Merge
authoramurillo
Fri, 08 Jul 2016 12:17:10 -0700
changeset 39737 4da8463b3d33
parent 39736 f939432eb32a (current diff)
parent 39559 0bd60e219fd0 (diff)
child 39738 15fea8b870eb
Merge
hotspot/test/compiler/c2/6857159/Test6857159.sh
hotspot/test/compiler/c2/6894807/Test6894807.sh
hotspot/test/compiler/c2/7070134/Test7070134.sh
hotspot/test/runtime/Unsafe/GetKlassPointerGetJavaMirror.java
jdk/make/mapfiles/libdcpr/mapfile-vers
jdk/make/mapfiles/libfontmanager/mapfile-vers.openjdk
jdk/make/mapfiles/libjdga/mapfile-vers
jdk/make/mapfiles/libjpeg/mapfile-vers-closed
jdk/make/mapfiles/libkcms/mapfile-vers
jdk/make/mapfiles/libt2k/mapfile-vers
jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/PluginOrderingGraph.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OptimizationPlugin.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmGlobalPool.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmModulePool.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPlugin.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPool.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPoolImpl.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPools.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ControlFlow.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ForNameFolding.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ReflectionOptimizer.java
jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/Utils.java
jdk/test/ProblemList.txt
jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.sh
jdk/test/sun/security/tools/keytool/printssl.sh
jdk/test/tools/jlink/JLinkOptimTest.java
jdk/test/tools/jlink/asmplugin/AddForgetResourcesTest.java
jdk/test/tools/jlink/asmplugin/AsmPluginTestBase.java
jdk/test/tools/jlink/asmplugin/BasicTest.java
jdk/test/tools/jlink/asmplugin/IdentityPluginTest.java
jdk/test/tools/jlink/asmplugin/NegativeTest.java
jdk/test/tools/jlink/asmplugin/PackageMappingTest.java
jdk/test/tools/jlink/asmplugin/SortingTest.java
jdk/test/tools/jlink/asmplugin/VisitorTest.java
jdk/test/tools/jlink/plugins/PluginOrderTest.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/DocEnv.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java
langtools/test/tools/javac/types/TypeHarness.java
--- a/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -367,3 +367,4 @@
 7693aa00e131493ceb42b93305e2f014c9922a3b jdk-9+122
 d53037a90c441cb528dc41c30827985de0e67c62 jdk-9+123
 2a5697a98620c4f40e4a1a71478464399b8878de jdk-9+124
+3aa52182b3ad7c5b3a61cf05a59dd07e4c5884e5 jdk-9+125
--- a/.hgtags-top-repo	Fri Jul 08 17:36:34 2016 +0300
+++ b/.hgtags-top-repo	Fri Jul 08 12:17:10 2016 -0700
@@ -367,3 +367,4 @@
 346be2df0f5b31d423807f53a719d1b9a67f3354 jdk-9+122
 405d811c0d7b9b48ff718ae6c240b732f098c028 jdk-9+123
 f80c841ae2545eaf9acd2724bccc305d98cefbe2 jdk-9+124
+9aa7d40f3a453f51e47f4c1b19eff5740a74a9f8 jdk-9+125
--- a/common/autoconf/boot-jdk.m4	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/boot-jdk.m4	Fri Jul 08 12:17:10 2016 -0700
@@ -359,25 +359,32 @@
 
   # Starting amount of heap memory.
   ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
+  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
 
-  # Maximum amount of heap memory.
-  # Maximum stack size.
-  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
+  # Maximum amount of heap memory and stack size.
+  JVM_HEAP_LIMIT_32="1024"
+  # Running a 64 bit JVM allows for and requires a bigger heap
+  JVM_HEAP_LIMIT_64="1600"
+  STACK_SIZE_32=768
+  STACK_SIZE_64=1536
+  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
+    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
+  fi
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
+    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
+  fi
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
+    JVM_HEAP_LIMIT_32=512
+    JVM_HEAP_LIMIT_64=512
+  fi
+
   if test "x$BOOT_JDK_BITS" = "x32"; then
-    if test "$JVM_MAX_HEAP" -gt "1100"; then
-      JVM_MAX_HEAP=1100
-    elif test "$JVM_MAX_HEAP" -lt "512"; then
-      JVM_MAX_HEAP=512
-    fi
-    STACK_SIZE=768
+    STACK_SIZE=$STACK_SIZE_32
+    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
   else
-    # Running a 64 bit JVM allows for and requires a bigger heap
-    if test "$JVM_MAX_HEAP" -gt "1600"; then
-      JVM_MAX_HEAP=1600
-    elif test "$JVM_MAX_HEAP" -lt "512"; then
-      JVM_MAX_HEAP=512
-    fi
-    STACK_SIZE=1536
+    STACK_SIZE=$STACK_SIZE_64
+    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
   fi
   ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
   ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
@@ -387,6 +394,19 @@
   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
   AC_SUBST(JAVA_FLAGS_BIG)
 
+  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
+    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
+    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
+  else
+    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
+    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
+  fi
+  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
+  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
+  AC_MSG_CHECKING([flags for bootcycle boot jdk java command for big workloads])
+  AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
+  AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
+
   # By default, the main javac compilations use big
   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
   AC_SUBST(JAVA_FLAGS_JAVAC)
--- a/common/autoconf/bootcycle-spec.gmk.in	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/bootcycle-spec.gmk.in	Fri Jul 08 12:17:10 2016 -0700
@@ -64,5 +64,7 @@
 # When building a 32bit target, make sure the sjavac server flags are compatible
 # with a 32bit JVM.
 ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
-  SJAVAC_SERVER_JAVA_FLAGS:= -Xms256M -Xmx1500M
+  SJAVAC_SERVER_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
 endif
+# The bootcycle JVM arguments may differ from the original boot jdk.
+JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
--- a/common/autoconf/build-performance.m4	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/build-performance.m4	Fri Jul 08 12:17:10 2016 -0700
@@ -367,6 +367,9 @@
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
     AC_MSG_RESULT([no, does not work with Solaris Studio])
     USE_PRECOMPILED_HEADER=0
+  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+    AC_MSG_RESULT([no, does not work with xlc])
+    USE_PRECOMPILED_HEADER=0
   else
     AC_MSG_RESULT([yes])
   fi
--- a/common/autoconf/flags.m4	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/flags.m4	Fri Jul 08 12:17:10 2016 -0700
@@ -593,9 +593,9 @@
       fi
       C_O_FLAG_NONE="-O0"
     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-      C_O_FLAG_HIGHEST_JVM="-O3"
-      C_O_FLAG_HIGHEST="-O3"
-      C_O_FLAG_HI="-O3 -qstrict"
+      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
+      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
+      C_O_FLAG_HI="-O3 -qinline -qinlglue"
       C_O_FLAG_NORM="-O2"
       C_O_FLAG_DEBUG="-qnoopt"
       # FIXME: Value below not verified.
@@ -911,8 +911,8 @@
   elif test "x$OPENJDK_$1_OS" = xaix; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DAIX"
     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
-    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
-        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced \
+        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
   elif test "x$OPENJDK_$1_OS" = xbsd; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
--- a/common/autoconf/generated-configure.sh	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/generated-configure.sh	Fri Jul 08 12:17:10 2016 -0700
@@ -644,6 +644,7 @@
 JAVA_TOOL_FLAGS_SMALL
 JAVA_FLAGS_SMALL
 JAVA_FLAGS_JAVAC
+BOOTCYCLE_JVM_ARGS_BIG
 JAVA_FLAGS_BIG
 JAVA_FLAGS
 TEST_JOBS
@@ -5094,7 +5095,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1467039751
+DATE_WHEN_GENERATED=1467223237
 
 ###############################################################################
 #
@@ -49625,9 +49626,9 @@
       fi
       C_O_FLAG_NONE="-O0"
     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-      C_O_FLAG_HIGHEST_JVM="-O3"
-      C_O_FLAG_HIGHEST="-O3"
-      C_O_FLAG_HI="-O3 -qstrict"
+      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
+      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
+      C_O_FLAG_HI="-O3 -qinline -qinlglue"
       C_O_FLAG_NORM="-O2"
       C_O_FLAG_DEBUG="-qnoopt"
       # FIXME: Value below not verified.
@@ -50634,8 +50635,8 @@
   elif test "x$OPENJDK_TARGET_OS" = xaix; then
     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
-    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
-        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
+    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
+        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
@@ -51439,8 +51440,8 @@
   elif test "x$OPENJDK_BUILD_OS" = xaix; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
-    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
-        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
+        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
@@ -53468,7 +53469,7 @@
 $as_echo "no, forced" >&6; }
     BUILD_GTEST="false"
   elif test "x$enable_hotspot_gtest" = "x"; then
-    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
       BUILD_GTEST="true"
@@ -64612,12 +64613,16 @@
 
 
 
-  if test "$OPENJDK_TARGET_OS" = "solaris"; then
+  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
     # Find the root of the Solaris Studio installation from the compiler path
     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
 $as_echo_n "checking for libstlport.so.1... " >&6; }
+    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
+      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
+      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
+    fi
     if test -f "$STLPORT_LIB"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
 $as_echo "yes, $STLPORT_LIB" >&6; }
@@ -65118,25 +65123,32 @@
     JVM_ARG_OK=false
   fi
 
-
-  # Maximum amount of heap memory.
-  # Maximum stack size.
-  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
+  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
+
+  # Maximum amount of heap memory and stack size.
+  JVM_HEAP_LIMIT_32="1024"
+  # Running a 64 bit JVM allows for and requires a bigger heap
+  JVM_HEAP_LIMIT_64="1600"
+  STACK_SIZE_32=768
+  STACK_SIZE_64=1536
+  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
+    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
+  fi
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
+    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
+  fi
+  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
+    JVM_HEAP_LIMIT_32=512
+    JVM_HEAP_LIMIT_64=512
+  fi
+
   if test "x$BOOT_JDK_BITS" = "x32"; then
-    if test "$JVM_MAX_HEAP" -gt "1100"; then
-      JVM_MAX_HEAP=1100
-    elif test "$JVM_MAX_HEAP" -lt "512"; then
-      JVM_MAX_HEAP=512
-    fi
-    STACK_SIZE=768
-  else
-    # Running a 64 bit JVM allows for and requires a bigger heap
-    if test "$JVM_MAX_HEAP" -gt "1600"; then
-      JVM_MAX_HEAP=1600
-    elif test "$JVM_MAX_HEAP" -lt "512"; then
-      JVM_MAX_HEAP=512
-    fi
-    STACK_SIZE=1536
+    STACK_SIZE=$STACK_SIZE_32
+    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
+  else
+    STACK_SIZE=$STACK_SIZE_64
+    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
   fi
 
   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
@@ -65175,6 +65187,21 @@
   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
 
 
+  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
+    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
+    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
+  else
+    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
+    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
+  fi
+  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
+  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
+$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
+$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
+
+
   # By default, the main javac compilations use big
   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
 
@@ -66132,6 +66159,10 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
 $as_echo "no, does not work with Solaris Studio" >&6; }
     USE_PRECOMPILED_HEADER=0
+  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
+$as_echo "no, does not work with xlc" >&6; }
+    USE_PRECOMPILED_HEADER=0
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
--- a/common/autoconf/hotspot.m4	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/hotspot.m4	Fri Jul 08 12:17:10 2016 -0700
@@ -333,7 +333,7 @@
     AC_MSG_RESULT([no, forced])
     BUILD_GTEST="false"
   elif test "x$enable_hotspot_gtest" = "x"; then
-    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
+    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
       AC_MSG_RESULT([yes])
       BUILD_GTEST="true"
     else
--- a/common/autoconf/libraries.m4	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/libraries.m4	Fri Jul 08 12:17:10 2016 -0700
@@ -197,11 +197,15 @@
 ################################################################################
 AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
 [
-  if test "$OPENJDK_TARGET_OS" = "solaris"; then
+  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
     # Find the root of the Solaris Studio installation from the compiler path
     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
     AC_MSG_CHECKING([for libstlport.so.1])
+    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
+      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
+      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
+    fi
     if test -f "$STLPORT_LIB"; then
       AC_MSG_RESULT([yes, $STLPORT_LIB])
       BASIC_FIXUP_PATH([STLPORT_LIB])
--- a/common/autoconf/spec.gmk.in	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/autoconf/spec.gmk.in	Fri Jul 08 12:17:10 2016 -0700
@@ -578,7 +578,7 @@
 JAVAC_FLAGS?=@JAVAC_FLAGS@
 
 
-BUILD_JAVA_FLAGS:=-Xms64M -Xmx1100M
+BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
 BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
 
 # Use ?= as this can be overridden from bootcycle-spec.gmk
--- a/common/bin/compare.sh	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/bin/compare.sh	Fri Jul 08 12:17:10 2016 -0700
@@ -102,10 +102,13 @@
     # Ignore date strings in class files.
     # Anonymous lambda classes get randomly assigned counters in their names.
     if test "x$SUFFIX" = "xclass"; then
-        if [ "$NAME" = "module-info.class" ] || [ "$NAME" = "SystemModules.class" ]
-        then
-            # The SystemModules.class and module-info.class have several issues
-            # with random ordering of elements in HashSets.
+        if [ "$NAME" = "SystemModules.class" ]; then
+            # The SystemModules.class is not comparable. The way it is generated is
+            # too random. It can even be of different size for no apparent reason.
+            TMP=""
+        elif [ "$NAME" = "module-info.class" ]; then
+            # The module-info.class have several issues with random ordering of
+            # elements in HashSets.
             MODULES_CLASS_FILTER="$SED \
                 -e 's/,$//' \
                 -e 's/;$//' \
@@ -369,6 +372,14 @@
                 $CAT $OTHER_DIR/$f | eval "$HTML_FILTER" > $OTHER_FILE &
                 $CAT $THIS_DIR/$f  | eval "$HTML_FILTER" > $THIS_FILE &
                 wait
+            elif [ "$f" = "./lib/classlist" ]; then
+                # The classlist files may have some lines in random order
+                OTHER_FILE=$WORK_DIR/$f.other
+                THIS_FILE=$WORK_DIR/$f.this
+                $MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
+                $RM $OTHER_FILE $THIS_FILE
+                $CAT $OTHER_DIR/$f | $SORT > $OTHER_FILE
+                $CAT $THIS_DIR/$f  | $SORT > $THIS_FILE
             else
                 OTHER_FILE=$OTHER_DIR/$f
                 THIS_FILE=$THIS_DIR/$f
@@ -651,7 +662,7 @@
             OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
         else
             # Some files, jli.dll, appears twice in the image but only one of
-            # thme has a diz file next to it.
+            # them has a diz file next to it.
             OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)"
             if [ ! -f "$OTHER_DIZ_FILE" ]; then
                 # As a last resort, look for diz file in the whole build output
@@ -1335,6 +1346,24 @@
         OTHER_JDK="$OTHER/images/jdk"
         OTHER_JRE="$OTHER/images/jre"
         echo "Selecting jdk images for compare"
+    elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk)" ] \
+        && [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk)" ]
+    then
+        echo "Selecting licensee images for compare"
+        # Simply override the THIS and OTHER dir with the build dir from
+        # the nested licensee source build for the rest of the script
+        # execution.
+        OLD_THIS="$THIS"
+        OLD_OTHER="$OTHER"
+        THIS="$(ls -d $THIS/licensee-src/build/*)"
+        OTHER="$(ls -d $OTHER/licensee-src/build/*)"
+        THIS_JDK="$THIS/images/jdk"
+        THIS_JRE="$THIS/images/jre"
+        OTHER_JDK="$OTHER/images/jdk"
+        OTHER_JRE="$OTHER/images/jre"
+        # Rewrite the path to tools that are used from the build
+        JIMAGE="$(echo "$JIMAGE" | $SED "s|$OLD_THIS|$THIS|g")"
+        JAVAP="$(echo "$JAVAP" | $SED "s|$OLD_THIS|$THIS|g")"
     else
         echo "No common images found."
         exit 1
--- a/common/conf/jib-profiles.js	Fri Jul 08 17:36:34 2016 +0300
+++ b/common/conf/jib-profiles.js	Fri Jul 08 12:17:10 2016 -0700
@@ -254,7 +254,7 @@
             build_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit"),
             configure_args: concat(common.configure_args, common.configure_args_32bit,
-                "--with-jvm-variants=minimal,client,server", "--with-zlib=system"),
+                "--with-jvm-variants=minimal,server", "--with-zlib=system"),
             default_make_targets: common.default_make_targets
         },
 
@@ -295,8 +295,7 @@
             target_cpu: "x86",
             build_cpu: "x64",
             dependencies: concat(common.dependencies, "devkit", "freetype"),
-            configure_args: concat(common.configure_args,
-                "--with-jvm-variants=client,server", common.configure_args_32bit),
+            configure_args: concat(common.configure_args, common.configure_args_32bit),
             default_make_targets: common.default_make_targets
         }
     };
--- a/corba/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/corba/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -367,3 +367,4 @@
 a39131aafc51a6fd8836e6ebe1b04458702ce7d6 jdk-9+122
 e33a34cc551907617d8129c4faaf1a5a7e61d21c jdk-9+123
 45121d5afb9d5bfadab75378572ad96832e0809e jdk-9+124
+1d48e67d1b91eb9f72e49e69a4021edb85e357fc jdk-9+125
--- a/hotspot/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -527,3 +527,4 @@
 af6b4ad908e732d23021f12e8322b204433d5cf6 jdk-9+122
 75f81e1fecfb444f34f357295fe06af60e2762d9 jdk-9+123
 479631362b4930be985245ea063d87d821a472eb jdk-9+124
+bb640b49741af3f57f9994129934c46fc173219f jdk-9+125
--- a/hotspot/make/lib/JvmOverrideFiles.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/make/lib/JvmOverrideFiles.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -153,6 +153,13 @@
   # mode, so don't optimize sharedRuntimeTrig.cpp at all.
   BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
 
+  ifneq ($(DEBUG_LEVEL),slowdebug)
+    # Compiling jvmtiEnterTrace.cpp with full optimization needs more than 30min
+    # (mostly because of '-qhot=level=1' and the more than 1300 'log_trace' calls
+    # which cause a lot of template expansion).
+    BUILD_LIBJVM_jvmtiEnterTrace.cpp_OPTIMIZATION := LOW
+  endif
+
   # Disable ELF decoder on AIX (AIX uses XCOFF).
   JVM_EXCLUDE_PATTERNS += elf
 
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad	Fri Jul 08 12:17:10 2016 -0700
@@ -12179,21 +12179,21 @@
   %}
 %}
 
-instruct rolI_rReg_Var_C_32(iRegLNoSp dst, iRegL src, iRegI shift, immI_32 c_32, rFlagsReg cr)
+instruct rolI_rReg_Var_C_32(iRegINoSp dst, iRegI src, iRegI shift, immI_32 c_32, rFlagsReg cr)
 %{
   match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c_32 shift))));
 
   expand %{
-    rolL_rReg(dst, src, shift, cr);
-  %}
-%}
-
-instruct rolI_rReg_Var_C0(iRegLNoSp dst, iRegL src, iRegI shift, immI0 c0, rFlagsReg cr)
+    rolI_rReg(dst, src, shift, cr);
+  %}
+%}
+
+instruct rolI_rReg_Var_C0(iRegINoSp dst, iRegI src, iRegI shift, immI0 c0, rFlagsReg cr)
 %{
   match(Set dst (OrI (LShiftI src shift) (URShiftI src (SubI c0 shift))));
 
   expand %{
-    rolL_rReg(dst, src, shift, cr);
+    rolI_rReg(dst, src, shift, cr);
   %}
 %}
 
--- a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -944,8 +944,7 @@
         Register t = r5;
         __ load_klass(t, r0);
         __ ldrw(t, Address(t, Klass::access_flags_offset()));
-        __ tst(t, JVM_ACC_HAS_FINALIZER);
-        __ br(Assembler::NE, register_finalizer);
+        __ tbnz(t, exact_log2(JVM_ACC_HAS_FINALIZER), register_finalizer);
         __ ret(lr);
 
         __ bind(register_finalizer);
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -93,10 +93,8 @@
     // This method is only called just after the call into the vm in
     // call_VM_base, so the arg registers are available.
     ldrw(rscratch1, Address(rthread, JavaThread::popframe_condition_offset()));
-    tstw(rscratch1, JavaThread::popframe_pending_bit);
-    br(Assembler::EQ, L);
-    tstw(rscratch1, JavaThread::popframe_processing_bit);
-    br(Assembler::NE, L);
+    tbz(rscratch1, exact_log2(JavaThread::popframe_pending_bit), L);
+    tbnz(rscratch1, exact_log2(JavaThread::popframe_processing_bit), L);
     // Call Interpreter::remove_activation_preserving_args_entry() to get the
     // address of the same-named entrypoint in the generated interpreter code.
     call_VM_leaf(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));
@@ -505,8 +503,7 @@
  // get method access flags
   ldr(r1, Address(rfp, frame::interpreter_frame_method_offset * wordSize));
   ldr(r2, Address(r1, Method::access_flags_offset()));
-  tst(r2, JVM_ACC_SYNCHRONIZED);
-  br(Assembler::EQ, unlocked);
+  tbz(r2, exact_log2(JVM_ACC_SYNCHRONIZED), unlocked);
 
   // Don't unlock anything if the _do_not_unlock_if_synchronized flag
   // is set.
@@ -1582,8 +1579,8 @@
                            // do. The unknown bit may have been
                            // set already but no need to check.
 
-  tst(obj, TypeEntries::type_unknown);
-  br(Assembler::NE, next); // already unknown. Nothing to do anymore.
+  tbnz(obj, exact_log2(TypeEntries::type_unknown), next);
+  // already unknown. Nothing to do anymore.
 
   ldr(rscratch1, mdo_addr);
   cbz(rscratch1, none);
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -710,7 +710,7 @@
           __ BIND(L_loop);
           __ strb(zr, Address(start, count));
           __ subs(count, count, 1);
-          __ br(Assembler::HS, L_loop);
+          __ br(Assembler::GE, L_loop);
         }
         break;
       default:
@@ -1299,7 +1299,7 @@
       if (VerifyOops)
         verify_oop_array(size, d, count, r16);
       __ sub(count, count, 1); // make an inclusive end pointer
-      __ lea(count, Address(d, count, Address::uxtw(exact_log2(size))));
+      __ lea(count, Address(d, count, Address::lsl(exact_log2(size))));
       gen_write_ref_array_post_barrier(d, count, rscratch1);
     }
     __ leave();
@@ -2002,9 +2002,9 @@
     arraycopy_range_checks(src, src_pos, dst, dst_pos, scratch_length,
                            rscratch2, L_failed);
 
-    __ lea(from, Address(src, src_pos, Address::lsl(3)));
+    __ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop)));
     __ add(from, from, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
-    __ lea(to, Address(dst, dst_pos, Address::lsl(3)));
+    __ lea(to, Address(dst, dst_pos, Address::lsl(LogBytesPerHeapOop)));
     __ add(to, to, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
     __ movw(count, scratch_length); // length
   __ BIND(L_plain_copy);
@@ -2027,9 +2027,9 @@
       __ load_klass(rscratch2_dst_klass, dst); // reload
 
       // Marshal the base address arguments now, freeing registers.
-      __ lea(from, Address(src, src_pos, Address::lsl(3)));
+      __ lea(from, Address(src, src_pos, Address::lsl(LogBytesPerHeapOop)));
       __ add(from, from, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
-      __ lea(to, Address(dst, dst_pos, Address::lsl(3)));
+      __ lea(to, Address(dst, dst_pos, Address::lsl(LogBytesPerHeapOop)));
       __ add(to, to, arrayOopDesc::base_offset_in_bytes(T_OBJECT));
       __ movw(count, length);           // length (reloaded)
       Register sco_temp = c_rarg3;      // this register is free now
--- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1242,8 +1242,7 @@
   {
     Label L;
     __ ldrw(t, Address(rmethod, Method::access_flags_offset()));
-    __ tst(t, JVM_ACC_STATIC);
-    __ br(Assembler::EQ, L);
+    __ tbz(t, exact_log2(JVM_ACC_STATIC), L);
     // get mirror
     __ load_mirror(t, rmethod);
     // copy mirror into activation frame
@@ -1435,8 +1434,7 @@
   {
     Label L;
     __ ldrw(t, Address(rmethod, Method::access_flags_offset()));
-    __ tst(t, JVM_ACC_SYNCHRONIZED);
-    __ br(Assembler::EQ, L);
+    __ tbz(t, exact_log2(JVM_ACC_SYNCHRONIZED), L);
     // the code below should be shared with interpreter macro
     // assembler implementation
     {
--- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -2190,9 +2190,8 @@
     __ ldr(c_rarg1, aaddress(0));
     __ load_klass(r3, c_rarg1);
     __ ldrw(r3, Address(r3, Klass::access_flags_offset()));
-    __ tst(r3, JVM_ACC_HAS_FINALIZER);
     Label skip_register_finalizer;
-    __ br(Assembler::EQ, skip_register_finalizer);
+    __ tbz(r3, exact_log2(JVM_ACC_HAS_FINALIZER), skip_register_finalizer);
 
     __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::register_finalizer), c_rarg1);
 
--- a/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -503,6 +503,10 @@
     LVSL_OPCODE    = (31u << OPCODE_SHIFT |    6u << 1),
     LVSR_OPCODE    = (31u << OPCODE_SHIFT |   38u << 1),
 
+    // Vector-Scalar (VSX) instruction support.
+    LXVD2X_OPCODE  = (31u << OPCODE_SHIFT |  844u << 1),
+    STXVD2X_OPCODE = (31u << OPCODE_SHIFT |  972u << 1),
+
     // Vector Permute and Formatting
     VPKPX_OPCODE   = (4u  << OPCODE_SHIFT |  782u     ),
     VPKSHSS_OPCODE = (4u  << OPCODE_SHIFT |  398u     ),
@@ -1085,6 +1089,19 @@
   static int vrs(   VectorRegister r)  { return  vrs(r->encoding());}
   static int vrt(   VectorRegister r)  { return  vrt(r->encoding());}
 
+  // Support Vector-Scalar (VSX) instructions.
+  static int vsra(      int         x)  { return  opp_u_field(x,            15, 11); }
+  static int vsrb(      int         x)  { return  opp_u_field(x,            20, 16); }
+  static int vsrc(      int         x)  { return  opp_u_field(x,            25, 21); }
+  static int vsrs(      int         x)  { return  opp_u_field(x,            10,  6); }
+  static int vsrt(      int         x)  { return  opp_u_field(x,            10,  6); }
+
+  static int vsra(   VectorSRegister r)  { return  vsra(r->encoding());}
+  static int vsrb(   VectorSRegister r)  { return  vsrb(r->encoding());}
+  static int vsrc(   VectorSRegister r)  { return  vsrc(r->encoding());}
+  static int vsrs(   VectorSRegister r)  { return  vsrs(r->encoding());}
+  static int vsrt(   VectorSRegister r)  { return  vsrt(r->encoding());}
+
   static int vsplt_uim( int        x)  { return  opp_u_field(x,             15, 12); } // for vsplt* instructions
   static int vsplti_sim(int        x)  { return  opp_u_field(x,             15, 11); } // for vsplti* instructions
   static int vsldoi_shb(int        x)  { return  opp_u_field(x,             25, 22); } // for vsldoi instruction
@@ -2069,6 +2086,10 @@
   inline void mtvscr(   VectorRegister b);
   inline void mfvscr(   VectorRegister d);
 
+  // Vector-Scalar (VSX) instructions.
+  inline void lxvd2x(   VectorSRegister d, Register a, Register b);
+  inline void stxvd2x(  VectorSRegister d, Register a, Register b);
+
   // AES (introduced with Power 8)
   inline void vcipher(     VectorRegister d, VectorRegister a, VectorRegister b);
   inline void vcipherlast( VectorRegister d, VectorRegister a, VectorRegister b);
--- a/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -724,6 +724,10 @@
 inline void Assembler::lvsl(  VectorRegister d, Register s1, Register s2) { emit_int32( LVSL_OPCODE   | vrt(d) | ra0mem(s1) | rb(s2)); }
 inline void Assembler::lvsr(  VectorRegister d, Register s1, Register s2) { emit_int32( LVSR_OPCODE   | vrt(d) | ra0mem(s1) | rb(s2)); }
 
+// Vector-Scalar (VSX) instructions.
+inline void Assembler::lxvd2x (VectorSRegister d, Register s1, Register s2) { emit_int32( LXVD2X_OPCODE  | vsrt(d) | ra(s1) | rb(s2)); }
+inline void Assembler::stxvd2x(VectorSRegister d, Register s1, Register s2) { emit_int32( STXVD2X_OPCODE | vsrt(d) | ra(s1) | rb(s2)); }
+
 inline void Assembler::vpkpx(   VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKPX_OPCODE   | vrt(d) | vra(a) | vrb(b)); }
 inline void Assembler::vpkshss( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSHSS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
 inline void Assembler::vpkswss( VectorRegister d, VectorRegister a, VectorRegister b) { emit_int32( VPKSWSS_OPCODE | vrt(d) | vra(a) | vrb(b)); }
--- a/hotspot/src/cpu/ppc/vm/register_ppc.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/register_ppc.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -75,3 +75,14 @@
   };
   return is_valid() ? names[encoding()] : "vnoreg";
 }
+
+const char* VectorSRegisterImpl::name() const {
+  const char* names[number_of_registers] = {
+    "VSR0",  "VSR1",  "VSR2",  "VSR3",  "VSR4",  "VSR5",  "VSR6",  "VSR7",
+    "VSR8",  "VSR9",  "VSR10", "VSR11", "VSR12", "VSR13", "VSR14", "VSR15",
+    "VSR16", "VSR17", "VSR18", "VSR19", "VSR20", "VSR21", "VSR22", "VSR23",
+    "VSR24", "VSR25", "VSR26", "VSR27", "VSR28", "VSR29", "VSR30", "VSR31"
+  };
+  return is_valid() ? names[encoding()] : "vsnoreg";
+}
+
--- a/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/register_ppc.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -491,6 +491,106 @@
 #endif // DONT_USE_REGISTER_DEFINES
 
 
+// Use VectorSRegister as a shortcut.
+class VectorSRegisterImpl;
+typedef VectorSRegisterImpl* VectorSRegister;
+
+inline VectorSRegister as_VectorSRegister(int encoding) {
+  return (VectorSRegister)(intptr_t)encoding;
+}
+
+// The implementation of Vector-Scalar (VSX) registers on POWER architecture.
+class VectorSRegisterImpl: public AbstractRegisterImpl {
+ public:
+  enum {
+    number_of_registers = 32
+  };
+
+  // construction
+  inline friend VectorSRegister as_VectorSRegister(int encoding);
+
+  // accessors
+  int encoding() const { assert(is_valid(), "invalid register"); return value(); }
+
+  // testers
+  bool is_valid() const { return 0 <=  value() &&  value() < number_of_registers; }
+
+  const char* name() const;
+};
+
+// The Vector-Scalar (VSX) registers of the POWER architecture.
+
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, vsnoreg, (-1));
+
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR0,  ( 0));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR1,  ( 1));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR2,  ( 2));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR3,  ( 3));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR4,  ( 4));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR5,  ( 5));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR6,  ( 6));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR7,  ( 7));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR8,  ( 8));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR9,  ( 9));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR10, (10));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR11, (11));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR12, (12));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR13, (13));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR14, (14));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR15, (15));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR16, (16));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR17, (17));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR18, (18));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR19, (19));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR20, (20));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR21, (21));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR22, (22));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR23, (23));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR24, (24));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR25, (25));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR26, (26));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR27, (27));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR28, (28));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR29, (29));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR30, (30));
+CONSTANT_REGISTER_DECLARATION(VectorSRegister, VSR31, (31));
+
+#ifndef DONT_USE_REGISTER_DEFINES
+#define vsnoregi ((VectorSRegister)(vsnoreg_VectorSRegisterEnumValue))
+#define VSR0    ((VectorSRegister)(   VSR0_VectorSRegisterEnumValue))
+#define VSR1    ((VectorSRegister)(   VSR1_VectorSRegisterEnumValue))
+#define VSR2    ((VectorSRegister)(   VSR2_VectorSRegisterEnumValue))
+#define VSR3    ((VectorSRegister)(   VSR3_VectorSRegisterEnumValue))
+#define VSR4    ((VectorSRegister)(   VSR4_VectorSRegisterEnumValue))
+#define VSR5    ((VectorSRegister)(   VSR5_VectorSRegisterEnumValue))
+#define VSR6    ((VectorSRegister)(   VSR6_VectorSRegisterEnumValue))
+#define VSR7    ((VectorSRegister)(   VSR7_VectorSRegisterEnumValue))
+#define VSR8    ((VectorSRegister)(   VSR8_VectorSRegisterEnumValue))
+#define VSR9    ((VectorSRegister)(   VSR9_VectorSRegisterEnumValue))
+#define VSR10   ((VectorSRegister)(  VSR10_VectorSRegisterEnumValue))
+#define VSR11   ((VectorSRegister)(  VSR11_VectorSRegisterEnumValue))
+#define VSR12   ((VectorSRegister)(  VSR12_VectorSRegisterEnumValue))
+#define VSR13   ((VectorSRegister)(  VSR13_VectorSRegisterEnumValue))
+#define VSR14   ((VectorSRegister)(  VSR14_VectorSRegisterEnumValue))
+#define VSR15   ((VectorSRegister)(  VSR15_VectorSRegisterEnumValue))
+#define VSR16   ((VectorSRegister)(  VSR16_VectorSRegisterEnumValue))
+#define VSR17   ((VectorSRegister)(  VSR17_VectorSRegisterEnumValue))
+#define VSR18   ((VectorSRegister)(  VSR18_VectorSRegisterEnumValue))
+#define VSR19   ((VectorSRegister)(  VSR19_VectorSRegisterEnumValue))
+#define VSR20   ((VectorSRegister)(  VSR20_VectorSRegisterEnumValue))
+#define VSR21   ((VectorSRegister)(  VSR21_VectorSRegisterEnumValue))
+#define VSR22   ((VectorSRegister)(  VSR22_VectorSRegisterEnumValue))
+#define VSR23   ((VectorSRegister)(  VSR23_VectorSRegisterEnumValue))
+#define VSR24   ((VectorSRegister)(  VSR24_VectorSRegisterEnumValue))
+#define VSR25   ((VectorSRegister)(  VSR25_VectorSRegisterEnumValue))
+#define VSR26   ((VectorSRegister)(  VSR26_VectorSRegisterEnumValue))
+#define VSR27   ((VectorSRegister)(  VSR27_VectorSRegisterEnumValue))
+#define VSR28   ((VectorSRegister)(  VSR28_VectorSRegisterEnumValue))
+#define VSR29   ((VectorSRegister)(  VSR29_VectorSRegisterEnumValue))
+#define VSR30   ((VectorSRegister)(  VSR30_VectorSRegisterEnumValue))
+#define VSR31   ((VectorSRegister)(  VSR31_VectorSRegisterEnumValue))
+#endif // DONT_USE_REGISTER_DEFINES
+
 // Maximum number of incoming arguments that can be passed in i registers.
 const int PPC_ARGS_IN_REGS_NUM = 8;
 
--- a/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1341,10 +1341,13 @@
     Register tmp3 = R8_ARG6;
     Register tmp4 = R9_ARG7;
 
+    VectorSRegister tmp_vsr1  = VSR1;
+    VectorSRegister tmp_vsr2  = VSR2;
+
     address start = __ function_entry();
     assert_positive_int(R5_ARG3);
 
-      Label l_1, l_2, l_3, l_4, l_5, l_6, l_7, l_8;
+    Label l_1, l_2, l_3, l_4, l_5, l_6, l_7, l_8, l_9;
 
     // don't try anything fancy if arrays don't have many elements
     __ li(tmp3, 0);
@@ -1403,22 +1406,60 @@
       __ andi_(R5_ARG3, R5_ARG3, 15);
       __ mtctr(tmp1);
 
-      __ bind(l_8);
-      // Use unrolled version for mass copying (copy 16 elements a time).
-      // Load feeding store gets zero latency on Power6, however not on Power5.
-      // Therefore, the following sequence is made for the good of both.
-      __ ld(tmp1, 0, R3_ARG1);
-      __ ld(tmp2, 8, R3_ARG1);
-      __ ld(tmp3, 16, R3_ARG1);
-      __ ld(tmp4, 24, R3_ARG1);
-      __ std(tmp1, 0, R4_ARG2);
-      __ std(tmp2, 8, R4_ARG2);
-      __ std(tmp3, 16, R4_ARG2);
-      __ std(tmp4, 24, R4_ARG2);
-      __ addi(R3_ARG1, R3_ARG1, 32);
-      __ addi(R4_ARG2, R4_ARG2, 32);
-      __ bdnz(l_8);
-    }
+      if (!VM_Version::has_vsx()) {
+
+        __ bind(l_8);
+        // Use unrolled version for mass copying (copy 16 elements a time).
+        // Load feeding store gets zero latency on Power6, however not on Power5.
+        // Therefore, the following sequence is made for the good of both.
+        __ ld(tmp1, 0, R3_ARG1);
+        __ ld(tmp2, 8, R3_ARG1);
+        __ ld(tmp3, 16, R3_ARG1);
+        __ ld(tmp4, 24, R3_ARG1);
+        __ std(tmp1, 0, R4_ARG2);
+        __ std(tmp2, 8, R4_ARG2);
+        __ std(tmp3, 16, R4_ARG2);
+        __ std(tmp4, 24, R4_ARG2);
+        __ addi(R3_ARG1, R3_ARG1, 32);
+        __ addi(R4_ARG2, R4_ARG2, 32);
+        __ bdnz(l_8);
+
+      } else { // Processor supports VSX, so use it to mass copy.
+
+        // Prefetch src data into L2 cache.
+        __ dcbt(R3_ARG1, 0);
+
+        // If supported set DSCR pre-fetch to deepest.
+        if (VM_Version::has_mfdscr()) {
+          __ load_const_optimized(tmp2, VM_Version::_dscr_val | 7);
+          __ mtdscr(tmp2);
+        }
+        __ li(tmp1, 16);
+
+        // Backbranch target aligned to 32-byte. It's not aligned 16-byte
+        // as loop contains < 8 instructions that fit inside a single
+        // i-cache sector.
+        __ align(32);
+
+        __ bind(l_9);
+        // Use loop with VSX load/store instructions to
+        // copy 16 elements a time.
+        __ lxvd2x(tmp_vsr1, 0, R3_ARG1);     // Load from src.
+        __ stxvd2x(tmp_vsr1, 0, R4_ARG2);    // Store to dst.
+        __ lxvd2x(tmp_vsr2, R3_ARG1, tmp1);  // Load from src + 16.
+        __ stxvd2x(tmp_vsr2, R4_ARG2, tmp1); // Store to dst + 16.
+        __ addi(R3_ARG1, R3_ARG1, 32);       // Update src+=32.
+        __ addi(R4_ARG2, R4_ARG2, 32);       // Update dsc+=32.
+        __ bdnz(l_9);                        // Dec CTR and loop if not zero.
+
+        // Restore DSCR pre-fetch value.
+        if (VM_Version::has_mfdscr()) {
+          __ load_const_optimized(tmp2, VM_Version::_dscr_val);
+          __ mtdscr(tmp2);
+        }
+
+      }
+    } // FasterArrayCopy
     __ bind(l_6);
 
     // copy 2 elements at a time
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -38,7 +38,7 @@
 # include <sys/sysinfo.h>
 
 bool VM_Version::_is_determine_features_test_running = false;
-
+uint64_t VM_Version::_dscr_val = 0;
 
 #define MSG(flag)   \
   if (flag && !FLAG_IS_DEFAULT(flag))                                  \
@@ -111,7 +111,7 @@
   // Create and print feature-string.
   char buf[(num_features+1) * 16]; // Max 16 chars per feature.
   jio_snprintf(buf, sizeof(buf),
-               "ppc64%s%s%s%s%s%s%s%s%s%s%s%s%s",
+               "ppc64%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
                (has_fsqrt()   ? " fsqrt"   : ""),
                (has_isel()    ? " isel"    : ""),
                (has_lxarxeh() ? " lxarxeh" : ""),
@@ -125,7 +125,8 @@
                (has_vcipher() ? " aes"     : ""),
                (has_vpmsumb() ? " vpmsumb" : ""),
                (has_tcheck()  ? " tcheck"  : ""),
-               (has_mfdscr()  ? " mfdscr"  : "")
+               (has_mfdscr()  ? " mfdscr"  : ""),
+               (has_vsx()     ? " vsx"     : "")
                // Make sure number of %s matches num_features!
               );
   _features_string = os::strdup(buf);
@@ -643,6 +644,7 @@
   a->vpmsumb(VR0, VR1, VR2);                   // code[11] -> vpmsumb
   a->tcheck(0);                                // code[12] -> tcheck
   a->mfdscr(R0);                               // code[13] -> mfdscr
+  a->lxvd2x(VSR0, 0, R3_ARG1);                 // code[14] -> vsx
   a->blr();
 
   // Emit function to set one cache line to zero. Emit function descriptor and get pointer to it.
@@ -691,6 +693,7 @@
   if (code[feature_cntr++]) features |= vpmsumb_m;
   if (code[feature_cntr++]) features |= tcheck_m;
   if (code[feature_cntr++]) features |= mfdscr_m;
+  if (code[feature_cntr++]) features |= vsx_m;
 
   // Print the detection code.
   if (PrintAssembly) {
@@ -733,31 +736,31 @@
   }
 
   // Apply the configuration if needed.
-  uint64_t dscr_val = (*get_dscr)();
+  _dscr_val = (*get_dscr)();
   if (Verbose) {
-    tty->print_cr("dscr value was 0x%lx" , dscr_val);
+    tty->print_cr("dscr value was 0x%lx" , _dscr_val);
   }
   bool change_requested = false;
   if (DSCR_PPC64 != (uintx)-1) {
-    dscr_val = DSCR_PPC64;
+    _dscr_val = DSCR_PPC64;
     change_requested = true;
   }
   if (DSCR_DPFD_PPC64 <= 7) {
     uint64_t mask = 0x7;
-    if ((dscr_val & mask) != DSCR_DPFD_PPC64) {
-      dscr_val = (dscr_val & ~mask) | (DSCR_DPFD_PPC64);
+    if ((_dscr_val & mask) != DSCR_DPFD_PPC64) {
+      _dscr_val = (_dscr_val & ~mask) | (DSCR_DPFD_PPC64);
       change_requested = true;
     }
   }
   if (DSCR_URG_PPC64 <= 7) {
     uint64_t mask = 0x7 << 6;
-    if ((dscr_val & mask) != DSCR_DPFD_PPC64 << 6) {
-      dscr_val = (dscr_val & ~mask) | (DSCR_URG_PPC64 << 6);
+    if ((_dscr_val & mask) != DSCR_DPFD_PPC64 << 6) {
+      _dscr_val = (_dscr_val & ~mask) | (DSCR_URG_PPC64 << 6);
       change_requested = true;
     }
   }
   if (change_requested) {
-    (*set_dscr)(dscr_val);
+    (*set_dscr)(_dscr_val);
     if (Verbose) {
       tty->print_cr("dscr was set to 0x%lx" , (*get_dscr)());
     }
--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -46,6 +46,7 @@
     vpmsumb,
     tcheck,
     mfdscr,
+    vsx,
     num_features // last entry to count features
   };
   enum Feature_Flag_Set {
@@ -64,6 +65,7 @@
     vpmsumb_m             = (1 << vpmsumb),
     tcheck_m              = (1 << tcheck ),
     mfdscr_m              = (1 << mfdscr ),
+    vsx_m                 = (1 << vsx    ),
     all_features_m        = (unsigned long)-1
   };
 
@@ -97,10 +99,14 @@
   static bool has_vpmsumb() { return (_features & vpmsumb_m) != 0; }
   static bool has_tcheck()  { return (_features & tcheck_m) != 0; }
   static bool has_mfdscr()  { return (_features & mfdscr_m) != 0; }
+  static bool has_vsx()     { return (_features & vsx_m) != 0; }
 
   // Assembler testing
   static void allow_all();
   static void revert();
+
+  // POWER 8: DSCR current value.
+  static uint64_t _dscr_val;
 };
 
 #endif // CPU_PPC_VM_VM_VERSION_PPC_HPP
--- a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -68,7 +68,6 @@
       if (b->number_of_preds() > 1) {
         int id = b->first_lir_instruction_id();
         ResourceBitMap regs(FrameMap::nof_fpu_regs);
-        regs.clear();
 
         iw.walk_to(id);   // walk after the first instruction (always a label) of the block
         assert(iw.current_position() == id, "did not walk completely to id");
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -7046,7 +7046,6 @@
                                       int ae) {
   ShortBranchVerifier sbv(this);
   assert(UseSSE42Intrinsics, "SSE4.2 intrinsics are required");
-  assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
   assert(ae != StrIntrinsicNode::LU, "Invalid encoding");
 
   // This method uses the pcmpestri instruction with bound registers
@@ -7225,7 +7224,6 @@
                                     int ae) {
   ShortBranchVerifier sbv(this);
   assert(UseSSE42Intrinsics, "SSE4.2 intrinsics are required");
-  assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
   assert(ae != StrIntrinsicNode::LU, "Invalid encoding");
 
   //
@@ -7543,7 +7541,6 @@
                                          XMMRegister vec1, XMMRegister vec2, XMMRegister vec3, Register tmp) {
   ShortBranchVerifier sbv(this);
   assert(UseSSE42Intrinsics, "SSE4.2 intrinsics are required");
-  assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
 
   int stride = 8;
 
@@ -7723,7 +7720,6 @@
   }
 
   if (UseAVX >= 2 && UseSSE42Intrinsics) {
-    assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     Label COMPARE_WIDE_VECTORS, VECTOR_NOT_EQUAL, COMPARE_WIDE_TAIL, COMPARE_SMALL_STR;
     Label COMPARE_WIDE_VECTORS_LOOP, COMPARE_16_CHARS, COMPARE_INDEX_CHAR;
     Label COMPARE_WIDE_VECTORS_LOOP_AVX2;
@@ -7891,7 +7887,6 @@
 
     bind(COMPARE_SMALL_STR);
   } else if (UseSSE42Intrinsics) {
-    assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     Label COMPARE_WIDE_VECTORS, VECTOR_NOT_EQUAL, COMPARE_TAIL;
     int pcmpmask = 0x19;
     // Setup to compare 8-char (16-byte) vectors,
@@ -8179,7 +8174,6 @@
       // Fallthru to tail compare
     }
     else if (UseSSE42Intrinsics) {
-      assert(UseSSE >= 4, "SSE4 must be  for SSE4.2 intrinsics to be available");
       // With SSE4.2, use double quad vector compare
       Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
 
@@ -8383,7 +8377,6 @@
     movl(limit, result);
     // Fallthru to tail compare
   } else if (UseSSE42Intrinsics) {
-    assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     // With SSE4.2, use double quad vector compare
     Label COMPARE_WIDE_VECTORS, COMPARE_TAIL;
 
@@ -8747,7 +8740,6 @@
   negptr(len);
 
   if (UseSSE42Intrinsics || UseAVX >= 2) {
-    assert(UseSSE42Intrinsics ? UseSSE >= 4 : true, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     Label L_chars_8_check, L_copy_8_chars, L_copy_8_chars_exit;
     Label L_chars_16_check, L_copy_16_chars, L_copy_16_chars_exit;
 
@@ -10159,7 +10151,13 @@
   movdqa(xmm1, Address(buf, 0));
   movdl(rax, xmm1);
   xorl(crc, rax);
-  pinsrd(xmm1, crc, 0);
+  if (VM_Version::supports_sse4_1()) {
+    pinsrd(xmm1, crc, 0);
+  } else {
+    pinsrw(xmm1, crc, 0);
+    shrl(crc, 16);
+    pinsrw(xmm1, crc, 1);
+  }
   addptr(buf, 16);
   subl(len, 4); // len > 0
   jcc(Assembler::less, L_fold_tail);
@@ -10881,7 +10879,6 @@
     clear_vector_masking();   // closing of the stub context for programming mask registers
   }
   if (UseSSE42Intrinsics) {
-    assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     Label copy_32_loop, copy_16, copy_tail;
 
     bind(below_threshold);
@@ -11045,7 +11042,6 @@
     clear_vector_masking();   // closing of the stub context for programming mask registers
   }
   if (UseSSE42Intrinsics) {
-    assert(UseSSE >= 4, "SSE4 must be enabled for SSE4.2 intrinsics to be available");
     Label copy_16_loop, copy_8_loop, copy_bytes, copy_new_tail, copy_tail;
 
     movl(tmp2, len);
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -658,7 +658,7 @@
           FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
         }
       } else {
-        if(supports_sse4_1() && UseSSE >= 4) {
+        if(supports_sse4_1()) {
           if (FLAG_IS_DEFAULT(UseAESCTRIntrinsics)) {
             FLAG_SET_DEFAULT(UseAESCTRIntrinsics, true);
           }
@@ -970,7 +970,7 @@
         UseXmmI2D = false;
       }
     }
-    if (supports_sse4_2() && UseSSE >= 4) {
+    if (supports_sse4_2()) {
       if (FLAG_IS_DEFAULT(UseSSE42Intrinsics)) {
         FLAG_SET_DEFAULT(UseSSE42Intrinsics, true);
       }
@@ -1050,7 +1050,7 @@
           UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus
         }
       }
-      if (supports_sse4_2() && UseSSE >= 4) {
+      if (supports_sse4_2()) {
         if (FLAG_IS_DEFAULT(UseSSE42Intrinsics)) {
           FLAG_SET_DEFAULT(UseSSE42Intrinsics, true);
         }
--- a/hotspot/src/cpu/x86/vm/x86.ad	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/cpu/x86/vm/x86.ad	Fri Jul 08 12:17:10 2016 -0700
@@ -1718,7 +1718,7 @@
         ret_value = false;
       break;
     case Op_StrIndexOfChar:
-      if (!(UseSSE > 4))
+      if (!UseSSE42Intrinsics)
         ret_value = false;
       break;
     case Op_OnSpinWait:
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/Universe.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,6 +96,8 @@
     narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
     narrowKlassBaseField = type.getAddressField("_narrow_klass._base");
     narrowKlassShiftField = type.getCIntegerField("_narrow_klass._shift");
+
+    UniverseExt.initialize(heapConstructor);
   }
 
   public Universe() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/memory/UniverseExt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.memory;
+
+import sun.jvm.hotspot.runtime.*;
+
+public class UniverseExt {
+    public static void initialize(VirtualConstructor heapConstructor) { }
+}
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java	Fri Jul 08 12:17:10 2016 -0700
@@ -31,10 +31,13 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.ServiceLoader;
 import java.util.TreeMap;
 
 import jdk.internal.misc.VM;
@@ -213,7 +216,22 @@
 
     private final Map<Class<? extends Architecture>, JVMCIBackend> backends = new HashMap<>();
 
-    private final Iterable<HotSpotVMEventListener> vmEventListeners;
+    private volatile List<HotSpotVMEventListener> vmEventListeners;
+
+    private Iterable<HotSpotVMEventListener> getVmEventListeners() {
+        if (vmEventListeners == null) {
+            synchronized (this) {
+                if (vmEventListeners == null) {
+                    List<HotSpotVMEventListener> listeners = new ArrayList<>();
+                    for (HotSpotVMEventListener vmEventListener : ServiceLoader.load(HotSpotVMEventListener.class)) {
+                        listeners.add(vmEventListener);
+                    }
+                    vmEventListeners = listeners;
+                }
+            }
+        }
+        return vmEventListeners;
+    }
 
     /**
      * Stores the result of {@link HotSpotJVMCICompilerFactory#getTrivialPrefixes()} so that it can
@@ -240,8 +258,6 @@
             hostBackend = registerBackend(factory.createJVMCIBackend(this, null));
         }
 
-        vmEventListeners = Services.load(HotSpotVMEventListener.class);
-
         metaAccessContext = new HotSpotJVMCIMetaAccessContext();
 
         boolean printFlags = Option.PrintFlags.getBoolean();
@@ -370,7 +386,7 @@
      */
     @SuppressWarnings({"unused"})
     private void shutdown() throws Exception {
-        for (HotSpotVMEventListener vmEventListener : vmEventListeners) {
+        for (HotSpotVMEventListener vmEventListener : getVmEventListeners()) {
             vmEventListener.notifyShutdown();
         }
     }
@@ -382,7 +398,7 @@
      */
     @SuppressWarnings({"unused"})
     private void bootstrapFinished() throws Exception {
-        for (HotSpotVMEventListener vmEventListener : vmEventListeners) {
+        for (HotSpotVMEventListener vmEventListener : getVmEventListeners()) {
             vmEventListener.notifyBootstrapFinished();
         }
     }
@@ -395,7 +411,7 @@
      * @param compiledCode
      */
     void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
-        for (HotSpotVMEventListener vmEventListener : vmEventListeners) {
+        for (HotSpotVMEventListener vmEventListener : getVmEventListeners()) {
             vmEventListener.notifyInstall(hotSpotCodeCacheProvider, installedCode, compiledCode);
         }
     }
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMemoryAccessProviderImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -144,8 +144,18 @@
         return ret;
     }
 
-    @Override
-    public JavaConstant readUnsafeConstant(JavaKind kind, JavaConstant baseConstant, long displacement) {
+    /**
+     * Reads a value of this kind using a base address and a displacement. No bounds checking or
+     * type checking is performed. Returns {@code null} if the value is not available at this point.
+     *
+     * @param baseConstant the base address from which the value is read.
+     * @param displacement the displacement within the object in bytes
+     * @return the read value encapsulated in a {@link JavaConstant} object, or {@code null} if the
+     *         value cannot be read.
+     * @throws IllegalArgumentException if {@code kind} is {@code null}, {@link JavaKind#Void}, not
+     *             {@link JavaKind#Object} or not {@linkplain JavaKind#isPrimitive() primitive} kind
+     */
+    JavaConstant readUnsafeConstant(JavaKind kind, JavaConstant baseConstant, long displacement) {
         if (kind == null) {
             throw new IllegalArgumentException("null JavaKind");
         }
--- a/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/MemoryAccessProvider.java	Fri Jul 08 12:17:10 2016 -0700
@@ -28,19 +28,6 @@
 public interface MemoryAccessProvider {
 
     /**
-     * Reads a value of this kind using a base address and a displacement. No bounds checking or
-     * type checking is performed. Returns {@code null} if the value is not available at this point.
-     *
-     * @param base the base address from which the value is read.
-     * @param displacement the displacement within the object in bytes
-     * @return the read value encapsulated in a {@link JavaConstant} object, or {@code null} if the
-     *         value cannot be read.
-     * @throws IllegalArgumentException if {@code kind} is {@code null}, {@link JavaKind#Void}, not
-     *             {@link JavaKind#Object} or not {@linkplain JavaKind#isPrimitive() primitive} kind
-     */
-    JavaConstant readUnsafeConstant(JavaKind kind, JavaConstant base, long displacement) throws IllegalArgumentException;
-
-    /**
      * Reads a primitive value using a base address and a displacement.
      *
      * @param kind the {@link JavaKind} of the returned {@link JavaConstant} object
--- a/hotspot/src/os/aix/vm/libo4.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/os/aix/vm/libo4.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,17 +22,49 @@
  *
  */
 
-// This is only a stub. Will flesh out later when/if we add further support
-// for PASE.
-
 #include "libo4.hpp"
 
-bool libo4::init() { return false; }
-void libo4::cleanup() {}
-bool libo4::get_memory_info (unsigned long long* p_virt_total, unsigned long long* p_real_total,
-  unsigned long long* p_real_free, unsigned long long* p_pgsp_total, unsigned long long* p_pgsp_free) {
+// global variables
+
+// whether initialization worked
+static bool g_initialized = false;
+
+//////////////////////////
+//  class libo4 - impl  //
+//////////////////////////
+
+bool libo4::init() {
+  if (g_initialized) {
+    return true;
+  }
   return false;
 }
-bool libo4::get_load_avg (double* p_avg1, double* p_avg5, double* p_avg15) { return false; }
-bool libo4::realpath (const char* file_name, char* resolved_name, int resolved_name_len) { return false; }
+
+void libo4::cleanup() {
+  if (g_initialized) {
+    g_initialized = false;
+  }
+}
+
+bool libo4::get_memory_info(unsigned long long* p_virt_total,
+                            unsigned long long* p_real_total,
+                            unsigned long long* p_real_free,
+                            unsigned long long* p_pgsp_total,
+                            unsigned long long* p_pgsp_free) {
+  return false;
+}
 
+bool libo4::get_load_avg(double* p_avg1, double* p_avg5, double* p_avg15) {
+  return false;
+}
+
+bool libo4::realpath(const char* file_name, char* resolved_name,
+                     int resolved_name_len) {
+  return false;
+}
+
+bool libo4::removeEscapeMessageFromJoblogByContext(const void* context) {
+  // Note: no tracing here! We run in signal handling context
+
+  return false;
+}
--- a/hotspot/src/os/aix/vm/libo4.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/os/aix/vm/libo4.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,56 +22,69 @@
  *
  */
 
-// A C++ wrapper around the libo4 porting library. The libo4 porting library
-// is a set of bridge functions into native AS/400 functionality.
+// Class libo4 is a C++ wrapper around the libo4 porting library. It handles
+// basic stuff like dynamic loading, library initialization etc.
+// The libo4 porting library is a set of functions that bridge from the AIX
+// runtime environment on OS/400 (aka PASE layer) into native OS/400
+// functionality (aka ILE layer) to close some functional gaps that exist in
+// the PASE layer.
 
 #ifndef OS_AIX_VM_LIBO4_HPP
 #define OS_AIX_VM_LIBO4_HPP
 
-
 class libo4 {
 public:
-
   // Initialize the libo4 porting library.
   // Returns true if succeeded, false if error.
   static bool init();
 
-  // cleanup of the libo4 porting library.
+  // Triggers cleanup of the libo4 porting library.
   static void cleanup();
 
-  // returns a number of memory statistics from the
-  // AS/400.
+  // Returns a number of memory statistics from OS/400.
+  //
+  // See libo4.h for details on this API.
   //
   // Specify NULL for numbers you are not interested in.
   //
-  // returns false if an error happened. Activate OsMisc trace for
+  // Returns false if an error happened. Activate OsMisc trace for
   // trace output.
   //
-  static bool get_memory_info (unsigned long long* p_virt_total, unsigned long long* p_real_total,
-    unsigned long long* p_real_free, unsigned long long* p_pgsp_total, unsigned long long* p_pgsp_free);
+  static bool get_memory_info(unsigned long long* p_virt_total,
+                              unsigned long long* p_real_total,
+                              unsigned long long* p_real_free,
+                              unsigned long long* p_pgsp_total,
+                              unsigned long long* p_pgsp_free);
 
-  // returns information about system load
+  // Returns information about system load
   // (similar to "loadavg()" under other Unices)
   //
+  // See libo4.h for details on this API.
+  //
   // Specify NULL for numbers you are not interested in.
   //
-  // returns false if an error happened. Activate OsMisc trace for
+  // Returns false if an error happened. Activate OsMisc trace for
   // trace output.
   //
-  static bool get_load_avg (double* p_avg1, double* p_avg5, double* p_avg15);
+  static bool get_load_avg(double* p_avg1, double* p_avg5, double* p_avg15);
 
-  // this is a replacement for the "realpath()" API which does not really work
-  // on PASE
+  // This is a replacement for the "realpath()" API which does not really work
+  // in PASE together with the (case insensitive but case preserving)
+  // filesystem on OS/400.
   //
-  // Specify NULL for numbers you are not interested in.
+  // See libo4.h for details on this API.
   //
-  // returns false if an error happened. Activate OsMisc trace for
+  // Returns false if an error happened. Activate OsMisc trace for
   // trace output.
   //
-  static bool realpath (const char* file_name,
-      char* resolved_name, int resolved_name_len);
+  static bool realpath(const char* file_name, char* resolved_name,
+                       int resolved_name_len);
 
+  // Call libo4_RemoveEscapeMessageFromJoblogByContext API to remove messages
+  // from the OS/400 job log.
+  //
+  // See libo4.h for details on this API.
+  static bool removeEscapeMessageFromJoblogByContext(const void* context);
 };
 
 #endif // OS_AIX_VM_LIBO4_HPP
-
--- a/hotspot/src/os/aix/vm/libperfstat_aix.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/os/aix/vm/libperfstat_aix.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -180,10 +180,12 @@
   memset (&psct, '\0', sizeof(psct));
 
   if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(PERFSTAT_CPU_TOTAL_T_LATEST), 1)) {
-    if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_61), 1)) {
-      if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_53), 1)) {
+    if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_71), 1)) {
+      if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_61), 1)) {
+        if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_53), 1)) {
           trcVerbose("perfstat_cpu_total() failed (errno=%d)", errno);
           return false;
+        }
       }
     }
   }
--- a/hotspot/src/os/aix/vm/libperfstat_aix.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/os/aix/vm/libperfstat_aix.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -337,10 +337,109 @@
   int spurrflag;                        /* set if running in spurr mode */
   u_longlong_t  version;                /* version number (1, 2, etc.,) */
 /*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
-#define CURR_VERSION_CPU_TOTAL 1              /* Incremented by one for every new release *
+/* #define CURR_VERSION_CPU_TOTAL 1              Incremented by one for every new release *
                                                * of perfstat_cpu_total_t data structure   */
 } perfstat_cpu_total_t_71;
 
+typedef struct { /* global cpu information AIX 7.2  / 6.1 TL6 (see oslevel -r) */
+  int ncpus;                /* number of active logical processors */
+  int ncpus_cfg;             /* number of configured processors */
+  char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */
+  u_longlong_t processorHZ; /* processor speed in Hz */
+  u_longlong_t user;        /*  raw total number of clock ticks spent in user mode */
+  u_longlong_t sys;         /* raw total number of clock ticks spent in system mode */
+  u_longlong_t idle;        /* raw total number of clock ticks spent idle */
+  u_longlong_t wait;        /* raw total number of clock ticks spent waiting for I/O */
+  u_longlong_t pswitch;     /* number of process switches (change in currently running process) */
+  u_longlong_t syscall;     /* number of system calls executed */
+  u_longlong_t sysread;     /* number of read system calls executed */
+  u_longlong_t syswrite;    /* number of write system calls executed */
+  u_longlong_t sysfork;     /* number of forks system calls executed */
+  u_longlong_t sysexec;     /* number of execs system calls executed */
+  u_longlong_t readch;      /* number of characters tranferred with read system call */
+  u_longlong_t writech;     /* number of characters tranferred with write system call */
+  u_longlong_t devintrs;    /* number of device interrupts */
+  u_longlong_t softintrs;   /* number of software interrupts */
+  time_t lbolt;             /* number of ticks since last reboot */
+  u_longlong_t loadavg[3];  /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.    */
+                            /* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
+  u_longlong_t runque;      /* length of the run queue (processes ready) */
+  u_longlong_t swpque;      /* ength of the swap queue (processes waiting to be paged in) */
+  u_longlong_t bread;       /* number of blocks read */
+  u_longlong_t bwrite;      /* number of blocks written */
+  u_longlong_t lread;       /* number of logical read requests */
+  u_longlong_t lwrite;      /* number of logical write requests */
+  u_longlong_t phread;      /* number of physical reads (reads on raw devices) */
+  u_longlong_t phwrite;     /* number of physical writes (writes on raw devices) */
+  u_longlong_t runocc;      /* updated whenever runque is updated, i.e. the runqueue is occupied.
+                             * This can be used to compute the simple average of ready processes  */
+  u_longlong_t swpocc;      /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
+                             * This can be used to compute the simple average processes waiting to be paged in */
+  u_longlong_t iget;        /* number of inode lookups */
+  u_longlong_t namei;       /* number of vnode lookup from a path name */
+  u_longlong_t dirblk;      /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
+  u_longlong_t msg;         /* number of IPC message operations */
+  u_longlong_t sema;        /* number of IPC semaphore operations */
+  u_longlong_t rcvint;      /* number of tty receive interrupts */
+  u_longlong_t xmtint;      /* number of tyy transmit interrupts */
+  u_longlong_t mdmint;      /* number of modem interrupts */
+  u_longlong_t tty_rawinch; /* number of raw input characters  */
+  u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */
+  u_longlong_t tty_rawoutch;/* number of raw output characters */
+  u_longlong_t ksched;      /* number of kernel processes created */
+  u_longlong_t koverf;      /* kernel process creation attempts where:
+                             * -the user has forked to their maximum limit
+                             * -the configuration limit of processes has been reached */
+  u_longlong_t kexit;       /* number of kernel processes that became zombies */
+  u_longlong_t rbread;      /* number of remote read requests */
+  u_longlong_t rcread;      /* number of cached remote reads */
+  u_longlong_t rbwrt;       /* number of remote writes */
+  u_longlong_t rcwrt;       /* number of cached remote writes */
+  u_longlong_t traps;       /* number of traps */
+  int ncpus_high;           /* index of highest processor online */
+  u_longlong_t puser;       /* raw number of physical processor tics in user mode */
+  u_longlong_t psys;        /* raw number of physical processor tics in system mode */
+  u_longlong_t pidle;       /* raw number of physical processor tics idle */
+  u_longlong_t pwait;       /* raw number of physical processor tics waiting for I/O */
+  u_longlong_t decrintrs;   /* number of decrementer tics interrupts */
+  u_longlong_t mpcrintrs;   /* number of mpc's received interrupts */
+  u_longlong_t mpcsintrs;   /* number of mpc's sent interrupts */
+  u_longlong_t phantintrs;  /* number of phantom interrupts */
+  u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
+  u_longlong_t idle_donated_spurr;/* number of idle spurr cycles donated by a dedicated partition enabled for donation */
+  u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
+  u_longlong_t busy_donated_spurr;/* number of busy spurr cycles donated by a dedicated partition enabled for donation */
+  u_longlong_t idle_stolen_purr;  /* number of idle cycles stolen by the hypervisor from a dedicated partition */
+  u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
+  u_longlong_t busy_stolen_purr;  /* number of busy cycles stolen by the hypervisor from a dedicated partition */
+  u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
+  short iowait;             /* number of processes that are asleep waiting for buffered I/O */
+  short physio;             /* number of processes waiting for raw I/O */
+  longlong_t twait;         /* number of threads that are waiting for filesystem direct(cio) */
+  u_longlong_t hpi;         /* number of hypervisor page-ins */
+  u_longlong_t hpit;        /* Time spent in hypervisor page-ins (in nanoseconds) */
+  u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
+  u_longlong_t psys_spurr;  /* number of spurr cycles spent in kernel mode */
+  u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
+  u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
+  int spurrflag;            /* set if running in spurr mode */
+  u_longlong_t  version;    /* version number (1, 2, etc.,) */
+  u_longlong_t tb_last;     /*time base counter */
+  u_longlong_t purr_coalescing;   /* If the calling partition is
+                                   * authorized to see pool wide statistics then
+                                   * PURR cycles consumed to coalesce data
+                                   * else set to zero.*/
+  u_longlong_t spurr_coalescing;  /* If the calling partition is
+                                   * authorized to see pool wide statistics then
+                                   * SPURR cycles consumed to coalesce data
+                                   * else set to zero.*/
+
+/*      >>>>> END OF STRUCTURE DEFINITION <<<<<         */
+#define CURR_VERSION_CPU_TOTAL 2 /* Incremented by one for every new release *
+                                  * of perfstat_cpu_total_t data structure   */
+} perfstat_cpu_total_t_72;
+
+
 typedef union {
   uint    w;
   struct {
@@ -756,7 +855,7 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 #define PERFSTAT_PARTITON_TOTAL_T_LATEST perfstat_partition_total_t_71_1/* latest perfstat_partition_total_t structure */
-#define PERFSTAT_CPU_TOTAL_T_LATEST perfstat_cpu_total_t_71             /* latest perfstat_cpu_total_t structure */
+#define PERFSTAT_CPU_TOTAL_T_LATEST perfstat_cpu_total_t_72             /* latest perfstat_cpu_total_t structure */
 #define PERFSTAT_WPAR_TOTAL_T_LATEST perfstat_wpar_total_t_71           /* latest perfstat_wpar_total_t structure */
 
 class libperfstat {
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -264,7 +264,7 @@
   assert(array == NULL || FoldStableValues, "not enabled");
 
   // Constant fold loads from stable arrays.
-  if (array != NULL && index != NULL) {
+  if (!x->mismatched() && array != NULL && index != NULL) {
     jint idx = index->value();
     if (idx < 0 || idx >= array->value()->length()) {
       // Leave the load as is. The range check will handle it.
@@ -310,8 +310,6 @@
       return;
     }
   }
-
-
 }
 
 
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -4227,11 +4227,11 @@
   Value index = args->at(1);
   if (is_store) {
     Value value = args->at(2);
-    Instruction* store = append(new StoreIndexed(array, index, NULL, T_CHAR, value, state_before, false));
+    Instruction* store = append(new StoreIndexed(array, index, NULL, T_CHAR, value, state_before, false, true));
     store->set_flag(Instruction::NeedsRangeCheckFlag, false);
     _memory->store_value(value);
   } else {
-    Instruction* load = append(new LoadIndexed(array, index, NULL, T_CHAR, state_before));
+    Instruction* load = append(new LoadIndexed(array, index, NULL, T_CHAR, state_before, true));
     load->set_flag(Instruction::NeedsRangeCheckFlag, false);
     push(load->type(), load);
   }
--- a/hotspot/src/share/vm/c1/c1_IR.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_IR.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -147,10 +147,8 @@
   _wrote_volatile     = false;
   _start              = NULL;
 
-  if (osr_bci == -1) {
-    _requires_phi_function.clear();
-  } else {
-        // selective creation of phi functions is not possibel in osr-methods
+  if (osr_bci != -1) {
+    // selective creation of phi functions is not possibel in osr-methods
     _requires_phi_function.set_range(0, method->max_locals());
   }
 
@@ -540,7 +538,6 @@
 {
   TRACE_LINEAR_SCAN(2, tty->print_cr("***** computing linear-scan block order"));
 
-  init_visited();
   count_edges(start_block, NULL);
 
   if (compilation()->is_profiling()) {
@@ -646,7 +643,6 @@
   TRACE_LINEAR_SCAN(3, tty->print_cr("----- marking loops"));
 
   _loop_map = BitMap2D(_num_loops, _max_block_id);
-  _loop_map.clear();
 
   for (int i = _loop_end_blocks.length() - 1; i >= 0; i--) {
     BlockBegin* loop_end   = _loop_end_blocks.at(i);
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -912,14 +912,16 @@
   Value     _index;
   Value     _length;
   BasicType _elt_type;
+  bool      _mismatched;
 
  public:
   // creation
-  AccessIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before)
+  AccessIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before, bool mismatched)
   : AccessArray(as_ValueType(elt_type), array, state_before)
   , _index(index)
   , _length(length)
   , _elt_type(elt_type)
+  , _mismatched(mismatched)
   {
     set_flag(Instruction::NeedsRangeCheckFlag, true);
     ASSERT_VALUES
@@ -929,6 +931,7 @@
   Value index() const                            { return _index; }
   Value length() const                           { return _length; }
   BasicType elt_type() const                     { return _elt_type; }
+  bool mismatched() const                        { return _mismatched; }
 
   void clear_length()                            { _length = NULL; }
   // perform elimination of range checks involving constants
@@ -945,8 +948,8 @@
 
  public:
   // creation
-  LoadIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before)
-  : AccessIndexed(array, index, length, elt_type, state_before)
+  LoadIndexed(Value array, Value index, Value length, BasicType elt_type, ValueStack* state_before, bool mismatched = false)
+  : AccessIndexed(array, index, length, elt_type, state_before, mismatched)
   , _explicit_null_check(NULL) {}
 
   // accessors
@@ -974,8 +977,9 @@
 
  public:
   // creation
-  StoreIndexed(Value array, Value index, Value length, BasicType elt_type, Value value, ValueStack* state_before, bool check_boolean)
-  : AccessIndexed(array, index, length, elt_type, state_before)
+  StoreIndexed(Value array, Value index, Value length, BasicType elt_type, Value value, ValueStack* state_before,
+               bool check_boolean, bool mismatched = false)
+  : AccessIndexed(array, index, length, elt_type, state_before, mismatched)
   , _value(value), _profiled_method(NULL), _profiled_bci(0), _check_boolean(check_boolean)
   {
     set_flag(NeedsWriteBarrierFlag, (as_ValueType(elt_type)->is_object()));
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1387,7 +1387,6 @@
 void LIRGenerator::set_vreg_flag(int vreg_num, VregFlag f) {
   if (_vreg_flags.size_in_bits() == 0) {
     BitMap2D temp(100, num_vreg_flags);
-    temp.clear();
     _vreg_flags = temp;
   }
   _vreg_flags.at_put_grow(vreg_num, f, true);
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -562,14 +562,13 @@
   LIR_OpVisitState visitor;
 
   BitMap2D local_interval_in_loop = BitMap2D(_num_virtual_regs, num_loops());
-  local_interval_in_loop.clear();
 
   // iterate all blocks
   for (int i = 0; i < num_blocks; i++) {
     BlockBegin* block = block_at(i);
 
-    ResourceBitMap live_gen(live_size);  live_gen.clear();
-    ResourceBitMap live_kill(live_size); live_kill.clear();
+    ResourceBitMap live_gen(live_size);
+    ResourceBitMap live_kill(live_size);
 
     if (block->is_set(BlockBegin::exception_entry_flag)) {
       // Phi functions at the begin of an exception handler are
@@ -715,8 +714,8 @@
 
     block->set_live_gen (live_gen);
     block->set_live_kill(live_kill);
-    block->set_live_in  (ResourceBitMap(live_size)); block->live_in().clear();
-    block->set_live_out (ResourceBitMap(live_size)); block->live_out().clear();
+    block->set_live_in  (ResourceBitMap(live_size));
+    block->set_live_out (ResourceBitMap(live_size));
 
     TRACE_LINEAR_SCAN(4, tty->print("live_gen  B%d ", block->block_id()); print_bitmap(block->live_gen()));
     TRACE_LINEAR_SCAN(4, tty->print("live_kill B%d ", block->block_id()); print_bitmap(block->live_kill()));
@@ -741,7 +740,7 @@
   bool change_occurred;
   bool change_occurred_in_block;
   int  iteration_count = 0;
-  ResourceBitMap live_out(live_set_size()); live_out.clear(); // scratch set for calculations
+  ResourceBitMap live_out(live_set_size()); // scratch set for calculations
 
   // Perform a backward dataflow analysis to compute live_out and live_in for each block.
   // The loop is executed until a fixpoint is reached (no changes in an iteration)
@@ -827,7 +826,6 @@
 
   // check that the live_in set of the first block is empty
   ResourceBitMap live_in_args(ir()->start()->live_in().size());
-  live_in_args.clear();
   if (!ir()->start()->live_in().is_same(live_in_args)) {
 #ifdef ASSERT
     tty->print_cr("Error: live_in set of first block must be empty (when this fails, virtual registers are used before they are defined)");
@@ -1774,8 +1772,8 @@
 
   int num_blocks = block_count();
   MoveResolver move_resolver(this);
-  ResourceBitMap block_completed(num_blocks);  block_completed.clear();
-  ResourceBitMap already_resolved(num_blocks); already_resolved.clear();
+  ResourceBitMap block_completed(num_blocks);
+  ResourceBitMap already_resolved(num_blocks);
 
   int i;
   for (i = 0; i < num_blocks; i++) {
@@ -3750,7 +3748,6 @@
 
 
   ResourceBitMap used_regs(LinearScan::nof_regs + allocator()->frame_map()->argcount() + allocator()->max_spills());
-  used_regs.clear();
   if (!_multiple_reads_allowed) {
     for (i = 0; i < _mapping_from.length(); i++) {
       Interval* it = _mapping_from.at(i);
@@ -6319,7 +6316,6 @@
 void ControlFlowOptimizer::delete_jumps_to_return(BlockList* code) {
 #ifdef ASSERT
   ResourceBitMap return_converted(BlockBegin::number_of_blocks());
-  return_converted.clear();
 #endif
 
   for (int i = code->length() - 1; i >= 0; i--) {
--- a/hotspot/src/share/vm/c1/c1_ValueSet.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_ValueSet.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -53,7 +53,6 @@
 };
 
 inline ValueSet::ValueSet() : _map(Instruction::number_of_instructions()) {
-  _map.clear();
 }
 
 
--- a/hotspot/src/share/vm/ci/ciMethod.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -449,7 +449,6 @@
   OopMapCache::compute_one_oop_map(get_Method(), bci, &mask);
   int mask_size = max_locals();
   ResourceBitMap result(mask_size);
-  result.clear();
   int i;
   for (i = 0; i < mask_size ; i++ ) {
     if (mask.is_oop(i)) result.set_bit(i);
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -4673,6 +4673,7 @@
 }
 
 // Unqualified names may not contain the characters '.', ';', '[', or '/'.
+// In class names, '/' separates unqualified names.  This is verified in this function also.
 // Method names also may not contain the characters '<' or '>', unless <init>
 // or <clinit>.  Note that method names may not be <init> or <clinit> in this
 // method.  Because these names have been checked as special cases before
@@ -4698,8 +4699,16 @@
       if (ch == ';' || ch == '[' ) {
         return false;   // do not permit '.', ';', or '['
       }
-      if (type != ClassFileParser::LegalClass && ch == '/') {
-        return false;   // do not permit '/' unless it's class name
+      if (ch == '/') {
+        // check for '//' or leading or trailing '/' which are not legal
+        // unqualified name must not be empty
+        if (type == ClassFileParser::LegalClass) {
+          if (p == name || p+1 >= name+length || *(p+1) == '/') {
+           return false;
+          }
+        } else {
+          return false;   // do not permit '/' unless it's class name
+        }
       }
       if (type == ClassFileParser::LegalMethod && (ch == '<' || ch == '>')) {
         return false;   // do not permit '<' or '>' in method names
@@ -5347,15 +5356,7 @@
   if (!is_internal()) {
     if (log_is_enabled(Info, class, load)) {
       ResourceMark rm;
-      const char* module_name = NULL;
-      static const size_t modules_image_name_len = strlen(MODULES_IMAGE_NAME);
-      size_t stream_len = strlen(_stream->source());
-      // See if _stream->source() ends in "modules"
-      if (module_entry->is_named() && modules_image_name_len < stream_len &&
-        (strncmp(_stream->source() + stream_len - modules_image_name_len,
-                 MODULES_IMAGE_NAME, modules_image_name_len) == 0)) {
-        module_name = module_entry->name()->as_C_string();
-      }
+      const char* module_name = (module_entry->name() == NULL) ? UNNAMED_MODULE : module_entry->name()->as_C_string();
 
       if (log_is_enabled(Info, class, load)) {
         ik->print_loading_log(LogLevel::Info, _loader_data, module_name, _stream);
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -181,26 +181,59 @@
 }
 
 // Used to obtain the package name from a fully qualified class name.
-// It is the responsibility of the caller to establish ResourceMark.
-const char* ClassLoader::package_from_name(const char* class_name) {
-  const char* last_slash = strrchr(class_name, '/');
+// It is the responsibility of the caller to establish a ResourceMark.
+const char* ClassLoader::package_from_name(const char* const class_name, bool* bad_class_name) {
+  if (class_name == NULL) {
+    if (bad_class_name != NULL) {
+      *bad_class_name = true;
+    }
+    return NULL;
+  }
+
+  if (bad_class_name != NULL) {
+    *bad_class_name = false;
+  }
+
+  const char* const last_slash = strrchr(class_name, '/');
   if (last_slash == NULL) {
     // No package name
     return NULL;
   }
-  int length = last_slash - class_name;
+
+  char* class_name_ptr = (char*) class_name;
+  // Skip over '['s
+  if (*class_name_ptr == '[') {
+    do {
+      class_name_ptr++;
+    } while (*class_name_ptr == '[');
 
-  // A class name could have just the slash character in the name,
-  // resulting in a negative length.
+    // Fully qualified class names should not contain a 'L'.
+    // Set bad_class_name to true to indicate that the package name
+    // could not be obtained due to an error condition.
+    // In this situation, is_same_class_package returns false.
+    if (*class_name_ptr == 'L') {
+      if (bad_class_name != NULL) {
+        *bad_class_name = true;
+      }
+      return NULL;
+    }
+  }
+
+  int length = last_slash - class_name_ptr;
+
+  // A class name could have just the slash character in the name.
   if (length <= 0) {
     // No package name
+    if (bad_class_name != NULL) {
+      *bad_class_name = true;
+    }
     return NULL;
   }
 
   // drop name after last slash (including slash)
   // Ex., "java/lang/String.class" => "java/lang"
   char* pkg_name = NEW_RESOURCE_ARRAY(char, length + 1);
-  strncpy(pkg_name, class_name, length);
+  strncpy(pkg_name, class_name_ptr, length);
   *(pkg_name+length) = '\0';
 
   return (const char *)pkg_name;
@@ -228,8 +261,9 @@
 
 ClassFileStream* ClassPathDirEntry::open_stream(const char* name, TRAPS) {
   // construct full path name
-  char path[JVM_MAXPATHLEN];
-  if (jio_snprintf(path, sizeof(path), "%s%s%s", _dir, os::file_separator(), name) == -1) {
+  char* path = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, JVM_MAXPATHLEN);
+  if (jio_snprintf(path, JVM_MAXPATHLEN, "%s%s%s", _dir, os::file_separator(), name) == -1) {
+    FREE_RESOURCE_ARRAY(char, path, JVM_MAXPATHLEN);
     return NULL;
   }
   // check if file exists
@@ -256,6 +290,7 @@
         if (UsePerfData) {
           ClassLoader::perf_sys_classfile_bytes_read()->inc(num_read);
         }
+        FREE_RESOURCE_ARRAY(char, path, JVM_MAXPATHLEN);
         // Resource allocated
         return new ClassFileStream(buffer,
                                    st.st_size,
@@ -264,6 +299,7 @@
       }
     }
   }
+  FREE_RESOURCE_ARRAY(char, path, JVM_MAXPATHLEN);
   return NULL;
 }
 
@@ -344,9 +380,9 @@
 
     if (is_multi_ver) {
       int n;
-      char entry_name[JVM_MAXPATHLEN];
+      char* entry_name = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, JVM_MAXPATHLEN);
       if (version > 0) {
-        n = jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", version, name);
+        n = jio_snprintf(entry_name, JVM_MAXPATHLEN, "META-INF/versions/%d/%s", version, name);
         entry_name[n] = '\0';
         buffer = open_entry((const char*)entry_name, filesize, false, CHECK_NULL);
         if (buffer == NULL) {
@@ -355,7 +391,7 @@
       }
       if (buffer == NULL) {
         for (int i = cur_ver; i >= base_version; i--) {
-          n = jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", i, name);
+          n = jio_snprintf(entry_name, JVM_MAXPATHLEN, "META-INF/versions/%d/%s", i, name);
           entry_name[n] = '\0';
           buffer = open_entry((const char*)entry_name, filesize, false, CHECK_NULL);
           if (buffer != NULL) {
@@ -363,6 +399,7 @@
           }
         }
       }
+      FREE_RESOURCE_ARRAY(char, entry_name, JVM_MAXPATHLEN);
     }
   }
   return buffer;
@@ -508,7 +545,8 @@
         const char* name, const char* extension, void* arg) {
   if (strcmp(extension, "class") == 0) {
     Thread* THREAD = Thread::current();
-    char path[JIMAGE_MAX_PATH];
+    ResourceMark rm(THREAD);
+    char* path = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, JIMAGE_MAX_PATH);
     jio_snprintf(path, JIMAGE_MAX_PATH - 1, "%s/%s.class", package, name);
     ClassLoader::compile_the_world_in(path, *(Handle*)arg, THREAD);
     return !HAS_PENDING_EXCEPTION;
@@ -750,9 +788,10 @@
   JavaThread* thread = JavaThread::current();
   ClassPathEntry* new_entry = NULL;
   if ((st->st_mode & S_IFREG) == S_IFREG) {
+    ResourceMark rm(thread);
     // Regular file, should be a zip or jimage file
     // Canonicalized filename
-    char canonical_path[JVM_MAXPATHLEN];
+    char* canonical_path = NEW_RESOURCE_ARRAY_IN_THREAD(thread, char, JVM_MAXPATHLEN);
     if (!get_canonical_path(path, canonical_path, JVM_MAXPATHLEN)) {
       // This matches the classic VM
       if (throw_exception) {
@@ -777,14 +816,13 @@
       if (zip != NULL && error_msg == NULL) {
         new_entry = new ClassPathZipEntry(zip, path, is_boot_append);
       } else {
-        ResourceMark rm(thread);
         char *msg;
         if (error_msg == NULL) {
-          msg = NEW_RESOURCE_ARRAY(char, strlen(path) + 128); ;
+          msg = NEW_RESOURCE_ARRAY_IN_THREAD(thread, char, strlen(path) + 128); ;
           jio_snprintf(msg, strlen(path) + 127, "error in opening JAR file %s", path);
         } else {
           int len = (int)(strlen(path) + strlen(error_msg) + 128);
-          msg = NEW_RESOURCE_ARRAY(char, len); ;
+          msg = NEW_RESOURCE_ARRAY_IN_THREAD(thread, char, len); ;
           jio_snprintf(msg, len - 1, "error in opening JAR file <%s> %s", error_msg, path);
         }
         // Don't complain about bad jar files added via -Xbootclasspath/a:.
@@ -1112,13 +1150,11 @@
   assert(fullq_class_name != NULL, "just checking");
 
   // Get package name from fully qualified class name.
-  const char *cp = strrchr(fullq_class_name, '/');
+  ResourceMark rm;
+  const char *cp = package_from_name(fullq_class_name);
   if (cp != NULL) {
-    int len = cp - fullq_class_name;
-    PackageEntryTable* pkg_entry_tbl =
-      ClassLoaderData::the_null_class_loader_data()->packages();
-    TempNewSymbol pkg_symbol =
-      SymbolTable::new_symbol(fullq_class_name, len, CHECK_false);
+    PackageEntryTable* pkg_entry_tbl = ClassLoaderData::the_null_class_loader_data()->packages();
+    TempNewSymbol pkg_symbol = SymbolTable::new_symbol(cp, CHECK_false);
     PackageEntry* pkg_entry = pkg_entry_tbl->lookup_only(pkg_symbol);
     if (pkg_entry != NULL) {
       assert(classpath_index != -1, "Unexpected classpath_index");
@@ -1226,11 +1262,9 @@
   // jimage, it is determined by the class path entry.
   jshort loader_type = ClassLoader::APP_LOADER;
   if (e->is_jrt()) {
-    int length = 0;
-    const jbyte* pkg_string = InstanceKlass::package_from_name(class_name, length);
-    if (pkg_string != NULL) {
-      ResourceMark rm;
-      TempNewSymbol pkg_name = SymbolTable::new_symbol((const char*)pkg_string, length, THREAD);
+    ResourceMark rm;
+    TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name, CHECK_0);
+    if (pkg_name != NULL) {
       const char* pkg_name_C_string = (const char*)(pkg_name->as_C_string());
       ClassPathImageEntry* cpie = (ClassPathImageEntry*)e;
       JImageFile* jimage = cpie->jimage();
--- a/hotspot/src/share/vm/classfile/classLoader.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -444,7 +444,9 @@
   static bool string_ends_with(const char* str, const char* str_to_find);
 
   // obtain package name from a fully qualified class name
-  static const char* package_from_name(const char* class_name);
+  // *bad_class_name is set to true if there's a problem with parsing class_name, to
+  // distinguish from a class_name with no package name, as both cases have a NULL return value
+  static const char* package_from_name(const char* const class_name, bool* bad_class_name = NULL);
 
   static bool is_jrt(const char* name) { return string_ends_with(name, MODULES_IMAGE_NAME); }
 
--- a/hotspot/src/share/vm/classfile/classLoaderExt.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/classLoaderExt.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -54,12 +54,14 @@
                                       const s2 classpath_index,
                                       instanceKlassHandle result, TRAPS) {
       if (ClassLoader::add_package(_file_name, classpath_index, THREAD)) {
+#if INCLUDE_CDS
         if (DumpSharedSpaces) {
           s2 classloader_type = ClassLoader::classloader_type(
                           class_name, e, classpath_index, CHECK_(result));
           result->set_shared_classpath_index(classpath_index);
           result->set_class_loader_type(classloader_type);
         }
+#endif
         return result;
       } else {
         return instanceKlassHandle(); // NULL
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -3245,6 +3245,15 @@
   mname->address_field_put(_vmindex_offset, (address) index);
 }
 
+bool java_lang_invoke_MemberName::equals(oop mn1, oop mn2) {
+  if (mn1 == mn2) {
+     return true;
+  }
+  return (vmtarget(mn1) == vmtarget(mn2) && flags(mn1) == flags(mn2) &&
+          vmindex(mn1) == vmindex(mn2) &&
+          clazz(mn1) == clazz(mn2));
+}
+
 oop java_lang_invoke_LambdaForm::vmentry(oop lform) {
   assert(is_instance(lform), "wrong type");
   return lform->obj_field(_vmentry_offset);
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1114,6 +1114,8 @@
   static int flags_offset_in_bytes()            { return _flags_offset; }
   static int vmtarget_offset_in_bytes()         { return _vmtarget_offset; }
   static int vmindex_offset_in_bytes()          { return _vmindex_offset; }
+
+  static bool equals(oop mt1, oop mt2);
 };
 
 
--- a/hotspot/src/share/vm/classfile/moduleEntry.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/moduleEntry.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -201,7 +201,7 @@
 }
 
 void ModuleEntryTable::create_unnamed_module(ClassLoaderData* loader_data) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
 
   // Each ModuleEntryTable has exactly one unnamed module
   if (loader_data->is_the_null_class_loader_data()) {
@@ -227,7 +227,7 @@
 ModuleEntry* ModuleEntryTable::new_entry(unsigned int hash, Handle module_handle, Symbol* name,
                                          Symbol* version, Symbol* location,
                                          ClassLoaderData* loader_data) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   ModuleEntry* entry = (ModuleEntry*) NEW_C_HEAP_ARRAY(char, entry_size(), mtModule);
 
   // Initialize everything BasicHashtable would
@@ -258,7 +258,7 @@
 }
 
 void ModuleEntryTable::add_entry(int index, ModuleEntry* new_entry) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   Hashtable<Symbol*, mtModule>::add_entry(index, (HashtableEntry<Symbol*, mtModule>*)new_entry);
 }
 
@@ -268,7 +268,7 @@
                                                            Symbol* module_location,
                                                            ClassLoaderData* loader_data) {
   assert(module_name != NULL, "ModuleEntryTable locked_create_entry_or_null should never be called for unnamed module.");
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   // Check if module already exists.
   if (lookup_only(module_name) != NULL) {
     return NULL;
@@ -309,7 +309,7 @@
 }
 
 void ModuleEntryTable::finalize_javabase(Handle module_handle, Symbol* version, Symbol* location) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   ClassLoaderData* boot_loader_data = ClassLoaderData::the_null_class_loader_data();
   ModuleEntryTable* module_table = boot_loader_data->modules();
 
--- a/hotspot/src/share/vm/classfile/modules.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/modules.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -568,8 +568,8 @@
                       to_module_entry->is_named() ?
                         to_module_entry->name()->as_C_string() : UNNAMED_MODULE);
 
-  // Do nothing if modules are the same or if package is already exported unqualifiedly.
-  if (from_module_entry != to_module_entry && !package_entry->is_unqual_exported()) {
+  // Do nothing if modules are the same.
+  if (from_module_entry != to_module_entry) {
     package_entry->set_exported(to_module_entry);
   }
 }
--- a/hotspot/src/share/vm/classfile/packageEntry.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/packageEntry.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -49,7 +49,7 @@
 
 // Add a module to the package's qualified export list.
 void PackageEntry::add_qexport(ModuleEntry* m) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   if (!has_qual_exports_list()) {
     // Lazily create a package's qualified exports list.
     // Initial size is small, do not anticipate export lists to be large.
@@ -157,7 +157,7 @@
 }
 
 PackageEntry* PackageEntryTable::new_entry(unsigned int hash, Symbol* name, ModuleEntry* module) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   PackageEntry* entry = (PackageEntry*) NEW_C_HEAP_ARRAY(char, entry_size(), mtModule);
 
   // Initialize everything BasicHashtable would
@@ -180,14 +180,14 @@
 }
 
 void PackageEntryTable::add_entry(int index, PackageEntry* new_entry) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   Hashtable<Symbol*, mtModule>::add_entry(index, (HashtableEntry<Symbol*, mtModule>*)new_entry);
 }
 
 // Create package in loader's package entry table and return the entry.
 // If entry already exists, return null.  Assume Module lock was taken by caller.
 PackageEntry* PackageEntryTable::locked_create_entry_or_null(Symbol* name, ModuleEntry* module) {
-  assert_locked_or_safepoint(Module_lock);
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
   // Check if package already exists.  Return NULL if it does.
   if (lookup_only(name) != NULL) {
     return NULL;
--- a/hotspot/src/share/vm/classfile/packageEntry.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/packageEntry.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -40,11 +40,7 @@
 //     package is exported to.
 //
 // Packages can be exported in the following 3 ways:
-//   - not exported:        the package has not been explicitly qualified to a
-//                            particular module nor has it been specified to be
-//                            unqualifiedly exported to all modules. If all states
-//                            of exportedness are false, the package is considered
-//                            not exported.
+//   - not exported:        the package does not have qualified or unqualified exports.
 //   - qualified exports:   the package has been explicitly qualified to at least
 //                            one particular module or has been qualifiedly exported
 //                            to all unnamed modules.
@@ -125,6 +121,7 @@
     return _is_exported_unqualified;
   }
   void set_unqual_exported() {
+    assert(Module_lock->owned_by_self(), "should have the Module_lock");
     _is_exported_unqualified = true;
     _is_exported_allUnnamed = false;
     _qualified_exports = NULL;
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -70,6 +70,7 @@
 #include "services/threadService.hpp"
 #include "trace/traceMacros.hpp"
 #include "utilities/macros.hpp"
+#include "utilities/stringUtils.hpp"
 #include "utilities/ticks.hpp"
 #if INCLUDE_CDS
 #include "classfile/sharedClassUtil.hpp"
@@ -1154,12 +1155,10 @@
     // It is illegal to define classes in the "java." package from
     // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader
     ResourceMark rm(THREAD);
-    char* name = parsed_name->as_C_string();
-    char* index = strrchr(name, '/');
-    *index = '\0'; // chop to just the package name
-    while ((index = strchr(name, '/')) != NULL) {
-      *index = '.'; // replace '/' with '.' in package name
-    }
+    TempNewSymbol pkg_name = InstanceKlass::package_from_name(parsed_name, CHECK_NULL);
+    assert(pkg_name != NULL, "Error in parsing package name starting with 'java/'");
+    char* name = pkg_name->as_C_string();
+    StringUtils::replace_no_expand(name, "/", ".");
     const char* msg_text = "Prohibited package name: ";
     size_t len = strlen(msg_text) + strlen(name) + 1;
     char* message = NEW_RESOURCE_ARRAY(char, len);
@@ -1257,6 +1256,7 @@
 bool SystemDictionary::is_shared_class_visible(Symbol* class_name,
                                                instanceKlassHandle ik,
                                                Handle class_loader, TRAPS) {
+  ResourceMark rm;
   int path_index = ik->shared_classpath_index();
   SharedClassPathEntry* ent =
             (SharedClassPathEntry*)FileMapInfo::shared_classpath(path_index);
@@ -1270,12 +1270,11 @@
   TempNewSymbol pkg_name = NULL;
   PackageEntry* pkg_entry = NULL;
   ModuleEntry* mod_entry = NULL;
-  int length = 0;
+  const char* pkg_string = NULL;
   ClassLoaderData* loader_data = class_loader_data(class_loader);
-  const jbyte* pkg_string = InstanceKlass::package_from_name(class_name, length);
-  if (pkg_string != NULL) {
-    pkg_name = SymbolTable::new_symbol((const char*)pkg_string,
-                                       length, CHECK_(false));
+  pkg_name = InstanceKlass::package_from_name(class_name, CHECK_false);
+  if (pkg_name != NULL) {
+    pkg_string = pkg_name->as_C_string();
     if (loader_data != NULL) {
       pkg_entry = loader_data->packages()->lookup_only(pkg_name);
     }
@@ -1432,15 +1431,14 @@
   instanceKlassHandle nh = instanceKlassHandle(); // null Handle
 
   if (class_loader.is_null()) {
-    int length = 0;
+    ResourceMark rm;
     PackageEntry* pkg_entry = NULL;
     bool search_only_bootloader_append = false;
     ClassLoaderData *loader_data = class_loader_data(class_loader);
 
     // Find the package in the boot loader's package entry table.
-    const jbyte* pkg_string = InstanceKlass::package_from_name(class_name, length);
-    if (pkg_string != NULL) {
-      TempNewSymbol pkg_name = SymbolTable::new_symbol((const char*)pkg_string, length, CHECK_(nh));
+    TempNewSymbol pkg_name = InstanceKlass::package_from_name(class_name, CHECK_NULL);
+    if (pkg_name != NULL) {
       pkg_entry = loader_data->packages()->lookup_only(pkg_name);
     }
 
@@ -1477,7 +1475,7 @@
       assert(!DumpSharedSpaces, "Archive dumped after module system initialization");
       // After the module system has been initialized, check if the class'
       // package is in a module defined to the boot loader.
-      if (pkg_string == NULL || pkg_entry == NULL || pkg_entry->in_unnamed_module()) {
+      if (pkg_name == NULL || pkg_entry == NULL || pkg_entry->in_unnamed_module()) {
         // Class is either in the unnamed package, in a named package
         // within a module not defined to the boot loader or in a
         // a named package within the unnamed module.  In all cases,
--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
   static bool is_shared_class_visible_for_classloader(
                                       instanceKlassHandle ik,
                                       Handle class_loader,
-                                      const jbyte* pkg_string,
+                                      const char* pkg_string,
                                       Symbol* pkg_name,
                                       PackageEntry* pkg_entry,
                                       ModuleEntry* mod_entry,
--- a/hotspot/src/share/vm/compiler/methodLiveness.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/compiler/methodLiveness.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -137,11 +137,6 @@
   _arena = arena;
   _method = method;
   _bit_map_size_bits = method->max_locals();
-
-
-#ifdef COMPILER1
-  _bci_block_start.clear();
-#endif
 }
 
 void MethodLiveness::compute_liveness() {
@@ -587,14 +582,6 @@
     new (analyzer->arena()) GrowableArray<MethodLiveness::BasicBlock*>(analyzer->arena(), 5, 0, NULL);
   _exception_predecessors =
     new (analyzer->arena()) GrowableArray<MethodLiveness::BasicBlock*>(analyzer->arena(), 5, 0, NULL);
-  _normal_exit.clear();
-  _exception_exit.clear();
-  _entry.clear();
-
-  // this initialization is not strictly necessary.
-  // _gen and _kill are cleared at the beginning of compute_gen_kill_range()
-  _gen.clear();
-  _kill.clear();
 }
 
 
@@ -1020,7 +1007,6 @@
     _last_bci = bci;
   }
 
-  answer.clear();
   answer.set_union(_normal_exit);
   answer.set_difference(_kill);
   answer.set_union(_gen);
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1605,6 +1605,9 @@
   _inter_sweep_timer.reset();
   _inter_sweep_timer.start();
 
+  // No longer a need to do a concurrent collection for Metaspace.
+  MetaspaceGC::set_should_concurrent_collect(false);
+
   gch->post_full_gc_dump(gc_timer);
 
   gc_timer->register_gc_end();
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -3474,7 +3474,8 @@
   double remove_self_forwards_start = os::elapsedTime();
 
   remove_self_forwarding_pointers();
-  _preserved_marks_set.restore(workers());
+  SharedRestorePreservedMarksTaskExecutor task_executor(workers());
+  _preserved_marks_set.restore(&task_executor);
 
   g1_policy()->phase_times()->record_evac_fail_remove_self_forwards((os::elapsedTime() - remove_self_forwards_start) * 1000.0);
 }
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -109,7 +109,7 @@
   _old_set.remove(hr);
 }
 
-// It dirties the cards that cover the block so that so that the post
+// It dirties the cards that cover the block so that the post
 // write barrier never queues anything when updating objects on this
 // block. It is assumed (and in fact we assert) that the block
 // belongs to a young region.
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupStat.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupStat.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -80,7 +80,7 @@
   log_info(gc, stringdedup)(
     "Concurrent String Deduplication "
     G1_STRDEDUP_BYTES_FORMAT_NS "->" G1_STRDEDUP_BYTES_FORMAT_NS "(" G1_STRDEDUP_BYTES_FORMAT_NS "), avg "
-    G1_STRDEDUP_PERCENT_FORMAT_NS ", " G1_STRDEDUP_TIME_FORMAT "]",
+    G1_STRDEDUP_PERCENT_FORMAT_NS ", " G1_STRDEDUP_TIME_FORMAT,
     G1_STRDEDUP_BYTES_PARAM(last_stat._new_bytes),
     G1_STRDEDUP_BYTES_PARAM(last_stat._new_bytes - last_stat._deduped_bytes),
     G1_STRDEDUP_BYTES_PARAM(last_stat._deduped_bytes),
--- a/hotspot/src/share/vm/gc/parallel/psPromotionManager.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/parallel/psPromotionManager.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "gc/parallel/gcTaskManager.hpp"
 #include "gc/parallel/mutableSpace.hpp"
 #include "gc/parallel/parallelScavengeHeap.hpp"
 #include "gc/parallel/psOldGen.hpp"
@@ -237,8 +238,53 @@
   _preserved_marks = preserved_marks;
 }
 
+class ParRestoreGCTask : public GCTask {
+private:
+  const uint _id;
+  PreservedMarksSet* const _preserved_marks_set;
+  volatile size_t* const _total_size_addr;
+
+public:
+  virtual char* name() {
+    return (char*) "preserved mark restoration task";
+  }
+
+  virtual void do_it(GCTaskManager* manager, uint which){
+    _preserved_marks_set->get(_id)->restore_and_increment(_total_size_addr);
+  }
+
+  ParRestoreGCTask(uint id,
+                   PreservedMarksSet* preserved_marks_set,
+                   volatile size_t* total_size_addr)
+    : _id(id),
+      _preserved_marks_set(preserved_marks_set),
+      _total_size_addr(total_size_addr) { }
+};
+
+class PSRestorePreservedMarksTaskExecutor : public RestorePreservedMarksTaskExecutor {
+private:
+  GCTaskManager* _gc_task_manager;
+
+public:
+  PSRestorePreservedMarksTaskExecutor(GCTaskManager* gc_task_manager)
+      : _gc_task_manager(gc_task_manager) { }
+
+  void restore(PreservedMarksSet* preserved_marks_set,
+               volatile size_t* total_size_addr) {
+    // GCTask / GCTaskQueue are ResourceObjs
+    ResourceMark rm;
+
+    GCTaskQueue* q = GCTaskQueue::create();
+    for (uint i = 0; i < preserved_marks_set->num(); i += 1) {
+      q->enqueue(new ParRestoreGCTask(i, preserved_marks_set, total_size_addr));
+    }
+    _gc_task_manager->execute_and_wait(q);
+  }
+};
+
 void PSPromotionManager::restore_preserved_marks() {
-  _preserved_marks_set->restore(PSScavenge::gc_task_manager());
+  PSRestorePreservedMarksTaskExecutor task_executor(PSScavenge::gc_task_manager());
+  _preserved_marks_set->restore(&task_executor);
 }
 
 void PSPromotionManager::drain_stacks_depth(bool totally_drain) {
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -739,7 +739,8 @@
   eden()->object_iterate(&rspc);
   from()->object_iterate(&rspc);
 
-  _preserved_marks_set.restore(GenCollectedHeap::heap()->workers());
+  SharedRestorePreservedMarksTaskExecutor task_executor(GenCollectedHeap::heap()->workers());
+  _preserved_marks_set.restore(&task_executor);
 }
 
 void DefNewGeneration::handle_promotion_failure(oop old) {
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -386,7 +386,7 @@
 //     initialized by this point, a fact that we assert when doing the
 //     card-mark.)
 // (c) G1CollectedHeap(G1) uses two kinds of write barriers. When a
-//     G1 concurrent marking is in progress an SATB (pre-write-)barrier is
+//     G1 concurrent marking is in progress an SATB (pre-write-)barrier
 //     is used to remember the pre-value of any store. Initializing
 //     stores will not need this barrier, so we need not worry about
 //     compensating for the missing pre-barrier here. Turning now
--- a/hotspot/src/share/vm/gc/shared/preservedMarks.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -28,9 +28,6 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "utilities/macros.hpp"
-#if INCLUDE_ALL_GCS
-#include "gc/parallel/gcTaskManager.hpp"
-#endif
 
 void PreservedMarks::restore() {
   while (!_stack.is_empty()) {
@@ -40,6 +37,15 @@
   assert_empty();
 }
 
+void PreservedMarks::restore_and_increment(volatile size_t* const total_size_addr) {
+  const size_t stack_size = size();
+  restore();
+  // Only do the atomic add if the size is > 0.
+  if (stack_size > 0) {
+    Atomic::add(stack_size, total_size_addr);
+  }
+}
+
 #ifndef PRODUCT
 void PreservedMarks::assert_empty() {
   assert(_stack.is_empty(), "stack expected to be empty, size = "SIZE_FORMAT,
@@ -82,13 +88,7 @@
   virtual void work(uint worker_id) {
     uint task_id = 0;
     while (!_sub_tasks.is_task_claimed(/* reference */ task_id)) {
-      PreservedMarks* const preserved_marks = _preserved_marks_set->get(task_id);
-      const size_t size = preserved_marks->size();
-      preserved_marks->restore();
-      // Only do the atomic add if the size is > 0.
-      if (size > 0) {
-        Atomic::add(size, _total_size_addr);
-      }
+      _preserved_marks_set->get(task_id)->restore_and_increment(_total_size_addr);
     }
     _sub_tasks.all_tasks_completed();
   }
@@ -104,53 +104,6 @@
   }
 };
 
-void PreservedMarksSet::restore_internal(WorkGang* workers,
-                                         volatile size_t* total_size_addr) {
-  assert(workers != NULL, "pre-condition");
-  ParRestoreTask task(workers->active_workers(), this, total_size_addr);
-  workers->run_task(&task);
-}
-
-#if INCLUDE_ALL_GCS
-class ParRestoreGCTask : public GCTask {
-private:
-  const uint _id;
-  PreservedMarksSet* const _preserved_marks_set;
-  volatile size_t* const _total_size_addr;
-
-public:
-  virtual char* name() { return (char*) "preserved mark restoration task"; }
-
-  virtual void do_it(GCTaskManager* manager, uint which) {
-    PreservedMarks* const preserved_marks = _preserved_marks_set->get(_id);
-    const size_t size = preserved_marks->size();
-    preserved_marks->restore();
-    // Only do the atomic add if the size is > 0.
-    if (size > 0) {
-      Atomic::add(size, _total_size_addr);
-    }
-  }
-
-  ParRestoreGCTask(uint id,
-                   PreservedMarksSet* preserved_marks_set,
-                   volatile size_t* total_size_addr)
-    : _id(id),
-      _preserved_marks_set(preserved_marks_set),
-      _total_size_addr(total_size_addr) { }
-};
-
-void PreservedMarksSet::restore_internal(GCTaskManager* gc_task_manager,
-                                         volatile size_t* total_size_addr) {
-  // GCTask / GCTaskQueue are ResourceObjs
-  ResourceMark rm;
-
-  GCTaskQueue* q = GCTaskQueue::create();
-  for (uint i = 0; i < num(); i += 1) {
-    q->enqueue(new ParRestoreGCTask(i, this, total_size_addr));
-  }
-  gc_task_manager->execute_and_wait(q);
-}
-#endif
 
 void PreservedMarksSet::reclaim() {
   assert_empty();
@@ -176,3 +129,16 @@
   }
 }
 #endif // ndef PRODUCT
+
+void SharedRestorePreservedMarksTaskExecutor::restore(PreservedMarksSet* preserved_marks_set,
+                                                      volatile size_t* total_size_addr) {
+  if (_workers == NULL) {
+    for (uint i = 0; i < preserved_marks_set->num(); i += 1) {
+      *total_size_addr += preserved_marks_set->get(i)->size();
+      preserved_marks_set->get(i)->restore();
+    }
+  } else {
+    ParRestoreTask task(_workers->active_workers(), preserved_marks_set, total_size_addr);
+    _workers->run_task(&task);
+  }
+}
--- a/hotspot/src/share/vm/gc/shared/preservedMarks.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -30,7 +30,7 @@
 #include "oops/oop.hpp"
 #include "utilities/stack.hpp"
 
-class GCTaskManager;
+class PreservedMarksSet;
 class WorkGang;
 
 class PreservedMarks VALUE_OBJ_CLASS_SPEC {
@@ -61,6 +61,7 @@
   // reclaim the memory taken up by the stack segments.
   void restore();
 
+  void restore_and_increment(volatile size_t* const _total_size_addr);
   inline static void init_forwarded_mark(oop obj);
 
   // Assert the stack is empty and has no cached segments.
@@ -75,6 +76,24 @@
   virtual void do_object(oop obj);
 };
 
+class RestorePreservedMarksTaskExecutor {
+public:
+  void virtual restore(PreservedMarksSet* preserved_marks_set,
+                       volatile size_t* total_size_addr) = 0;
+};
+
+class SharedRestorePreservedMarksTaskExecutor : public RestorePreservedMarksTaskExecutor {
+private:
+    WorkGang* _workers;
+
+public:
+    SharedRestorePreservedMarksTaskExecutor(WorkGang* workers) : _workers(workers) { }
+
+    void restore(PreservedMarksSet* preserved_marks_set,
+                 volatile size_t* total_size_addr);
+
+};
+
 class PreservedMarksSet : public CHeapObj<mtGC> {
 private:
   // true -> _stacks will be allocated in the C heap
@@ -91,13 +110,6 @@
   // or == NULL if they have not.
   Padded<PreservedMarks>* _stacks;
 
-  // Internal version of restore() that uses a WorkGang for parallelism.
-  void restore_internal(WorkGang* workers, volatile size_t* total_size_addr);
-
-  // Internal version of restore() that uses a GCTaskManager for parallelism.
-  void restore_internal(GCTaskManager* gc_task_manager,
-                        volatile size_t* total_size_addr);
-
 public:
   uint num() const { return _num; }
 
@@ -111,14 +123,11 @@
   // Allocate stack array.
   void init(uint num);
 
-  // Itrerate over all stacks, restore all presered marks, and reclaim
-  // the memory taken up by the stack segments. If the executor is
-  // NULL, restoration will be done serially. If the executor is not
-  // NULL, restoration could be done in parallel (when it makes
-  // sense). Supported executors: WorkGang (Serial, CMS, G1),
-  // GCTaskManager (PS).
-  template <class E>
-  inline void restore(E* executor);
+  // Iterate over all stacks, restore all preserved marks, and reclaim
+  // the memory taken up by the stack segments.
+  // Supported executors: SharedRestorePreservedMarksTaskExecutor (Serial, CMS, G1),
+  // PSRestorePreservedMarksTaskExecutor (PS).
+  inline void restore(RestorePreservedMarksTaskExecutor* executor);
 
   // Reclaim stack array.
   void reclaim();
--- a/hotspot/src/share/vm/gc/shared/preservedMarks.inline.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/preservedMarks.inline.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -49,8 +49,7 @@
   obj->init_mark();
 }
 
-template <class E>
-inline void PreservedMarksSet::restore(E* executor) {
+inline void PreservedMarksSet::restore(RestorePreservedMarksTaskExecutor* executor) {
   volatile size_t total_size = 0;
 
 #ifdef ASSERT
@@ -61,17 +60,7 @@
   }
 #endif // def ASSERT
 
-  if (executor == NULL) {
-    for (uint i = 0; i < _num; i += 1) {
-      total_size += get(i)->size();
-      get(i)->restore();
-    }
-  } else {
-    // Right now, if the executor is not NULL we do the work in
-    // parallel. In the future we might want to do the restoration
-    // serially, if there's only a small number of marks per stack.
-    restore_internal(executor, &total_size);
-  }
+  executor->restore(this, &total_size);
   assert_empty();
 
   assert(total_size == total_size_before,
--- a/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/threadLocalAllocBuffer.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -108,8 +108,9 @@
     // do nothing.  tlabs must be inited by initialize() calls
   }
 
-  static const size_t min_size()                 { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
-  static const size_t max_size()                 { assert(_max_size != 0, "max_size not set up"); return _max_size; }
+  static size_t min_size()                       { return align_object_size(MinTLABSize / HeapWordSize) + alignment_reserve(); }
+  static size_t max_size()                       { assert(_max_size != 0, "max_size not set up"); return _max_size; }
+  static size_t max_size_in_bytes()              { return max_size() * BytesPerWord; }
   static void set_max_size(size_t max_size)      { _max_size = max_size; }
 
   HeapWord* start() const                        { return _start; }
--- a/hotspot/src/share/vm/gc/shared/workgroup.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/workgroup.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -44,11 +44,6 @@
     vm_exit_out_of_memory(0, OOM_MALLOC_ERROR, "Cannot create GangWorker array.");
   }
 
-  _active_workers = ParallelGCThreads;
-  if (UseDynamicNumberOfGCThreads && !FLAG_IS_CMDLINE(ParallelGCThreads)) {
-    _active_workers = 1U;
-  }
-
   add_workers(true);
 }
 
@@ -60,6 +55,10 @@
 }
 
 void AbstractWorkGang::add_workers(bool initializing) {
+  add_workers(_active_workers, initializing);
+}
+
+void AbstractWorkGang::add_workers(uint active_workers, bool initializing) {
 
   os::ThreadType worker_type;
   if (are_ConcurrentGC_threads()) {
@@ -69,7 +68,7 @@
   }
 
   _created_workers = WorkerManager::add_workers(this,
-                                                _active_workers,
+                                                active_workers,
                                                 _total_workers,
                                                 _created_workers,
                                                 worker_type,
@@ -268,10 +267,11 @@
 }
 
 void WorkGang::run_task(AbstractGangTask* task, uint num_workers) {
-  guarantee(num_workers <= active_workers(),
-            "Trying to execute task %s with %u workers which is more than the amount of active workers %u.",
-            task->name(), num_workers, active_workers());
+  guarantee(num_workers <= total_workers(),
+            "Trying to execute task %s with %u workers which is more than the amount of total workers %u.",
+            task->name(), num_workers, total_workers());
   guarantee(num_workers > 0, "Trying to execute task %s with zero workers", task->name());
+  add_workers(num_workers, false);
   _dispatcher->coordinator_execute_on_workers(task, num_workers);
 }
 
--- a/hotspot/src/share/vm/gc/shared/workgroup.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/gc/shared/workgroup.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -170,6 +170,9 @@
   // Add GC workers as needed.
   void add_workers(bool initializing);
 
+  // Add GC workers as needed to reach the specified number of workers.
+  void add_workers(uint active_workers, bool initializing);
+
   // Return the Ith worker.
   AbstractGangWorker* worker(uint i) const;
 
@@ -214,7 +217,8 @@
   virtual void run_task(AbstractGangTask* task);
   // Run a task with the given number of workers, returns
   // when the task is done. The number of workers must be at most the number of
-  // active workers.
+  // active workers.  Additional workers may be created if an insufficient
+  // number currently exists.
   void run_task(AbstractGangTask* task, uint num_workers);
 
 protected:
--- a/hotspot/src/share/vm/jvmci/jvmciRuntime.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/jvmci/jvmciRuntime.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -40,31 +40,6 @@
 #define JVMCI_ERROR_OK(...)   JVMCI_ERROR_(JVMCIEnv::ok, __VA_ARGS__)
 #define CHECK_OK              CHECK_(JVMCIEnv::ok)
 
-class ParseClosure : public StackObj {
-  int _lineNo;
-  char* _filename;
-  bool _abort;
-protected:
-  void abort() { _abort = true; }
-  void warn_and_abort(const char* message) {
-    warn(message);
-    abort();
-  }
-  void warn(const char* message) {
-    warning("Error at line %d while parsing %s: %s", _lineNo, _filename == NULL ? "?" : _filename, message);
-  }
- public:
-  ParseClosure() : _lineNo(0), _filename(NULL), _abort(false) {}
-  void parse_line(char* line) {
-    _lineNo++;
-    do_line(line);
-  }
-  virtual void do_line(char* line) = 0;
-  int lineNo() { return _lineNo; }
-  bool is_aborted() { return _abort; }
-  void set_filename(char* path) {_filename = path; _lineNo = 0;}
-};
-
 class JVMCIRuntime: public AllStatic {
  public:
   // Constants describing whether JVMCI wants to be able to adjust the compilation
--- a/hotspot/src/share/vm/logging/logConfiguration.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/logging/logConfiguration.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -484,13 +484,13 @@
               " -Xlog:gc::uptime,tid\n"
               "\t Log messages tagged with 'gc' tag using 'info' level to output 'stdout', using 'uptime' and 'tid' decorations.\n\n"
 
-              " -Xlog:gc*=info,rt*=off\n"
-              "\t Log messages tagged with at least 'gc' using 'info' level, but turn off logging of messages tagged with 'rt'.\n"
-              "\t (Messages tagged with both 'gc' and 'rt' will not be logged.)\n\n"
+              " -Xlog:gc*=info,safepoint*=off\n"
+              "\t Log messages tagged with at least 'gc' using 'info' level, but turn off logging of messages tagged with 'safepoint'.\n"
+              "\t (Messages tagged with both 'gc' and 'safepoint' will not be logged.)\n\n"
 
-              " -Xlog:disable -Xlog:rt=trace:rttrace.txt\n"
+              " -Xlog:disable -Xlog:safepoint=trace:safepointtrace.txt\n"
               "\t Turn off all logging, including warnings and errors,\n"
-              "\t and then enable messages tagged with 'rt' using 'trace' level to file 'rttrace.txt'.\n");
+              "\t and then enable messages tagged with 'safepoint' using 'trace' level to file 'safepointtrace.txt'.\n");
 }
 
 void LogConfiguration::rotate_all_outputs() {
--- a/hotspot/src/share/vm/memory/metaspace.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/memory/metaspace.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -2933,7 +2933,7 @@
   // Don't use large pages for the class space.
   bool large_pages = false;
 
-#ifndef AARCH64
+#if !(defined(AARCH64) || defined(AIX))
   ReservedSpace metaspace_rs = ReservedSpace(compressed_class_space_size(),
                                              _reserve_alignment,
                                              large_pages,
@@ -2945,18 +2945,25 @@
   // bits.
   if ((uint64_t)requested_addr + compressed_class_space_size() < 4*G) {
     metaspace_rs = ReservedSpace(compressed_class_space_size(),
-                                             _reserve_alignment,
-                                             large_pages,
-                                             requested_addr);
+                                 _reserve_alignment,
+                                 large_pages,
+                                 requested_addr);
   }
 
   if (! metaspace_rs.is_reserved()) {
-    // Try to align metaspace so that we can decode a compressed klass
-    // with a single MOVK instruction.  We can do this iff the
+    // Aarch64: Try to align metaspace so that we can decode a compressed
+    // klass with a single MOVK instruction.  We can do this iff the
     // compressed class base is a multiple of 4G.
-    for (char *a = (char*)align_ptr_up(requested_addr, 4*G);
+    // Aix: Search for a place where we can find memory. If we need to load
+    // the base, 4G alignment is helpful, too.
+    size_t increment = AARCH64_ONLY(4*)G;
+    for (char *a = (char*)align_ptr_up(requested_addr, increment);
          a < (char*)(1024*G);
-         a += 4*G) {
+         a += increment) {
+      if (a == (char *)(32*G)) {
+        // Go faster from here on. Zero-based is no longer possible.
+        increment = 4*G;
+      }
 
 #if INCLUDE_CDS
       if (UseSharedSpaces
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -2182,39 +2182,21 @@
   return dest;
 }
 
-const jbyte* InstanceKlass::package_from_name(const Symbol* name, int& length) {
-  ResourceMark rm;
-  length = 0;
+// Used to obtain the package name from a fully qualified class name.
+Symbol* InstanceKlass::package_from_name(const Symbol* name, TRAPS) {
   if (name == NULL) {
     return NULL;
   } else {
-    const jbyte* base_name = name->base();
-    const jbyte* last_slash = UTF8::strrchr(base_name, name->utf8_length(), '/');
-
-    if (last_slash == NULL) {
-      // No package name
+    if (name->utf8_length() <= 0) {
       return NULL;
-    } else {
-      // Skip over '['s
-      if (*base_name == '[') {
-        do {
-          base_name++;
-        } while (*base_name == '[');
-        if (*base_name != 'L') {
-          // Fully qualified class names should not contain a 'L'.
-          // Set length to -1 to indicate that the package name
-          // could not be obtained due to an error condition.
-          // In this situtation, is_same_class_package returns false.
-          length = -1;
-          return NULL;
-        }
-      }
-
-      // Found the package name, look it up in the symbol table.
-      length = last_slash - base_name;
-      assert(length > 0, "Bad length for package name");
-      return base_name;
     }
+    ResourceMark rm;
+    const char* package_name = ClassLoader::package_from_name((const char*) name->as_C_string());
+    if (package_name == NULL) {
+      return NULL;
+    }
+    Symbol* pkg_name = SymbolTable::new_symbol(package_name, THREAD);
+    return pkg_name;
   }
 }
 
@@ -2230,12 +2212,9 @@
 }
 
 void InstanceKlass::set_package(ClassLoaderData* loader_data, TRAPS) {
-  int length = 0;
-  const jbyte* base_name = package_from_name(name(), length);
-
-  if (base_name != NULL && loader_data != NULL) {
-    TempNewSymbol pkg_name = SymbolTable::new_symbol((const char*)base_name, length, CHECK);
-
+  TempNewSymbol pkg_name = package_from_name(name(), CHECK);
+
+  if (pkg_name != NULL && loader_data != NULL) {
     // Find in class loader's package entry table.
     _package_entry = loader_data->packages()->lookup_only(pkg_name);
 
@@ -2331,20 +2310,18 @@
   if (class_loader1 != class_loader2) {
     return false;
   } else if (class_name1 == class_name2) {
-    return true;                // skip painful bytewise comparison
+    return true;
   } else {
     ResourceMark rm;
 
-    // The Symbol*'s are in UTF8 encoding. Since we only need to check explicitly
-    // for ASCII characters ('/', 'L', '['), we can keep them in UTF8 encoding.
-    // Otherwise, we just compare jbyte values between the strings.
-    int length1 = 0;
-    int length2 = 0;
-    const jbyte *name1 = package_from_name(class_name1, length1);
-    const jbyte *name2 = package_from_name(class_name2, length2);
-
-    if ((length1 < 0) || (length2 < 0)) {
-      // error occurred parsing package name.
+    bool bad_class_name = false;
+    const char* name1 = ClassLoader::package_from_name((const char*) class_name1->as_C_string(), &bad_class_name);
+    if (bad_class_name) {
+      return false;
+    }
+
+    const char* name2 = ClassLoader::package_from_name((const char*) class_name2->as_C_string(), &bad_class_name);
+    if (bad_class_name) {
       return false;
     }
 
@@ -2354,13 +2331,13 @@
       return name1 == name2;
     }
 
-    // Check that package part is identical
-    return UTF8::equal(name1, length1, name2, length2);
+    // Check that package is identical
+    return (strcmp(name1, name2) == 0);
   }
 }
 
 // Returns true iff super_method can be overridden by a method in targetclassname
-// See JSL 3rd edition 8.4.6.1
+// See JLS 3rd edition 8.4.6.1
 // Assumes name-signature match
 // "this" is InstanceKlass of super_method which must exist
 // note that the InstanceKlass of the method in the targetclassname has not always been created yet
@@ -2716,7 +2693,7 @@
   return NULL;
 }
 
-bool InstanceKlass::add_member_name(Handle mem_name) {
+oop InstanceKlass::add_member_name(Handle mem_name, bool intern) {
   jweak mem_name_wref = JNIHandles::make_weak_global(mem_name);
   MutexLocker ml(MemberNameTable_lock);
   DEBUG_ONLY(NoSafepointVerifier nsv);
@@ -2726,7 +2703,7 @@
   // is called!
   Method* method = (Method*)java_lang_invoke_MemberName::vmtarget(mem_name());
   if (method->is_obsolete()) {
-    return false;
+    return NULL;
   } else if (method->is_old()) {
     // Replace method with redefined version
     java_lang_invoke_MemberName::set_vmtarget(mem_name(), method_with_idnum(method->method_idnum()));
@@ -2735,8 +2712,11 @@
   if (_member_names == NULL) {
     _member_names = new (ResourceObj::C_HEAP, mtClass) MemberNameTable(idnum_allocated_count());
   }
-  _member_names->add_member_name(mem_name_wref);
-  return true;
+  if (intern) {
+    return _member_names->find_or_add_member_name(mem_name_wref);
+  } else {
+    return _member_names->add_member_name(mem_name_wref);
+  }
 }
 
 // -----------------------------------------------------------------------------------------------------
@@ -3027,7 +3007,11 @@
   if (cfs != NULL) {
     if (cfs->source() != NULL) {
       if (module_name != NULL) {
-        log->print(" source: jrt:/%s", module_name);
+        if (ClassLoader::is_jrt(cfs->source())) {
+          log->print(" source: jrt:/%s", module_name);
+        } else {
+          log->print(" source: %s", cfs->source());
+        }
       } else {
         log->print(" source: %s", cfs->source());
       }
--- a/hotspot/src/share/vm/oops/instanceKlass.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/oops/instanceKlass.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1108,7 +1108,7 @@
 
   // Naming
   const char* signature_name() const;
-  static const jbyte* package_from_name(const Symbol* name, int& length);
+  static Symbol* package_from_name(const Symbol* name, TRAPS);
 
   // GC specific object visitors
   //
@@ -1298,7 +1298,7 @@
   // JSR-292 support
   MemberNameTable* member_names() { return _member_names; }
   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
-  bool add_member_name(Handle member_name);
+  oop add_member_name(Handle member_name, bool intern);
 
 public:
   // JVMTI support
--- a/hotspot/src/share/vm/oops/method.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/oops/method.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -246,7 +246,7 @@
   int code_size() const                  { return constMethod()->code_size(); }
 
   // method size in words
-  int method_size() const                { return sizeof(Method)/wordSize + is_native() ? 2 : 0; }
+  int method_size() const                { return sizeof(Method)/wordSize + ( is_native() ? 2 : 0 ); }
 
   // constant pool for Klass* holding this method
   ConstantPool* constants() const              { return constMethod()->constants(); }
--- a/hotspot/src/share/vm/opto/arraycopynode.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/arraycopynode.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -204,7 +204,8 @@
   }
 
   if (!finish_transform(phase, can_reshape, ctl, mem)) {
-    return NULL;
+    // Return NodeSentinel to indicate that the transform failed
+    return NodeSentinel;
   }
 
   return mem;
@@ -222,6 +223,7 @@
   Node* dest = in(ArrayCopyNode::Dest);
   const Type* src_type = phase->type(src);
   const TypeAryPtr* ary_src = src_type->isa_aryptr();
+  assert(ary_src != NULL, "should be an array copy/clone");
 
   if (is_arraycopy() || is_copyofrange() || is_copyof()) {
     const Type* dest_type = phase->type(dest);
@@ -520,7 +522,7 @@
 
   Node* mem = try_clone_instance(phase, can_reshape, count);
   if (mem != NULL) {
-    return mem;
+    return (mem == NodeSentinel) ? NULL : mem;
   }
 
   Node* adr_src = NULL;
@@ -627,31 +629,37 @@
   return CallNode::may_modify_arraycopy_helper(dest_t, t_oop, phase);
 }
 
-bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase) {
+bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac) {
   if (n->is_Proj()) {
     n = n->in(0);
     if (n->is_Call() && n->as_Call()->may_modify(t_oop, phase)) {
+      if (n->isa_ArrayCopy() != NULL) {
+        ac = n->as_ArrayCopy();
+      }
       return true;
     }
   }
   return false;
 }
 
-bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase) {
+bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
   Node* mem = mb->in(TypeFunc::Memory);
 
   if (mem->is_MergeMem()) {
     Node* n = mem->as_MergeMem()->memory_at(Compile::AliasIdxRaw);
-    if (may_modify_helper(t_oop, n, phase)) {
+    if (may_modify_helper(t_oop, n, phase, ac)) {
       return true;
     } else if (n->is_Phi()) {
       for (uint i = 1; i < n->req(); i++) {
         if (n->in(i) != NULL) {
-          if (may_modify_helper(t_oop, n->in(i), phase)) {
+          if (may_modify_helper(t_oop, n->in(i), phase, ac)) {
             return true;
           }
         }
       }
+    } else if (n->Opcode() == Op_StoreCM) {
+      // Ignore card mark stores
+      return may_modify_helper(t_oop, n->in(MemNode::Memory), phase, ac);
     }
   }
 
--- a/hotspot/src/share/vm/opto/arraycopynode.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/arraycopynode.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,7 +107,7 @@
                             BasicType copy_type, const Type* value_type, int count);
   bool finish_transform(PhaseGVN *phase, bool can_reshape,
                         Node* ctl, Node *mem);
-  static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase);
+  static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac);
 
 public:
 
@@ -162,7 +162,7 @@
 
   bool is_alloc_tightly_coupled() const { return _alloc_tightly_coupled; }
 
-  static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase);
+  static bool may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac);
   bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify);
 
 #ifndef PRODUCT
--- a/hotspot/src/share/vm/opto/graphKit.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/graphKit.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -4306,8 +4306,15 @@
       } __ end_if();
     } __ end_if();
   } else {
-    // Object.clone() instrinsic uses this path.
-    g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
+    // The Object.clone() intrinsic uses this path if !ReduceInitialCardMarks.
+    // We don't need a barrier here if the destination is a newly allocated object
+    // in Eden. Otherwise, GC verification breaks because we assume that cards in Eden
+    // are set to 'g1_young_gen' (see G1SATBCardTableModRefBS::verify_g1_young_region()).
+    assert(!use_ReduceInitialCardMarks(), "can only happen with card marking");
+    Node* card_val = __ load(__ ctrl(), card_adr, TypeInt::INT, T_BYTE, Compile::AliasIdxRaw);
+    __ if_then(card_val, BoolTest::ne, young_card); {
+      g1_mark_card(ideal, card_adr, oop_store, alias_idx, index, index_adr, buffer, tf);
+    } __ end_if();
   }
 
   // Final sync IdealKit and GraphKit.
--- a/hotspot/src/share/vm/opto/macro.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/macro.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 #include "opto/cfgnode.hpp"
 #include "opto/compile.hpp"
 #include "opto/convertnode.hpp"
+#include "opto/graphKit.hpp"
 #include "opto/locknode.hpp"
 #include "opto/loopnode.hpp"
 #include "opto/macro.hpp"
@@ -263,41 +264,58 @@
     // checks if the store done to a different from the value's region.
     // And replace Cmp with #0 (false) to collapse G1 post barrier.
     Node* xorx = p2x->find_out_with(Op_XorX);
-    assert(xorx != NULL, "missing G1 post barrier");
-    Node* shift = xorx->unique_out();
-    Node* cmpx = shift->unique_out();
-    assert(cmpx->is_Cmp() && cmpx->unique_out()->is_Bool() &&
-    cmpx->unique_out()->as_Bool()->_test._test == BoolTest::ne,
-    "missing region check in G1 post barrier");
-    _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ));
+    if (xorx != NULL) {
+      Node* shift = xorx->unique_out();
+      Node* cmpx = shift->unique_out();
+      assert(cmpx->is_Cmp() && cmpx->unique_out()->is_Bool() &&
+      cmpx->unique_out()->as_Bool()->_test._test == BoolTest::ne,
+      "missing region check in G1 post barrier");
+      _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ));
 
-    // Remove G1 pre barrier.
+      // Remove G1 pre barrier.
 
-    // Search "if (marking != 0)" check and set it to "false".
-    // There is no G1 pre barrier if previous stored value is NULL
-    // (for example, after initialization).
-    if (this_region->is_Region() && this_region->req() == 3) {
-      int ind = 1;
-      if (!this_region->in(ind)->is_IfFalse()) {
-        ind = 2;
-      }
-      if (this_region->in(ind)->is_IfFalse()) {
-        Node* bol = this_region->in(ind)->in(0)->in(1);
-        assert(bol->is_Bool(), "");
-        cmpx = bol->in(1);
-        if (bol->as_Bool()->_test._test == BoolTest::ne &&
-            cmpx->is_Cmp() && cmpx->in(2) == intcon(0) &&
-            cmpx->in(1)->is_Load()) {
-          Node* adr = cmpx->in(1)->as_Load()->in(MemNode::Address);
-          const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +
-                                              SATBMarkQueue::byte_offset_of_active());
-          if (adr->is_AddP() && adr->in(AddPNode::Base) == top() &&
-              adr->in(AddPNode::Address)->Opcode() == Op_ThreadLocal &&
-              adr->in(AddPNode::Offset) == MakeConX(marking_offset)) {
-            _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ));
+      // Search "if (marking != 0)" check and set it to "false".
+      // There is no G1 pre barrier if previous stored value is NULL
+      // (for example, after initialization).
+      if (this_region->is_Region() && this_region->req() == 3) {
+        int ind = 1;
+        if (!this_region->in(ind)->is_IfFalse()) {
+          ind = 2;
+        }
+        if (this_region->in(ind)->is_IfFalse()) {
+          Node* bol = this_region->in(ind)->in(0)->in(1);
+          assert(bol->is_Bool(), "");
+          cmpx = bol->in(1);
+          if (bol->as_Bool()->_test._test == BoolTest::ne &&
+              cmpx->is_Cmp() && cmpx->in(2) == intcon(0) &&
+              cmpx->in(1)->is_Load()) {
+            Node* adr = cmpx->in(1)->as_Load()->in(MemNode::Address);
+            const int marking_offset = in_bytes(JavaThread::satb_mark_queue_offset() +
+                                                SATBMarkQueue::byte_offset_of_active());
+            if (adr->is_AddP() && adr->in(AddPNode::Base) == top() &&
+                adr->in(AddPNode::Address)->Opcode() == Op_ThreadLocal &&
+                adr->in(AddPNode::Offset) == MakeConX(marking_offset)) {
+              _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ));
+            }
           }
         }
       }
+    } else {
+      assert(!GraphKit::use_ReduceInitialCardMarks(), "can only happen with card marking");
+      // This is a G1 post barrier emitted by the Object.clone() intrinsic.
+      // Search for the CastP2X->URShiftX->AddP->LoadB->Cmp path which checks if the card
+      // is marked as young_gen and replace the Cmp with 0 (false) to collapse the barrier.
+      Node* shift = p2x->find_out_with(Op_URShiftX);
+      assert(shift != NULL, "missing G1 post barrier");
+      Node* addp = shift->unique_out();
+      Node* load = addp->find_out_with(Op_LoadB);
+      assert(load != NULL, "missing G1 post barrier");
+      Node* cmpx = load->unique_out();
+      assert(cmpx->is_Cmp() && cmpx->unique_out()->is_Bool() &&
+             cmpx->unique_out()->as_Bool()->_test._test == BoolTest::ne,
+             "missing card value check in G1 post barrier");
+      _igvn.replace_node(cmpx, makecon(TypeInt::CC_EQ));
+      // There is no G1 pre barrier in this case
     }
     // Now CastP2X can be removed since it is used only on dead path
     // which currently still alive until igvn optimize it.
@@ -326,17 +344,15 @@
         CallNode *call = in->as_Call();
         if (call->may_modify(tinst, phase)) {
           assert(call->is_ArrayCopy(), "ArrayCopy is the only call node that doesn't make allocation escape");
-
           if (call->as_ArrayCopy()->modifies(offset, offset, phase, false)) {
             return in;
           }
         }
         mem = in->in(TypeFunc::Memory);
       } else if (in->is_MemBar()) {
-        if (ArrayCopyNode::may_modify(tinst, in->as_MemBar(), phase)) {
-          assert(in->in(0)->is_Proj() && in->in(0)->in(0)->is_ArrayCopy(), "should be arraycopy");
-          ArrayCopyNode* ac = in->in(0)->in(0)->as_ArrayCopy();
-          assert(ac->is_clonebasic(), "Only basic clone is a non escaping clone");
+        ArrayCopyNode* ac = NULL;
+        if (ArrayCopyNode::may_modify(tinst, in->as_MemBar(), phase, ac)) {
+          assert(ac != NULL && ac->is_clonebasic(), "Only basic clone is a non escaping clone");
           return ac;
         }
         mem = in->in(TypeFunc::Memory);
--- a/hotspot/src/share/vm/opto/memnode.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -160,7 +160,8 @@
           }
         }
       } else if (proj_in->is_MemBar()) {
-        if (ArrayCopyNode::may_modify(t_oop, proj_in->as_MemBar(), phase)) {
+        ArrayCopyNode* ac = NULL;
+        if (ArrayCopyNode::may_modify(t_oop, proj_in->as_MemBar(), phase, ac)) {
           break;
         }
         result = proj_in->in(TypeFunc::Memory);
@@ -657,7 +658,8 @@
           continue;         // (a) advance through independent call memory
         }
       } else if (mem->is_Proj() && mem->in(0)->is_MemBar()) {
-        if (ArrayCopyNode::may_modify(addr_t, mem->in(0)->as_MemBar(), phase)) {
+        ArrayCopyNode* ac = NULL;
+        if (ArrayCopyNode::may_modify(addr_t, mem->in(0)->as_MemBar(), phase, ac)) {
           break;
         }
         mem = mem->in(0)->in(TypeFunc::Memory);
--- a/hotspot/src/share/vm/opto/parse.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/parse.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -166,14 +166,11 @@
     int                _all_successors; // Include exception paths also.
     Block**            _successors;
 
-    // Use init_node/init_graph to initialize Blocks.
-    // Block() : _live_locals((uintptr_t*)NULL,0) { ShouldNotReachHere(); }
-    Block() : _live_locals() { ShouldNotReachHere(); }
-
    public:
 
     // Set up the block data structure itself.
-    void init_node(Parse* outer, int po);
+    Block(Parse* outer, int rpo);
+
     // Set up the block's relations to other blocks.
     void init_graph(Parse* outer);
 
--- a/hotspot/src/share/vm/opto/parse1.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/opto/parse1.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1235,29 +1235,33 @@
   // Create the blocks.
   _block_count = flow()->block_count();
   _blocks = NEW_RESOURCE_ARRAY(Block, _block_count);
-  Copy::zero_to_bytes(_blocks, sizeof(Block)*_block_count);
-
-  int rpo;
 
   // Initialize the structs.
-  for (rpo = 0; rpo < block_count(); rpo++) {
+  for (int rpo = 0; rpo < block_count(); rpo++) {
     Block* block = rpo_at(rpo);
-    block->init_node(this, rpo);
+    new(block) Block(this, rpo);
   }
 
   // Collect predecessor and successor information.
-  for (rpo = 0; rpo < block_count(); rpo++) {
+  for (int rpo = 0; rpo < block_count(); rpo++) {
     Block* block = rpo_at(rpo);
     block->init_graph(this);
   }
 }
 
 //-------------------------------init_node-------------------------------------
-void Parse::Block::init_node(Parse* outer, int rpo) {
+Parse::Block::Block(Parse* outer, int rpo) : _live_locals() {
   _flow = outer->flow()->rpo_at(rpo);
   _pred_count = 0;
   _preds_parsed = 0;
   _count = 0;
+  _is_parsed = false;
+  _is_handler = false;
+  _has_merged_backedge = false;
+  _start_map = NULL;
+  _num_successors = 0;
+  _all_successors = 0;
+  _successors = NULL;
   assert(pred_count() == 0 && preds_parsed() == 0, "sanity");
   assert(!(is_merged() || is_parsed() || is_handler() || has_merged_backedge()), "sanity");
   assert(_live_locals.size() == 0, "sanity");
--- a/hotspot/src/share/vm/prims/jvm.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -695,7 +695,7 @@
       // This can safepoint and redefine method, so need both new_obj and method
       // in a handle, for two different reasons.  new_obj can move, method can be
       // deleted if nothing is using it on the stack.
-      m->method_holder()->add_member_name(new_obj());
+      m->method_holder()->add_member_name(new_obj(), false);
     }
   }
 
--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -319,15 +319,7 @@
 JvmtiEnv::GetObjectSize(jobject object, jlong* size_ptr) {
   oop mirror = JNIHandles::resolve_external_guard(object);
   NULL_CHECK(mirror, JVMTI_ERROR_INVALID_OBJECT);
-
-  if (mirror->klass() == SystemDictionary::Class_klass() &&
-      !java_lang_Class::is_primitive(mirror)) {
-    Klass* k = java_lang_Class::as_Klass(mirror);
-    assert(k != NULL, "class for non-primitive mirror must exist");
-    *size_ptr = (jlong)k->size() * wordSize;
-  } else {
-    *size_ptr = (jlong)mirror->size() * wordSize;
-    }
+  *size_ptr = (jlong)mirror->size() * wordSize;
   return JVMTI_ERROR_NONE;
 } /* end GetObjectSize */
 
--- a/hotspot/src/share/vm/prims/methodHandles.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -178,7 +178,7 @@
   return NULL;
 }
 
-oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info) {
+oop MethodHandles::init_method_MemberName(Handle mname, CallInfo& info, bool intern) {
   assert(info.resolved_appendix().is_null(), "only normal methods here");
   methodHandle m = info.resolved_method();
   assert(m.not_null(), "null method handle");
@@ -279,13 +279,7 @@
   // If relevant, the vtable or itable value is stored as vmindex.
   // This is done eagerly, since it is readily available without
   // constructing any new objects.
-  // TO DO: maybe intern mname_oop
-  if (m->method_holder()->add_member_name(mname)) {
-    return mname();
-  } else {
-    // Redefinition caused this to fail.  Return NULL (and an exception?)
-    return NULL;
-  }
+  return m->method_holder()->add_member_name(mname, intern);
 }
 
 oop MethodHandles::init_field_MemberName(Handle mname, fieldDescriptor& fd, bool is_setter) {
@@ -975,7 +969,9 @@
         if (!java_lang_invoke_MemberName::is_instance(result()))
           return -99;  // caller bug!
         CallInfo info(m);
-        oop saved = MethodHandles::init_method_MemberName(result, info);
+        // Since this is going through the methods to create MemberNames, don't search
+        // for matching methods already in the table
+        oop saved = MethodHandles::init_method_MemberName(result, info, /*intern*/false);
         if (saved != result())
           results->obj_at_put(rfill-1, saved);  // show saved instance to user
       } else if (++overflow >= overflow_limit) {
@@ -1056,9 +1052,34 @@
   }
 }
 
-void MemberNameTable::add_member_name(jweak mem_name_wref) {
+oop MemberNameTable::add_member_name(jweak mem_name_wref) {
   assert_locked_or_safepoint(MemberNameTable_lock);
   this->push(mem_name_wref);
+  return JNIHandles::resolve(mem_name_wref);
+}
+
+oop MemberNameTable::find_or_add_member_name(jweak mem_name_wref) {
+  assert_locked_or_safepoint(MemberNameTable_lock);
+  oop new_mem_name = JNIHandles::resolve(mem_name_wref);
+
+  // Find matching member name in the list.
+  // This is linear because these because these are short lists.
+  int len = this->length();
+  int new_index = len;
+  for (int idx = 0; idx < len; idx++) {
+    oop mname = JNIHandles::resolve(this->at(idx));
+    if (mname == NULL) {
+      new_index = idx;
+      continue;
+    }
+    if (java_lang_invoke_MemberName::equals(new_mem_name, mname)) {
+      JNIHandles::destroy_weak_global(mem_name_wref);
+      return mname;
+    }
+  }
+  // Not found, push the new one, or reuse empty slot
+  this->at_put_grow(new_index, mem_name_wref);
+  return new_mem_name;
 }
 
 #if INCLUDE_JVMTI
--- a/hotspot/src/share/vm/prims/methodHandles.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/methodHandles.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@
   static Handle new_MemberName(TRAPS);  // must be followed by init_MemberName
   static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target
   static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false);
-  static oop init_method_MemberName(Handle mname_h, CallInfo& info);
+  static oop init_method_MemberName(Handle mname_h, CallInfo& info, bool intern = true);
   static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true);
   static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig,
                               int mflags, KlassHandle caller,
@@ -253,7 +253,8 @@
  public:
   MemberNameTable(int methods_cnt);
   ~MemberNameTable();
-  void add_member_name(jweak mem_name_ref);
+  oop add_member_name(jweak mem_name_ref);
+  oop find_or_add_member_name(jweak mem_name_ref);
 
 #if INCLUDE_JVMTI
   // RedefineClasses() API support:
--- a/hotspot/src/share/vm/prims/unsafe.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/unsafe.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -356,19 +356,6 @@
   return JNIHandles::make_local(env, v);
 } UNSAFE_END
 
-UNSAFE_ENTRY(jclass, Unsafe_GetJavaMirror(JNIEnv *env, jobject unsafe, jlong metaspace_klass)) {
-  Klass* klass = (Klass*) (address) metaspace_klass;
-
-  return (jclass) JNIHandles::make_local(klass->java_mirror());
-} UNSAFE_END
-
-UNSAFE_ENTRY(jlong, Unsafe_GetKlassPointer(JNIEnv *env, jobject unsafe, jobject obj)) {
-  oop o = JNIHandles::resolve(obj);
-  jlong klass = (jlong) (address) o->klass();
-
-  return klass;
-} UNSAFE_END
-
 #ifndef SUPPORTS_NATIVE_CX8
 
 // VM_Version::supports_cx8() is a surrogate for 'supports atomic long memory ops'.
@@ -1152,8 +1139,6 @@
     {CC "putObjectVolatile",CC "(" OBJ "J" OBJ ")V",  FN_PTR(Unsafe_PutObjectVolatile)},
 
     {CC "getUncompressedObject", CC "(" ADR ")" OBJ,  FN_PTR(Unsafe_GetUncompressedObject)},
-    {CC "getJavaMirror",         CC "(" ADR ")" CLS,  FN_PTR(Unsafe_GetJavaMirror)},
-    {CC "getKlassPointer",       CC "(" OBJ ")" ADR,  FN_PTR(Unsafe_GetKlassPointer)},
 
     DECLARE_GETPUTOOP(Boolean, Z),
     DECLARE_GETPUTOOP(Byte, B),
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1433,6 +1433,10 @@
   return (jlong) MetaspaceGC::capacity_until_GC();
 WB_END
 
+WB_ENTRY(jboolean, WB_MetaspaceShouldConcurrentCollect(JNIEnv* env, jobject wb))
+  return MetaspaceGC::should_concurrent_collect();
+WB_END
+
 
 WB_ENTRY(void, WB_AssertMatchingSafepointCalls(JNIEnv* env, jobject o, jboolean mutexSafepointValue, jboolean attemptedNoSafepointValue))
   Monitor::SafepointCheckRequired sfpt_check_required = mutexSafepointValue ?
@@ -1813,6 +1817,7 @@
      CC"(Ljava/lang/ClassLoader;JJ)V",                (void*)&WB_FreeMetaspace },
   {CC"incMetaspaceCapacityUntilGC", CC"(J)J",         (void*)&WB_IncMetaspaceCapacityUntilGC },
   {CC"metaspaceCapacityUntilGC", CC"()J",             (void*)&WB_MetaspaceCapacityUntilGC },
+  {CC"metaspaceShouldConcurrentCollect", CC"()Z",     (void*)&WB_MetaspaceShouldConcurrentCollect },
   {CC"getCPUFeatures",     CC"()Ljava/lang/String;",  (void*)&WB_GetCPUFeatures     },
   {CC"getNMethod0",         CC"(Ljava/lang/reflect/Executable;Z)[Ljava/lang/Object;",
                                                       (void*)&WB_GetNMethod         },
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -498,6 +498,19 @@
   }
 #endif
 
+  if (thread->frames_to_pop_failed_realloc() > 0 && exec_mode != Unpack_uncommon_trap) {
+    assert(thread->has_pending_exception(), "should have thrown OOME");
+    thread->set_exception_oop(thread->pending_exception());
+    thread->clear_pending_exception();
+    exec_mode = Unpack_exception;
+  }
+
+#if INCLUDE_JVMCI
+  if (thread->frames_to_pop_failed_realloc() > 0) {
+    thread->set_pending_monitorenter(false);
+  }
+#endif
+
   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
                                       caller_adjustment * BytesPerWord,
                                       caller_was_method_handle ? 0 : callee_parameters,
--- a/hotspot/src/share/vm/runtime/java.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/java.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -446,6 +446,14 @@
     os::infinite_sleep();
   }
 
+  EventThreadEnd event;
+  if (event.should_commit()) {
+    event.set_thread(THREAD_TRACE_ID(thread));
+    event.commit();
+  }
+
+  TRACE_VM_EXIT();
+
   // Stop the WatcherThread. We do this before disenrolling various
   // PeriodicTasks to reduce the likelihood of races.
   if (PeriodicTask::num_tasks() > 0) {
@@ -484,13 +492,6 @@
     JvmtiExport::post_thread_end(thread);
   }
 
-
-  EventThreadEnd event;
-  if (event.should_commit()) {
-      event.set_thread(THREAD_TRACE_ID(thread));
-      event.commit();
-  }
-
   // Always call even when there are not JVMTI environments yet, since environments
   // may be attached late and JVMTI must track phases of VM execution
   JvmtiExport::post_vm_death();
--- a/hotspot/src/share/vm/runtime/mutexLocker.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/mutexLocker.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -274,7 +274,7 @@
   def(JfrMsg_lock                  , Monitor, leaf,        true,  Monitor::_safepoint_check_always);
   def(JfrBuffer_lock               , Mutex,   leaf,        true,  Monitor::_safepoint_check_never);
   def(JfrThreadGroups_lock         , Mutex,   leaf,        true,  Monitor::_safepoint_check_always);
-  def(JfrStream_lock               , Mutex,   nonleaf,     true,  Monitor::_safepoint_check_never);
+  def(JfrStream_lock               , Mutex,   leaf+1,      true,  Monitor::_safepoint_check_never);      // ensure to rank lower than 'safepoint'
   def(JfrStacktrace_lock           , Mutex,   special,     true,  Monitor::_safepoint_check_sometimes);
 #endif
 
--- a/hotspot/src/share/vm/runtime/reflectionUtils.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/reflectionUtils.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,10 +73,7 @@
 
 
 void FilteredFieldsMap::initialize() {
-  int offset;
-  offset = java_lang_Throwable::get_backtrace_offset();
-  _filtered_fields->append(new FilteredField(SystemDictionary::Throwable_klass(), offset));
-  offset = reflect_ConstantPool::oop_offset();
+  int offset = reflect_ConstantPool::oop_offset();
   _filtered_fields->append(new FilteredField(SystemDictionary::reflect_ConstantPool_klass(), offset));
   offset = reflect_UnsafeStaticFieldAccessorImpl::base_offset();
   _filtered_fields->append(new FilteredField(SystemDictionary::reflect_UnsafeStaticFieldAccessorImpl_klass(), offset));
--- a/hotspot/src/share/vm/runtime/thread.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -3405,6 +3405,8 @@
 //
 //     After phase 2, The VM will begin search classes from -Xbootclasspath/a.
 static void call_initPhase2(TRAPS) {
+  TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, modules, startuptime));
+
   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), true, CHECK);
   instanceKlassHandle klass (THREAD, k);
 
--- a/hotspot/src/share/vm/runtime/thread.inline.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/thread.inline.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -71,9 +71,12 @@
   jlong allocated_bytes = OrderAccess::load_acquire(&_allocated_bytes);
   if (UseTLAB) {
     size_t used_bytes = tlab().used_bytes();
-    if ((ssize_t)used_bytes > 0) {
-      // More-or-less valid tlab. The load_acquire above should ensure
-      // that the result of the add is <= the instantaneous value.
+    if (used_bytes <= ThreadLocalAllocBuffer::max_size_in_bytes()) {
+      // Comparing used_bytes with the maximum allowed size will ensure
+      // that we don't add the used bytes from a semi-initialized TLAB
+      // ending up with incorrect values. There is still a race between
+      // incrementing _allocated_bytes and clearing the TLAB, that might
+      // cause double counting in rare cases.
       return allocated_bytes + used_bytes;
     }
   }
--- a/hotspot/src/share/vm/runtime/vframeArray.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/runtime/vframeArray.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -171,6 +171,8 @@
                                          int exec_mode) {
   JavaThread* thread = (JavaThread*) Thread::current();
 
+  bool realloc_failure_exception = thread->frames_to_pop_failed_realloc() > 0;
+
   // Look at bci and decide on bcp and continuation pc
   address bcp;
   // C++ interpreter doesn't need a pc since it will figure out what to do when it
@@ -204,10 +206,12 @@
   //
   // For Compiler1, deoptimization can occur while throwing a NullPointerException at monitorenter,
   // in which case bcp should point to the monitorenter since it is within the exception's range.
+  //
+  // For realloc failure exception we just pop frames, skip the guarantee.
 
   assert(*bcp != Bytecodes::_monitorenter || is_top_frame, "a _monitorenter must be a top frame");
   assert(thread->deopt_compiled_method() != NULL, "compiled method should be known");
-  guarantee(!(thread->deopt_compiled_method()->is_compiled_by_c2() &&
+  guarantee(realloc_failure_exception || !(thread->deopt_compiled_method()->is_compiled_by_c2() &&
               *bcp == Bytecodes::_monitorenter             &&
               exec_mode == Deoptimization::Unpack_exception),
             "shouldn't get exception during monitorenter");
@@ -237,12 +241,17 @@
         // Deoptimization::fetch_unroll_info_helper
         popframe_preserved_args_size_in_words = in_words(thread->popframe_preserved_args_size_in_words());
       }
-    } else if (JvmtiExport::can_force_early_return() && state != NULL && state->is_earlyret_pending()) {
+    } else if (!realloc_failure_exception && JvmtiExport::can_force_early_return() && state != NULL && state->is_earlyret_pending()) {
       // Force early return from top frame after deoptimization
 #ifndef CC_INTERP
       pc = Interpreter::remove_activation_early_entry(state->earlyret_tos());
 #endif
     } else {
+      if (realloc_failure_exception && JvmtiExport::can_force_early_return() && state != NULL && state->is_earlyret_pending()) {
+        state->clr_earlyret_pending();
+        state->set_earlyret_oop(NULL);
+        state->clr_earlyret_value();
+      }
       // Possibly override the previous pc computation of the top (youngest) frame
       switch (exec_mode) {
       case Deoptimization::Unpack_deopt:
--- a/hotspot/src/share/vm/trace/traceBackend.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/trace/traceBackend.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -48,9 +48,6 @@
   static void on_unloading_classes(void) {
   }
 
-  static void on_vm_error(bool) {
-  }
-
 };
 
 class TraceThreadData {
--- a/hotspot/src/share/vm/trace/traceMacros.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/trace/traceMacros.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -43,6 +43,8 @@
 #define TRACE_REGISTER_NATIVES ((void*)((address_word)(&trace_register_natives)))
 #define TRACE_START() JNI_OK
 #define TRACE_INITIALIZE() JNI_OK
+#define TRACE_VM_EXIT()
+#define TRACE_VM_ERROR()
 
 #define TRACE_DEFINE_TRACE_ID_METHODS typedef int ___IGNORED_hs_trace_type1
 #define TRACE_DEFINE_TRACE_ID_FIELD typedef int ___IGNORED_hs_trace_type2
--- a/hotspot/src/share/vm/utilities/bitMap.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/utilities/bitMap.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -435,7 +435,6 @@
   void clear_bit(idx_t slot_index, idx_t bit_within_slot_index);
   void at_put(idx_t slot_index, idx_t bit_within_slot_index, bool value);
   void at_put_grow(idx_t slot_index, idx_t bit_within_slot_index, bool value);
-  void clear();
 };
 
 // Closure for iterating over BitMaps
--- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Fri Jul 08 12:17:10 2016 -0700
@@ -367,8 +367,4 @@
   _map.at_put(bit, value);
 }
 
-inline void BitMap2D::clear() {
-  _map.clear();
-}
-
 #endif // SHARE_VM_UTILITIES_BITMAP_INLINE_HPP
--- a/hotspot/src/share/vm/utilities/debug.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/utilities/debug.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -54,10 +54,6 @@
 #include "utilities/macros.hpp"
 #include "utilities/vmError.hpp"
 
-#if INCLUDE_TRACE
-#include "trace/tracing.hpp"
-#endif
-
 #include <stdio.h>
 
 #ifndef ASSERT
@@ -306,11 +302,6 @@
    exit(2);
 }
 
-static void notify_tracing() {
-#if INCLUDE_TRACE
-  Tracing::on_vm_error(true);
-#endif
-}
 
 void report_insufficient_metaspace(size_t required_size) {
   warning("\nThe MaxMetaspaceSize of " SIZE_FORMAT " bytes is not large enough.\n"
@@ -334,8 +325,6 @@
       HeapDumper::dump_heap_from_oome();
     }
 
-    notify_tracing();
-
     if (OnOutOfMemoryError && OnOutOfMemoryError[0]) {
       VMError::report_java_out_of_memory(message);
     }
--- a/hotspot/src/share/vm/utilities/vmError.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/src/share/vm/utilities/vmError.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -39,6 +39,7 @@
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
 #include "services/memTracker.hpp"
+#include "trace/traceMacros.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/decoder.hpp"
 #include "utilities/defaultStream.hpp"
@@ -1165,6 +1166,8 @@
     // are handled properly.
     reset_signal_handlers();
 
+    TRACE_VM_ERROR();
+
   } else {
     // If UseOsErrorReporting we call this for each level of the call stack
     // while searching for the exception handler.  Only the first level needs
--- a/hotspot/test/TEST.ROOT	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/TEST.ROOT	Fri Jul 08 12:17:10 2016 -0700
@@ -1,4 +1,4 @@
-# 
+#
 # Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -19,7 +19,7 @@
 # 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.
-# 
+#
 
 #
 
@@ -31,10 +31,10 @@
 
 groups=TEST.groups [closed/TEST.groups]
 
-# Source files for classes that will be used at the beginning of each test suite run, 
-# to determine additional characteristics of the system for use with the @requires tag. 
+# Source files for classes that will be used at the beginning of each test suite run,
+# to determine additional characteristics of the system for use with the @requires tag.
 requires.extraPropDefns = ../../test/jtreg-ext/requires/VMProps.java
-requires.properties=sun.arch.data.model
+requires.properties=sun.arch.data.model vm.simpleArch vm.flightRecorder
 
 # Tests using jtreg 4.2 b02 features
 requiredVersion=4.2 b02
--- a/hotspot/test/compiler/arraycopy/TestEliminatedArrayCopyDeopt.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/arraycopy/TestEliminatedArrayCopyDeopt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,10 @@
 
 /*
  * @test
- * @bug 8130847
+ * @bug 8130847 8156760
  * @summary Eliminated instance/array written to by an array copy variant must be correctly initialized when reallocated at a deopt
  * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement TestEliminatedArrayCopyDeopt
- *
+ * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks TestEliminatedArrayCopyDeopt
  */
 
 // Test that if an ArrayCopy node is eliminated because it doesn't
--- a/hotspot/test/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/arraycopy/TestInstanceCloneAsLoadsStores.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,12 @@
 
 /*
  * @test
- * @bug 6700100
+ * @bug 6700100 8156760
  * @summary small instance clone as loads/stores
  * @compile TestInstanceCloneAsLoadsStores.java TestInstanceCloneUtils.java
  * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileCommand=dontinline,TestInstanceCloneAsLoadsStores::m* TestInstanceCloneAsLoadsStores
  * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileCommand=dontinline,TestInstanceCloneAsLoadsStores::m* -XX:+IgnoreUnrecognizedVMOptions -XX:+StressArrayCopyMacroNode TestInstanceCloneAsLoadsStores
- *
+ * @run main/othervm -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileCommand=dontinline,TestInstanceCloneAsLoadsStores::m* -XX:+IgnoreUnrecognizedVMOptions -XX:-ReduceInitialCardMarks TestInstanceCloneAsLoadsStores
  */
 
 public class TestInstanceCloneAsLoadsStores extends TestInstanceCloneUtils {
--- a/hotspot/test/compiler/c2/6857159/Test6857159.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/c2/6857159/Test6857159.java	Fri Jul 08 12:17:10 2016 -0700
@@ -34,12 +34,12 @@
 import jdk.test.lib.*;
 
 public class Test6857159 {
-    public static void main(String[] args) throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xbatch", "-XX:+PrintCompilation",
-                                                                  "-XX:CompileOnly=Test$ct.run", "Test");
-        OutputAnalyzer analyzer = new OutputAnalyzer(pb.start());
+    public static void main(String[] args) throws Throwable {
+        OutputAnalyzer analyzer = ProcessTools.executeTestJvm("-Xbatch",
+                "-XX:+PrintCompilation", "-XX:CompileOnly=Test$ct.run", "Test");
         analyzer.shouldNotContain("COMPILE SKIPPED");
         analyzer.shouldContain("Test$ct0::run (16 bytes)");
+        analyzer.shouldHaveExitValue(0);
     }
 }
 
--- a/hotspot/test/compiler/c2/6857159/Test6857159.sh	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#!/bin/sh
-# 
-# Copyright (c) 2009, 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.
-# 
-# 
-## some tests require path to find test source dir
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../../test_env.sh
-
-set -x
-
-cp ${TESTSRC}/Test6857159.java .
-cp ${TESTSRC}/Test6857159.sh .
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Test6857159.java
-
-${TESTJAVA}/bin/java  ${TESTOPTS} -Xbatch -XX:+PrintCompilation -XX:CompileOnly=Test6857159\$ct.run Test6857159 > test.out 2>&1
-
-grep "COMPILE SKIPPED" test.out
-
-result=$?
-if [ $result -eq 1 ]
-then
-  echo "Passed"
-  exit 0
-else
-  echo "Failed"
-  exit 1
-fi
--- a/hotspot/test/compiler/c2/6894807/IsInstanceTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/c2/6894807/IsInstanceTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,7 @@
  * @test
  * @bug 6894807
  * @summary No ClassCastException for HashAttributeSet constructors if run with -Xcomp
- * @compile IsInstanceTest.java
- * @run shell Test6894807.sh
+ * @run main IsInstanceTest
 */
 
 public class IsInstanceTest {
@@ -35,13 +34,7 @@
         BaseInterface baseInterfaceImpl = new BaseInterfaceImpl();
         for (int i = 0; i < 100000; i++) {
             if (isInstanceOf(baseInterfaceImpl, ExtendedInterface.class)) {
-                System.out.println("Failed at index:" + i);
-                System.out.println("Arch: "+System.getProperty("os.arch", "")+
-                                   " OS: "+System.getProperty("os.name", "")+
-                                   " OSV: "+System.getProperty("os.version", "")+
-                                   " Cores: "+Runtime.getRuntime().availableProcessors()+
-                                   " JVM: "+System.getProperty("java.version", "")+" "+System.getProperty("sun.arch.data.model", ""));
-                break;
+                throw new AssertionError("Failed at index:" + i);
             }
         }
         System.out.println("Done!");
--- a/hotspot/test/compiler/c2/6894807/Test6894807.sh	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#!/bin/sh
-#
-#  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.
-# 
-
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../../test_env.sh
-
-${TESTJAVA}${FS}bin${FS}java ${TESTOPTS} IsInstanceTest > test.out 2>&1
-
-cat test.out
-
-grep "Failed at index" test.out
-
-if [ $? = 0 ]
-then
-    echo "Test Failed"
-    exit 1
-else
-    echo "Test Passed"
-    exit 0
-fi
--- a/hotspot/test/compiler/c2/7070134/Stemmer.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/c2/7070134/Stemmer.java	Fri Jul 08 12:17:10 2016 -0700
@@ -2,8 +2,10 @@
  * @test
  * @bug 7070134
  * @summary Hotspot crashes with sigsegv from PorterStemmer
- *
- * @run shell Test7070134.sh
+ * @modules java.base/jdk.internal.misc
+ * @library /testlibrary
+ * @run driver jdk.test.lib.FileInstaller words words
+ * @run main/othervm -Xbatch Stemmer words
  */
 
 /*
@@ -61,7 +63,7 @@
   * by calling one of the various stem(something) methods.
   */
 
-class Stemmer
+public class Stemmer
 {  private char[] b;
    private int i,     /* offset into b */
                i_end, /* offset to end of stemmed word */
--- a/hotspot/test/compiler/c2/7070134/Test7070134.sh	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#!/bin/sh
-# 
-# Copyright (c) 2011, 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.
-# 
-# 
-## some tests require path to find test source dir
-if [ "${TESTSRC}" = "" ]
-then
-  TESTSRC=${PWD}
-  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
-fi
-echo "TESTSRC=${TESTSRC}"
-## Adding common setup Variables for running shell tests.
-. ${TESTSRC}/../../../test_env.sh
-
-set -x
-
-cp ${TESTSRC}/Stemmer.java .
-cp ${TESTSRC}/words .
-
-${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} -d . Stemmer.java
-
-${TESTJAVA}/bin/java ${TESTOPTS} -Xbatch Stemmer words > test.out 2>&1
-
-exit $?
-
--- a/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -38,6 +38,7 @@
 /*
  * @test PoolsIndependenceTest
  * @modules java.base/jdk.internal.misc
+ *          java.management
  * @library /testlibrary /test/lib
  * @build PoolsIndependenceTest
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/cpuflags/TestSSE4Disabled.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test TestSSE4Disabled
+ * @bug 8158214
+ * @requires (vm.simpleArch == "x64")
+ * @summary Test correct execution without SSE 4.
+ * @run main/othervm -Xcomp -XX:UseSSE=3 TestSSE4Disabled
+ */
+public class TestSSE4Disabled {
+    public static void main(String args[]) {
+        System.out.println("Passed");
+    }
+}
+
--- a/hotspot/test/compiler/floatingpoint/Test15FloatJNIArgs.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/floatingpoint/Test15FloatJNIArgs.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,9 +25,9 @@
  * @bug 8139258
  * @summary Regression test for 8139258 which failed to properly pass float args
  *          to a jni function on ppc64le.
- * @run main/othervm -Xint Test15FloatJNIArgs
- * @run main/othervm -XX:+TieredCompilation -Xcomp Test15FloatJNIArgs
- * @run main/othervm -XX:-TieredCompilation -Xcomp Test15FloatJNIArgs
+ * @run main/othervm/native -Xint Test15FloatJNIArgs
+ * @run main/othervm/native -XX:+TieredCompilation -Xcomp Test15FloatJNIArgs
+ * @run main/othervm/native -XX:-TieredCompilation -Xcomp Test15FloatJNIArgs
  */
 
 public class Test15FloatJNIArgs {
--- a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library common/patches
  * @modules java.base/jdk.internal.misc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/common/services/jdk.vm.ci.hotspot.services.HotSpotVMEventListener	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,1 @@
+compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/common/services/jdk.vm.ci.runtime.services.JVMCICompilerFactory	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,1 @@
+compiler.jvmci.common.JVMCIHelpers$EmptyCompilerFactory
--- a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -21,7 +21,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @ignore 8139383
--- a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
@@ -138,17 +138,6 @@
                 return CompilerToVMHelper.getConstantPool(cpInst, ptr);
             }
         },
-        OBJECT_TYPE_BASE {
-            @Override
-            ConstantPool getConstantPool() {
-                HotSpotResolvedObjectType type
-                        = HotSpotResolvedObjectType.fromObjectClass(
-                                OBJECT_TYPE_BASE.getClass());
-                long ptrToClass = UNSAFE.getKlassPointer(OBJECT_TYPE_BASE);
-                return CompilerToVMHelper.getConstantPool(type,
-                        getPtrToCpAddress() - ptrToClass);
-            }
-        },
         ;
         abstract ConstantPool getConstantPool();
     }
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @library ../common/patches
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
  /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,8 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @ignore 8158860
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
@@ -149,25 +150,12 @@
                         ptr, COMPRESSED);
             }
         },
-        OBJECT_TYPE_BASE {
-            @Override
-            HotSpotResolvedObjectType getResolvedJavaType() {
-                HotSpotResolvedObjectType type
-                        = HotSpotResolvedObjectType.fromObjectClass(
-                        OBJECT_TYPE_BASE.getClass());
-                long ptrToClass = UNSAFE.getKlassPointer(OBJECT_TYPE_BASE);
-                return CompilerToVMHelper.getResolvedJavaType(type,
-                        getPtrToKlass() - ptrToClass, COMPRESSED);
-            }
-        },
         ;
         abstract HotSpotResolvedObjectType getResolvedJavaType();
     }
 
     private static final Unsafe UNSAFE = Utils.getUnsafe();
     private static final WhiteBox WB = WhiteBox.getWhiteBox();
-    private static final long PTR = UNSAFE.getKlassPointer(
-            new GetResolvedJavaTypeTest());
     private static final Class TEST_CLASS = GetResolvedJavaTypeTest.class;
     /* a compressed parameter for tested method is set to false because
        unsafe.getKlassPointer always returns uncompressed pointer */
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @summary Testing compiler.jvmci.CompilerToVM.lookupKlassInPool method
  * @library /testlibrary /test/lib /
  * @library ../common/patches
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8138708
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @summary Testing compiler.jvmci.CompilerToVM.resolveTypeInPool method
  * @library /testlibrary /test/lib /
  * @library ../common/patches
--- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 /**
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.code.site
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidDebugInfo.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.code.site
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidOopMap.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.code.site
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.config	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,1 @@
+compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8156034
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
+ * @library / /testlibrary
+ * @library ../common/patches
+ * @modules java.base/jdk.internal.misc
+            java.base/jdk.internal.org.objectweb.asm
+ *          java.base/jdk.internal.org.objectweb.asm.tree
+ *          jdk.vm.ci/jdk.vm.ci.hotspot
+ *          jdk.vm.ci/jdk.vm.ci.code
+ *          jdk.vm.ci/jdk.vm.ci.meta
+ *          jdk.vm.ci/jdk.vm.ci.runtime
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
+ * @build compiler.jvmci.common.JVMCIHelpers
+ *     compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
+ * @run main jdk.test.lib.FileInstaller ../common/services/ ./META-INF/services/
+ * @run main jdk.test.lib.FileInstaller ./JvmciNotifyBootstrapFinishedEventTest.config
+ *     ./META-INF/services/jdk.vm.ci.hotspot.services.HotSpotVMEventListener
+ * @run main ClassFileInstaller
+ *     compiler.jvmci.common.JVMCIHelpers$EmptyHotspotCompiler
+ *     compiler.jvmci.common.JVMCIHelpers$EmptyCompilerFactory
+ *     compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
+ *     jdk.test.lib.Asserts
+ *     jdk.test.lib.Utils
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
+ *     -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
+ *     -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
+ *     -Dcompiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest.bootstrap=false
+ *     compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
+ *     -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
+ *     -XX:+UseJVMCICompiler -XX:+BootstrapJVMCI
+ *     -Dcompiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest.bootstrap=true
+ *     compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
+ */
+
+package compiler.jvmci.events;
+
+import jdk.test.lib.Asserts;
+import jdk.vm.ci.hotspot.services.HotSpotVMEventListener;
+
+public class JvmciNotifyBootstrapFinishedEventTest extends HotSpotVMEventListener {
+    private static final boolean BOOTSTRAP = Boolean
+            .getBoolean("compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest.bootstrap");
+    private static volatile int gotBoostrapNotification = 0;
+
+    public static void main(String args[]) {
+        if (BOOTSTRAP) {
+            Asserts.assertEQ(gotBoostrapNotification, 1, "Did not receive expected number of bootstrap events");
+        } else {
+            Asserts.assertEQ(gotBoostrapNotification, 0, "Got unexpected bootstrap event");
+        }
+    }
+
+    @Override
+    public void notifyBootstrapFinished() {
+        gotBoostrapNotification++;
+    }
+}
--- a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library / /testlibrary
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8136421
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/DataPatchTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  * @library /
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.meta
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/InterpreterFrameSizeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.code.site
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleCodeInstallationTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  * @library /
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.meta
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  * @library /
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.meta
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/VirtualObjectDebugInfoTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9") & os.arch != "aarch64"
  * @library /
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.meta
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test jdk.vm.ci.hotspot.test.HotSpotConstantReflectionProviderTest
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.hotspot
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8152341
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.common
@@ -49,26 +49,6 @@
     private static final MemoryAccessProvider PROVIDER = JVMCI.getRuntime().getHostJVMCIBackend().getConstantReflection().getMemoryAccessProvider();
 
     @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class)
-    public void testPositiveReadUnsafeConstant(JavaKind kind, JavaConstant base, Long offset, Object expected, int bitsCount) {
-        Assert.assertEquals(PROVIDER.readUnsafeConstant(kind, base, offset), expected, "Failed to read constant");
-    }
-
-    @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class})
-    public void testReadUnsafeConstantNullBase(JavaKind kind, JavaConstant base, Long offset, Object expected, int bitsCount) {
-        PROVIDER.readUnsafeConstant(kind, null, offset);
-    }
-
-    @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class})
-    public void testNegativeReadUnsafeConstantNullKind(JavaKind kind, JavaConstant base, Long offset, Object expected, int bitsCount) {
-        Assert.assertNull(PROVIDER.readUnsafeConstant(null, base, offset), "Expected null return");
-    }
-
-    @Test(dataProvider = "negative", dataProviderClass = MemoryAccessProviderData.class, expectedExceptions = {IllegalArgumentException.class})
-    public void testNegativeReadUnsafeConstant(JavaKind kind, JavaConstant base) {
-        PROVIDER.readUnsafeConstant(kind, base, 0L);
-    }
-
-    @Test(dataProvider = "positivePrimitive", dataProviderClass = MemoryAccessProviderData.class)
     public void testPositiveReadPrimitiveConstant(JavaKind kind, Constant base, Long offset, Object expected, int bitsCount) {
         Assert.assertEquals(PROVIDER.readPrimitiveConstant(kind, base, offset, bitsCount), expected, "Failed to read constant");
     }
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8152343
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
@@ -31,7 +31,6 @@
  * @build jdk.vm.ci.runtime.test.ConstantTest
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ConstantTest
  */
-// * @compile ConstantTest.java FieldUniverse.java TypeUniverse.java TestMetaAccessProvider.java
 package jdk.vm.ci.runtime.test;
 
 import org.junit.Assert;
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveConcreteMethodTest
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ResolvedJavaTypeResolveMethodTest
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library ../../../../../
  * @modules java.base/jdk.internal.reflect
  *          jdk.vm.ci/jdk.vm.ci.meta
--- a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 /**
  * @test
  * @bug 8151664
- * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9" | os.simpleArch == "aarch64")
+ * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @library /testlibrary /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/stable/TestStableMismatched.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test TestStableMismatched
+ * @bug 8158228
+ * @summary Tests if mismatched char load from stable byte[] returns correct result
+ * @run main/othervm -XX:-CompactStrings -XX:TieredStopAtLevel=1 -Xcomp
+ *                   -XX:CompileOnly=TestStableMismatched::test,::charAt
+ *                   TestStableMismatched
+ * @run main/othervm -XX:-CompactStrings -XX:-TieredCompilation -Xcomp
+ *                   -XX:CompileOnly=TestStableMismatched::test,::charAt
+ *                   TestStableMismatched
+ */
+public class TestStableMismatched {
+    public static void main(String args[]) {
+        test();
+    }
+
+    public static void test() {
+        String text = "abcdefg";
+        // Mismatched char load from @Stable byte[] String.value field
+        char returned = text.charAt(6);
+        if (returned != 'g') {
+            throw new RuntimeException("failed: charAt(6) returned '" + returned + "' instead of 'g'");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/uncommontrap/DeoptReallocFailure.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8146416
+ * @library /test/lib /testlibrary /
+ * @build sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbatch -XX:CompileCommand=exclude,DeoptReallocFailure::main -Xmx100m DeoptReallocFailure
+ *
+ */
+import java.lang.reflect.Method;
+import sun.hotspot.WhiteBox;
+
+class MemoryChunk {
+    MemoryChunk other;
+    Object[][] array;
+
+    MemoryChunk(MemoryChunk other) {
+        this.other = other;
+        array = new Object[1024 * 256][];
+    }
+}
+
+class NoEscape {
+    long f1;
+}
+
+public class DeoptReallocFailure {
+
+    static MemoryChunk root;
+    private static final WhiteBox WB = WhiteBox.getWhiteBox();
+
+    public static synchronized long  test() {
+        NoEscape[] noEscape = new NoEscape[45];
+        noEscape[0] = new NoEscape();
+        for (int i=0;i<1024*256;i++) {
+           root.array[i]= new Object[45];
+        }
+        return noEscape[0].f1;
+    }
+
+    public static void main(String[] args) throws Throwable {
+
+        //Exhaust Memory
+        root = null;
+        try {
+            while (true) {
+                root = new MemoryChunk(root);
+            }
+        } catch (OutOfMemoryError oom) {
+        }
+
+        if (root == null) {
+          return;
+        }
+
+        try {
+            NoEscape dummy = new NoEscape();
+            Method m = DeoptReallocFailure.class.getMethod("test");
+            WB.enqueueMethodForCompilation(m, 4);
+            test();
+        } catch (OutOfMemoryError oom) {
+            root = null;
+            oom.printStackTrace();
+        }
+        System.out.println("TEST PASSED");
+    }
+}
--- a/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
  * @test TestTargetSurvivorRatioFlag
  * @key gc
  * @summary Verify that option TargetSurvivorRatio affects survivor space occupancy after minor GC.
+ * @requires (vm.opt.ExplicitGCInvokesConcurrent == null) | (vm.opt.ExplicitGCInvokesConcurrent == false)
+ * @requires (vm.opt.UseJVMCICompiler == null) | (vm.opt.UseJVMCICompiler == false)
  * @library /testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/GC.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/GC.java	Fri Jul 08 12:17:10 2016 -0700
@@ -38,6 +38,61 @@
  * referenced objects after GCs
  */
 public enum GC {
+    CMC {
+        @Override
+        public Runnable get() {
+            return () -> {
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                WHITE_BOX.g1StartConcMarkCycle();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+            };
+        }
+
+        public Consumer<ReferenceInfo<Object[]>> getChecker() {
+            return getCheckerImpl(false, false, true, false);
+        }
+
+        @Override
+        public List<String> shouldContain() {
+            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
+        }
+
+        @Override
+        public List<String> shouldNotContain() {
+            return Arrays.asList(GCTokens.WB_INITIATED_YOUNG_GC, GCTokens.WB_INITIATED_MIXED_GC,
+                    GCTokens.FULL_GC, GCTokens.YOUNG_GC);
+        }
+    },
+
+    CMC_NO_SURV_ROOTS {
+        @Override
+        public Runnable get() {
+            return () -> {
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+                WHITE_BOX.youngGC();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+
+                WHITE_BOX.g1StartConcMarkCycle();
+                Helpers.waitTillCMCFinished(WHITE_BOX, 0);
+            };
+        }
+
+        public Consumer<ReferenceInfo<Object[]>> getChecker() {
+            return getCheckerImpl(true, false, true, false);
+        }
+
+        @Override
+        public List<String> shouldContain() {
+            return Arrays.asList(GCTokens.WB_INITIATED_CMC);
+        }
+
+        @Override
+        public List<String> shouldNotContain() {
+            return Arrays.asList(GCTokens.WB_INITIATED_MIXED_GC,
+                    GCTokens.FULL_GC, GCTokens.YOUNG_GC);
+        }
+    },
 
     YOUNG_GC {
         @Override
@@ -60,6 +115,7 @@
                     GCTokens.CMC, GCTokens.YOUNG_GC);
         }
     },
+
     FULL_GC {
         @Override
         public Runnable get() {
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/README	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/README	Fri Jul 08 12:17:10 2016 -0700
@@ -31,6 +31,13 @@
 
 3. Full GC with memory pressure - weakly and softly referenced non-humongous and humongous objects are collected.
 
+4. CMC -  weakly referenced non-humongous objects are collected, other objects are not collected since weak references
+          from Young Gen is handled as strong during CMC.
+
+5. CMC_NO_SURV_ROOTS -  weakly referenced non-humongous and humongous objects are collected, softly referenced
+                        non-humongous and humongous objects are not collected since we make 2 Young GC to promote all
+                        weak references to Old Gen.
+
 The test gets gc type as a command line argument.
 Then the test allocates object graph in heap (currently testing scenarios are pre-generated and stored in
 TestcaseData.getPregeneratedTestcases()) with TestObjectGraphAfterGC::allocateObjectGraph.
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java	Fri Jul 08 12:17:10 2016 -0700
@@ -77,6 +77,14 @@
  * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_FULL_GC_MEMORY_PRESSURE.gc.log
  * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC FULL_GC_MEMORY_PRESSURE
  *
+ * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC.gc.log -XX:MaxTenuringThreshold=16
+ * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC
+ *
+ * @run main/othervm -Xms200M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
+ * -XX:G1HeapRegionSize=1M -Xlog:gc=info:file=TestObjectGraphAfterGC_CMC_NO_SURV_ROOTS.gc.log -XX:MaxTenuringThreshold=1
+ * gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC CMC_NO_SURV_ROOTS
+ *
  */
 
 /**
--- a/hotspot/test/gc/g1/ihop/TestIHOPErgo.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/ihop/TestIHOPErgo.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,8 @@
  * @test TestIHOPErgo
  * @bug 8148397
  * @summary Test checks that behavior of Adaptive and Static IHOP at concurrent cycle initiation
- * @requires vm.gc=="G1" | vm.gc=="null"
- * @requires vm.opt.FlightRecorder != true
+ * @requires vm.gc == "G1" | vm.gc == "null"
+ * @requires !vm.flightRecorder
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  * @requires vm.opt.MaxGCPauseMillis == "null"
  * @library /testlibrary /test/lib /
--- a/hotspot/test/gc/g1/ihop/TestIHOPStatic.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/ihop/TestIHOPStatic.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,8 @@
  * @test TestIHOPStatic
  * @bug 8148397
  * @summary Test checks concurrent cycle initiation which depends on IHOP value.
- * @requires vm.gc=="G1" | vm.gc=="null"
- * @requires vm.opt.FlightRecorder != true
+ * @requires vm.gc == "G1" | vm.gc == "null"
+ * @requires !vm.flightRecorder
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  * @library /testlibrary /
  * @modules java.base/jdk.internal.misc
--- a/hotspot/test/gc/g1/plab/TestPLABPromotion.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/plab/TestPLABPromotion.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,8 @@
  * @test TestPLABPromotion
  * @bug 8141278 8141141
  * @summary Test PLAB promotion
- * @requires vm.gc=="G1" | vm.gc=="null"
- * @requires vm.opt.FlightRecorder != true
+ * @requires vm.gc == "G1" | vm.gc == "null"
+ * @requires !vm.flightRecorder
  * @library /testlibrary /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
--- a/hotspot/test/gc/g1/plab/TestPLABResize.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/g1/plab/TestPLABResize.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,8 @@
  * @test TestPLABResize
  * @bug 8141278 8141141
  * @summary Test for PLAB resizing
- * @requires vm.gc=="G1" | vm.gc=="null"
- * @requires vm.opt.FlightRecorder != true
+ * @requires vm.gc == "G1" | vm.gc == "null"
+ * @requires !vm.flightRecorder
  * @library /testlibrary /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/gc/metaspace/TestMetaspaceCMSCancel.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Asserts;
+import sun.hotspot.WhiteBox;
+
+/* @test TestMetaspaceCMSCancel
+ * @bug 8026752
+ * @summary Tests cancel of CMS concurrent cycle for Metaspace after a full GC
+ * @library /testlibrary /test/lib /test/lib/share/classes
+ * @modules java.base/jdk.internal.misc
+ * @build TestMetaspaceCMSCancel
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ * @run main/othervm TestMetaspaceCMSCancel
+ */
+
+
+public class TestMetaspaceCMSCancel {
+
+    public static void main(String[] args) throws Exception {
+        // Set a small MetaspaceSize so that a CMS concurrent collection will be
+        // scheduled.  Set CMSWaitDuration to 5s so that the concurrent collection
+        // start may be delayed.  It does not guarantee 5s before the start of the
+        // concurrent collection but does increase the probability that it will
+        // be started later.  System.gc() is used to invoke a full collection.  Set
+        // ExplicitGCInvokesConcurrent to off so it is a STW collection.
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xbootclasspath/a:.",
+                                                                  "-XX:+UnlockDiagnosticVMOptions",
+                                                                  "-XX:+WhiteBoxAPI",
+                                                                  "-XX:+UseConcMarkSweepGC",
+                                                                  "-XX:MetaspaceSize=2m",
+                                                                  "-XX:CMSWaitDuration=5000",
+                                                                  "-XX:-ExplicitGCInvokesConcurrent",
+                                                                  "-Xlog:gc*=debug",
+                                                                  MetaspaceGCTest.class.getName());
+
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("Concurrent Reset");
+        output.shouldHaveExitValue(0);
+    }
+
+    static class MetaspaceGCTest {
+        public static void main(String [] args) {
+            WhiteBox wb = WhiteBox.getWhiteBox();
+            System.gc();
+            Asserts.assertFalse(wb.metaspaceShouldConcurrentCollect());
+        }
+    }
+}
--- a/hotspot/test/gc/stress/TestGCOld.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/stress/TestGCOld.java	Fri Jul 08 12:17:10 2016 -0700
@@ -32,6 +32,7 @@
  * @run main/othervm -Xmx384M -XX:+UseParallelGC -XX:-UseParallelOldGC TestGCOld 50 1 20 10 10000
  * @run main/othervm -Xmx384M -XX:+UseConcMarkSweepGC TestGCOld 50 1 20 10 10000
  * @run main/othervm -Xmx384M -XX:+UseG1GC TestGCOld 50 1 20 10 10000
+ * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -Xlog:gc,gc+task=trace TestGCOld 50 5 20 1 5000
  */
 
 import java.text.*;
--- a/hotspot/test/gc/stress/TestStressG1Humongous.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/gc/stress/TestStressG1Humongous.java	Fri Jul 08 12:17:10 2016 -0700
@@ -26,7 +26,8 @@
  * @key gc
  * @key stress
  * @summary Stress G1 by humongous allocations in situation near OOM
- * @requires vm.gc=="G1" | vm.gc=="null"
+ * @requires vm.gc == "G1" | vm.gc == "null"
+ * @requires !vm.flightRecorder
  * @run main/othervm/timeout=200 -Xlog:gc=debug -Xmx1g -XX:+UseG1GC -XX:G1HeapRegionSize=4m
  *              -Dtimeout=120 -Dthreads=3 -Dhumongoussize=1.1 -Dregionsize=4 TestStressG1Humongous
  * @run main/othervm/timeout=200 -Xlog:gc=debug -Xmx1g -XX:+UseG1GC -XX:G1HeapRegionSize=16m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/native/runtime/test_classLoader.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "classfile/classLoader.hpp"
+#include "memory/resourceArea.hpp"
+#include "unittest.hpp"
+
+// Tests ClassLoader::package_from_name()
+TEST_VM(classLoader, null_class_name) {
+  ResourceMark rm;
+  bool bad_class_name = false;
+  const char* retval= ClassLoader::package_from_name(NULL, &bad_class_name);
+  ASSERT_TRUE(bad_class_name) << "Function did not set bad_class_name with NULL class name";
+  ASSERT_STREQ(retval, NULL) << "Wrong package for NULL class name pointer";
+}
+
+TEST_VM(classLoader, empty_class_name) {
+  ResourceMark rm;
+  const char* retval = ClassLoader::package_from_name("");
+  ASSERT_STREQ(retval, NULL) << "Wrong package for empty string";
+}
+
+TEST_VM(classLoader, no_slash) {
+  ResourceMark rm;
+  const char* retval = ClassLoader::package_from_name("L");
+  ASSERT_STREQ(retval, NULL) << "Wrong package for class with no slashes";
+}
+
+TEST_VM(classLoader, just_slash) {
+  ResourceMark rm;
+  bool bad_class_name = false;
+  const char* retval = ClassLoader::package_from_name("/", &bad_class_name);
+  ASSERT_TRUE(bad_class_name) << "Function did not set bad_class_name with package of length 0";
+  ASSERT_STREQ(retval, NULL) << "Wrong package for class with just slash";
+}
+
+TEST_VM(classLoader, multiple_slashes) {
+  ResourceMark rm;
+  const char* retval = ClassLoader::package_from_name("///");
+  ASSERT_STREQ(retval, "//") << "Wrong package for class with just slashes";
+}
+
+TEST_VM(classLoader, standard_case_1) {
+  ResourceMark rm;
+  bool bad_class_name = true;
+  const char* retval = ClassLoader::package_from_name("package/class", &bad_class_name);
+  ASSERT_FALSE(bad_class_name) << "Function did not reset bad_class_name";
+  ASSERT_STREQ(retval, "package") << "Wrong package for class with one slash";
+}
+
+TEST_VM(classLoader, standard_case_2) {
+  ResourceMark rm;
+  const char* retval = ClassLoader::package_from_name("package/folder/class");
+  ASSERT_STREQ(retval, "package/folder") << "Wrong package for class with multiple slashes";
+}
+
+TEST_VM(classLoader, class_array) {
+  ResourceMark rm;
+  bool bad_class_name = false;
+  const char* retval = ClassLoader::package_from_name("[package/class", &bad_class_name);
+  ASSERT_FALSE(bad_class_name) << "Function set bad_class_name with class array";
+  ASSERT_STREQ(retval, "package") << "Wrong package for class with leading bracket";
+}
+
+TEST_VM(classLoader, class_object_array) {
+  ResourceMark rm;
+  bool bad_class_name = false;
+  const char* retval = ClassLoader::package_from_name("[Lpackage/class", &bad_class_name);
+  ASSERT_TRUE(bad_class_name) << "Function did not set bad_class_name with array of class objects";
+  ASSERT_STREQ(retval, NULL) << "Wrong package for class with leading '[L'";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/native/runtime/test_instanceKlass.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "classfile/symbolTable.hpp"
+#include "memory/resourceArea.hpp"
+#include "oops/instanceKlass.hpp"
+#include "unittest.hpp"
+
+// Tests InstanceKlass::package_from_name()
+TEST_VM(instanceKlass, null_symbol) {
+  ResourceMark rm;
+  TempNewSymbol package_sym = InstanceKlass::package_from_name(NULL, NULL);
+  ASSERT_TRUE(package_sym == NULL) << "Wrong package for NULL symbol";
+}
--- a/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,9 @@
 
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            "-Xmx64m", "-XX:-TransmitErrorReport", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
+            "-Xmx64m", "-XX:-TransmitErrorReport", "-XaddExports:java.base/jdk.internal.misc=ALL-UNNAMED", "-XX:-CreateCoredumpOnCrash", Crasher.class.getName());
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("Exception in thread");
         output.shouldNotMatch("error occurred during error reporting \\(printing problematic frame\\)");
     }
 }
--- a/hotspot/test/runtime/NMT/CommitOverlappingRegions.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/NMT/CommitOverlappingRegions.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,12 @@
     public static WhiteBox wb = WhiteBox.getWhiteBox();
     public static void main(String args[]) throws Exception {
         OutputAnalyzer output;
+
         long size = 32 * 1024;
+        int pagesize = wb.getVMPageSize();
+        if (size < pagesize) { size = pagesize; }  // Should be aligned.
+        long sizek = size / 1024;
+
         long addr = wb.NMTReserveMemory(8*size);
 
         String pid = Long.toString(ProcessTools.getProcessId());
@@ -52,93 +57,93 @@
 
         // Start: . . . . . . . .
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=0KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=0KB)");
 
         // Committing: * * * . . . . .
         // Region:     * * * . . . . .
-        // Expected Total: 3 x 32KB = 96KB
+        // Expected Total: 3 x sizek KB
         wb.NMTCommitMemory(addr + 0*size, 3*size);
 
         // Committing: . . . . * * * .
         // Region:     * * * . * * * .
-        // Expected Total: 6 x 32KB = 192KB
+        // Expected Total: 6 x sizek KB
         wb.NMTCommitMemory(addr + 4*size, 3*size);
 
         // Check output after first 2 commits.
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=192KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 6*sizek + "KB)");
 
         // Committing: . . * * * . . .
         // Region:     * * * * * * * .
-        // Expected Total: 7 x 32KB = 224KB
+        // Expected Total: 7 x sizek KB
         wb.NMTCommitMemory(addr + 2*size, 3*size);
 
         // Check output after overlapping commit.
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=224KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 7*sizek + "KB)");
 
         // Uncommitting: * * * * * * * *
         // Region:       . . . . . . . .
-        // Expected Total: 0 x 32KB = 0KB
+        // Expected Total: 0 x sizek KB
         wb.NMTUncommitMemory(addr + 0*size, 8*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=0KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=0KB)");
 
         // Committing: * * . . . . . .
         // Region:     * * . . . . . .
-        // Expected Total: 2 x 32KB = 64KB
+        // Expected Total: 2 x sizek KB
         wb.NMTCommitMemory(addr + 0*size, 2*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=64KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 2*sizek + "KB)");
 
         // Committing: . * * * . . . .
         // Region:     * * * * . . . .
-        // Expected Total: 4 x 32KB = 128KB
+        // Expected Total: 4 x sizek KB
         wb.NMTCommitMemory(addr + 1*size, 3*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=128KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 4*sizek + "KB)");
 
         // Uncommitting: * * * . . . . .
         // Region:       . . . * . . . .
-        // Expected Total: 1 x 32KB = 32KB
+        // Expected Total: 1 x sizek KB
         wb.NMTUncommitMemory(addr + 0*size, 3*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=32KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 1*sizek + "KB)");
 
         // Committing: . . . * * . . .
         // Region:     . . . * * . . .
-        // Expected Total: 2 x 32KB = 64KB
+        // Expected Total: 2 x sizek KB
         wb.NMTCommitMemory(addr + 3*size, 2*size);
         System.out.println("Address is " + Long.toHexString(addr + 3*size));
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=64KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 2*sizek + "KB)");
 
         // Committing: . . . . * * . .
         // Region:     . . . * * * . .
-        // Expected Total: 3 x 32KB = 96KB
+        // Expected Total: 3 x sizek KB
         wb.NMTCommitMemory(addr + 4*size, 2*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=96KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 3*sizek + "KB)");
 
         // Committing: . . . . . * * .
         // Region:     . . . * * * * .
-        // Expected Total: 4 x 32KB = 128KB
+        // Expected Total: 4 x sizek KB
         wb.NMTCommitMemory(addr + 5*size, 2*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=128KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 4*sizek + "KB)");
 
         // Committing: . . . . . . * *
         // Region:     . . . * * * * *
-        // Expected Total: 5 x 32KB = 160KB
+        // Expected Total: 5 x sizek KB
         wb.NMTCommitMemory(addr + 6*size, 2*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=160KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=" + 5*sizek + "KB)");
 
         // Uncommitting: * * * * * * * *
         // Region:       . . . . . . . .
-        // Expected Total: 0 x 32KB = 32KB
+        // Expected Total: 0 x sizek KB
         wb.NMTUncommitMemory(addr + 0*size, 8*size);
         output = new OutputAnalyzer(pb.start());
-        output.shouldContain("Test (reserved=256KB, committed=0KB)");
+        output.shouldContain("Test (reserved=" + 8*sizek + "KB, committed=0KB)");
     }
 }
--- a/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,6 +27,7 @@
  * @library /testlibrary
  * @modules java.base/jdk.internal.misc
  *          java.management
+ * @ignore 8154204
  * @run main DefaultUseWithClient
  * @bug 8032224
  */
--- a/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java	Fri Jul 08 12:17:10 2016 -0700
@@ -35,7 +35,7 @@
  * @key cte_test
  * @bug 4345157
  * @summary JDK 1.3.0 alters thread signal mask
- * @requires (os.simpleArch == "sparcv9")
+ * @requires (vm.simpleArch == "sparcv9")
  * @modules java.base/jdk.internal.misc
  * @library /testlibrary
  * @compile Prog.java
--- a/hotspot/test/runtime/Unsafe/GetKlassPointerGetJavaMirror.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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
- * @bug 8022853
- * @library /testlibrary
- * @modules java.base/jdk.internal.misc
- * @build jdk.test.lib.*
- * @run main GetKlassPointerGetJavaMirror
- */
-
-import static jdk.test.lib.Asserts.*;
-
-import jdk.test.lib.*;
-import jdk.internal.misc.Unsafe;
-
-public class GetKlassPointerGetJavaMirror {
-
-    public static void main(String args[]) throws Exception {
-        Unsafe unsafe = Utils.getUnsafe();
-        Object o = new GetKlassPointerGetJavaMirror();
-        final long metaspaceKlass = unsafe.getKlassPointer(o);
-        Class<?> c = unsafe.getJavaMirror(metaspaceKlass);
-        assertEquals(o.getClass(), c);
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/TestBadClassName.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @bug 8158297
+ * @summary Constant pool utf8 entry for class name cannot have empty qualified name '//'
+ * @compile p1/BadInterface1.jcod
+ * @compile p1/BadInterface2.jcod
+ * @compile UseBadInterface1.jcod
+ * @compile UseBadInterface2.jcod
+ * @run main/othervm -Xverify:all TestBadClassName
+ */
+
+public class TestBadClassName {
+    public static void main(String args[]) throws Throwable {
+
+        System.out.println("Regression test for bug 8042660");
+
+        // Test class name with p1//BadInterface2
+        try {
+            Class newClass = Class.forName("UseBadInterface1");
+            throw new RuntimeException("Expected ClassFormatError exception not thrown");
+        } catch (java.lang.ClassFormatError e) {
+            System.out.println("Test UseBadInterface1 passed test case with illegal class name");
+        }
+
+        // Test class name with p1/BadInterface2/
+        try {
+            Class newClass = Class.forName("UseBadInterface2");
+            throw new RuntimeException("Expected ClassFormatError exception not thrown");
+        } catch (java.lang.ClassFormatError e) {
+            System.out.println("Test UseBadInterface1 passed test case with illegal class name");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/UseBadInterface1.jcod	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+// jcod file for UseBadInterface1.java
+// class UseBadInterface1 implements p1.BadInterface1 {
+//     int i;
+//     UseBadInterface1() {}
+//     public static void main(java.lang.String[] unused) { }
+// }
+
+class UseBadInterface1 {
+  0xCAFEBABE;
+  0; // minor version
+  53; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #10; // #1    
+    Utf8 "UseBadInterface1.java"; // #2    
+    class #4; // #3    
+    Utf8 "java/lang/Object"; // #4    
+    class #8; // #5    
+    Utf8 "([Ljava/lang/String;)V"; // #6    
+    class #11; // #7    
+    Utf8 "UseBadInterface1"; // #8    
+    Utf8 "main"; // #9    
+    NameAndType #17 #13; // #10    
+    Utf8 "p1//BadInterface1"; // #11    
+    Utf8 "SourceFile"; // #12    
+    Utf8 "()V"; // #13    
+    Utf8 "I"; // #14    
+    Utf8 "Code"; // #15    
+    Utf8 "i"; // #16    
+    Utf8 "<init>"; // #17    
+  } // Constant Pool
+
+  0x0020; // access
+  #5;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+    #7;
+  } // Interfaces
+
+  [] { // fields
+    { // Member
+      0x0000; // access
+      #16; // name_cpx
+      #14; // sig_cpx
+      [] { // Attributes
+      } // Attributes
+    } // Member
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0000; // access
+      #17; // name_cpx
+      #13; // sig_cpx
+      [] { // Attributes
+        Attr(#15) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #9; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#15) { // Code
+          0; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0xB1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#12) { // SourceFile
+      #2;
+    } // end SourceFile
+  } // Attributes
+} // end class UseBadInterface1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/UseBadInterface2.jcod	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+// jcod file for UseBadInterface2.java
+// class UseBadInterface2 implements p1.BadInterface2 {
+//     int i;
+//     UseBadInterface2() {}
+//     public static void main(java.lang.String[] unused) { }
+// }
+
+class UseBadInterface2 {
+  0xCAFEBABE;
+  0; // minor version
+  53; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #10; // #1    
+    Utf8 "UseBadInterface2.java"; // #2    
+    class #4; // #3    
+    Utf8 "java/lang/Object"; // #4    
+    class #8; // #5    
+    Utf8 "([Ljava/lang/String;)V"; // #6    
+    class #11; // #7    
+    Utf8 "UseBadInterface2"; // #8    
+    Utf8 "main"; // #9    
+    NameAndType #17 #13; // #10    
+    Utf8 "p1/BadInterface2/"; // #11    
+    Utf8 "SourceFile"; // #12    
+    Utf8 "()V"; // #13    
+    Utf8 "I"; // #14    
+    Utf8 "Code"; // #15    
+    Utf8 "i"; // #16    
+    Utf8 "<init>"; // #17    
+  } // Constant Pool
+
+  0x0020; // access
+  #5;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+    #7;
+  } // Interfaces
+
+  [] { // fields
+    { // Member
+      0x0000; // access
+      #16; // name_cpx
+      #14; // sig_cpx
+      [] { // Attributes
+      } // Attributes
+    } // Member
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0000; // access
+      #17; // name_cpx
+      #13; // sig_cpx
+      [] { // Attributes
+        Attr(#15) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0009; // access
+      #9; // name_cpx
+      #6; // sig_cpx
+      [] { // Attributes
+        Attr(#15) { // Code
+          0; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0xB1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+    Attr(#12) { // SourceFile
+      #2;
+    } // end SourceFile
+  } // Attributes
+} // end class UseBadInterface2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/p1/BadInterface1.jcod	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+// Interface that should get a ClassFormatException for the "//" in the name
+
+// package p1;
+// public interface cls1 {}
+
+class p1//BadInterface1 {
+  0xCAFEBABE;
+  0; // minor version
+  53; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    class #5; // #1    
+    class #6; // #2    
+    Utf8 "SourceFile"; // #3    
+    Utf8 "BadInterface1.java"; // #4    
+    Utf8 "p1//BadInterface1"; // #5    
+    Utf8 "java/lang/Object"; // #6    
+  } // Constant Pool
+
+  0x0601; // access
+  #1;// this_cpx
+  #2;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+  } // methods
+
+  [] { // Attributes
+    Attr(#3) { // SourceFile
+      #4;
+    } // end SourceFile
+  } // Attributes
+} // end class p1//BadInterface1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/p1/BadInterface2.jcod	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+// Interface that should get a ClassFormatException for the trailing "/" in the name
+
+// package p1;
+// public interface cls1 {}
+
+class p1/BadInterface2/ {
+  0xCAFEBABE;
+  0; // minor version
+  53; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    class #5; // #1    
+    class #6; // #2    
+    Utf8 "SourceFile"; // #3    
+    Utf8 "BadInterface2.java"; // #4    
+    Utf8 "p1/BadInterface2/"; // #5    
+    Utf8 "java/lang/Object"; // #6    
+  } // Constant Pool
+
+  0x0601; // access
+  #1;// this_cpx
+  #2;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+  } // methods
+
+  [] { // Attributes
+    Attr(#3) { // SourceFile
+      #4;
+    } // end SourceFile
+  } // Attributes
+} // end class p1/BadInterface2
--- a/hotspot/test/runtime/logging/StartupTimeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/logging/StartupTimeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -50,6 +50,18 @@
         output.shouldHaveExitValue(0);
     }
 
+    static void analyzeModulesOutputOn(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldMatch("(Phase2 initialization, [0-9]+.[0-9]+ secs)");
+        output.shouldHaveExitValue(0);
+    }
+
+    static void analyzeModulesOutputOff(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("[modules,startuptime]");
+        output.shouldHaveExitValue(0);
+    }
+
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime",
                                                                   InnerClass.class.getName());
@@ -58,6 +70,14 @@
         pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime=off",
                                                    InnerClass.class.getName());
         analyzeOutputOff(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+modules",
+                                                   InnerClass.class.getName());
+        analyzeModulesOutputOn(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+modules=off",
+                                                   InnerClass.class.getName());
+        analyzeModulesOutputOff(pb);
     }
 
     public static class InnerClass {
--- a/hotspot/test/runtime/memory/ReserveMemory.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/memory/ReserveMemory.java	Fri Jul 08 12:17:10 2016 -0700
@@ -21,10 +21,12 @@
  * questions.
  */
 
+// Aix commits on touch, so this test won't work.
 /*
  * @test
  * @key regression
  * @bug 8012015
+ * @requires !(os.family == "aix")
  * @summary Make sure reserved (but uncommitted) memory is not accessible
  * @library /testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
@@ -36,18 +38,11 @@
  */
 
 import jdk.test.lib.*;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
 public class ReserveMemory {
-  private static boolean isWindows() {
-    return System.getProperty("os.name").toLowerCase().startsWith("win");
-  }
-
-  private static boolean isOsx() {
-    return System.getProperty("os.name").toLowerCase().startsWith("mac");
-  }
-
   public static void main(String args[]) throws Exception {
     if (args.length > 0) {
       WhiteBox.getWhiteBox().readReservedMemory();
@@ -66,9 +61,9 @@
           "test");
 
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    if (isWindows()) {
+    if (Platform.isWindows()) {
       output.shouldContain("EXCEPTION_ACCESS_VIOLATION");
-    } else if (isOsx()) {
+    } else if (Platform.isOSX()) {
       output.shouldContain("SIGBUS");
     } else {
       output.shouldContain("SIGSEGV");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/CompilerUtils.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.tools.JavaCompiler;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * This class consists exclusively of static utility methods for invoking the
+ * java compiler.
+ *
+ * This class will eventually move to jdk.testlibrary.
+ */
+
+public final class CompilerUtils {
+    private CompilerUtils() { }
+
+    /**
+     * Compile all the java sources in {@code <source>/**} to
+     * {@code <destination>/**}. The destination directory will be created if
+     * it doesn't exist.
+     *
+     * All warnings/errors emitted by the compiler are output to System.out/err.
+     *
+     * @return true if the compilation is successful
+     *
+     * @throws IOException if there is an I/O error scanning the source tree or
+     *                     creating the destination directory
+     */
+    public static boolean compile(Path source, Path destination, String ... options)
+        throws IOException
+    {
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        StandardJavaFileManager jfm = compiler.getStandardFileManager(null, null, null);
+
+        List<Path> sources
+            = Files.find(source, Integer.MAX_VALUE,
+                (file, attrs) -> (file.toString().endsWith(".java")))
+                .collect(Collectors.toList());
+
+        Files.createDirectories(destination);
+        jfm.setLocationFromPaths(StandardLocation.CLASS_OUTPUT,
+                                 Arrays.asList(destination));
+
+        List<String> opts = Arrays.asList(options);
+        JavaCompiler.CompilationTask task
+            = compiler.getTask(null, jfm, null, opts, null,
+                jfm.getJavaFileObjectsFromPaths(sources));
+
+        return task.call();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/ModuleStress/ExportModuleStressTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8156871
+ * @summary package in the boot layer is repeatedly exported to unique module created in layers on top of the boot layer
+ * @modules java.base/jdk.internal.misc
+ * @library /testlibrary /test/lib
+ * @compile ../CompilerUtils.java
+ * @build ExportModuleStressTest
+ * @run main/othervm ExportModuleStressTest
+ */
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import jdk.test.lib.*;
+
+public class ExportModuleStressTest {
+
+    private static final String TEST_SRC = System.getProperty("test.src");
+    private static final String TEST_CLASSES = System.getProperty("test.classes");
+
+    private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
+    private static final Path MODS_DIR = Paths.get(TEST_CLASSES, "mods");
+
+    /**
+     * Compiles all module definitions used by the test
+     */
+    public static void main(String[] args) throws Exception {
+
+        boolean compiled;
+        // Compile module jdk.test declaration
+        compiled = CompilerUtils.compile(
+            SRC_DIR.resolve("jdk.test"),
+            MODS_DIR.resolve("jdk.test"));
+        if (!compiled) {
+            throw new RuntimeException("Test failed to compile module jdk.test");
+        }
+
+        // Compile module jdk.translet declaration
+        compiled = CompilerUtils.compile(
+            SRC_DIR.resolve("jdk.translet"),
+            MODS_DIR.resolve("jdk.translet"),
+            "-XaddExports:jdk.test/test=jdk.translet",
+            "-mp", MODS_DIR.toString());
+        if (!compiled) {
+            throw new RuntimeException("Test failed to compile module jdk.translet");
+        }
+
+        // Sanity check that the test, jdk.test/test/Main.java
+        // runs without error.
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-mp", MODS_DIR.toString(),
+            "-m", "jdk.test/test.Main");
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("failed: 0")
+              .shouldHaveExitValue(0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/module-info.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module jdk.test {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package test;
+
+import java.lang.module.Configuration;
+import java.lang.module.ModuleFinder;
+import java.lang.reflect.Layer;
+import java.lang.reflect.Method;
+import java.lang.reflect.Module;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+public class Main {
+
+    private static final Path MODS_DIR = Paths.get(System.getProperty("jdk.module.path"));
+    static final String MODULE_NAME = "jdk.translet";
+
+    public static void main(String[] args) throws Exception {
+
+        ModuleFinder finder = ModuleFinder.of(MODS_DIR);
+        Layer layerBoot = Layer.boot();
+
+        Configuration cf = layerBoot
+                .configuration()
+                .resolveRequires(ModuleFinder.of(), finder, Set.of(MODULE_NAME));
+
+        Module testModule = Main.class.getModule();
+        ClassLoader scl = ClassLoader.getSystemClassLoader();
+
+        // Create an unique module/class loader in a layer above the boot layer.
+        // Export this module to the jdk.test/test package.
+        Callable<Void> task = new Callable<Void>() {
+            @Override
+            public Void call() throws Exception {
+                Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl);
+                Module transletModule = layer.findModule(MODULE_NAME).get();
+                testModule.addExports("test", transletModule);
+                Class<?> c = layer.findLoader(MODULE_NAME).loadClass("translet.Main");
+                Method method = c.getDeclaredMethod("go");
+                method.invoke(null);
+                return null;
+            }
+        };
+
+        List<Future<Void>> results = new ArrayList<>();
+
+        // Repeatedly create the layer above stressing the exportation of
+        // package jdk.test/test to several different modules.
+        ExecutorService pool = Executors.newFixedThreadPool(Math.min(100, Runtime.getRuntime().availableProcessors()*10));
+        try {
+            for (int i = 0; i < 10000; i++) {
+                results.add(pool.submit(task));
+            }
+        } finally {
+            pool.shutdown();
+        }
+
+        int passed = 0;
+        int failed = 0;
+
+        // The failed state should be 0, the created modules in layers above the
+        // boot layer should be allowed access to the contents of the jdk.test/test
+        // package since that package was exported to the transletModule above.
+        for (Future<Void> result : results) {
+            try {
+                result.get();
+                passed++;
+            } catch (Throwable x) {
+                x.printStackTrace();
+                failed++;
+            }
+        }
+
+        System.out.println("passed: " + passed);
+        System.out.println("failed: " + failed);
+    }
+
+    public static void callback() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.translet/module-info.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module jdk.translet {
+    requires jdk.test;
+    exports translet;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/modules/ModuleStress/src/jdk.translet/translet/Main.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package translet;
+
+public class Main {
+    public static void go() {
+        test.Main.callback();
+    }
+}
--- a/hotspot/test/runtime/modules/Xpatch/XpatchJavaBase.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/runtime/modules/Xpatch/XpatchJavaBase.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 8130399
  * @summary Make sure -Xpatch works for java.base.
+ * @modules java.base/jdk.internal.misc
  * @library /testlibrary
  * @compile XpatchMain.java
  * @run main XpatchJavaBase
--- a/hotspot/test/serviceability/dcmd/framework/HelpTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/serviceability/dcmd/framework/HelpTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -37,7 +37,6 @@
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @ignore 8072440
  * @build jdk.test.lib.*
  * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData HelpTest
--- a/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -37,7 +37,6 @@
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @ignore 8072440
  * @build jdk.test.lib.*
  * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData InvalidCommandTest
--- a/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -38,7 +38,6 @@
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @ignore 8072440
  * @build jdk.test.lib.*
  * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData VMVersionTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/jvmti/GetObjectSizeClass.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.PrintWriter;
+import jdk.test.lib.*;
+
+/*
+ * @test
+ * @bug 8075030
+ * @summary JvmtiEnv::GetObjectSize reports incorrect java.lang.Class instance size
+ * @library /testlibrary
+ * @modules java.base/jdk.internal.misc
+ *          java.compiler
+ *          java.instrument
+ *          java.management
+ *          jdk.jvmstat/sun.jvmstat.monitor
+ * @build ClassFileInstaller jdk.test.lib.* GetObjectSizeClassAgent
+ * @run main ClassFileInstaller GetObjectSizeClassAgent
+ * @run main GetObjectSizeClass
+ */
+public class GetObjectSizeClass {
+    public static void main(String[] args) throws Exception  {
+        PrintWriter pw = new PrintWriter("MANIFEST.MF");
+        pw.println("Premain-Class: GetObjectSizeClassAgent");
+        pw.close();
+
+        ProcessBuilder pb = new ProcessBuilder();
+        pb.command(new String[] { JDKToolFinder.getJDKTool("jar"), "cmf", "MANIFEST.MF", "agent.jar", "GetObjectSizeClassAgent.class"});
+        pb.start().waitFor();
+
+        ProcessBuilder pt = ProcessTools.createJavaProcessBuilder(true, "-javaagent:agent.jar",  "GetObjectSizeClassAgent");
+        OutputAnalyzer output = new OutputAnalyzer(pt.start());
+
+        output.stdoutShouldContain("GetObjectSizeClass passed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/serviceability/jvmti/GetObjectSizeClassAgent.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.lang.instrument.*;
+
+public class GetObjectSizeClassAgent {
+
+    static Instrumentation instrumentation;
+
+    public static void premain(String agentArgs, Instrumentation instrumentation) {
+        GetObjectSizeClassAgent.instrumentation = instrumentation;
+    }
+
+    public static void main(String[] args) throws Exception {
+        long sizeA = instrumentation.getObjectSize(A.class);
+        long sizeB = instrumentation.getObjectSize(B.class);
+
+        if (sizeA != sizeB) {
+            throw new RuntimeException("java.lang.Class sizes disagree: " + sizeA + " vs. " + sizeB);
+        }
+
+        System.out.println("GetObjectSizeClass passed");
+    }
+
+    static class A {
+    }
+
+    static class B {
+        void m() {}
+    }
+
+}
--- a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -33,7 +33,6 @@
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  * @build common.*
  * @build utils.*
- * @ignore 8149778
  * @run main/othervm -XX:+UsePerfData -Xmx128M GcCapacityTest
  */
 public class GcCapacityTest {
--- a/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/serviceability/tmtools/jstat/utils/GcProvokerImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -42,8 +42,9 @@
         // uses fixed small objects to avoid Humongous objects allocation in G1
         int memoryChunk = 2048;
         List<Object> list = new ArrayList<>();
-        float used = 0;
-        while (used < targetUsage * maxMemory) {
+        long used = 0;
+        long target = (long) (maxMemory * targetUsage);
+        while (used < target) {
             try {
                 list.add(new byte[memoryChunk]);
                 used += memoryChunk;
--- a/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java	Fri Jul 08 12:17:10 2016 -0700
@@ -45,8 +45,8 @@
         if (args.length != 2) {
             throw new IllegalArgumentException("Unexpected number of arguments for file copy");
         }
-        Path src = Paths.get(Utils.TEST_SRC, args[0]);
-        Path dst = Paths.get(args[1]);
+        Path src = Paths.get(Utils.TEST_SRC, args[0]).toAbsolutePath();
+        Path dst = Paths.get(args[1]).toAbsolutePath();
         if (src.toFile().exists()) {
             if (src.toFile().isDirectory()) {
                 Files.walkFileTree(src, new CopyFileVisitor(src, dst));
--- a/hotspot/test/testlibrary/jittester/Makefile	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/Makefile	Fri Jul 08 12:17:10 2016 -0700
@@ -44,6 +44,10 @@
 	APPLICATION_ARGS += --seed $(SEED)
 endif
 
+ifneq "x$(EXTRA_SRC_DIR)" "x"
+        EXTRA_SRC_FILES := $(shell find $(EXTRA_SRC_DIR) -name '*.java')
+endif
+
 JAVA = $(JDK_HOME)/bin/java
 JAVAC = $(JDK_HOME)/bin/javac
 JAR = $(JDK_HOME)/bin/jar
@@ -99,6 +103,7 @@
 filelist: $(SRC_FILES)
 		@rm -f $@
 		@echo $(SRC_FILES) > $@
+		@echo $(EXTRA_SRC_FILES) >> $@
 
 INIT: $(DIST_DIR)
 	$(shell if [ ! -d $(CLASSES_DIR) ]; then mkdir -p $(CLASSES_DIR); fi)
--- a/hotspot/test/testlibrary/jittester/conf/default.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/conf/default.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -9,3 +9,5 @@
 print-complexity=true
 print-hierarchy=true
 disable-static=true
+generatorsFactories=jdk.test.lib.jittester.TestGeneratorsFactory
+generators=JavaCode,ByteCode
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,50 +25,19 @@
 
 import jdk.test.lib.Pair;
 import jdk.test.lib.jittester.factories.IRNodeBuilder;
-import jdk.test.lib.jittester.jtreg.Printer;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.FixedTrees;
 import jdk.test.lib.jittester.utils.OptionResolver;
 import jdk.test.lib.jittester.utils.OptionResolver.Option;
 import jdk.test.lib.jittester.utils.PseudoRandom;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.time.LocalTime;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
+import java.util.function.Function;
 
 public class Automatic {
-    private static final int MINUTES_TO_WAIT = Integer.getInteger("jdk.test.lib.jittester", 3);
-
-    static String getJtregHeader(String mainClass, boolean addCompile) {
-        String synopsis = "seed = '" + ProductionParams.seed.value() + "'"
-                + ", specificSeed = '" + PseudoRandom.getCurrentSeed() + "'";
-        StringBuilder header = new StringBuilder();
-        header.append("/*\n * @test\n * @summary ")
-                .append(synopsis)
-                .append(" \n* @library / ../\n");
-        if (addCompile) {
-            header.append("\n * @compile ")
-                    .append(mainClass)
-                    .append(".java\n");
-        }
-        header.append(" * @run build jdk.test.lib.jittester.jtreg.JitTesterDriver "
-                        + "jdk.test.lib.jittester.jtreg.Printer\n")
-                .append(" * @run driver jdk.test.lib.jittester.jtreg.JitTesterDriver ")
-                .append(mainClass)
-                .append("\n */\n\n");
-        if (ProductionParams.printHierarchy.value()) {
-            header.append("/*\n")
-                .append(Automatic.printHierarchy())
-                .append("*/\n");
-        }
-        return header.toString();
-    }
+    public static final int MINUTES_TO_WAIT = Integer.getInteger("jdk.test.lib.jittester", 3);
 
     private static Pair<IRNode, IRNode> generateIRTree(String name) {
         SymbolTable.removeAll();
@@ -120,123 +89,48 @@
         }
     }
 
+    private static List<TestsGenerator> getTestGenerators() {
+        List<TestsGenerator> result = new ArrayList<>();
+        Class<?> factoryClass;
+        Function<String[], List<TestsGenerator>> factory;
+        String[] factoryClassNames = ProductionParams.generatorsFactories.value().split(",");
+        String[] generatorNames = ProductionParams.generators.value().split(",");
+        for (String factoryClassName : factoryClassNames) {
+            try {
+                factoryClass = Class.forName(factoryClassName);
+                factory = (Function<String[], List<TestsGenerator>>) factoryClass.newInstance();
+            } catch (ReflectiveOperationException roe) {
+                throw new Error("Can't instantiate generators factory", roe);
+            }
+            result.addAll(factory.apply(generatorNames));
+        }
+        return result;
+    }
+
     public static void main(String[] args) {
         initializeTestGenerator(args);
         int counter = 0;
-        try {
-            Path testbaseDir = Paths.get(ProductionParams.testbaseDir.value());
-            System.out.printf(" %13s | %8s | %8s | %8s |%n", "start time", "count", "generat",
-                              "running");
-            System.out.printf(" %13s | %8s | %8s | %8s |%n", "---", "---", "---","---");
-            String path = getJavaPath();
-            String javacPath = Paths.get(path, "javac").toString();
-            String javaPath = Paths.get(path, "java").toString();
-
-            // compile Printer class first. A common one for all tests
-            ensureExisting(testbaseDir);
-            ProcessBuilder pbPrinter = new ProcessBuilder(javacPath,
-                    Paths.get(testbaseDir.toString(), "jdk", "test", "lib", "jittester",
-                            "jtreg", "Printer.java").toString());
-            runProcess(pbPrinter, testbaseDir.resolve("Printer").toString());
-            do {
-                double start = System.currentTimeMillis();
-                System.out.print("[" + LocalTime.now() + "] |");
-                String name = "Test_" + counter;
-                Pair<IRNode, IRNode> irTree = generateIRTree(name);
-                System.out.printf(" %8d |", counter);
-                double generationTime = System.currentTimeMillis() - start;
-                System.out.printf(" %8.0f |", generationTime);
-                if (!ProductionParams.disableJavacodeGeneration.value()) {
-                    JavaCodeGenerator generator = new JavaCodeGenerator();
-                    String javaFile = generator.apply(irTree.first, irTree.second);
-                    ProcessBuilder pb = new ProcessBuilder(javacPath, "-cp", testbaseDir.toString()
-                            + ":" + generator.getTestbase().toString(), javaFile);
-                    runProcess(pb, generator.getTestbase().resolve(name).toString());
-                    start = System.currentTimeMillis();
-
-                    // Run compiled class files
-                    pb = new ProcessBuilder(javaPath, "-Xint", "-cp", testbaseDir.toString()
-                            + ":" + generator.getTestbase().toString(), name);
-                    String goldFile = name + ".gold";
-                    runProcess(pb, generator.getTestbase().resolve(goldFile).toString());
-                }
-
-                if (!ProductionParams.disableBytecodeGeneration.value()) {
-                    ByteCodeGenerator generator = new ByteCodeGenerator();
-                    generator.apply(irTree.first, irTree.second);
-                    generator.writeJtregBytecodeRunner(name);
-                    // Run generated bytecode
-                    ProcessBuilder pb = new ProcessBuilder(javaPath, "-Xint", "-Xverify", "-cp",
-                            testbaseDir.toString() + ":" + generator.getTestbase().toString(),
-                            name);
-                    String goldFile = name + ".gold";
-                    start = System.currentTimeMillis();
-                    runProcess(pb, generator.getTestbase().resolve(goldFile).toString());
-                }
-
-                double runningTime = System.currentTimeMillis() - start;
-                System.out.printf(" %8.0f |%n", runningTime);
-                if (runningTime < TimeUnit.MINUTES.toMillis(MINUTES_TO_WAIT)) {
-                    ++counter;
-                }
-            } while (counter < ProductionParams.numberOfTests.value());
-        } catch (IOException | InterruptedException ex) {
-            ex.printStackTrace();
-        }
-    }
-
-    private static String getJavaPath() {
-        String[] env = { "JDK_HOME", "JAVA_HOME", "BOOTDIR" };
-        for (String name : env) {
-            String path = System.getenv(name);
-            if (path != null) {
-                return path + "/bin/";
+        System.out.printf(" %13s | %8s | %8s | %8s |%n", "start time", "count", "generat",
+                "running");
+        System.out.printf(" %13s | %8s | %8s | %8s |%n", "---", "---", "---", "---");
+        List<TestsGenerator> generators = getTestGenerators();
+        do {
+            double start = System.currentTimeMillis();
+            System.out.print("[" + LocalTime.now() + "] |");
+            String name = "Test_" + counter;
+            Pair<IRNode, IRNode> irTree = generateIRTree(name);
+            System.out.printf(" %8d |", counter);
+            double generationTime = System.currentTimeMillis() - start;
+            System.out.printf(" %8.0f |", generationTime);
+            start = System.currentTimeMillis();
+            for (TestsGenerator generator : generators) {
+                generator.accept(irTree.first, irTree.second);
             }
-        }
-        return "";
-    }
-
-    private static int runProcess(ProcessBuilder pb, String name)
-            throws IOException, InterruptedException {
-        pb.redirectError(new File(name + ".err"));
-        pb.redirectOutput(new File(name + ".out"));
-        Process process = pb.start();
-        if (process.waitFor(MINUTES_TO_WAIT, TimeUnit.MINUTES)) {
-            try (FileWriter file = new FileWriter(name + ".exit")) {
-                file.write(Integer.toString(process.exitValue()));
+            double runningTime = System.currentTimeMillis() - start;
+            System.out.printf(" %8.0f |%n", runningTime);
+            if (runningTime < TimeUnit.MINUTES.toMillis(MINUTES_TO_WAIT)) {
+                ++counter;
             }
-            return process.exitValue();
-        } else {
-            process.destroyForcibly();
-            return -1;
-        }
-    }
-
-    private static String printHierarchy() {
-        return TypeList.getAll().stream()
-                .filter(t -> t instanceof TypeKlass)
-                .map(t -> typeDescription((TypeKlass) t))
-                .collect(Collectors.joining("\n","CLASS HIERARCHY:\n", "\n"));
-    }
-
-    private static String typeDescription(TypeKlass type) {
-        StringBuilder result = new StringBuilder();
-        String parents = type.getParentsNames().stream().collect(Collectors.joining(","));
-        result.append(type.isAbstract() ? "abstract " : "")
-              .append(type.isFinal() ? "final " : "")
-              .append(type.isInterface() ? "interface " : "class ")
-              .append(type.getName())
-              .append(parents.isEmpty() ? "" : ": " + parents);
-        return result.toString();
-    }
-
-    static void ensureExisting(Path path) {
-        if (Files.notExists(path)) {
-            try {
-                Files.createDirectories(path);
-            } catch (IOException ex) {
-                ex.printStackTrace();
-            }
-        }
+        } while (counter < ProductionParams.numberOfTests.value());
     }
 }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,54 +23,60 @@
 
 package jdk.test.lib.jittester;
 
-import jdk.test.lib.jittester.visitors.ByteCodeVisitor;
-
 import java.io.FileOutputStream;
-import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.nio.file.Files;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.nio.file.StandardOpenOption;
-import java.util.function.BiFunction;
+import java.util.function.Function;
+import jdk.test.lib.jittester.visitors.ByteCodeVisitor;
 
 /**
- * Generates class files from bytecode
+ * Generates class files from IRTree
  */
-class ByteCodeGenerator implements BiFunction<IRNode, IRNode, String> {
-    private final Path testbase = Paths.get(ProductionParams.testbaseDir.value(),
-            "bytecode_tests");
+class ByteCodeGenerator extends TestsGenerator {
+    private static final String DEFAULT_SUFFIX = "bytecode_tests";
 
-    public void writeJtregBytecodeRunner(String name) {
-        try (FileWriter file = new FileWriter(testbase.resolve(name + ".java").toFile())) {
-            file.write(Automatic.getJtregHeader(name, false));
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
+    ByteCodeGenerator() {
+        super(DEFAULT_SUFFIX);
+    }
+
+    ByteCodeGenerator(String suffix, Function<String, String[]> preRunActions, String jtDriverOptions) {
+        super(suffix, preRunActions, jtDriverOptions);
     }
 
-    public String apply(IRNode mainClass, IRNode privateClasses) {
-        Automatic.ensureExisting(testbase);
+    @Override
+    public void accept(IRNode mainClass, IRNode privateClasses) {
+        generateClassFiles(mainClass, privateClasses);
+        generateSeparateJtregHeader(mainClass);
+        compilePrinter();
+        generateGoldenOut(mainClass.getName());
+    }
+
+    private void generateSeparateJtregHeader(IRNode mainClass) {
+        String mainClassName = mainClass.getName();
+        writeFile(generatorDir, mainClassName + ".java", getJtregHeader(mainClassName));
+    }
+
+    private void generateClassFiles(IRNode mainClass, IRNode privateClasses) {
+        String mainClassName = mainClass.getName();
+        ensureExisting(generatorDir);
         try {
             ByteCodeVisitor vis = new ByteCodeVisitor();
             if (privateClasses != null) {
                 privateClasses.accept(vis);
             }
             mainClass.accept(vis);
-
-            Path mainClassPath = testbase.resolve(mainClass.getName() + ".class");
-            writeToClassFile(mainClassPath, vis.getByteCode(mainClass.getName()));
+            writeFile(mainClassName + ".class", vis.getByteCode(mainClassName));
             if (privateClasses != null) {
                 privateClasses.getChildren().forEach(c -> {
                     String name = c.getName();
-                    Path classPath = testbase.resolve(name + ".class");
-                    writeToClassFile(classPath, vis.getByteCode(name));
+                    writeFile(name + ".class", vis.getByteCode(name));
                 });
             }
-            return mainClassPath.toString();
         } catch (Throwable t) {
-            Path errFile = testbase.resolve(mainClass.getName() + ".err");
+            Path errFile = generatorDir.resolve(mainClassName + ".err");
             try (PrintWriter pw = new PrintWriter(Files.newOutputStream(errFile,
                     StandardOpenOption.CREATE_NEW))) {
                 t.printStackTrace(pw);
@@ -78,16 +84,11 @@
                 t.printStackTrace();
                 throw new Error("can't write error to error file " + errFile, e);
             }
-            return null;
         }
     }
 
-    public Path getTestbase() {
-        return testbase;
-    }
-
-    private void writeToClassFile(Path path, byte[] bytecode) {
-        try (FileOutputStream file = new FileOutputStream(path.toString())) {
+    private void writeFile(String fileName, byte[] bytecode) {
+        try (FileOutputStream file = new FileOutputStream(generatorDir.resolve(fileName).toFile())) {
             file.write(bytecode);
         } catch (IOException ex) {
             ex.printStackTrace();
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/JavaCodeGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,48 +23,59 @@
 
 package jdk.test.lib.jittester;
 
-import jdk.test.lib.jittester.visitors.JavaCodeVisitor;
-
-import java.io.FileWriter;
+import java.io.File;
 import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.function.BiFunction;
+import java.util.function.Function;
+import jdk.test.lib.jittester.visitors.JavaCodeVisitor;
 
 /**
- * Generates class files from java source code
+ * Generates java source code from IRTree
  */
-class JavaCodeGenerator implements BiFunction<IRNode, IRNode, String> {
-    private final Path testbase = Paths.get(ProductionParams.testbaseDir.value(), "java_tests");
+public class JavaCodeGenerator extends TestsGenerator {
+    private static final String DEFAULT_SUFFIX = "java_tests";
+
+    JavaCodeGenerator() {
+        this(DEFAULT_SUFFIX, JavaCodeGenerator::generatePrerunAction, "");
+    }
+
+    JavaCodeGenerator(String prefix, Function<String, String[]> preRunActions, String jtDriverOptions) {
+        super(prefix, preRunActions, jtDriverOptions);
+    }
 
-    private String generateJavaCode(IRNode mainClass, IRNode privateClasses) {
+    @Override
+    public void accept(IRNode mainClass, IRNode privateClasses) {
+        String mainClassName = mainClass.getName();
+        generateSources(mainClass, privateClasses);
+        compilePrinter();
+        compileJavaFile(mainClassName);
+        generateGoldenOut(mainClassName);
+    }
+
+    private void generateSources(IRNode mainClass, IRNode privateClasses) {
+        String mainClassName = mainClass.getName();
         StringBuilder code = new StringBuilder();
         JavaCodeVisitor vis = new JavaCodeVisitor();
-
-        code.append(Automatic.getJtregHeader(mainClass.getName(), true));
+        code.append(getJtregHeader(mainClassName));
         if (privateClasses != null) {
             code.append(privateClasses.accept(vis));
         }
         code.append(mainClass.accept(vis));
-
-        return code.toString();
-    }
-
-    public Path getTestbase() {
-        return testbase;
+        ensureExisting(generatorDir);
+        writeFile(generatorDir, mainClassName + ".java", code.toString());
     }
 
-    @Override
-    public String apply(IRNode mainClass, IRNode privateClasses) {
-        String code = generateJavaCode(mainClass, privateClasses);
-        Automatic.ensureExisting(testbase);
-        Path fileName = testbase.resolve(mainClass.getName() + ".java");
-        try (FileWriter file = new FileWriter(fileName.toFile())) {
-            file.write(code);
-            return fileName.toString();
-        } catch (IOException ex) {
-            ex.printStackTrace();
+    private void compileJavaFile(String mainClassName) {
+        String classPath = getRoot() + File.pathSeparator + generatorDir;
+        ProcessBuilder pb = new ProcessBuilder(JAVAC, "-cp", classPath,
+                generatorDir.resolve(mainClassName + ".java").toString());
+        try {
+            runProcess(pb, generatorDir.resolve(mainClassName).toString());
+        } catch (IOException | InterruptedException e) {
+            throw new Error("Can't compile sources ", e);
         }
-        return "";
+    }
+
+    private static String[] generatePrerunAction(String mainClassName) {
+        return new String[] {"@compile " + mainClassName + ".java"};
     }
 }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ProductionParams.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ProductionParams.java	Fri Jul 08 12:17:10 2016 -0700
@@ -68,8 +68,6 @@
     public static Option<Boolean> disableNestedBlocks = null;
     public static Option<Boolean> disableArrays = null;
     public static Option<Boolean> enableFinalizers = null;
-    public static Option<Boolean> disableBytecodeGeneration = null;
-    public static Option<Boolean> disableJavacodeGeneration = null;
     // workaraound: to reduce chance throwing ArrayIndexOutOfBoundsException
     public static Option<Integer> chanceExpressionIndex = null;
     public static Option<String> testbaseDir = null;
@@ -78,6 +76,8 @@
     public static Option<Long> specificSeed = null;
     public static Option<String> classesFile = null;
     public static Option<String> excludeMethodsFile = null;
+    public static Option<String> generators = null;
+    public static Option<String> generatorsFactories = null;
 
     public static void register(OptionResolver optionResolver) {
         productionLimit = optionResolver.addIntegerOption('l', "production-limit", 100, "Limit on steps in the production of an expression");
@@ -120,8 +120,6 @@
         disableNestedBlocks = optionResolver.addBooleanOption("disable-nested-blocks", "Disable generation of nested blocks");
         disableArrays = optionResolver.addBooleanOption("disable-arrays", "Disable generation of arrays");
         enableFinalizers = optionResolver.addBooleanOption("enable-finalizers", "Enable finalizers (for stress testing)");
-        disableBytecodeGeneration = optionResolver.addBooleanOption("disable-bytecode-generation", "Disable generation of bytecode output");
-        disableJavacodeGeneration = optionResolver.addBooleanOption("disable-javacode-generation", "Disable generation of java source code output");
         chanceExpressionIndex = optionResolver.addIntegerOption("chance-expression-index", 0, "A non negative decimal integer used to restrict chane of generating expression in array index while creating or accessing by index");
         testbaseDir = optionResolver.addStringOption("testbase-dir", ".", "Testbase dir");
         numberOfTests = optionResolver.addIntegerOption('n', "number-of-tests", 0, "Number of test classes to generate");
@@ -129,5 +127,7 @@
         specificSeed = optionResolver.addLongOption('z', "specificSeed", 0L, "A seed to be set for specific test generation(regular seed still needed for initialization)");
         classesFile = optionResolver.addStringOption('f', "classes-file", "conf/classes.lst", "File to read classes from");
         excludeMethodsFile = optionResolver.addStringOption('r', "exclude-methods-file", "conf/exclude.methods.lst", "File to read excluded methods from");
+        generators = optionResolver.addStringOption("generators", "", "Comma-separated list of generator names");
+        generatorsFactories = optionResolver.addStringOption("generatorsFactories", "", "Comma-separated list of generators factories class names");
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestGeneratorsFactory.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.jittester;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Function;
+
+public class TestGeneratorsFactory implements Function<String[], List<TestsGenerator>> {
+
+    @Override
+    public List<TestsGenerator> apply(String[] input) {
+        List<TestsGenerator> result = new ArrayList<>();
+        for (String generatorName : input) {
+            switch (generatorName) {
+                case "JavaCode":
+                    result.add(new JavaCodeGenerator());
+                    break;
+                case "ByteCode":
+                    result.add(new ByteCodeGenerator());
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unknown generator: " + generatorName);
+            }
+        }
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/TestsGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.jittester;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.concurrent.TimeUnit;
+import java.util.function.BiConsumer;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import jdk.test.lib.jittester.types.TypeKlass;
+import jdk.test.lib.jittester.utils.PseudoRandom;
+
+public abstract class TestsGenerator implements BiConsumer<IRNode, IRNode> {
+    protected static final String JAVA_BIN = getJavaPath();
+    protected static final String JAVAC = Paths.get(JAVA_BIN, "javac").toString();
+    protected static final String JAVA = Paths.get(JAVA_BIN, "java").toString();
+    protected final Path generatorDir;
+    protected final Function<String, String[]> preRunActions;
+    protected final String jtDriverOptions;
+
+    protected TestsGenerator(String suffix) {
+        this(suffix, s -> new String[0], "");
+    }
+
+    protected TestsGenerator(String suffix, Function<String, String[]> preRunActions,
+            String jtDriverOptions) {
+        generatorDir = getRoot().resolve(suffix);
+        this.preRunActions = preRunActions;
+        this.jtDriverOptions = jtDriverOptions;
+    }
+
+    protected void generateGoldenOut(String mainClassName) {
+        String classPath = getRoot() + File.pathSeparator + generatorDir;
+        ProcessBuilder pb = new ProcessBuilder(JAVA, "-Xint", "-Xverify", "-cp", classPath,
+                mainClassName);
+        String goldFile = mainClassName + ".gold";
+        try {
+            runProcess(pb, generatorDir.resolve(goldFile).toString());
+        } catch (IOException | InterruptedException e)  {
+            throw new Error("Can't run generated test ", e);
+        }
+    }
+
+    protected static int runProcess(ProcessBuilder pb, String name)
+            throws IOException, InterruptedException {
+        pb.redirectError(new File(name + ".err"));
+        pb.redirectOutput(new File(name + ".out"));
+        Process process = pb.start();
+        if (process.waitFor(Automatic.MINUTES_TO_WAIT, TimeUnit.MINUTES)) {
+            try (FileWriter file = new FileWriter(name + ".exit")) {
+                file.write(Integer.toString(process.exitValue()));
+            }
+            return process.exitValue();
+        } else {
+            process.destroyForcibly();
+            return -1;
+        }
+    }
+
+    protected static void compilePrinter() {
+        Path root = getRoot();
+        ProcessBuilder pbPrinter = new ProcessBuilder(JAVAC,
+                root.resolve("jdk")
+                    .resolve("test")
+                    .resolve("lib")
+                    .resolve("jittester")
+                    .resolve("jtreg")
+                    .resolve("Printer.java")
+                    .toString());
+        try {
+            int exitCode = runProcess(pbPrinter, root.resolve("Printer").toString());
+            if (exitCode != 0) {
+                throw new Error("Printer compilation returned exit code " + exitCode);
+            }
+        } catch (IOException | InterruptedException e) {
+            throw new Error("Can't compile printer", e);
+        }
+    }
+
+    protected static void ensureExisting(Path path) {
+        if (Files.notExists(path)) {
+            try {
+                Files.createDirectories(path);
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+    }
+
+    protected String getJtregHeader(String mainClassName) {
+        String synopsis = "seed = '" + ProductionParams.seed.value() + "'"
+                + ", specificSeed = '" + PseudoRandom.getCurrentSeed() + "'";
+        StringBuilder header = new StringBuilder();
+        header.append("/*\n * @test\n * @summary ")
+              .append(synopsis)
+              .append(" \n * @library / ../\n");
+        header.append(" * @run build jdk.test.lib.jittester.jtreg.JitTesterDriver "
+                        + "jdk.test.lib.jittester.jtreg.Printer\n");
+        for (String action : preRunActions.apply(mainClassName)) {
+            header.append(" * ")
+                  .append(action)
+                  .append("\n");
+        }
+        header.append(" * @run driver jdk.test.lib.jittester.jtreg.JitTesterDriver ")
+              .append(jtDriverOptions)
+              .append(" ")
+              .append(mainClassName)
+              .append("\n */\n\n");
+        if (ProductionParams.printHierarchy.value()) {
+            header.append("/*\n")
+                  .append(printHierarchy())
+                  .append("*/\n");
+        }
+        return header.toString();
+    }
+
+    protected static Path getRoot() {
+        return Paths.get(ProductionParams.testbaseDir.value());
+    }
+
+    protected static void writeFile(Path targetDir, String fileName, String content) {
+        try (FileWriter file = new FileWriter(targetDir.resolve(fileName).toFile())) {
+            file.write(content);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static String printHierarchy() {
+        return TypeList.getAll()
+                .stream()
+                .filter(t -> t instanceof TypeKlass)
+                .map(t -> typeDescription((TypeKlass) t))
+                .collect(Collectors.joining("\n","CLASS HIERARCHY:\n", "\n"));
+    }
+
+    private static String typeDescription(TypeKlass type) {
+        StringBuilder result = new StringBuilder();
+        String parents = type.getParentsNames().stream().collect(Collectors.joining(","));
+        result.append(type.isAbstract() ? "abstract " : "")
+              .append(type.isFinal() ? "final " : "")
+              .append(type.isInterface() ? "interface " : "class ")
+              .append(type.getName())
+              .append(parents.isEmpty() ? "" : ": " + parents);
+        return result.toString();
+    }
+
+    private static String getJavaPath() {
+        String[] env = { "JDK_HOME", "JAVA_HOME", "BOOTDIR" };
+        for (String name : env) {
+            String path = System.getenv(name);
+            if (path != null) {
+                return path + "/bin/";
+            }
+        }
+        return "";
+    }
+}
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/LiteralFactory.java	Fri Jul 08 12:17:10 2016 -0700
@@ -51,13 +51,13 @@
         } else if (resultType.equals(TypeList.LONG)) {
             literal = new Literal((long) (PseudoRandom.random() * Long.MAX_VALUE), TypeList.LONG);
         } else if (resultType.equals(TypeList.FLOAT)) {
-            literal = new Literal(new Float(String.format(
+            literal = new Literal(Float.valueOf(String.format(
                     (Locale) null,
                     "%." + ProductionParams.floatingPointPrecision.value() + "EF",
                     (float) PseudoRandom.random() * Float.MAX_VALUE)),
                     TypeList.FLOAT);
         } else if (resultType.equals(TypeList.DOUBLE)) {
-            literal = new Literal(new Double(String.format(
+            literal = new Literal(Double.valueOf(String.format(
                     (Locale) null,
                     "%." + 2 * ProductionParams.floatingPointPrecision.value() + "E",
                     PseudoRandom.random() * Double.MAX_VALUE)),
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java	Fri Jul 08 12:17:10 2016 -0700
@@ -40,40 +40,36 @@
 public class JitTesterDriver {
 
     public static void main(String[] args) {
-        if (args.length != 1) {
+        if (args.length < 1) {
             throw new IllegalArgumentException(
                     "[TESTBUG]: wrong number of argument : " + args.length
-                    + ". Expected 1 argument -- jit-tester test name.");
+                    + ". Expected at least 1 argument -- jit-tester test name.");
         }
         OutputAnalyzer oa;
         try {
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, args[0]);
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, args);
             oa = new OutputAnalyzer(pb.start());
         } catch (Exception e) {
             throw new Error("Unexpected exception on test jvm start :" + e, e);
         }
 
+        String name = args[args.length - 1];
         Pattern splitOut = Pattern.compile("\\n"); // tests use \n only in stdout
         Pattern splitErr = Pattern.compile("\\r?\\n"); // can handle both \r\n and \n
         Path testDir = Paths.get(Utils.TEST_SRC);
-        String goldOut = formatOutput(streamGoldFile(testDir, args[0], "out"), s -> true);
-        String anlzOut = formatOutput(Arrays.stream(splitOut.split(oa.getStdout())), s -> true);
+        String goldOut = formatOutput(streamGoldFile(testDir, name, "out"));
+        String anlzOut = formatOutput(Arrays.stream(splitOut.split(oa.getStdout())));
         Asserts.assertEQ(anlzOut, goldOut, "Actual stdout isn't equal to golden one");
-        // TODO: add a comment why we skip such lines
-        Predicate<String> notStartWhitespaces = s -> !(s.startsWith("\t") || s.startsWith(" "));
-        String goldErr = formatOutput(streamGoldFile(testDir, args[0], "err"), notStartWhitespaces);
-        String anlzErr = formatOutput(Arrays.stream(splitErr.split(oa.getStderr())),
-                                      notStartWhitespaces);
+        String goldErr = formatOutput(streamGoldFile(testDir, name, "err"));
+        String anlzErr = formatOutput(Arrays.stream(splitErr.split(oa.getStderr())));
         Asserts.assertEQ(anlzErr, goldErr, "Actual stderr isn't equal to golden one");
 
-        int exitValue = Integer.parseInt(streamGoldFile(testDir, args[0], "exit").findFirst().get());
+        int exitValue = Integer.parseInt(streamGoldFile(testDir, name, "exit").findFirst().get());
         oa.shouldHaveExitValue(exitValue);
     }
 
-    private static String formatOutput(Stream<String> stream, Predicate<String> predicate) {
-        String result = stream
-                .filter(predicate)
-                .collect(Collectors.joining(Utils.NEW_LINE));
+    private static String formatOutput(Stream<String> stream) {
+        String result = stream.collect(Collectors.joining(Utils.NEW_LINE));
         if (result.length() > 0) {
             result += Utils.NEW_LINE;
         }
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/FixedTrees.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/FixedTrees.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,9 +23,11 @@
 
 package jdk.test.lib.jittester.utils;
 
+import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
+
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.Block;
 import jdk.test.lib.jittester.CatchBlock;
@@ -60,6 +62,8 @@
 import jdk.test.lib.jittester.types.TypeKlass;
 
 public class FixedTrees {
+    private static final Literal EOL = new Literal("\n", TypeList.STRING);
+
     public static FunctionDefinition printVariablesAsFunction(PrintVariables node) {
         TypeKlass owner = node.getOwner();
 
@@ -72,7 +76,6 @@
         List<Symbol> vars = node.getVars();
 
         TypeKlass printerKlass = new TypeKlass(Printer.class.getName());
-        Literal EOL = new Literal("\n", TypeList.STRING);
         VariableInfo thisInfo = new VariableInfo("this", node.getOwner(),
                 node.getOwner(), VariableInfo.LOCAL | VariableInfo.INITIALIZED);
 
@@ -109,6 +112,7 @@
         FunctionInfo toStringInfo = new FunctionInfo("toString", owner, TypeList.STRING, 0L, FunctionInfo.PUBLIC, thisInfo);
         return new FunctionDefinition(toStringInfo, new ArrayList<>(), block, new Return(resultVar));
     }
+
     public static FunctionDefinition generateMainOrExecuteMethod(TypeKlass owner, boolean isMain) {
         Nothing nothing = new Nothing();
         ArrayList<IRNode> testCallNodeContent = new ArrayList<>();
@@ -149,39 +153,50 @@
         List<Type> throwables = new ArrayList<>();
         throwables.add(throwableKlass);
 
-        VariableInfo exInfo = new VariableInfo("ex", owner, throwableKlass,
-                VariableInfo.LOCAL | VariableInfo.INITIALIZED);
-        FunctionInfo printStackTraceInfo = new FunctionInfo("printStackTrace", throwableKlass,
-                TypeList.VOID, 0, FunctionInfo.PUBLIC, exInfo);
-        Function printStackTraceCall = new Function(throwableKlass, printStackTraceInfo, null);
-        printStackTraceCall.addChild(new LocalVariable(exInfo));
-        ArrayList<IRNode> printStackTraceCallBlockContent = new ArrayList<>();
-        // { ex.printStackTrace(); }
-        printStackTraceCallBlockContent.add(new Statement(printStackTraceCall, true));
-
-        Block printStackTraceCallBlock = new Block(owner, TypeList.VOID, printStackTraceCallBlockContent, 3);
-        List<CatchBlock> catchBlocks1 = new ArrayList<>();
-        catchBlocks1.add(new CatchBlock(printStackTraceCallBlock, throwables, 3));
-        List<CatchBlock> catchBlocks2 = new ArrayList<>();
-        catchBlocks2.add(new CatchBlock(printStackTraceCallBlock, throwables, 3));
-        List<CatchBlock> catchBlocks3 = new ArrayList<>();
-        catchBlocks3.add(new CatchBlock(printStackTraceCallBlock, throwables, 2));
-
-        TryCatchBlock tryCatch1 = new TryCatchBlock(tryNode, nothing, catchBlocks1, 3);
         TypeKlass printStreamKlass = new TypeKlass("java.io.PrintStream");
-        TypeKlass systemKlass = new TypeKlass("java.lang.System");
-        FunctionInfo systemOutPrintInfo = new FunctionInfo("print", printStreamKlass,
+        FunctionInfo printInfo = new FunctionInfo("print", printStreamKlass,
                 TypeList.VOID, 0, FunctionInfo.PUBLIC,
                 new VariableInfo("this", owner, printStreamKlass, VariableInfo.LOCAL | VariableInfo.INITIALIZED),
                 new VariableInfo("t", owner, TypeList.OBJECT,
                         VariableInfo.LOCAL  | VariableInfo.INITIALIZED));
+        TypeKlass systemKlass = new TypeKlass("java.lang.System");
+        StaticMemberVariable systemErrVar = new StaticMemberVariable(owner,
+                new VariableInfo("err", systemKlass, printStreamKlass, VariableInfo.STATIC | VariableInfo.PUBLIC));
+
+        LocalVariable exVar = new LocalVariable(
+                new VariableInfo("ex", owner, throwableKlass, VariableInfo.LOCAL | VariableInfo.INITIALIZED));
+        TypeKlass classKlass = new TypeKlass("java.lang.Class");
+        FunctionInfo getClassInfo = new FunctionInfo("getClass", TypeList.OBJECT,
+                classKlass, 0, FunctionInfo.PUBLIC,
+                new VariableInfo("this", owner, TypeList.OBJECT, VariableInfo.LOCAL | VariableInfo.INITIALIZED));
+        Function getClass = new Function(TypeList.OBJECT, getClassInfo, Arrays.asList(exVar));
+        FunctionInfo getNameInfo = new FunctionInfo("getName", classKlass,
+                TypeList.STRING, 0, FunctionInfo.PUBLIC,
+                new VariableInfo("this", owner, TypeList.OBJECT, VariableInfo.LOCAL | VariableInfo.INITIALIZED));
+        Function getName = new Function(classKlass, getNameInfo, Arrays.asList(getClass));
+        ArrayList<IRNode> printExceptionBlockContent = new ArrayList<>();
+        // { System.err.print(ex.getClass().getName()); System.err.print("\n"); }
+        printExceptionBlockContent.add(new Statement(
+            new Function(printStreamKlass, printInfo, Arrays.asList(systemErrVar, getName)), true));
+        printExceptionBlockContent.add(new Statement(
+            new Function(printStreamKlass, printInfo, Arrays.asList(systemErrVar, EOL)), true));
+
+        Block printExceptionBlock = new Block(owner, TypeList.VOID, printExceptionBlockContent, 3);
+        List<CatchBlock> catchBlocks1 = new ArrayList<>();
+        catchBlocks1.add(new CatchBlock(printExceptionBlock, throwables, 3));
+        List<CatchBlock> catchBlocks2 = new ArrayList<>();
+        catchBlocks2.add(new CatchBlock(printExceptionBlock, throwables, 3));
+        List<CatchBlock> catchBlocks3 = new ArrayList<>();
+        catchBlocks3.add(new CatchBlock(printExceptionBlock, throwables, 2));
+
+        TryCatchBlock tryCatch1 = new TryCatchBlock(tryNode, nothing, catchBlocks1, 3);
         List<IRNode> printArgs = new ArrayList<>();
         VariableInfo systemOutInfo = new VariableInfo("out", systemKlass, printStreamKlass,
                 VariableInfo.STATIC | VariableInfo.PUBLIC);
         StaticMemberVariable systemOutVar = new StaticMemberVariable(owner, systemOutInfo);
         printArgs.add(systemOutVar);
         printArgs.add(tVar);
-        Function print = new Function(printStreamKlass, systemOutPrintInfo, printArgs);
+        Function print = new Function(printStreamKlass, printInfo, printArgs);
         ArrayList<IRNode> printBlockContent = new ArrayList<>();
         printBlockContent.add(new Statement(print, true));
         Block printBlock = new Block(owner, TypeList.VOID, printBlockContent, 3);
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/OptionResolver.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/utils/OptionResolver.java	Fri Jul 08 12:17:10 2016 -0700
@@ -230,7 +230,7 @@
 
         @Override
         public Long parseFromString(String arg) {
-            return new Long(arg);
+            return Long.valueOf(arg);
         }
     }
 
@@ -242,7 +242,7 @@
 
         @Override
         public Integer parseFromString(String arg) {
-            return new Integer(arg);
+            return Integer.valueOf(arg);
         }
     }
 
--- a/jaxp/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/jaxp/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -367,3 +367,4 @@
 f8899b1884e2c4a000dbcc5b1a80954245fe462e jdk-9+122
 3c19ab8742c196ac267b3d87e1d19ec3472c708d jdk-9+123
 e04a15153cc293f05fcd60bc98236f50e16af46a jdk-9+124
+493eb91ec32a6dea7604cfbd86c10045ad9af15b jdk-9+125
--- a/jaxp/test/ProblemList.txt	Fri Jul 08 17:36:34 2016 +0300
+++ b/jaxp/test/ProblemList.txt	Fri Jul 08 12:17:10 2016 -0700
@@ -1,6 +1,6 @@
 ###########################################################################
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,8 @@
 #
 ###########################################################################
 
-# 8147431 
-javax/xml/jaxp/isolatedjdk/catalog/PropertiesTest.sh            generic-all
+javax/xml/jaxp/isolatedjdk/catalog/PropertiesTest.sh            8147431 generic-all
 
-# 8150145
-javax/xml/jaxp/unittest/common/TransformationWarningsTest.java	generic-all
+javax/xml/jaxp/unittest/common/TransformationWarningsTest.java	8150145 generic-all
 
-# 8156508
-javax/xml/jaxp/unittest/stream/FactoryFindTest.java             generic-all
+javax/xml/jaxp/unittest/stream/FactoryFindTest.java             8156508 generic-all
--- a/jaxws/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/jaxws/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -370,3 +370,4 @@
 342705d785ffd9e999991a3d4baae2eca58ea7c3 jdk-9+122
 c42decd28bbfa817347112ed6053b5fbd30517a2 jdk-9+123
 1600da1665cd2cc127014e8c002b328ec33a9147 jdk-9+124
+5b0570e3db29f6b8c80a4beac70d51284507b203 jdk-9+125
--- a/jdk/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -368,3 +368,4 @@
 c40c8739bcdc88892ff58ebee3fd8a3f287be94d jdk-9+123
 7ff61c55b5c6c124592f09b18953222009a204a6 jdk-9+124
 073ab1d4edf5590cf1af7b6d819350c14e425c1a jdk-9+125
+6fda66a5bdf2da8994032b9da2078a4137f4d954 jdk-9+126
--- a/jdk/make/gendata/GendataBlacklistedCerts.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/gendata/GendataBlacklistedCerts.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,16 +23,14 @@
 # questions.
 #
 
-GENDATA_BLACKLISTED_CERTS_SRC := $(JDK_TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
+$(eval $(call IncludeCustomExtension, jdk, gendata/GendataBlacklistedCerts.gmk))
+
+GENDATA_BLACKLISTED_CERTS_SRC += $(JDK_TOPDIR)/make/data/blacklistedcertsconverter/blacklisted.certs.pem
 GENDATA_BLACKLISTED_CERTS := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/security/blacklisted.certs
 
-ifndef OPENJDK
-	GENDATA_BLACKLISTED_CERTS_SRC += $(wildcard $(JDK_TOPDIR)/make/closed/data/blacklistedcertsconverter/blacklisted.certs.pem)
-endif
- 
 $(GENDATA_BLACKLISTED_CERTS): $(BUILD_TOOLS) $(GENDATA_BLACKLISTED_CERTS_SRC)
-	$(ECHO) "Generating blacklisted certs"
-	$(MKDIR) -p $(@D)
+	$(call LogInfo, Generating blacklisted certs)
+	$(call MakeDir, $(@D))
 	($(CAT) $(GENDATA_BLACKLISTED_CERTS_SRC) | $(TOOL_BLACKLISTED_CERTS) > $@) || exit 1
 
 TARGETS += $(GENDATA_BLACKLISTED_CERTS)
--- a/jdk/make/gendata/GendataFontConfig.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/gendata/GendataFontConfig.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,14 +23,11 @@
 # questions.
 #
 
+$(eval $(call IncludeCustomExtension, jdk, gendata/GendataFontConfig.gmk))
+
 GENDATA_FONT_CONFIG_DST := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)
 
-GENDATA_FONT_CONFIG_DATA_DIR := $(JDK_TOPDIR)/make/data/fontconfig
-ifndef OPENJDK
-  ifeq ($(OPENJDK_TARGET_OS), linux)
-    GENDATA_FONT_CONFIG_DATA_DIR := $(JDK_TOPDIR)/make/closed/data/fontconfig
-  endif
-endif
+GENDATA_FONT_CONFIG_DATA_DIR ?= $(JDK_TOPDIR)/make/data/fontconfig
 
 GENDATA_FONT_CONFIG_SRC_FILES := \
     $(wildcard $(GENDATA_FONT_CONFIG_DATA_DIR)/$(OPENJDK_TARGET_OS).*)
@@ -55,4 +52,3 @@
     $(GENDATA_FONT_CONFIG_DST)/%.bfc, $(GENDATA_FONT_CONFIG_SRC_FILES))
 
 TARGETS := $(GENDATA_FONT_CONFIGS) $(GENDATA_BFONT_CONFIGS)
-
--- a/jdk/make/gendata/GendataPolicyJars.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/gendata/GendataPolicyJars.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -40,22 +40,6 @@
 US_EXPORT_POLICY_JAR_UNLIMITED := \
     $(SUPPORT_OUTPUTDIR)/jce/policy/unlimited/US_export_policy.jar
 
-ifndef OPENJDK
-  #
-  # In past releases, Oracle JDK has had a separately downloadable set of
-  # policy files which has been a nightmare for deployment.
-  #
-  # Now if we're closed and limited (default for Oracle JDK), create
-  # an "unlimited_policy" directory that contains the unlimited policy
-  # files.  It will be up to the user/deployer to make an informed choice
-  # as to whether they are legally entitled to use the unlimited policy
-  # file in their environment.  Users/deployers simply need to overwrite
-  # the files.  Consult README.txt (below) for more info.
-  #
-  UNLIMITED_POLICY_DIR := \
-      $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/security/unlimited_policy
-endif
-
 #
 # TODO fix so that SetupJarArchive does not write files into SRCS
 # then we don't need this extra copying
@@ -100,15 +84,6 @@
 	$(install-file)
 endif
 
-ifndef OPENJDK
-  ifneq ($(UNLIMITED_CRYPTO), true)
-    $(UNLIMITED_POLICY_DIR)/US_export_policy.jar: \
-        $(US_EXPORT_POLICY_JAR_UNLIMITED)
-		$(install-file)
-    TARGETS += $(UNLIMITED_POLICY_DIR)/US_export_policy.jar
-  endif
-endif
-
 POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
 
 ################################################################################
@@ -159,31 +134,12 @@
 
 TARGETS += $(LOCAL_POLICY_JAR_LIMITED) $(LOCAL_POLICY_JAR_UNLIMITED)
 
-ifndef OPENJDK
-  ifneq ($(UNLIMITED_CRYPTO), true)
-    $(UNLIMITED_POLICY_DIR)/README.txt: \
-        $(JDK_TOPDIR)/make/closed/data/cryptopolicy/README.txt
-		$(install-file)
-
-    TARGETS += $(UNLIMITED_POLICY_DIR)/README.txt
-  endif
-endif
-
 ifeq ($(UNLIMITED_CRYPTO), true)
   $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED)
 	$(install-file)
-else 
+else
   $(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED)
 	$(install-file)
-endif 
-
-ifndef OPENJDK
-  ifneq ($(UNLIMITED_CRYPTO), true)
-    $(UNLIMITED_POLICY_DIR)/local_policy.jar: \
-        $(LOCAL_POLICY_JAR_UNLIMITED)
-		$(install-file) 
-    TARGETS += $(UNLIMITED_POLICY_DIR)/local_policy.jar
-  endif
 endif
 
 POLICY_JARS += $(LOCAL_POLICY_JAR_DST)
@@ -191,3 +147,4 @@
 
 ################################################################################
 
+$(eval $(call IncludeCustomExtension, jdk, gendata/GendataPolicyJars.gmk))
--- a/jdk/make/gensrc/GensrcIcons.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/gensrc/GensrcIcons.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -23,16 +23,15 @@
 # questions.
 #
 
+$(eval $(call IncludeCustomExtension, jdk, gensrc/GensrcIcons.gmk))
+
 GENSRC_AWT_ICONS :=
 GENSRC_AWT_ICONS_SRC :=
 GENSRC_AWT_ICONS_TMP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
 GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
 
-ifdef OPENJDK
-  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)
-else
-  X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/java.desktop/$(OPENJDK_TARGET_OS_TYPE)
-endif
+# Allow this to be overridden from a custom makefile
+X11_ICONS_PATH_PREFIX ?= $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)
 
 GENSRC_AWT_ICONS_SRC += \
     $(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon16.png \
@@ -114,11 +113,8 @@
   GENSRC_OSX_ICONS_DST := $(SUPPORT_OUTPUTDIR)/headers/java.desktop
   GENSRC_OSX_ICONS := $(GENSRC_OSX_ICONS_DST)/AWTIconData.h
 
-  ifdef OPENJDK
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
-  else
-    GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
-  endif
+  GENSRC_OSX_ICONS_SRC ?= $(JDK_TOPDIR)/make/data/macosxicons/JavaApp.icns
+
 
   $(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
 	$(call LogInfo, Generating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
--- a/jdk/make/launcher/Launcher-java.base.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/launcher/Launcher-java.base.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -25,12 +25,10 @@
 
 include LauncherCommon.gmk
 
+$(eval $(call IncludeCustomExtension, jdk, launcher/Launcher-java.base.gmk))
+
 JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/common
-ifdef OPENJDK
-  JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons
-else
-  JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons
-endif
+JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons
 
 ################################################################################
 
--- a/jdk/make/lib/Awt2dLibraries.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -23,6 +23,8 @@
 # questions.
 #
 
+$(eval $(call IncludeCustomExtension, jdk, lib/Awt2dLibraries-pre.gmk))
+
 WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
 
 ################################################################################
@@ -212,11 +214,7 @@
     LIBAWT_CFLAGS += -DMLIB_OS64BIT
   endif
 
-  ifdef OPENJDK
-    LIBAWT_RC_FLAGS := -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons
-  else
-    LIBAWT_RC_FLAGS := -I $(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons
-  endif
+  LIBAWT_RC_FLAGS ?= -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons
   LIBAWT_VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/java.desktop/windows/native/libawt/windows/awt.rc
 endif
 
@@ -426,7 +424,7 @@
         $(LCMS_CFLAGS), \
     CFLAGS_solaris := -xc99=no_lib, \
     CFLAGS_windows := -DCMS_IS_WINDOWS_, \
-    DISABLED_WARNINGS_gcc := format-nonliteral type-limits, \
+    DISABLED_WARNINGS_gcc := format-nonliteral type-limits misleading-indentation, \
     DISABLED_WARNINGS_clang := tautological-compare, \
     DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
@@ -454,13 +452,6 @@
 
 ################################################################################
 
-ifdef OPENJDK
-  BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
-else
-  BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
-  LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/closed/java.desktop/share/native/libjavajpeg
-endif
-
 LIBJAVAJPEG_SRC += $(JDK_TOPDIR)/src/java.desktop/share/native/libjavajpeg
 
 BUILD_LIBJAVAJPEG_REORDER :=
@@ -507,10 +498,10 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(BUILD_LIBJAVAJPEG_HEADERS) \
         $(LIBJAVA_HEADER_FLAGS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/java.desktop, \
-    DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds, \
+    DISABLED_WARNINGS_gcc := clobbered parentheses array-bounds shift-negative-value, \
     DISABLED_WARNINGS_clang := logical-op-parentheses, \
     DISABLED_WARNINGS_microsoft := 4267, \
-    MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
+    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS := $(LIBJPEG_LIBS) $(JDKLIB_LIBS), \
@@ -645,15 +636,10 @@
 
 #### End harfbuzz configuration
 
-ifndef OPENJDK
-  LIBFONTMANAGER_CFLAGS += -I$(JDK_TOPDIR)/src/closed/java.desktop/share/native/libt2k
-  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
-  LIBFONTMANAGER_EXCLUDE_FILES += freetypeScaler.c
-else
-  LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
-  BUILD_LIBFONTMANAGER_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers.openjdk
-  BUILD_LIBFONTMANAGER_FONTLIB := $(FREETYPE_LIBS)
-endif
+LIBFONTMANAGER_CFLAGS += $(FREETYPE_CFLAGS)
+# This may be overridden in a custom makefile
+BUILD_LIBFONTMANAGER_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libfontmanager/mapfile-vers
+BUILD_LIBFONTMANAGER_FONTLIB += $(FREETYPE_LIBS)
 
 LIBFONTMANAGER_OPTIMIZATION := HIGH
 
@@ -943,7 +929,7 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
                 $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
-      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized, \
+      DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized shift-negative-value, \
       DISABLED_WARNINGS_clang := incompatible-pointer-types, \
       DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
           E_STATEMENT_NOT_REACHED, \
--- a/jdk/make/mapfiles/libdcpr/mapfile-vers	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		Java_sun_dc_pr_PathDasher_beginPath;
-		Java_sun_dc_pr_PathFiller_getTileState;
-		Java_sun_dc_pr_PathStroker_setCaps;
-		Java_sun_dc_pr_PathStroker_setCorners;
-		Java_sun_dc_pr_PathFiller_writeAlpha16;
-		Java_sun_dc_pr_PathFiller_closedSubpath;
-		Java_sun_dc_pr_PathStroker_beginPath;
-		Java_sun_dc_pr_PathDasher_setDashT4;
-		Java_sun_dc_pr_PathFiller_dispose;
-		Java_sun_dc_pr_PathStroker_closedSubpath;
-		Java_sun_dc_pr_PathDasher_appendLine;
-		Java_sun_dc_pr_PathStroker_dispose;
-		Java_sun_dc_pr_PathDasher_setOutputConsumer;
-		Java_sun_dc_pr_PathStroker_reset;
-		Java_sun_dc_pr_PathFiller_beginSubpath;
-		Java_sun_dc_pr_PathFiller_writeAlpha8;
-		Java_sun_dc_pr_PathDasher_closedSubpath;
-		Java_sun_dc_pr_PathFiller_appendQuadratic;
-		Java_sun_dc_pr_PathDasher_setOutputT6;
-		Java_sun_dc_pr_PathStroker_setPenFitting;
-		Java_sun_dc_pr_PathStroker_endPath;
-		Java_sun_dc_pr_PathDasher_setDash;
-		Java_sun_dc_pr_PathFiller_nextTile;
-		Java_sun_dc_pr_PathStroker_setOutputConsumer;
-		Java_sun_dc_pr_PathFiller_setFillMode;
-		Java_sun_dc_pr_PathFiller_appendLine;
-		Java_sun_dc_pr_PathStroker_appendQuadratic;
-		Java_sun_dc_pr_PathFiller_endPath;
-		Java_sun_dc_pr_PathStroker_appendCubic;
-		Java_sun_dc_pr_PathDasher_appendCubic;
-		Java_sun_dc_pr_PathStroker_setPenDiameter;
-		Java_sun_dc_pr_PathFiller_setOutputArea;
-		Java_sun_dc_pr_PathFiller_getAlphaBox;
-		Java_sun_dc_pr_PathStroker_appendLine;
-		Java_sun_dc_pr_PathStroker_setOutputT6;
-		Java_sun_dc_pr_PathFiller_beginPath;
-		Java_sun_dc_pr_PathDasher_dispose;
-		Java_sun_dc_pr_PathDasher_reset;
-		Java_sun_dc_pr_PathFiller_reset;
-		Java_sun_dc_pr_PathDasher_endPath;
-		Java_sun_dc_pr_PathStroker_beginSubpath;
-		Java_sun_dc_pr_PathStroker_setPenT4;
-		Java_sun_dc_pr_PathDasher_appendQuadratic;
-		Java_sun_dc_pr_PathDasher_beginSubpath;
-		Java_sun_dc_pr_PathFiller_appendCubic;
-
-		Java_sun_dc_pr_PathDasher_cClassFinalize;
-		Java_sun_dc_pr_PathDasher_cClassInitialize;
-		Java_sun_dc_pr_PathDasher_cInitialize;
-		Java_sun_dc_pr_PathFiller_cClassFinalize;
-		Java_sun_dc_pr_PathFiller_cClassInitialize;
-		Java_sun_dc_pr_PathFiller_cInitialize;
-		Java_sun_dc_pr_PathStroker_cClassFinalize;
-		Java_sun_dc_pr_PathStroker_cClassInitialize;
-		Java_sun_dc_pr_PathStroker_cInitialize;
-		Java_sun_dc_pr_PathStroker_cInitialize2D;
-
-		Java_sun_dc_pr_PathDasher_getCPathConsumer;
-		Java_sun_dc_pr_PathFiller_getCPathConsumer;
-		Java_sun_dc_pr_PathStroker_getCPathConsumer;
-
-	local:
-		*;
-};
--- a/jdk/make/mapfiles/libfontmanager/mapfile-vers	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/make/mapfiles/libfontmanager/mapfile-vers	Fri Jul 08 12:17:10 2016 -0700
@@ -25,6 +25,8 @@
 
 # Define public interface.
 
+# In addition to regular symbols also include Freetype scaler
+
 SUNWprivate_1.1 {
 	global:
                 getSunFontIDs;
@@ -57,6 +59,23 @@
                 Java_sun_font_NativeFont_getGlyphImage;
                 Java_sun_font_NativeFont_getGlyphImageNoDefault;
                 Java_sun_font_NativeFont_getFontMetrics;
+                Java_sun_font_FreetypeFontScaler_initIDs;
+                Java_sun_font_FreetypeFontScaler_createScalerContextNative;
+                Java_sun_font_FreetypeFontScaler_disposeNativeScaler;
+                Java_sun_font_FreetypeFontScaler_getFontMetricsNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphCodeNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphImageNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphOutlineBoundsNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphOutlineNative;
+                Java_sun_font_FreetypeFontScaler_getGlyphVectorOutlineNative;
+                Java_sun_font_FreetypeFontScaler_getLayoutTableCacheNative;
+                Java_sun_font_FreetypeFontScaler_getMissingGlyphCodeNative;
+                Java_sun_font_FreetypeFontScaler_getNumGlyphsNative;
+                Java_sun_font_FreetypeFontScaler_getUnitsPerEMNative;
+                Java_sun_font_FreetypeFontScaler_initNativeScaler;
+                Java_sun_font_FreetypeFontScaler_getGlyphPointNative;
 	local:
 		*;
 };
--- a/jdk/make/mapfiles/libfontmanager/mapfile-vers.openjdk	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-# In addition to regular symbols also include Freetype scaler
-
-SUNWprivate_1.1 {
-	global:
-                getSunFontIDs;
-                newLayoutTableCache;
-                freeLayoutTableCache;
-                isNullScalerContext;
-                Java_sun_font_NullFontScaler_getNullScalerContext;
-                Java_sun_font_NullFontScaler_getGlyphImage;
-                Java_sun_font_SunFontManager_initIDs;
-                Java_sun_font_StrikeCache_getGlyphCacheDescription;
-                Java_sun_font_StrikeCache_freeIntPointer;
-                Java_sun_font_StrikeCache_freeLongPointer;
-                Java_sun_font_StrikeCache_freeIntMemory;
-                Java_sun_font_StrikeCache_freeLongMemory;
-                Java_sun_font_SunLayoutEngine_initGVIDs;
-                Java_sun_font_SunLayoutEngine_nativeLayout;
-                Java_sun_font_SunLayoutEngine_shape;
-                Java_sun_font_X11TextRenderer_doDrawGlyphList;
-		Java_sun_java2d_loops_DrawGlyphListAA_DrawGlyphListAA;
-		Java_sun_java2d_loops_DrawGlyphListLCD_DrawGlyphListLCD;
-		Java_sun_java2d_loops_DrawGlyphList_DrawGlyphList;
-                Java_sun_font_NativeStrikeDisposer_freeNativeScalerContext;
-                Java_sun_font_NativeStrike_createNullScalerContext;
-                Java_sun_font_NativeStrike_createScalerContext;
-                Java_sun_font_NativeStrike_getMaxGlyph;
-                Java_sun_font_NativeFont_fontExists;
-                Java_sun_font_NativeFont_haveBitmapFonts;
-                Java_sun_font_NativeFont_countGlyphs;
-                Java_sun_font_NativeFont_getGlyphAdvance;
-                Java_sun_font_NativeFont_getGlyphImage;
-                Java_sun_font_NativeFont_getGlyphImageNoDefault;
-                Java_sun_font_NativeFont_getFontMetrics;
-                Java_sun_font_FreetypeFontScaler_initIDs;
-                Java_sun_font_FreetypeFontScaler_createScalerContextNative;
-                Java_sun_font_FreetypeFontScaler_disposeNativeScaler;
-                Java_sun_font_FreetypeFontScaler_getFontMetricsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphCodeNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphImageNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphOutlineBoundsNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphOutlineNative;
-                Java_sun_font_FreetypeFontScaler_getGlyphVectorOutlineNative;
-                Java_sun_font_FreetypeFontScaler_getLayoutTableCacheNative;
-                Java_sun_font_FreetypeFontScaler_getMissingGlyphCodeNative;
-                Java_sun_font_FreetypeFontScaler_getNumGlyphsNative;
-                Java_sun_font_FreetypeFontScaler_getUnitsPerEMNative;
-                Java_sun_font_FreetypeFontScaler_initNativeScaler;
-                Java_sun_font_FreetypeFontScaler_getGlyphPointNative;
-	local:
-		*;
-};
--- a/jdk/make/mapfiles/libjdga/mapfile-vers	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define library interface.
-
-SUNWprivate_1.1 {
-	global:
-            JDgaLibInit;
-	local:
-	    *;
-};
--- a/jdk/make/mapfiles/libjpeg/mapfile-vers-closed	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
-
-		Java_sun_awt_image_JPEGImageDecoder_initIDs;
-		Java_sun_awt_image_JPEGImageDecoder_readImage;
-
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
-	local:
-		*;
-};
--- a/jdk/make/mapfiles/libkcms/mapfile-vers	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetTagSize;
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetNumComponents;
-        Java_sun_java2d_cmm_kcms_CMM_cmmColorConvert;
-        Java_sun_java2d_cmm_kcms_CMM_cmmInit;
-        Java_sun_java2d_cmm_kcms_CMM_cmmCombineTransforms;
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetTagData;
-        Java_sun_java2d_cmm_kcms_CMM_cmmSetTagData;
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetProfileData;
-        Java_sun_java2d_cmm_kcms_CMM_cmmFreeProfile;
-        Java_sun_java2d_cmm_kcms_CMM_cmmTerminate;
-        Java_sun_java2d_cmm_kcms_CMM_cmmLoadProfile;
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetTransform;
-        Java_sun_java2d_cmm_kcms_CMM_cmmFreeTransform;
-        Java_sun_java2d_cmm_kcms_CMM_cmmGetProfileSize;
-
-	local:
-		*;
-};
--- a/jdk/make/mapfiles/libt2k/mapfile-vers	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-             Java_sun_font_T2KFontScaler_createScalerContextNative;
-             Java_sun_font_T2KFontScaler_disposeNativeScaler;
-             Java_sun_font_T2KFontScaler_getFontMetricsNative;
-             Java_sun_font_T2KFontScaler_getGlyphAdvanceNative;
-             Java_sun_font_T2KFontScaler_getGlyphCodeNative;
-             Java_sun_font_T2KFontScaler_getGlyphImageNative;
-             Java_sun_font_T2KFontScaler_getGlyphMetricsNative;
-             Java_sun_font_T2KFontScaler_getGlyphOutlineBoundsNative;
-             Java_sun_font_T2KFontScaler_getGlyphOutlineNative;
-             Java_sun_font_T2KFontScaler_getGlyphVectorOutlineNative;
-             Java_sun_font_T2KFontScaler_getLayoutTableCacheNative;
-             Java_sun_font_T2KFontScaler_getMissingGlyphCodeNative;
-             Java_sun_font_T2KFontScaler_getNumGlyphsNative;
-             Java_sun_font_T2KFontScaler_getUnitsPerEMNative;
-             Java_sun_font_T2KFontScaler_initIDs;
-             Java_sun_font_T2KFontScaler_initNativeScaler;
-             Java_sun_font_T2KFontScaler_getGlyphPointNative;
-	local:
-		*;
-};
--- a/jdk/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/macosx/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/macosx/native/libjli/java_md_macosx.c	Fri Jul 08 12:17:10 2016 -0700
@@ -1053,32 +1053,6 @@
     setenv(envVar, "1", 1);
 }
 
-/* This class is made for performSelectorOnMainThread when java main
- * should be launched on main thread.
- * We cannot use dispatch_sync here, because it blocks the main dispatch queue
- * which is used inside Cocoa
- */
-@interface JavaLaunchHelper : NSObject {
-    int _returnValue;
-}
-- (void) launchJava:(NSValue*)argsValue;
-- (int) getReturnValue;
-@end
-
-@implementation JavaLaunchHelper
-
-- (void) launchJava:(NSValue*)argsValue
-{
-    _returnValue = JavaMain([argsValue pointerValue]);
-}
-
-- (int) getReturnValue
-{
-    return _returnValue;
-}
-
-@end
-
 // MacOSX we may continue in the same thread
 int
 JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
@@ -1088,20 +1062,26 @@
         JLI_TraceLauncher("In same thread\n");
         // need to block this thread against the main thread
         // so signals get caught correctly
-        JavaMainArgs args;
-        args.argc = argc;
-        args.argv = argv;
-        args.mode = mode;
-        args.what = what;
-        args.ifn  = *ifn;
-        int rslt;
+        __block int rslt = 0;
         NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
         {
-            JavaLaunchHelper* launcher = [[[JavaLaunchHelper alloc] init] autorelease];
-            [launcher performSelectorOnMainThread:@selector(launchJava:)
-                                       withObject:[NSValue valueWithPointer:(void*)&args]
-                                    waitUntilDone:YES];
-            rslt = [launcher getReturnValue];
+            NSBlockOperation *op = [NSBlockOperation blockOperationWithBlock: ^{
+                JavaMainArgs args;
+                args.argc = argc;
+                args.argv = argv;
+                args.mode = mode;
+                args.what = what;
+                args.ifn  = *ifn;
+                rslt = JavaMain(&args);
+            }];
+
+            /*
+             * We cannot use dispatch_sync here, because it blocks the main dispatch queue.
+             * Using the main NSRunLoop allows the dispatch queue to run properly once
+             * SWT (or whatever toolkit this is needed for) kicks off it's own NSRunLoop
+             * and starts running.
+             */
+            [op performSelectorOnMainThread:@selector(start) withObject:nil waitUntilDone:YES];
         }
         [pool drain];
         return rslt;
--- a/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/annotation/AnnotationTypeMismatchException.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
     /**
      * The {@code Method} object for the annotation element.
      */
-    private final Method element;
+    private final transient Method element;
 
     /**
      * The (erroneous) type of data found in the annotation.  This string
@@ -57,10 +57,12 @@
      * Constructs an AnnotationTypeMismatchException for the specified
      * annotation type element and found data type.
      *
-     * @param element the {@code Method} object for the annotation element
+     * @param element the {@code Method} object for the annotation
+     * element, may be {@code null}
      * @param foundType the (erroneous) type of data found in the annotation.
      *        This string may, but is not required to, contain the value
-     *        as well.  The exact format of the string is unspecified.
+     *        as well.  The exact format of the string is unspecified,
+     *        may be {@code null}.
      */
     public AnnotationTypeMismatchException(Method element, String foundType) {
         super("Incorrectly typed data found for annotation element " + element
@@ -71,8 +73,11 @@
 
     /**
      * Returns the {@code Method} object for the incorrectly typed element.
+     * The value may be unavailable if this exception has been
+     * serialized and then read back in.
      *
-     * @return the {@code Method} object for the incorrectly typed element
+     * @return the {@code Method} object for the incorrectly typed
+     * element, or {@code null} if unavailable
      */
     public Method element() {
         return this.element;
@@ -81,7 +86,8 @@
     /**
      * Returns the type of data found in the incorrectly typed element.
      * The returned string may, but is not required to, contain the value
-     * as well.  The exact format of the string is unspecified.
+     * as well.  The exact format of the string is unspecified and the string
+     * may be {@code null}.
      *
      * @return the type of data found in the incorrectly typed element
      */
--- a/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,17 +26,16 @@
 package java.lang.invoke;
 
 import jdk.internal.loader.BootLoader;
-import jdk.internal.vm.annotation.Stable;
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.FieldVisitor;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.vm.annotation.Stable;
 import sun.invoke.util.ValueConversions;
 import sun.invoke.util.Wrapper;
 
 import java.lang.invoke.LambdaForm.NamedFunction;
 import java.lang.invoke.MethodHandles.Lookup;
 import java.lang.reflect.Field;
-import java.util.Arrays;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -168,12 +167,16 @@
     }
 
     @Override
-    final Object internalValues() {
-        Object[] boundValues = new Object[speciesData().fieldCount()];
-        for (int i = 0; i < boundValues.length; ++i) {
-            boundValues[i] = arg(i);
+    final String internalValues() {
+        int count = speciesData().fieldCount();
+        if (count == 1) {
+            return "[" + arg(0) + "]";
         }
-        return Arrays.asList(boundValues);
+        StringBuilder sb = new StringBuilder("[");
+        for (int i = 0; i < count; ++i) {
+            sb.append("\n  ").append(i).append(": ( ").append(arg(i)).append(" )");
+        }
+        return sb.append("\n]").toString();
     }
 
     /*non-public*/ final Object arg(int i) {
@@ -869,7 +872,7 @@
      */
     static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY;
 
-    private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[5];
+    private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[6];
     private static SpeciesData checkCache(int size, String types) {
         int idx = size - 1;
         SpeciesData data = SPECIES_DATA_CACHE[idx];
@@ -877,9 +880,10 @@
         SPECIES_DATA_CACHE[idx] = data = getSpeciesData(types);
         return data;
     }
-    static SpeciesData speciesData_L()     { return checkCache(1, "L"); }
-    static SpeciesData speciesData_LL()    { return checkCache(2, "LL"); }
-    static SpeciesData speciesData_LLL()   { return checkCache(3, "LLL"); }
-    static SpeciesData speciesData_LLLL()  { return checkCache(4, "LLLL"); }
-    static SpeciesData speciesData_LLLLL() { return checkCache(5, "LLLLL"); }
+    static SpeciesData speciesData_L()      { return checkCache(1, "L"); }
+    static SpeciesData speciesData_LL()     { return checkCache(2, "LL"); }
+    static SpeciesData speciesData_LLL()    { return checkCache(3, "LLL"); }
+    static SpeciesData speciesData_LLLL()   { return checkCache(4, "LLLL"); }
+    static SpeciesData speciesData_LLLLL()  { return checkCache(5, "LLLLL"); }
+    static SpeciesData speciesData_LLLLLL() { return checkCache(6, "LLLLLL"); }
 }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,22 +25,30 @@
 
 package java.lang.invoke;
 
-import java.io.*;
-import java.util.*;
-import java.lang.reflect.Modifier;
-
-import jdk.internal.org.objectweb.asm.*;
-
-import static java.lang.invoke.LambdaForm.*;
-import static java.lang.invoke.LambdaForm.BasicType.*;
-import static java.lang.invoke.MethodHandleStatics.*;
-import static java.lang.invoke.MethodHandleNatives.Constants.*;
-
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.Label;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.org.objectweb.asm.Opcodes;
+import jdk.internal.org.objectweb.asm.Type;
 import sun.invoke.util.VerifyAccess;
 import sun.invoke.util.VerifyType;
 import sun.invoke.util.Wrapper;
 import sun.reflect.misc.ReflectUtil;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Stream;
+
+import static java.lang.invoke.LambdaForm.*;
+import static java.lang.invoke.LambdaForm.BasicType.*;
+import static java.lang.invoke.MethodHandleNatives.Constants.*;
+import static java.lang.invoke.MethodHandleStatics.*;
+
 /**
  * Code generation backend for LambdaForm.
  * <p>
@@ -75,8 +83,8 @@
     private final MethodType invokerType;
 
     /** Info about local variables in compiled lambda form */
-    private final int[]       localsMap;    // index
-    private final Class<?>[]  localClasses; // type
+    private int[]       localsMap;    // index
+    private Class<?>[]  localClasses; // type
 
     /** ASM bytecode generation. */
     private ClassWriter cw;
@@ -101,8 +109,7 @@
         this.lambdaForm = lambdaForm;
         this.invokerName = invokerName;
         this.invokerType = invokerType;
-        this.localsMap = new int[localsMapSize+1];
-        // last entry of localsMap is count of allocated local slots
+        this.localsMap = new int[localsMapSize+1]; // last entry of localsMap is count of allocated local slots
         this.localClasses = new Class<?>[localsMapSize+1];
     }
 
@@ -131,7 +138,6 @@
         }
     }
 
-
     /** instance counters for dumped classes */
     private static final HashMap<String,Integer> DUMP_CLASS_FILES_COUNTERS;
     /** debugging flag for saving generated class files */
@@ -177,7 +183,6 @@
                 }
             });
         }
-
     }
 
     private static String makeDumpableClassName(String className) {
@@ -280,14 +285,11 @@
 
     private static MemberName resolveInvokerMember(Class<?> invokerClass, String name, MethodType type) {
         MemberName member = new MemberName(invokerClass, name, type, REF_invokeStatic);
-        //System.out.println("resolveInvokerMember => "+member);
-        //for (Method m : invokerClass.getDeclaredMethods())  System.out.println("  "+m);
         try {
             member = MEMBERNAME_FACTORY.resolveOrFail(REF_invokeStatic, member, HOST_CLASS, ReflectiveOperationException.class);
         } catch (ReflectiveOperationException e) {
             throw newInternalError(e);
         }
-        //System.out.println("resolveInvokerMember => "+member);
         return member;
     }
 
@@ -541,11 +543,12 @@
         Name writeBack = null;  // local to write back result
         if (arg instanceof Name) {
             Name n = (Name) arg;
-            if (assertStaticType(cls, n))
-                return;  // this cast was already performed
             if (lambdaForm.useCount(n) > 1) {
                 // This guy gets used more than once.
                 writeBack = n;
+                if (assertStaticType(cls, n)) {
+                    return; // this cast was already performed
+                }
             }
         }
         if (isStaticallyNameable(cls)) {
@@ -679,19 +682,29 @@
             MethodHandleImpl.Intrinsic intr = name.function.intrinsicName();
             switch (intr) {
                 case SELECT_ALTERNATIVE:
-                    assert isSelectAlternative(i);
+                    assert lambdaForm.isSelectAlternative(i);
                     if (PROFILE_GWT) {
                         assert(name.arguments[0] instanceof Name &&
-                               nameRefersTo((Name)name.arguments[0], MethodHandleImpl.class, "profileBoolean"));
+                                ((Name)name.arguments[0]).refersTo(MethodHandleImpl.class, "profileBoolean"));
                         mv.visitAnnotation(INJECTEDPROFILE_SIG, true);
                     }
                     onStack = emitSelectAlternative(name, lambdaForm.names[i+1]);
                     i++;  // skip MH.invokeBasic of the selectAlternative result
                     continue;
                 case GUARD_WITH_CATCH:
-                    assert isGuardWithCatch(i);
+                    assert lambdaForm.isGuardWithCatch(i);
                     onStack = emitGuardWithCatch(i);
-                    i = i+2; // Jump to the end of GWC idiom
+                    i += 2; // jump to the end of GWC idiom
+                    continue;
+                case TRY_FINALLY:
+                    assert lambdaForm.isTryFinally(i);
+                    onStack = emitTryFinally(i);
+                    i += 2; // jump to the end of the TF idiom
+                    continue;
+                case LOOP:
+                    assert lambdaForm.isLoop(i);
+                    onStack = emitLoop(i);
+                    i += 2; // jump to the end of the LOOP idiom
                     continue;
                 case NEW_ARRAY:
                     Class<?> rtype = name.function.methodType().returnType();
@@ -738,11 +751,25 @@
         classFileEpilogue();
         bogusMethod(lambdaForm);
 
-        final byte[] classFile = cw.toByteArray();
+        final byte[] classFile;
+        try {
+            classFile = cw.toByteArray();
+        } catch (RuntimeException e) {
+            // ASM throws RuntimeException if something goes wrong - capture these and wrap them in a meaningful
+            // exception to support falling back to LambdaForm interpretation
+            throw new BytecodeGenerationException(e);
+        }
         maybeDump(className, classFile);
         return classFile;
     }
 
+    @SuppressWarnings("serial")
+    static final class BytecodeGenerationException extends RuntimeException {
+        BytecodeGenerationException(Exception cause) {
+            super(cause);
+        }
+    }
+
     void emitArrayLoad(Name name)   { emitArrayOp(name, Opcodes.AALOAD);      }
     void emitArrayStore(Name name)  { emitArrayOp(name, Opcodes.AASTORE);     }
     void emitArrayLength(Name name) { emitArrayOp(name, Opcodes.ARRAYLENGTH); }
@@ -763,7 +790,7 @@
      * Emit an invoke for the given name.
      */
     void emitInvoke(Name name) {
-        assert(!isLinkerMethodInvoke(name));  // should use the static path for these
+        assert(!name.isLinkerMethodInvoke());  // should use the static path for these
         if (true) {
             // push receiver
             MethodHandle target = name.function.resolvedHandle();
@@ -952,84 +979,6 @@
     }
 
     /**
-     * Check if MemberName is a call to a method named {@code name} in class {@code declaredClass}.
-     */
-    private boolean memberRefersTo(MemberName member, Class<?> declaringClass, String name) {
-        return member != null &&
-               member.getDeclaringClass() == declaringClass &&
-               member.getName().equals(name);
-    }
-    private boolean nameRefersTo(Name name, Class<?> declaringClass, String methodName) {
-        return name.function != null &&
-               memberRefersTo(name.function.member(), declaringClass, methodName);
-    }
-
-    /**
-     * Check if MemberName is a call to MethodHandle.invokeBasic.
-     */
-    private boolean isInvokeBasic(Name name) {
-        if (name.function == null)
-            return false;
-        if (name.arguments.length < 1)
-            return false;  // must have MH argument
-        MemberName member = name.function.member();
-        return memberRefersTo(member, MethodHandle.class, "invokeBasic") &&
-               !member.isPublic() && !member.isStatic();
-    }
-
-    /**
-     * Check if MemberName is a call to MethodHandle.linkToStatic, etc.
-     */
-    private boolean isLinkerMethodInvoke(Name name) {
-        if (name.function == null)
-            return false;
-        if (name.arguments.length < 1)
-            return false;  // must have MH argument
-        MemberName member = name.function.member();
-        return member != null &&
-               member.getDeclaringClass() == MethodHandle.class &&
-               !member.isPublic() && member.isStatic() &&
-               member.getName().startsWith("linkTo");
-    }
-
-    /**
-     * Check if i-th name is a call to MethodHandleImpl.selectAlternative.
-     */
-    private boolean isSelectAlternative(int pos) {
-        // selectAlternative idiom:
-        //   t_{n}:L=MethodHandleImpl.selectAlternative(...)
-        //   t_{n+1}:?=MethodHandle.invokeBasic(t_{n}, ...)
-        if (pos+1 >= lambdaForm.names.length)  return false;
-        Name name0 = lambdaForm.names[pos];
-        Name name1 = lambdaForm.names[pos+1];
-        return nameRefersTo(name0, MethodHandleImpl.class, "selectAlternative") &&
-               isInvokeBasic(name1) &&
-               name1.lastUseIndex(name0) == 0 &&        // t_{n+1}:?=MethodHandle.invokeBasic(t_{n}, ...)
-               lambdaForm.lastUseIndex(name0) == pos+1; // t_{n} is local: used only in t_{n+1}
-    }
-
-    /**
-     * Check if i-th name is a start of GuardWithCatch idiom.
-     */
-    private boolean isGuardWithCatch(int pos) {
-        // GuardWithCatch idiom:
-        //   t_{n}:L=MethodHandle.invokeBasic(...)
-        //   t_{n+1}:L=MethodHandleImpl.guardWithCatch(*, *, *, t_{n});
-        //   t_{n+2}:?=MethodHandle.invokeBasic(t_{n+1})
-        if (pos+2 >= lambdaForm.names.length)  return false;
-        Name name0 = lambdaForm.names[pos];
-        Name name1 = lambdaForm.names[pos+1];
-        Name name2 = lambdaForm.names[pos+2];
-        return nameRefersTo(name1, MethodHandleImpl.class, "guardWithCatch") &&
-               isInvokeBasic(name0) &&
-               isInvokeBasic(name2) &&
-               name1.lastUseIndex(name0) == 3 &&          // t_{n+1}:L=MethodHandleImpl.guardWithCatch(*, *, *, t_{n});
-               lambdaForm.lastUseIndex(name0) == pos+1 && // t_{n} is local: used only in t_{n+1}
-               name2.lastUseIndex(name1) == 1 &&          // t_{n+2}:?=MethodHandle.invokeBasic(t_{n+1})
-               lambdaForm.lastUseIndex(name1) == pos+2;   // t_{n+1} is local: used only in t_{n+2}
-    }
-
-    /**
      * Emit bytecode for the selectAlternative idiom.
      *
      * The pattern looks like (Cf. MethodHandleImpl.makeGuardWithTest):
@@ -1155,6 +1104,329 @@
         return result;
     }
 
+    /**
+     * Emit bytecode for the tryFinally idiom.
+     * <p>
+     * The pattern looks like (Cf. MethodHandleImpl.makeTryFinally):
+     * <blockquote><pre>{@code
+     * // a0: BMH
+     * // a1: target, a2: cleanup
+     * // a3: box, a4: unbox
+     * // a5 (and following): arguments
+     * tryFinally=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L)=>{
+     *   t6:L=MethodHandle.invokeBasic(a3:L,a5:L);         // box the arguments into an Object[]
+     *   t7:L=MethodHandleImpl.tryFinally(a1:L,a2:L,t6:L); // call the tryFinally executor
+     *   t8:L=MethodHandle.invokeBasic(a4:L,t7:L);t8:L}    // unbox the result; return the result
+     * }</pre></blockquote>
+     * <p>
+     * It is compiled into bytecode equivalent to the following code:
+     * <blockquote><pre>{@code
+     * Throwable t;
+     * Object r;
+     * try {
+     *     r = a1.invokeBasic(a5);
+     * } catch (Throwable thrown) {
+     *     t = thrown;
+     *     throw t;
+     * } finally {
+     *     r = a2.invokeBasic(t, r, a5);
+     * }
+     * return r;
+     * }</pre></blockquote>
+     * <p>
+     * Specifically, the bytecode will have the following form (the stack effects are given for the beginnings of
+     * blocks, and for the situations after executing the given instruction - the code will have a slightly different
+     * shape if the return type is {@code void}):
+     * <blockquote><pre>{@code
+     * TRY:                 (--)
+     *                      load target                             (-- target)
+     *                      load args                               (-- args... target)
+     *                      INVOKEVIRTUAL MethodHandle.invokeBasic  (depends)
+     * FINALLY_NORMAL:      (-- r)
+     *                      load cleanup                            (-- cleanup r)
+     *                      SWAP                                    (-- r cleanup)
+     *                      ACONST_NULL                             (-- t r cleanup)
+     *                      SWAP                                    (-- r t cleanup)
+     *                      load args                               (-- args... r t cleanup)
+     *                      INVOKEVIRTUAL MethodHandle.invokeBasic  (-- r)
+     *                      GOTO DONE
+     * CATCH:               (-- t)
+     *                      DUP                                     (-- t t)
+     * FINALLY_EXCEPTIONAL: (-- t t)
+     *                      load cleanup                            (-- cleanup t t)
+     *                      SWAP                                    (-- t cleanup t)
+     *                      load default for r                      (-- r t cleanup t)
+     *                      load args                               (-- args... r t cleanup t)
+     *                      INVOKEVIRTUAL MethodHandle.invokeBasic  (-- r t)
+     *                      POP                                     (-- t)
+     *                      ATHROW
+     * DONE:                (-- r)
+     * }</pre></blockquote>
+     */
+    private Name emitTryFinally(int pos) {
+        Name args    = lambdaForm.names[pos];
+        Name invoker = lambdaForm.names[pos+1];
+        Name result  = lambdaForm.names[pos+2];
+
+        Label lFrom = new Label();
+        Label lTo = new Label();
+        Label lCatch = new Label();
+        Label lDone = new Label();
+
+        Class<?> returnType = result.function.resolvedHandle().type().returnType();
+        boolean isNonVoid = returnType != void.class;
+        MethodType type = args.function.resolvedHandle().type()
+                .dropParameterTypes(0,1)
+                .changeReturnType(returnType);
+        MethodType cleanupType = type.insertParameterTypes(0, Throwable.class);
+        if (isNonVoid) {
+            cleanupType = cleanupType.insertParameterTypes(1, returnType);
+        }
+        String cleanupDesc = cleanupType.basicType().toMethodDescriptorString();
+
+        // exception handler table
+        mv.visitTryCatchBlock(lFrom, lTo, lCatch, "java/lang/Throwable");
+
+        // TRY:
+        mv.visitLabel(lFrom);
+        emitPushArgument(invoker, 0); // load target
+        emitPushArguments(args, 1); // load args (skip 0: method handle)
+        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", type.basicType().toMethodDescriptorString(), false);
+        mv.visitLabel(lTo);
+
+        // FINALLY_NORMAL:
+        emitPushArgument(invoker, 1); // load cleanup
+        if (isNonVoid) {
+            mv.visitInsn(Opcodes.SWAP);
+        }
+        mv.visitInsn(Opcodes.ACONST_NULL);
+        if (isNonVoid) {
+            mv.visitInsn(Opcodes.SWAP);
+        }
+        emitPushArguments(args, 1); // load args (skip 0: method handle)
+        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", cleanupDesc, false);
+        mv.visitJumpInsn(Opcodes.GOTO, lDone);
+
+        // CATCH:
+        mv.visitLabel(lCatch);
+        mv.visitInsn(Opcodes.DUP);
+
+        // FINALLY_EXCEPTIONAL:
+        emitPushArgument(invoker, 1); // load cleanup
+        mv.visitInsn(Opcodes.SWAP);
+        if (isNonVoid) {
+            emitZero(BasicType.basicType(returnType)); // load default for result
+        }
+        emitPushArguments(args, 1); // load args (skip 0: method handle)
+        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", cleanupDesc, false);
+        if (isNonVoid) {
+            mv.visitInsn(Opcodes.POP);
+        }
+        mv.visitInsn(Opcodes.ATHROW);
+
+        // DONE:
+        mv.visitLabel(lDone);
+
+        return result;
+    }
+
+    /**
+     * Emit bytecode for the loop idiom.
+     * <p>
+     * The pattern looks like (Cf. MethodHandleImpl.loop):
+     * <blockquote><pre>{@code
+     * // a0: BMH
+     * // a1: inits, a2: steps, a3: preds, a4: finis
+     * // a5: box, a6: unbox
+     * // a7 (and following): arguments
+     * loop=Lambda(a0:L,a1:L,a2:L,a3:L,a4:L,a5:L,a6:L,a7:L)=>{
+     *   t8:L=MethodHandle.invokeBasic(a5:L,a7:L);                  // box the arguments into an Object[]
+     *   t9:L=MethodHandleImpl.loop(bt:L,a1:L,a2:L,a3:L,a4:L,t8:L); // call the loop executor (with supplied types in bt)
+     *   t10:L=MethodHandle.invokeBasic(a6:L,t9:L);t10:L}           // unbox the result; return the result
+     * }</pre></blockquote>
+     * <p>
+     * It is compiled into bytecode equivalent to the code seen in {@link MethodHandleImpl#loop(BasicType[],
+     * MethodHandle[], MethodHandle[], MethodHandle[], MethodHandle[], Object...)}, with the difference that no arrays
+     * will be used for local state storage. Instead, the local state will be mapped to actual stack slots.
+     * <p>
+     * Bytecode generation applies an unrolling scheme to enable better bytecode generation regarding local state type
+     * handling. The generated bytecode will have the following form ({@code void} types are ignored for convenience).
+     * Assume there are {@code C} clauses in the loop.
+     * <blockquote><pre>{@code
+     * INIT: (INIT_SEQ for clause 1)
+     *       ...
+     *       (INIT_SEQ for clause C)
+     * LOOP: (LOOP_SEQ for clause 1)
+     *       ...
+     *       (LOOP_SEQ for clause C)
+     *       GOTO LOOP
+     * DONE: ...
+     * }</pre></blockquote>
+     * <p>
+     * The {@code INIT_SEQ_x} sequence for clause {@code x} (with {@code x} ranging from {@code 0} to {@code C-1}) has
+     * the following shape. Assume slot {@code vx} is used to hold the state for clause {@code x}.
+     * <blockquote><pre>{@code
+     * INIT_SEQ_x:  ALOAD inits
+     *              CHECKCAST MethodHandle[]
+     *              ICONST x
+     *              AALOAD      // load the init handle for clause x
+     *              load args
+     *              INVOKEVIRTUAL MethodHandle.invokeBasic
+     *              store vx
+     * }</pre></blockquote>
+     * <p>
+     * The {@code LOOP_SEQ_x} sequence for clause {@code x} (with {@code x} ranging from {@code 0} to {@code C-1}) has
+     * the following shape. Again, assume slot {@code vx} is used to hold the state for clause {@code x}.
+     * <blockquote><pre>{@code
+     * LOOP_SEQ_x:  ALOAD steps
+     *              CHECKCAST MethodHandle[]
+     *              ICONST x
+     *              AALOAD              // load the step handle for clause x
+     *              load locals
+     *              load args
+     *              INVOKEVIRTUAL MethodHandle.invokeBasic
+     *              store vx
+     *              ALOAD preds
+     *              CHECKCAST MethodHandle[]
+     *              ICONST x
+     *              AALOAD              // load the pred handle for clause x
+     *              load locals
+     *              load args
+     *              INVOKEVIRTUAL MethodHandle.invokeBasic
+     *              IFNE LOOP_SEQ_x+1   // predicate returned false -> jump to next clause
+     *              ALOAD finis
+     *              CHECKCAST MethodHandle[]
+     *              ICONST x
+     *              AALOAD              // load the fini handle for clause x
+     *              load locals
+     *              load args
+     *              INVOKEVIRTUAL MethodHandle.invokeBasic
+     *              GOTO DONE           // jump beyond end of clauses to return from loop
+     * }</pre></blockquote>
+     */
+    private Name emitLoop(int pos) {
+        Name args    = lambdaForm.names[pos];
+        Name invoker = lambdaForm.names[pos+1];
+        Name result  = lambdaForm.names[pos+2];
+
+        // extract clause and loop-local state types
+        // find the type info in the loop invocation
+        BasicType[] loopClauseTypes = (BasicType[]) invoker.arguments[0];
+        Class<?>[] loopLocalStateTypes = Stream.of(loopClauseTypes).
+                filter(bt -> bt != BasicType.V_TYPE).map(BasicType::basicTypeClass).toArray(Class<?>[]::new);
+
+        final int firstLoopStateIndex = extendLocalsMap(loopLocalStateTypes);
+
+        Class<?> returnType = result.function.resolvedHandle().type().returnType();
+        MethodType loopType = args.function.resolvedHandle().type()
+                .dropParameterTypes(0,1)
+                .changeReturnType(returnType);
+        MethodType loopHandleType = loopType.insertParameterTypes(0, loopLocalStateTypes);
+        MethodType predType = loopHandleType.changeReturnType(boolean.class);
+        MethodType finiType = loopHandleType;
+
+        final int nClauses = loopClauseTypes.length;
+
+        // indices to invoker arguments to load method handle arrays
+        final int inits = 1;
+        final int steps = 2;
+        final int preds = 3;
+        final int finis = 4;
+
+        Label lLoop = new Label();
+        Label lDone = new Label();
+        Label lNext;
+
+        // INIT:
+        for (int c = 0, state = 0; c < nClauses; ++c) {
+            MethodType cInitType = loopType.changeReturnType(loopClauseTypes[c].basicTypeClass());
+            emitLoopHandleInvoke(invoker, inits, c, args, false, cInitType, loopLocalStateTypes, firstLoopStateIndex);
+            if (cInitType.returnType() != void.class) {
+                emitStoreInsn(BasicType.basicType(cInitType.returnType()), firstLoopStateIndex + state);
+                ++state;
+            }
+        }
+
+        // LOOP:
+        mv.visitLabel(lLoop);
+
+        for (int c = 0, state = 0; c < nClauses; ++c) {
+            lNext = new Label();
+
+            MethodType stepType = loopHandleType.changeReturnType(loopClauseTypes[c].basicTypeClass());
+            boolean isVoid = stepType.returnType() == void.class;
+
+            // invoke loop step
+            emitLoopHandleInvoke(invoker, steps, c, args, true, stepType, loopLocalStateTypes, firstLoopStateIndex);
+            if (!isVoid) {
+                emitStoreInsn(BasicType.basicType(stepType.returnType()), firstLoopStateIndex + state);
+                ++state;
+            }
+
+            // invoke loop predicate
+            emitLoopHandleInvoke(invoker, preds, c, args, true, predType, loopLocalStateTypes, firstLoopStateIndex);
+            mv.visitJumpInsn(Opcodes.IFNE, lNext);
+
+            // invoke fini
+            emitLoopHandleInvoke(invoker, finis, c, args, true, finiType, loopLocalStateTypes, firstLoopStateIndex);
+            mv.visitJumpInsn(Opcodes.GOTO, lDone);
+
+            // this is the beginning of the next loop clause
+            mv.visitLabel(lNext);
+        }
+
+        mv.visitJumpInsn(Opcodes.GOTO, lLoop);
+
+        // DONE:
+        mv.visitLabel(lDone);
+
+        return result;
+    }
+
+    private int extendLocalsMap(Class<?>[] types) {
+        int firstSlot = localsMap.length - 1;
+        localsMap = Arrays.copyOf(localsMap, localsMap.length + types.length);
+        localClasses = Arrays.copyOf(localClasses, localClasses.length + types.length);
+        System.arraycopy(types, 0, localClasses, firstSlot, types.length);
+        int index = localsMap[firstSlot - 1] + 1;
+        int lastSlots = 0;
+        for (int i = 0; i < types.length; ++i) {
+            localsMap[firstSlot + i] = index;
+            lastSlots = BasicType.basicType(localClasses[firstSlot + i]).basicTypeSlots();
+            index += lastSlots;
+        }
+        localsMap[localsMap.length - 1] = index - lastSlots;
+        return firstSlot;
+    }
+
+    private void emitLoopHandleInvoke(Name holder, int handles, int clause, Name args, boolean pushLocalState,
+                                      MethodType type, Class<?>[] loopLocalStateTypes, int firstLoopStateSlot) {
+        // load handle for clause
+        emitPushArgument(holder, handles);
+        emitIconstInsn(clause);
+        mv.visitInsn(Opcodes.AALOAD);
+        // load loop state (preceding the other arguments)
+        if (pushLocalState) {
+            for (int s = 0; s < loopLocalStateTypes.length; ++s) {
+                emitLoadInsn(BasicType.basicType(loopLocalStateTypes[s]), firstLoopStateSlot + s);
+            }
+        }
+        // load loop args (skip 0: method handle)
+        emitPushArguments(args, 1);
+        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, MH, "invokeBasic", type.toMethodDescriptorString(), false);
+    }
+
+    private void emitZero(BasicType type) {
+        switch (type) {
+            case I_TYPE: mv.visitInsn(Opcodes.ICONST_0); break;
+            case J_TYPE: mv.visitInsn(Opcodes.LCONST_0); break;
+            case F_TYPE: mv.visitInsn(Opcodes.FCONST_0); break;
+            case D_TYPE: mv.visitInsn(Opcodes.DCONST_0); break;
+            case L_TYPE: mv.visitInsn(Opcodes.ACONST_NULL); break;
+            default: throw new InternalError("unknown type: " + type);
+        }
+    }
+
     private void emitPushArguments(Name args) {
         emitPushArguments(args, 0);
     }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 
 package java.lang.invoke;
 
+import jdk.internal.perf.PerfCounter;
 import jdk.internal.vm.annotation.DontInline;
 import jdk.internal.vm.annotation.Stable;
 import sun.invoke.util.Wrapper;
@@ -33,16 +34,13 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.List;
 
 import static java.lang.invoke.LambdaForm.BasicType.*;
 import static java.lang.invoke.MethodHandleNatives.Constants.REF_invokeStatic;
-import static java.lang.invoke.MethodHandleStatics.debugEnabled;
-import static java.lang.invoke.MethodHandleStatics.newInternalError;
+import static java.lang.invoke.MethodHandleStatics.*;
 
 /**
  * The symbolic, non-executable form of a method handle's invocation semantics.
@@ -210,6 +208,29 @@
             }
             return btypes;
         }
+        static String basicTypeDesc(BasicType[] types) {
+            if (types == null) {
+                return null;
+            }
+            if (types.length == 0) {
+                return "";
+            }
+            StringBuilder sb = new StringBuilder();
+            for (BasicType bt : types) {
+                sb.append(bt.basicTypeChar());
+            }
+            return sb.toString();
+        }
+        static int[] basicTypeOrds(BasicType[] types) {
+            if (types == null) {
+                return null;
+            }
+            int[] a = new int[types.length];
+            for(int i = 0; i < types.length; ++i) {
+                a[i] = types[i].ordinal();
+            }
+            return a;
+        }
 
         static char basicTypeChar(Class<?> type) {
             return basicType(type).btChar;
@@ -375,7 +396,7 @@
     /** Customize LambdaForm for a particular MethodHandle */
     LambdaForm customize(MethodHandle mh) {
         LambdaForm customForm = new LambdaForm(debugName, arity, names, result, forceInline, mh);
-        if (COMPILE_THRESHOLD > 0 && isCompiled) {
+        if (COMPILE_THRESHOLD >= 0 && isCompiled) {
             // If shared LambdaForm has been compiled, compile customized version as well.
             customForm.compileToBytecode();
         }
@@ -390,7 +411,7 @@
         }
         assert(transformCache != null); // Customized LambdaForm should always has a link to uncustomized version.
         LambdaForm uncustomizedForm = (LambdaForm)transformCache;
-        if (COMPILE_THRESHOLD > 0 && isCompiled) {
+        if (COMPILE_THRESHOLD >= 0 && isCompiled) {
             // If customized LambdaForm has been compiled, compile uncustomized version as well.
             uncustomizedForm.compileToBytecode();
         }
@@ -565,6 +586,69 @@
         return MethodType.methodType(rtype, ptypes);
     }
 
+    /**
+     * Check if i-th name is a call to MethodHandleImpl.selectAlternative.
+     */
+    boolean isSelectAlternative(int pos) {
+        // selectAlternative idiom:
+        //   t_{n}:L=MethodHandleImpl.selectAlternative(...)
+        //   t_{n+1}:?=MethodHandle.invokeBasic(t_{n}, ...)
+        if (pos+1 >= names.length)  return false;
+        Name name0 = names[pos];
+        Name name1 = names[pos+1];
+        return name0.refersTo(MethodHandleImpl.class, "selectAlternative") &&
+                name1.isInvokeBasic() &&
+                name1.lastUseIndex(name0) == 0 && // t_{n+1}:?=MethodHandle.invokeBasic(t_{n}, ...)
+                lastUseIndex(name0) == pos+1;     // t_{n} is local: used only in t_{n+1}
+    }
+
+    private boolean isMatchingIdiom(int pos, String idiomName, int nArgs) {
+        if (pos+2 >= names.length)  return false;
+        Name name0 = names[pos];
+        Name name1 = names[pos+1];
+        Name name2 = names[pos+2];
+        return name1.refersTo(MethodHandleImpl.class, idiomName) &&
+                name0.isInvokeBasic() &&
+                name2.isInvokeBasic() &&
+                name1.lastUseIndex(name0) == nArgs && // t_{n+1}:L=MethodHandleImpl.<invoker>(<args>, t_{n});
+                lastUseIndex(name0) == pos+1 &&       // t_{n} is local: used only in t_{n+1}
+                name2.lastUseIndex(name1) == 1 &&     // t_{n+2}:?=MethodHandle.invokeBasic(*, t_{n+1})
+                lastUseIndex(name1) == pos+2;         // t_{n+1} is local: used only in t_{n+2}
+    }
+
+    /**
+     * Check if i-th name is a start of GuardWithCatch idiom.
+     */
+    boolean isGuardWithCatch(int pos) {
+        // GuardWithCatch idiom:
+        //   t_{n}:L=MethodHandle.invokeBasic(...)
+        //   t_{n+1}:L=MethodHandleImpl.guardWithCatch(*, *, *, t_{n});
+        //   t_{n+2}:?=MethodHandle.invokeBasic(*, t_{n+1})
+        return isMatchingIdiom(pos, "guardWithCatch", 3);
+    }
+
+    /**
+     * Check if i-th name is a start of the tryFinally idiom.
+     */
+    boolean isTryFinally(int pos) {
+        // tryFinally idiom:
+        //   t_{n}:L=MethodHandle.invokeBasic(...)
+        //   t_{n+1}:L=MethodHandleImpl.tryFinally(*, *, t_{n})
+        //   t_{n+2}:?=MethodHandle.invokeBasic(*, t_{n+1})
+        return isMatchingIdiom(pos, "tryFinally", 2);
+    }
+
+    /**
+     * Check if i-th name is a start of the loop idiom.
+     */
+    boolean isLoop(int pos) {
+        // loop idiom:
+        //   t_{n}:L=MethodHandle.invokeBasic(...)
+        //   t_{n+1}:L=MethodHandleImpl.loop(types, *, *, *, *, t_{n})
+        //   t_{n+2}:?=MethodHandle.invokeBasic(*, t_{n+1})
+        return isMatchingIdiom(pos, "loop", 5);
+    }
+
     /*
      * Code generation issues:
      *
@@ -633,7 +717,7 @@
      * as a sort of pre-invocation linkage step.)
      */
     public void prepare() {
-        if (COMPILE_THRESHOLD == 0 && !isCompiled) {
+        if (COMPILE_THRESHOLD == 0 && !forceInterpretation() && !isCompiled) {
             compileToBytecode();
         }
         if (this.vmentry != null) {
@@ -652,10 +736,22 @@
         // TO DO: Maybe add invokeGeneric, invokeWithArguments
     }
 
+    private static @Stable PerfCounter LF_FAILED;
+
+    private static PerfCounter failedCompilationCounter() {
+        if (LF_FAILED == null) {
+            LF_FAILED = PerfCounter.newPerfCounter("java.lang.invoke.failedLambdaFormCompilations");
+        }
+        return LF_FAILED;
+    }
+
     /** Generate optimizable bytecode for this form. */
-    MemberName compileToBytecode() {
+    void compileToBytecode() {
+        if (forceInterpretation()) {
+            return; // this should not be compiled
+        }
         if (vmentry != null && isCompiled) {
-            return vmentry;  // already compiled somehow
+            return;  // already compiled somehow
         }
         MethodType invokerType = methodType();
         assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
@@ -664,9 +760,16 @@
             if (TRACE_INTERPRETER)
                 traceInterpreter("compileToBytecode", this);
             isCompiled = true;
-            return vmentry;
-        } catch (Error | Exception ex) {
-            throw newInternalError(this.toString(), ex);
+        } catch (InvokerBytecodeGenerator.BytecodeGenerationException bge) {
+            // bytecode generation failed - mark this LambdaForm as to be run in interpretation mode only
+            invocationCounter = -1;
+            failedCompilationCounter().increment();
+            if (LOG_LF_COMPILATION_FAILURE) {
+                System.out.println("LambdaForm compilation failed: " + this);
+                bge.printStackTrace(System.out);
+            }
+        } catch (Error | Exception e) {
+            throw newInternalError(this.toString(), e);
         }
     }
 
@@ -772,7 +875,11 @@
     static {
         COMPILE_THRESHOLD = Math.max(-1, MethodHandleStatics.COMPILE_THRESHOLD);
     }
-    private int invocationCounter = 0;
+    private int invocationCounter = 0; // a value of -1 indicates LambdaForm interpretation mode forever
+
+    private boolean forceInterpretation() {
+        return invocationCounter == -1;
+    }
 
     @Hidden
     @DontInline
@@ -812,7 +919,7 @@
 
     private void checkInvocationCounter() {
         if (COMPILE_THRESHOLD != 0 &&
-            invocationCounter < COMPILE_THRESHOLD) {
+            !forceInterpretation() && invocationCounter < COMPILE_THRESHOLD) {
             invocationCounter++;  // benign race
             if (invocationCounter >= COMPILE_THRESHOLD) {
                 // Replace vmentry with a bytecode version of this LF.
@@ -822,7 +929,7 @@
     }
     Object interpretWithArgumentsTracing(Object... argumentValues) throws Throwable {
         traceInterpreter("[ interpretWithArguments", this, argumentValues);
-        if (invocationCounter < COMPILE_THRESHOLD) {
+        if (!forceInterpretation() && invocationCounter < COMPILE_THRESHOLD) {
             int ctr = invocationCounter++;  // benign race
             traceInterpreter("| invocationCounter", ctr);
             if (invocationCounter >= COMPILE_THRESHOLD) {
@@ -1421,6 +1528,39 @@
             return !isParam() && arguments.length == 0 && function.isConstantZero();
         }
 
+        boolean refersTo(Class<?> declaringClass, String methodName) {
+            return function != null &&
+                    function.member() != null && function.member().refersTo(declaringClass, methodName);
+        }
+
+        /**
+         * Check if MemberName is a call to MethodHandle.invokeBasic.
+         */
+        boolean isInvokeBasic() {
+            if (function == null)
+                return false;
+            if (arguments.length < 1)
+                return false;  // must have MH argument
+            MemberName member = function.member();
+            return member != null && member.refersTo(MethodHandle.class, "invokeBasic") &&
+                    !member.isPublic() && !member.isStatic();
+        }
+
+        /**
+         * Check if MemberName is a call to MethodHandle.linkToStatic, etc.
+         */
+        boolean isLinkerMethodInvoke() {
+            if (function == null)
+                return false;
+            if (arguments.length < 1)
+                return false;  // must have MH argument
+            MemberName member = function.member();
+            return member != null &&
+                    member.getDeclaringClass() == MethodHandle.class &&
+                    !member.isPublic() && member.isStatic() &&
+                    member.getName().startsWith("linkTo");
+        }
+
         public String toString() {
             return (isParam()?"a":"t")+(index >= 0 ? index : System.identityHashCode(this))+":"+typeChar();
         }
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -249,7 +249,7 @@
         assert(inTrans());
     }
 
-    private void changeName(int i, Name name) {
+    void changeName(int i, Name name) {
         assert(inTrans());
         assert(i < length);
         Name oldName = names[i];
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
 
 package java.lang.invoke;
 
+import sun.invoke.util.Wrapper;
+
 import java.lang.ref.SoftReference;
 import java.util.Arrays;
+import java.util.Collections;
+import java.util.concurrent.ConcurrentHashMap;
+
 import static java.lang.invoke.LambdaForm.*;
 import static java.lang.invoke.LambdaForm.BasicType.*;
 import static java.lang.invoke.MethodHandleImpl.Intrinsic;
-import java.util.Collections;
-import java.util.concurrent.ConcurrentHashMap;
-
-import sun.invoke.util.Wrapper;
+import static java.lang.invoke.MethodHandleImpl.NF_loop;
 
 /** Transforms on LFs.
  *  A lambda-form editor can derive new LFs from its base LF.
@@ -73,7 +75,8 @@
             FILTER_ARG, FILTER_RETURN, FILTER_RETURN_TO_ZERO,
             COLLECT_ARGS, COLLECT_ARGS_TO_VOID, COLLECT_ARGS_TO_ARRAY,
             FOLD_ARGS, FOLD_ARGS_TO_VOID,
-            PERMUTE_ARGS
+            PERMUTE_ARGS,
+            LOCAL_TYPES
             //maybe add more for guard with test, catch exception, pointwise type conversions
         }
 
@@ -847,6 +850,32 @@
         return putInCache(key, form);
     }
 
+    LambdaForm noteLoopLocalTypesForm(int pos, BasicType[] localTypes) {
+        assert(lambdaForm.isLoop(pos));
+        int[] desc = BasicType.basicTypeOrds(localTypes);
+        desc = Arrays.copyOf(desc, desc.length + 1);
+        desc[desc.length - 1] = pos;
+        Transform key = Transform.of(Transform.Kind.LOCAL_TYPES, desc);
+        LambdaForm form = getInCache(key);
+        if (form != null) {
+            return form;
+        }
+
+        // replace the null entry in the MHImpl.loop invocation with localTypes
+        Name invokeLoop = lambdaForm.names[pos + 1];
+        assert(invokeLoop.function == NF_loop);
+        Object[] args = Arrays.copyOf(invokeLoop.arguments, invokeLoop.arguments.length);
+        assert(args[0] == null);
+        args[0] = localTypes;
+
+        LambdaFormBuffer buf = buffer();
+        buf.startEdit();
+        buf.changeName(pos + 1, new Name(NF_loop, args));
+        form = buf.endEdit();
+
+        return putInCache(key, form);
+    }
+
     static boolean permutedTypesMatch(int[] reorder, BasicType[] types, Name[] names, int skip) {
         for (int i = 0; i < reorder.length; i++) {
             assert (names[skip + i].isParam());
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MemberName.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
+import java.lang.reflect.Member;
 import java.lang.reflect.Method;
-import java.lang.reflect.Member;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Module;
 import java.util.ArrayList;
@@ -41,9 +41,11 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Objects;
+
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
-import static java.lang.invoke.MethodHandleStatics.*;
-import java.util.Objects;
+import static java.lang.invoke.MethodHandleStatics.newIllegalArgumentException;
+import static java.lang.invoke.MethodHandleStatics.newInternalError;
 
 /**
  * A {@code MemberName} is a compact symbolic datum which fully characterizes
@@ -500,6 +502,13 @@
                                                lookupClass, mode);
     }
 
+    /**
+     * Check if MemberName is a call to a method named {@code name} in class {@code declaredClass}.
+     */
+    public boolean refersTo(Class<?> declc, String n) {
+        return clazz == declc && getName().equals(n);
+    }
+
     /** Initialize a query.   It is not resolved. */
     private void init(Class<?> defClass, String name, Object type, int flags) {
         // defining class is allowed to be null (for a naked name/type pair)
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,6 +25,17 @@
 
 package java.lang.invoke;
 
+import jdk.internal.org.objectweb.asm.AnnotationVisitor;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.reflect.CallerSensitive;
+import jdk.internal.reflect.Reflection;
+import jdk.internal.vm.annotation.Stable;
+import sun.invoke.empty.Empty;
+import sun.invoke.util.ValueConversions;
+import sun.invoke.util.VerifyType;
+import sun.invoke.util.Wrapper;
+
 import java.lang.reflect.Array;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -33,18 +44,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.function.Function;
-
-import jdk.internal.reflect.CallerSensitive;
-import jdk.internal.reflect.Reflection;
-import jdk.internal.vm.annotation.Stable;
-import sun.invoke.empty.Empty;
-import sun.invoke.util.ValueConversions;
-import sun.invoke.util.VerifyType;
-import sun.invoke.util.Wrapper;
-
-import jdk.internal.org.objectweb.asm.AnnotationVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.MethodVisitor;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 import static java.lang.invoke.LambdaForm.*;
 import static java.lang.invoke.MethodHandleStatics.*;
@@ -1046,26 +1047,13 @@
         // Box arguments and wrap them into Object[]: ValueConversions.array().
         MethodType varargsType = type.changeReturnType(Object[].class);
         MethodHandle collectArgs = varargsArray(type.parameterCount()).asType(varargsType);
-        // Result unboxing: ValueConversions.unbox() OR ValueConversions.identity() OR ValueConversions.ignore().
-        MethodHandle unboxResult;
-        Class<?> rtype = type.returnType();
-        if (rtype.isPrimitive()) {
-            if (rtype == void.class) {
-                unboxResult = ValueConversions.ignore();
-            } else {
-                Wrapper w = Wrapper.forPrimitiveType(type.returnType());
-                unboxResult = ValueConversions.unboxExact(w);
-            }
-        } else {
-            unboxResult = MethodHandles.identity(Object.class);
-        }
+        MethodHandle unboxResult = unboxResultHandle(type.returnType());
 
         BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLLL();
         BoundMethodHandle mh;
         try {
-            mh = (BoundMethodHandle)
-                    data.constructor().invokeBasic(type, form, (Object) target, (Object) exType, (Object) catcher,
-                                                   (Object) collectArgs, (Object) unboxResult);
+            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) exType,
+                    (Object) catcher, (Object) collectArgs, (Object) unboxResult);
         } catch (Throwable ex) {
             throw uncaughtException(ex);
         }
@@ -1085,16 +1073,18 @@
             return target.asFixedArity().invokeWithArguments(av);
         } catch (Throwable t) {
             if (!exType.isInstance(t)) throw t;
-            return catcher.asFixedArity().invokeWithArguments(prepend(t, av));
+            return catcher.asFixedArity().invokeWithArguments(prepend(av, t));
         }
     }
 
-    /** Prepend an element {@code elem} to an {@code array}. */
+    /** Prepend elements to an array. */
     @LambdaForm.Hidden
-    private static Object[] prepend(Object elem, Object[] array) {
-        Object[] newArray = new Object[array.length+1];
-        newArray[0] = elem;
-        System.arraycopy(array, 0, newArray, 1, array.length);
+    private static Object[] prepend(Object[] array, Object... elems) {
+        int nArray = array.length;
+        int nElems = elems.length;
+        Object[] newArray = new Object[nArray + nElems];
+        System.arraycopy(elems, 0, newArray, 0, nElems);
+        System.arraycopy(array, 0, newArray, nElems, nArray);
         return newArray;
     }
 
@@ -1352,6 +1342,8 @@
     enum Intrinsic {
         SELECT_ALTERNATIVE,
         GUARD_WITH_CATCH,
+        TRY_FINALLY,
+        LOOP,
         NEW_ARRAY,
         ARRAY_LOAD,
         ARRAY_STORE,
@@ -1363,7 +1355,7 @@
 
     /** Mark arbitrary method handle as intrinsic.
      * InvokerBytecodeGenerator uses this info to produce more efficient bytecode shape. */
-    private static final class IntrinsicMethodHandle extends DelegatingMethodHandle {
+    static final class IntrinsicMethodHandle extends DelegatingMethodHandle {
         private final MethodHandle target;
         private final Intrinsic intrinsicName;
 
@@ -1694,6 +1686,8 @@
         NF_checkSpreadArgument,
         NF_guardWithCatch,
         NF_throwException,
+        NF_tryFinally,
+        NF_loop,
         NF_profileBoolean;
 
     static {
@@ -1703,6 +1697,11 @@
             NF_guardWithCatch = new NamedFunction(MethodHandleImpl.class
                     .getDeclaredMethod("guardWithCatch", MethodHandle.class, Class.class,
                             MethodHandle.class, Object[].class));
+            NF_tryFinally = new NamedFunction(MethodHandleImpl.class
+                    .getDeclaredMethod("tryFinally", MethodHandle.class, MethodHandle.class, Object[].class));
+            NF_loop = new NamedFunction(MethodHandleImpl.class
+                    .getDeclaredMethod("loop", BasicType[].class, MethodHandle[].class, MethodHandle[].class,
+                            MethodHandle[].class, MethodHandle[].class, Object[].class));
             NF_throwException = new NamedFunction(MethodHandleImpl.class
                     .getDeclaredMethod("throwException", Throwable.class));
             NF_profileBoolean = new NamedFunction(MethodHandleImpl.class
@@ -1712,14 +1711,25 @@
         }
     }
 
+    /** Result unboxing: ValueConversions.unbox() OR ValueConversions.identity() OR ValueConversions.ignore(). */
+    private static MethodHandle unboxResultHandle(Class<?> returnType) {
+        if (returnType.isPrimitive()) {
+            if (returnType == void.class) {
+                return ValueConversions.ignore();
+            } else {
+                Wrapper w = Wrapper.forPrimitiveType(returnType);
+                return ValueConversions.unboxExact(w);
+            }
+        } else {
+            return MethodHandles.identity(Object.class);
+        }
+    }
+
     /**
-     * Assembles a loop method handle from the given handles and type information. This works by binding and configuring
-     * the {@linkplain #looper(MethodHandle[], MethodHandle[], MethodHandle[], MethodHandle[], int, int, Object[]) "most
-     * generic loop"}.
+     * Assembles a loop method handle from the given handles and type information.
      *
      * @param tloop the return type of the loop.
      * @param targs types of the arguments to be passed to the loop.
-     * @param tvars types of loop-local variables.
      * @param init sanitized array of initializers for loop-local variables.
      * @param step sanitited array of loop bodies.
      * @param pred sanitized array of predicates.
@@ -1727,64 +1737,144 @@
      *
      * @return a handle that, when invoked, will execute the loop.
      */
-    static MethodHandle makeLoop(Class<?> tloop, List<Class<?>> targs, List<Class<?>> tvars, List<MethodHandle> init,
-                                 List<MethodHandle> step, List<MethodHandle> pred, List<MethodHandle> fini) {
-        MethodHandle[] ainit = toArrayArgs(init);
-        MethodHandle[] astep = toArrayArgs(step);
-        MethodHandle[] apred = toArrayArgs(pred);
-        MethodHandle[] afini = toArrayArgs(fini);
+    static MethodHandle makeLoop(Class<?> tloop, List<Class<?>> targs, List<MethodHandle> init, List<MethodHandle> step,
+                                 List<MethodHandle> pred, List<MethodHandle> fini) {
+        MethodType type = MethodType.methodType(tloop, targs);
+        BasicType[] initClauseTypes =
+                init.stream().map(h -> h.type().returnType()).map(BasicType::basicType).toArray(BasicType[]::new);
+        LambdaForm form = makeLoopForm(type.basicType(), initClauseTypes);
 
-        MethodHandle l = getConstantHandle(MH_looper);
+        // Prepare auxiliary method handles used during LambdaForm interpretation.
+        // Box arguments and wrap them into Object[]: ValueConversions.array().
+        MethodType varargsType = type.changeReturnType(Object[].class);
+        MethodHandle collectArgs = varargsArray(type.parameterCount()).asType(varargsType);
+        MethodHandle unboxResult = unboxResultHandle(tloop);
 
-        // Bind the statically known arguments.
-        l = MethodHandles.insertArguments(l, 0, ainit, astep, apred, afini, tvars.size(), targs.size());
-
-        // Turn the args array into an argument list.
-        l = l.asCollector(Object[].class, targs.size());
+        BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLLLL();
+        BoundMethodHandle mh;
+        try {
+            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) toArray(init),
+                    (Object) toArray(step), (Object) toArray(pred), (Object) toArray(fini), (Object) collectArgs,
+                    (Object) unboxResult);
+        } catch (Throwable ex) {
+            throw uncaughtException(ex);
+        }
+        assert(mh.type() == type);
+        return mh;
+    }
 
-        // Finally, make loop type.
-        MethodType loopType = MethodType.methodType(tloop, targs);
-        l = l.asType(loopType);
-
-        return l;
+    private static MethodHandle[] toArray(List<MethodHandle> l) {
+        return l.toArray(new MethodHandle[0]);
     }
 
     /**
-     * Converts all handles in the {@code hs} array to handles that accept an array of arguments.
-     *
-     * @param hs method handles to be converted.
-     *
-     * @return the {@code hs} array, with all method handles therein converted.
+     * Loops introduce some complexity as they can have additional local state. Hence, LambdaForms for loops are
+     * generated from a template. The LambdaForm template shape for the loop combinator is as follows (assuming one
+     * reference parameter passed in {@code a1}, and a reference return type, with the return value represented by
+     * {@code t12}):
+     * <blockquote><pre>{@code
+     *  loop=Lambda(a0:L,a1:L)=>{
+     *    t2:L=BoundMethodHandle$Species_L6.argL0(a0:L);             // array of init method handles
+     *    t3:L=BoundMethodHandle$Species_L6.argL1(a0:L);             // array of step method handles
+     *    t4:L=BoundMethodHandle$Species_L6.argL2(a0:L);             // array of pred method handles
+     *    t5:L=BoundMethodHandle$Species_L6.argL3(a0:L);             // array of fini method handles
+     *    t6:L=BoundMethodHandle$Species_L6.argL4(a0:L);             // helper handle to box the arguments into an Object[]
+     *    t7:L=BoundMethodHandle$Species_L6.argL5(a0:L);             // helper handle to unbox the result
+     *    t8:L=MethodHandle.invokeBasic(t6:L,a1:L);                  // box the arguments into an Object[]
+     *    t9:L=MethodHandleImpl.loop(null,t2:L,t3:L,t4:L,t5:L,t6:L); // call the loop executor
+     *    t10:L=MethodHandle.invokeBasic(t7:L,t9:L);t10:L}           // unbox the result; return the result
+     * }</pre></blockquote>
+     * <p>
+     * {@code argL0} through {@code argL3} are the arrays of init, step, pred, and fini method handles.
+     * {@code argL4} and {@code argL5} are auxiliary method handles: {@code argL2} boxes arguments and wraps them into
+     * {@code Object[]} ({@code ValueConversions.array()}), and {@code argL3} unboxes the result if necessary
+     * ({@code ValueConversions.unbox()}).
+     * <p>
+     * Having {@code t6} and {@code t7} passed in via a BMH and not hardcoded in the lambda form allows to share lambda
+     * forms among loop combinators with the same basic type.
+     * <p>
+     * The above template is instantiated by using the {@link LambdaFormEditor} to replace the {@code null} argument to
+     * the {@code loop} invocation with the {@code BasicType} array describing the loop clause types. This argument is
+     * ignored in the loop invoker, but will be extracted and used in {@linkplain InvokerBytecodeGenerator#emitLoop(int)
+     * bytecode generation}.
      */
-    static MethodHandle[] toArrayArgs(List<MethodHandle> hs) {
-        return hs.stream().map(h -> h.asSpreader(Object[].class, h.type().parameterCount())).toArray(MethodHandle[]::new);
+    private static LambdaForm makeLoopForm(MethodType basicType, BasicType[] localVarTypes) {
+        MethodType lambdaType = basicType.invokerType();
+
+        final int THIS_MH = 0;  // the BMH_LLLLLL
+        final int ARG_BASE = 1; // start of incoming arguments
+        final int ARG_LIMIT = ARG_BASE + basicType.parameterCount();
+
+        int nameCursor = ARG_LIMIT;
+        final int GET_INITS = nameCursor++;
+        final int GET_STEPS = nameCursor++;
+        final int GET_PREDS = nameCursor++;
+        final int GET_FINIS = nameCursor++;
+        final int GET_COLLECT_ARGS = nameCursor++;
+        final int GET_UNBOX_RESULT = nameCursor++;
+        final int BOXED_ARGS = nameCursor++;
+        final int LOOP = nameCursor++;
+        final int UNBOX_RESULT = nameCursor++;
+
+        LambdaForm lform = basicType.form().cachedLambdaForm(MethodTypeForm.LF_LOOP);
+        if (lform == null) {
+            Name[] names = arguments(nameCursor - ARG_LIMIT, lambdaType);
+
+            BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLLLL();
+            names[THIS_MH] = names[THIS_MH].withConstraint(data);
+            names[GET_INITS] = new Name(data.getterFunction(0), names[THIS_MH]);
+            names[GET_STEPS] = new Name(data.getterFunction(1), names[THIS_MH]);
+            names[GET_PREDS] = new Name(data.getterFunction(2), names[THIS_MH]);
+            names[GET_FINIS] = new Name(data.getterFunction(3), names[THIS_MH]);
+            names[GET_COLLECT_ARGS] = new Name(data.getterFunction(4), names[THIS_MH]);
+            names[GET_UNBOX_RESULT] = new Name(data.getterFunction(5), names[THIS_MH]);
+
+            // t_{i}:L=MethodHandle.invokeBasic(collectArgs:L,a1:L,...);
+            MethodType collectArgsType = basicType.changeReturnType(Object.class);
+            MethodHandle invokeBasic = MethodHandles.basicInvoker(collectArgsType);
+            Object[] args = new Object[invokeBasic.type().parameterCount()];
+            args[0] = names[GET_COLLECT_ARGS];
+            System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT - ARG_BASE);
+            names[BOXED_ARGS] = new Name(makeIntrinsic(invokeBasic, Intrinsic.LOOP), args);
+
+            // t_{i+1}:L=MethodHandleImpl.loop(localTypes:L,inits:L,steps:L,preds:L,finis:L,t_{i}:L);
+            Object[] lArgs =
+                    new Object[]{null, // placeholder for BasicType[] localTypes - will be added by LambdaFormEditor
+                            names[GET_INITS], names[GET_STEPS], names[GET_PREDS], names[GET_FINIS], names[BOXED_ARGS]};
+            names[LOOP] = new Name(NF_loop, lArgs);
+
+            // t_{i+2}:I=MethodHandle.invokeBasic(unbox:L,t_{i+1}:L);
+            MethodHandle invokeBasicUnbox = MethodHandles.basicInvoker(MethodType.methodType(basicType.rtype(), Object.class));
+            Object[] unboxArgs = new Object[]{names[GET_UNBOX_RESULT], names[LOOP]};
+            names[UNBOX_RESULT] = new Name(invokeBasicUnbox, unboxArgs);
+
+            lform = basicType.form().setCachedLambdaForm(MethodTypeForm.LF_LOOP,
+                    new LambdaForm("loop", lambdaType.parameterCount(), names));
+        }
+
+        // BOXED_ARGS is the index into the names array where the loop idiom starts
+        return lform.editor().noteLoopLocalTypesForm(BOXED_ARGS, localVarTypes);
     }
 
+
     /**
-     * This method embodies the most generic loop for use by {@link MethodHandles#loop(MethodHandle[][])}. A handle on
-     * it will be transformed into a handle on a concrete loop instantiation by {@link #makeLoop}.
-     *
-     * @param init loop-local variable initializers.
-     * @param step bodies.
-     * @param pred predicates.
-     * @param fini finalizers.
-     * @param varSize number of loop-local variables.
-     * @param nArgs number of arguments passed to the loop.
-     * @param args arguments to the loop invocation.
-     *
-     * @return the result of executing the loop.
+     * Intrinsified during LambdaForm compilation
+     * (see {@link InvokerBytecodeGenerator#emitLoop(int)}).
      */
-    static Object looper(MethodHandle[] init, MethodHandle[] step, MethodHandle[] pred, MethodHandle[] fini,
-                         int varSize, int nArgs, Object[] args) throws Throwable {
+    @LambdaForm.Hidden
+    static Object loop(BasicType[] localTypes, MethodHandle[] init, MethodHandle[] step, MethodHandle[] pred,
+                       MethodHandle[] fini, Object... av) throws Throwable {
+        int varSize = (int) Stream.of(init).filter(h -> h.type().returnType() != void.class).count();
+        int nArgs = init[0].type().parameterCount();
         Object[] varsAndArgs = new Object[varSize + nArgs];
         for (int i = 0, v = 0; i < init.length; ++i) {
             if (init[i].type().returnType() == void.class) {
-                init[i].invoke(args);
+                init[i].asFixedArity().invokeWithArguments(av);
             } else {
-                varsAndArgs[v++] = init[i].invoke(args);
+                varsAndArgs[v++] = init[i].asFixedArity().invokeWithArguments(av);
             }
         }
-        System.arraycopy(args, 0, varsAndArgs, varSize, nArgs);
+        System.arraycopy(av, 0, varsAndArgs, varSize, nArgs);
         final int nSteps = step.length;
         for (; ; ) {
             for (int i = 0, v = 0; i < nSteps; ++i) {
@@ -1792,12 +1882,12 @@
                 MethodHandle s = step[i];
                 MethodHandle f = fini[i];
                 if (s.type().returnType() == void.class) {
-                    s.invoke(varsAndArgs);
+                    s.asFixedArity().invokeWithArguments(varsAndArgs);
                 } else {
-                    varsAndArgs[v++] = s.invoke(varsAndArgs);
+                    varsAndArgs[v++] = s.asFixedArity().invokeWithArguments(varsAndArgs);
                 }
-                if (!(boolean) p.invoke(varsAndArgs)) {
-                    return f.invoke(varsAndArgs);
+                if (!(boolean) p.asFixedArity().invokeWithArguments(varsAndArgs)) {
+                    return f.asFixedArity().invokeWithArguments(varsAndArgs);
                 }
             }
         }
@@ -1879,77 +1969,127 @@
      *
      * @param target the target to execute in a {@code try-finally} block.
      * @param cleanup the cleanup to execute in the {@code finally} block.
-     * @param type the result type of the entire construct.
+     * @param rtype the result type of the entire construct.
      * @param argTypes the types of the arguments.
      *
      * @return a handle on the constructed {@code try-finally} block.
      */
-    static MethodHandle makeTryFinally(MethodHandle target, MethodHandle cleanup, Class<?> type, List<Class<?>> argTypes) {
-        MethodHandle tf = getConstantHandle(type == void.class ? MH_tryFinallyVoidExec : MH_tryFinallyExec);
+    static MethodHandle makeTryFinally(MethodHandle target, MethodHandle cleanup, Class<?> rtype, List<Class<?>> argTypes) {
+        MethodType type = MethodType.methodType(rtype, argTypes);
+        LambdaForm form = makeTryFinallyForm(type.basicType());
 
-        // Bind the statically known arguments.
-        tf = MethodHandles.insertArguments(tf, 0, target, cleanup);
+        // Prepare auxiliary method handles used during LambdaForm interpretation.
+        // Box arguments and wrap them into Object[]: ValueConversions.array().
+        MethodType varargsType = type.changeReturnType(Object[].class);
+        MethodHandle collectArgs = varargsArray(type.parameterCount()).asType(varargsType);
+        MethodHandle unboxResult = unboxResultHandle(rtype);
 
-        // Turn the args array into an argument list.
-        tf = tf.asCollector(Object[].class, argTypes.size());
-
-        // Finally, make try-finally type.
-        MethodType tfType = MethodType.methodType(type, argTypes);
-        tf = tf.asType(tfType);
-
-        return tf;
+        BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLL();
+        BoundMethodHandle mh;
+        try {
+            mh = (BoundMethodHandle) data.constructor().invokeBasic(type, form, (Object) target, (Object) cleanup,
+                    (Object) collectArgs, (Object) unboxResult);
+        } catch (Throwable ex) {
+            throw uncaughtException(ex);
+        }
+        assert(mh.type() == type);
+        return mh;
     }
 
     /**
-     * A method that will be bound during construction of a {@code try-finally} handle with non-{@code void} return type
-     * by {@link MethodHandles#tryFinally(MethodHandle, MethodHandle)}.
-     *
-     * @param target the handle to wrap in a {@code try-finally} block. This will be bound.
-     * @param cleanup the handle to run in any case before returning. This will be bound.
-     * @param args the arguments to the call. These will remain as the argument list.
-     *
-     * @return whatever the execution of the {@code target} returned (it may have been modified by the execution of
-     *         {@code cleanup}).
-     * @throws Throwable in case anything is thrown by the execution of {@code target}, the {@link Throwable} will be
-     *         passed to the {@code cleanup} handle, which may decide to throw any exception it sees fit.
+     * The LambdaForm shape for the tryFinally combinator is as follows (assuming one reference parameter passed in
+     * {@code a1}, and a reference return type, with the return value represented by {@code t8}):
+     * <blockquote><pre>{@code
+     *  tryFinally=Lambda(a0:L,a1:L)=>{
+     *    t2:L=BoundMethodHandle$Species_LLLL.argL0(a0:L);  // target method handle
+     *    t3:L=BoundMethodHandle$Species_LLLL.argL1(a0:L);  // cleanup method handle
+     *    t4:L=BoundMethodHandle$Species_LLLL.argL2(a0:L);  // helper handle to box the arguments into an Object[]
+     *    t5:L=BoundMethodHandle$Species_LLLL.argL3(a0:L);  // helper handle to unbox the result
+     *    t6:L=MethodHandle.invokeBasic(t4:L,a1:L);         // box the arguments into an Object[]
+     *    t7:L=MethodHandleImpl.tryFinally(t2:L,t3:L,t6:L); // call the tryFinally executor
+     *    t8:L=MethodHandle.invokeBasic(t5:L,t7:L);t8:L}    // unbox the result; return the result
+     * }</pre></blockquote>
+     * <p>
+     * {@code argL0} and {@code argL1} are the target and cleanup method handles.
+     * {@code argL2} and {@code argL3} are auxiliary method handles: {@code argL2} boxes arguments and wraps them into
+     * {@code Object[]} ({@code ValueConversions.array()}), and {@code argL3} unboxes the result if necessary
+     * ({@code ValueConversions.unbox()}).
+     * <p>
+     * Having {@code t4} and {@code t5} passed in via a BMH and not hardcoded in the lambda form allows to share lambda
+     * forms among tryFinally combinators with the same basic type.
      */
-    static Object tryFinallyExecutor(MethodHandle target, MethodHandle cleanup, Object[] args) throws Throwable {
+    private static LambdaForm makeTryFinallyForm(MethodType basicType) {
+        MethodType lambdaType = basicType.invokerType();
+
+        LambdaForm lform = basicType.form().cachedLambdaForm(MethodTypeForm.LF_TF);
+        if (lform != null) {
+            return lform;
+        }
+        final int THIS_MH      = 0;  // the BMH_LLLL
+        final int ARG_BASE     = 1;  // start of incoming arguments
+        final int ARG_LIMIT    = ARG_BASE + basicType.parameterCount();
+
+        int nameCursor = ARG_LIMIT;
+        final int GET_TARGET       = nameCursor++;
+        final int GET_CLEANUP      = nameCursor++;
+        final int GET_COLLECT_ARGS = nameCursor++;
+        final int GET_UNBOX_RESULT = nameCursor++;
+        final int BOXED_ARGS       = nameCursor++;
+        final int TRY_FINALLY      = nameCursor++;
+        final int UNBOX_RESULT     = nameCursor++;
+
+        Name[] names = arguments(nameCursor - ARG_LIMIT, lambdaType);
+
+        BoundMethodHandle.SpeciesData data = BoundMethodHandle.speciesData_LLLL();
+        names[THIS_MH]          = names[THIS_MH].withConstraint(data);
+        names[GET_TARGET]       = new Name(data.getterFunction(0), names[THIS_MH]);
+        names[GET_CLEANUP]      = new Name(data.getterFunction(1), names[THIS_MH]);
+        names[GET_COLLECT_ARGS] = new Name(data.getterFunction(2), names[THIS_MH]);
+        names[GET_UNBOX_RESULT] = new Name(data.getterFunction(3), names[THIS_MH]);
+
+        // t_{i}:L=MethodHandle.invokeBasic(collectArgs:L,a1:L,...);
+        MethodType collectArgsType = basicType.changeReturnType(Object.class);
+        MethodHandle invokeBasic = MethodHandles.basicInvoker(collectArgsType);
+        Object[] args = new Object[invokeBasic.type().parameterCount()];
+        args[0] = names[GET_COLLECT_ARGS];
+        System.arraycopy(names, ARG_BASE, args, 1, ARG_LIMIT-ARG_BASE);
+        names[BOXED_ARGS] = new Name(makeIntrinsic(invokeBasic, Intrinsic.TRY_FINALLY), args);
+
+        // t_{i+1}:L=MethodHandleImpl.tryFinally(target:L,exType:L,catcher:L,t_{i}:L);
+        Object[] tfArgs = new Object[] {names[GET_TARGET], names[GET_CLEANUP], names[BOXED_ARGS]};
+        names[TRY_FINALLY] = new Name(NF_tryFinally, tfArgs);
+
+        // t_{i+2}:I=MethodHandle.invokeBasic(unbox:L,t_{i+1}:L);
+        MethodHandle invokeBasicUnbox = MethodHandles.basicInvoker(MethodType.methodType(basicType.rtype(), Object.class));
+        Object[] unboxArgs  = new Object[] {names[GET_UNBOX_RESULT], names[TRY_FINALLY]};
+        names[UNBOX_RESULT] = new Name(invokeBasicUnbox, unboxArgs);
+
+        lform = new LambdaForm("tryFinally", lambdaType.parameterCount(), names);
+
+        return basicType.form().setCachedLambdaForm(MethodTypeForm.LF_TF, lform);
+    }
+
+    /**
+     * Intrinsified during LambdaForm compilation
+     * (see {@link InvokerBytecodeGenerator#emitTryFinally emitTryFinally}).
+     */
+    @LambdaForm.Hidden
+    static Object tryFinally(MethodHandle target, MethodHandle cleanup, Object... av) throws Throwable {
         Throwable t = null;
         Object r = null;
         try {
-            r = target.invoke(args);
+            // Use asFixedArity() to avoid unnecessary boxing of last argument for VarargsCollector case.
+            r = target.asFixedArity().invokeWithArguments(av);
         } catch (Throwable thrown) {
             t = thrown;
             throw t;
         } finally {
-            r = cleanup.invoke(t, r, args);
+            Object[] args = target.type().returnType() == void.class ? prepend(av, t) : prepend(av, t, r);
+            r = cleanup.asFixedArity().invokeWithArguments(args);
         }
         return r;
     }
 
-    /**
-     * A method that will be bound during construction of a {@code try-finally} handle with {@code void} return type by
-     * {@link MethodHandles#tryFinally(MethodHandle, MethodHandle)}.
-     *
-     * @param target the handle to wrap in a {@code try-finally} block. This will be bound.
-     * @param cleanup the handle to run in any case before returning. This will be bound.
-     * @param args the arguments to the call. These will remain as the argument list.
-     *
-     * @throws Throwable in case anything is thrown by the execution of {@code target}, the {@link Throwable} will be
-     *         passed to the {@code cleanup} handle, which may decide to throw any exception it sees fit.
-     */
-    static void tryFinallyVoidExecutor(MethodHandle target, MethodHandle cleanup, Object[] args) throws Throwable {
-        Throwable t = null;
-        try {
-            target.invoke(args);
-        } catch (Throwable thrown) {
-            t = thrown;
-            throw t;
-        } finally {
-            cleanup.invoke(t, args);
-        }
-    }
-
     // Indexes into constant method handles:
     static final int
             MH_cast                  =  0,
@@ -1958,17 +2098,14 @@
             MH_fillNewTypedArray     =  3,
             MH_fillNewArray          =  4,
             MH_arrayIdentity         =  5,
-            MH_looper                =  6,
-            MH_countedLoopPred       =  7,
-            MH_countedLoopStep       =  8,
-            MH_iteratePred           =  9,
-            MH_initIterator          = 10,
-            MH_iterateNext           = 11,
-            MH_tryFinallyExec        = 12,
-            MH_tryFinallyVoidExec    = 13,
-            MH_decrementCounter      = 14,
-            MH_Array_newInstance     = 15,
-            MH_LIMIT                 = 16;
+            MH_countedLoopPred       =  6,
+            MH_countedLoopStep       =  7,
+            MH_iteratePred           =  8,
+            MH_initIterator          =  9,
+            MH_iterateNext           = 10,
+            MH_decrementCounter      = 11,
+            MH_Array_newInstance     = 12,
+            MH_LIMIT                 = 13;
 
     static MethodHandle getConstantHandle(int idx) {
         MethodHandle handle = HANDLES[idx];
@@ -2013,10 +2150,6 @@
                     return makeIntrinsic(IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
                             MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class)),
                         Intrinsic.SELECT_ALTERNATIVE);
-                case MH_looper:
-                    return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "looper", MethodType.methodType(Object.class,
-                            MethodHandle[].class, MethodHandle[].class, MethodHandle[].class, MethodHandle[].class,
-                            int.class, int.class, Object[].class));
                 case MH_countedLoopPred:
                     return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "countedLoopPredicate",
                             MethodType.methodType(boolean.class, int.class, int.class));
@@ -2032,12 +2165,6 @@
                 case MH_iterateNext:
                     return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "iterateNext",
                             MethodType.methodType(Object.class, Iterator.class));
-                case MH_tryFinallyExec:
-                    return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "tryFinallyExecutor",
-                            MethodType.methodType(Object.class, MethodHandle.class, MethodHandle.class, Object[].class));
-                case MH_tryFinallyVoidExec:
-                    return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "tryFinallyVoidExecutor",
-                            MethodType.methodType(void.class, MethodHandle.class, MethodHandle.class, Object[].class));
                 case MH_decrementCounter:
                     return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "decrementCounter",
                             MethodType.methodType(int.class, int.class));
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,11 @@
 
 package java.lang.invoke;
 
-import java.util.Properties;
 import jdk.internal.misc.Unsafe;
 import sun.security.action.GetPropertyAction;
 
+import java.util.Properties;
+
 /**
  * This class consists exclusively of static names internal to the
  * method handle implementation.
@@ -46,6 +47,7 @@
     static final boolean TRACE_INTERPRETER;
     static final boolean TRACE_METHOD_LINKAGE;
     static final int COMPILE_THRESHOLD;
+    static final boolean LOG_LF_COMPILATION_FAILURE;
     static final int DONT_INLINE_THRESHOLD;
     static final int PROFILE_LEVEL;
     static final boolean PROFILE_GWT;
@@ -64,6 +66,8 @@
                 props.getProperty("java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE"));
         COMPILE_THRESHOLD = Integer.parseInt(
                 props.getProperty("java.lang.invoke.MethodHandle.COMPILE_THRESHOLD", "0"));
+        LOG_LF_COMPILATION_FAILURE = Boolean.parseBoolean(
+                props.getProperty("java.lang.invoke.MethodHandle.LOG_LF_COMPILATION_FAILURE", "false"));
         DONT_INLINE_THRESHOLD = Integer.parseInt(
                 props.getProperty("java.lang.invoke.MethodHandle.DONT_INLINE_THRESHOLD", "30"));
         PROFILE_LEVEL = Integer.parseInt(
@@ -87,7 +91,8 @@
         return (DEBUG_METHOD_HANDLE_NAMES |
                 DUMP_CLASS_FILES |
                 TRACE_INTERPRETER |
-                TRACE_METHOD_LINKAGE);
+                TRACE_METHOD_LINKAGE |
+                LOG_LF_COMPILATION_FAILURE);
     }
 
     // handy shared exception makers (they simplify the common case code)
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Jul 08 12:17:10 2016 -0700
@@ -3427,7 +3427,8 @@
      * @return a possibly adapted method handle
      * @throws NullPointerException if either argument is null
      * @throws IllegalArgumentException if any element of {@code newTypes} is {@code void.class},
-     *         or if either index is out of range in its corresponding list,
+     *         or if {@code skip} is negative or greater than the arity of the target,
+     *         or if {@code pos} is negative or greater than the newTypes list size,
      *         or if the non-skipped target parameter types match the new types at {@code pos}
      * @since 9
      */
@@ -4307,7 +4308,7 @@
         assert Stream.of(fstep, fpred, ffini).flatMap(List::stream).map(MethodHandle::type).map(MethodType::parameterList).
                 allMatch(pl -> pl.equals(commonParameterSequence));
 
-        return MethodHandleImpl.makeLoop(loopReturnType, commonSuffix, commonPrefix, finit, fstep, fpred, ffini);
+        return MethodHandleImpl.makeLoop(loopReturnType, commonSuffix, finit, fstep, fpred, ffini);
     }
 
     private static List<MethodHandle> fillParameterTypes(List<MethodHandle> hs, final List<Class<?>> targetParams) {
@@ -4814,10 +4815,8 @@
         // The cleanup parameter list (minus the leading Throwable and result parameters) must be a sublist of the
         // target parameter list.
         cleanup = dropArgumentsToMatch(cleanup, (rtype == void.class ? 1 : 2), targetParamTypes, 0);
-        MethodHandle aTarget = target.asSpreader(Object[].class, target.type().parameterCount());
-        MethodHandle aCleanup = cleanup.asSpreader(Object[].class, targetParamTypes.size());
 
-        return MethodHandleImpl.makeTryFinally(aTarget, aCleanup, rtype, targetParamTypes);
+        return MethodHandleImpl.makeTryFinally(target, cleanup, rtype, targetParamTypes);
     }
 
     /**
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodTypeForm.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodTypeForm.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,10 @@
 
 import jdk.internal.vm.annotation.Stable;
 import sun.invoke.util.Wrapper;
+
 import java.lang.ref.SoftReference;
-import static java.lang.invoke.MethodHandleStatics.*;
+
+import static java.lang.invoke.MethodHandleStatics.newIllegalArgumentException;
 
 /**
  * Shared information for a group of method types, which differ
@@ -81,7 +83,9 @@
             LF_MH_LINKER               = 15,  // linkToCallSite_MH
             LF_GWC                     = 16,  // guardWithCatch (catchException)
             LF_GWT                     = 17,  // guardWithTest
-            LF_LIMIT                   = 18;
+            LF_TF                      = 18,  // tryFinally
+            LF_LOOP                    = 19,  // loop
+            LF_LIMIT                   = 20;
 
     /** Return the type corresponding uniquely (1-1) to this MT-form.
      *  It might have any primitive returns or arguments, but will have no references except Object.
--- a/jdk/src/java.base/share/classes/java/security/Identity.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Identity.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,11 +52,12 @@
  *
  * @author Benjamin Renaud
  * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * replaced by {@link java.security.KeyStore}, the
+ * {@link java.security.cert} package, and
+ * {@link java.security.Principal}.
+ * This class is subject to removal in a future version of Java SE.
  */
-@Deprecated
+@Deprecated(since="1.2", forRemoval=true)
 public abstract class Identity implements Principal, Serializable {
 
     /** use serialVersionUID from JDK 1.1.x for interoperability */
--- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,11 +57,15 @@
  * @author Benjamin Renaud
  *
  * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * replaced by {@link java.security.KeyStore}, the
+ * {@link java.security.cert} package, and
+ * {@link java.security.Principal}.
+ * This class is subject to removal in a future version of Java SE.
+ *
+ * Note that the security property {@code policy.ignoreIdentityScope}
+ * is only applicable to these APIs and is also a candidate for removal.
  */
-@Deprecated
+@Deprecated(since="1.2", forRemoval=true)
 public abstract
 class IdentityScope extends Identity {
 
--- a/jdk/src/java.base/share/classes/java/security/Signer.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/security/Signer.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,11 +40,12 @@
  * @author Benjamin Renaud
  *
  * @deprecated This class is no longer used. Its functionality has been
- * replaced by {@code java.security.KeyStore}, the
- * {@code java.security.cert} package, and
- * {@code java.security.Principal}.
+ * replaced by {@link java.security.KeyStore}, the
+ * {@link java.security.cert} package, and
+ * {@link java.security.Principal}.
+ * This class is subject to removal in a future version of Java SE.
  */
-@Deprecated
+@Deprecated(since="1.2", forRemoval=true)
 public abstract class Signer extends Identity {
 
     private static final long serialVersionUID = -1763464102261361480L;
--- a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java	Fri Jul 08 12:17:10 2016 -0700
@@ -418,7 +418,7 @@
      * Gets short month strings. For example: "Jan", "Feb", etc.
      *
      * <p>If the language requires different forms for formatting and
-     * stand-alone usages, This method returns short month names in
+     * stand-alone usages, this method returns short month names in
      * the formatting form. For example, the preferred abbreviation
      * for January in the Catalan language is <em>de gen.</em> in the
      * formatting form, while it is <em>gen.</em> in the stand-alone
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Fri Jul 08 12:17:10 2016 -0700
@@ -276,9 +276,16 @@
  *     it is interpreted as a <a href="#number">number</a>.<br>
  *     <ul>
  *     <li>Letter <em>M</em> produces context-sensitive month names, such as the
- *         embedded form of names. If a {@code DateFormatSymbols} has been set
- *         explicitly with constructor {@link #SimpleDateFormat(String,
- *         DateFormatSymbols)} or method {@link
+ *         embedded form of names. Letter <em>M</em> is context-sensitive in the
+ *         sense that when it is used in the standalone pattern, for example,
+ *         "MMMM", it gives the standalone form of a month name and when it is
+ *         used in the pattern containing other field(s), for example, "d MMMM",
+ *         it gives the format form of a month name. For example, January in the
+ *         Catalan language is "de gener" in the format form while it is "gener"
+ *         in the standalone form. In this case, "MMMM" will produce "gener" and
+ *         the month part of the "d MMMM" will produce "de gener". If a
+ *         {@code DateFormatSymbols} has been set explicitly with constructor
+ *         {@link #SimpleDateFormat(String,DateFormatSymbols)} or method {@link
  *         #setDateFormatSymbols(DateFormatSymbols)}, the month names given by
  *         the {@code DateFormatSymbols} are used.</li>
  *     <li>Letter <em>L</em> produces the standalone form of month names.</li>
--- a/jdk/src/java.base/share/classes/java/time/Instant.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/time/Instant.java	Fri Jul 08 12:17:10 2016 -0700
@@ -561,7 +561,6 @@
                 case NANO_OF_SECOND: return nanos;
                 case MICRO_OF_SECOND: return nanos / 1000;
                 case MILLI_OF_SECOND: return nanos / 1000_000;
-                case INSTANT_SECONDS: INSTANT_SECONDS.checkValidIntValue(seconds);
             }
             throw new UnsupportedTemporalTypeException("Unsupported field: " + field);
         }
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Fri Jul 08 12:17:10 2016 -0700
@@ -417,7 +417,10 @@
      * <p>In the case of {@link #FULL_FLUSH} or {@link #SYNC_FLUSH}, if
      * the return value is {@code len}, the space available in output
      * buffer {@code b}, this method should be invoked again with the same
-     * {@code flush} parameter and more output space.
+     * {@code flush} parameter and more output space. Make sure that
+     * {@code len} is greater than 6 to avoid flush marker (5 bytes) being
+     * repeatedly output to the output buffer every time this method is
+     * invoked.
      *
      * @param b the buffer for the compressed data
      * @param off the start offset of the data
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1709,9 +1709,9 @@
     public final float compareAndExchangeFloatAcquire(Object o, long offset,
                                                   float expected,
                                                   float x) {
-        int w = compareAndExchangeIntVolatile(o, offset,
-                                              Float.floatToRawIntBits(expected),
-                                              Float.floatToRawIntBits(x));
+        int w = compareAndExchangeIntAcquire(o, offset,
+                                             Float.floatToRawIntBits(expected),
+                                             Float.floatToRawIntBits(x));
         return Float.intBitsToFloat(w);
     }
 
@@ -1793,9 +1793,9 @@
     public final double compareAndExchangeDoubleAcquire(Object o, long offset,
                                                         double expected,
                                                         double x) {
-        long w = compareAndExchangeLongVolatile(o, offset,
-                                                Double.doubleToRawLongBits(expected),
-                                                Double.doubleToRawLongBits(x));
+        long w = compareAndExchangeLongAcquire(o, offset,
+                                               Double.doubleToRawLongBits(expected),
+                                               Double.doubleToRawLongBits(x));
         return Double.longBitsToDouble(w);
     }
 
--- a/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -584,15 +584,17 @@
         Class<?> mainClass = null;
         ClassLoader scl = ClassLoader.getSystemClassLoader();
         try {
-            mainClass = scl.loadClass(cn);
+            mainClass = Class.forName(cn, false, scl);
         } catch (NoClassDefFoundError | ClassNotFoundException cnfe) {
             if (System.getProperty("os.name", "").contains("OS X")
                     && Normalizer.isNormalized(cn, Normalizer.Form.NFD)) {
                 try {
-                    // On Mac OS X since all names with diacretic symbols are given as decomposed it
-                    // is possible that main class name comes incorrectly from the command line
-                    // and we have to re-compose it
-                    mainClass = scl.loadClass(Normalizer.normalize(cn, Normalizer.Form.NFC));
+                    // On Mac OS X since all names with diacretic symbols are
+                    // given as decomposed it is possible that main class name
+                    // comes incorrectly from the command line and we have
+                    // to re-compose it
+                    String ncn = Normalizer.normalize(cn, Normalizer.Form.NFC);
+                    mainClass = Class.forName(ncn, false, scl);
                 } catch (NoClassDefFoundError | ClassNotFoundException cnfe1) {
                     abort(cnfe, "java.launcher.cls.error1", cn);
                 }
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -141,7 +141,7 @@
 The following options are Mac OS X specific:\n\
 \    -XstartOnFirstThread\n\
 \                      run the main() method on the first (AppKit) thread\n\
-\    -Xdock:name=<application name>"\n\
+\    -Xdock:name=<application name>\n\
 \                      override default application name displayed in dock\n\
 \    -Xdock:icon=<path to icon file>\n\
 \                      override default icon displayed in dock\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_de.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Verwendung: {0} [options] class [args...]\n           (zur Ausf\u00FChrung einer Klasse)\n   oder  {0} [options] -jar jarfile [args...]\n           (zur Ausf\u00FChrung einer JAR-Datei)\n   oder  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "options" Folgendes umfasst:\n
+java.launcher.opt.header  =   Verwendung: {0} [options] class [args...]\n           (zur Ausf\u00FChrung einer Klasse)\n   oder  {0} [options] -jar jarfile [args...]\n           (zur Ausf\u00FChrung einer JAR-Datei)\n   oder  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (zur Ausf\u00FChrung der Hauptklasse in einem Modul)\nwobei "options" Folgendes umfasst:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  Verwendet ein {0}-Bit-Datenmodell, sofern verf\u00FCgbar\n
 java.launcher.opt.vmselect   =\    {0}\t  zur Auswahl der "{1}" VM\n
@@ -34,7 +34,7 @@
 java.launcher.ergo.message2  =\                  weil die Ausf\u00FChrung auf einem Server-Class-Rechner erfolgt.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven zur Suche nach Klassendateien.\n    -mp <Modulpfad>\n    -modulepath <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, in der jedes Verzeichnis\n                  ein Modulverzeichnis darstellt.\n    -upgrademodulepath <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, in der jedes Verzeichnis\n                  ein Verzeichnis von Modulen darstellt, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    -m <modulename> | <modulename>/<mainclass>\n                  das anf\u00E4ngliche oder Hauptmodul, das aufgel\u00F6st werden soll\n    -addmods <modulename>[,<modulename>...]\n                  Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen\n    -limitmods <modulename>[,<modulename>...]\n                  Schr\u00E4nkt die Gesamtzahl der beachtbaren Module ein\n    -listmods[:<modulename>[,<modulename>...]]\n                  Listet die beachtbaren Module auf und beendet den Vorgang\n    -D<name>=<value>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|gc|jni]\n                  Aktiviert die Verbose-Ausgabe\n    -version      Druckt Produktversion und beendet das Programm\n    -showversion  Druckt Produktversion und f\u00E4hrt fort\n    -? -help      Druckt diese Hilfemeldung\n    -X            Druckt Hilfe zu Nicht-Standardoptionen\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt native Agent Library <libname>, z.B. -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt native Agent Library nach vollem Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt Startbildschirm mit angegebenem Bild an\n    @<filepath>   Liest Optionen aus der angegebenen Datei\n
+java.launcher.opt.footer     =\    -cp <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n    -classpath <Klassensuchpfad von Verzeichnissen und ZIP-/JAR-Dateien>\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, JAR-Archiven\n                  und ZIP-Archiven zur Suche nach Klassendateien.\n    -mp <Modulpfad>\n    -modulepath <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, in der jedes Verzeichnis\n                  ein Modulverzeichnis darstellt.\n    -upgrademodulepath <Modulpfad>...\n                  Eine durch {0} getrennte Liste mit Verzeichnissen, in der jedes Verzeichnis\n                  ein Verzeichnis von Modulen darstellt, die upgradef\u00E4hige\n                  Module im Laufzeitimage ersetzen\n    -m <modulename>[/<mainclass>]\n                  Das anf\u00E4ngliche Modul, das aufgel\u00F6st werden soll, und der Name der Hauptklasse,\n                  die ausgef\u00FChrt werden soll, wenn keine Angabe durch das Modul erfolgt\n    -addmods <modulename>[,<modulename>...]\n                  Root-Module, die zus\u00E4tzlich zum anf\u00E4nglichen Modul aufgel\u00F6st werden sollen\n    -limitmods <modulename>[,<modulename>...]\n                  Schr\u00E4nkt die Gesamtzahl der beobachtbaren Module ein\n    -listmods[:<modulename>[,<modulename>...]]\n                  Listet die beobachtbaren Module auf und beendet den Vorgang\n    -D<name>=<value>\n                  Legt eine Systemeigenschaft fest\n    -verbose:[class|gc|jni]\n                  Aktiviert die Verbose-Ausgabe\n    -version      Druckt Produktversion und beendet das Programm\n    -showversion  Druckt Produktversion und f\u00E4hrt fort\n    -? -help      Druckt diese Hilfemeldung\n    -X            Druckt Hilfe zu Nicht-Standardoptionen\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  Aktiviert Assertions mit angegebener Granularit\u00E4t\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  Deaktiviert Assertions mit angegebener Granularit\u00E4t\n    -esa | -enablesystemassertions\n                  Aktiviert System-Assertions\n    -dsa | -disablesystemassertions\n                  Deaktiviert System-Assertions\n    -agentlib:<libname>[=<options>]\n                  L\u00E4dt native Agent Library <libname>, z.B. -agentlib:jdwp\n                  siehe auch -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  L\u00E4dt native Agent Library nach vollem Pfadnamen\n    -javaagent:<jarpath>[=<options>]\n                  L\u00E4dt Java-Programmiersprachen-Agent, siehe java.lang.instrument\n    -splash:<imagepath>\n                  Zeigt Startbildschirm mit angegebenem Bild an\n    @<filepath>   Liest Optionen aus der angegebenen Datei\n
 See Weitere Einzelheiten finden Sie unter http://www.oracle.com/technetwork/java/javase/documentation/index.html.
 
 # Translators please note do not translate the options themselves
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_es.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Sintaxis: {0} [opciones] class [args...]\n           (para ejecutar una clase)\n   or  {0} [opciones] -jar jarfile [args...]\n           (para ejecutar un archivo jar)\n   or  {0} [-options] -mp <ruta_m\u00F3dulo> -m <nombre_m\u00F3dulo> | <nombre_m\u00F3dulo>/<clase_principal>\n           (para ejecutar una clase principal en un m\u00F3dulo)\ndonde opciones incluye:\n
+java.launcher.opt.header  =   Sintaxis: {0} [opciones] class [args...]\n           (para ejecutar una clase)\n   o  {0} [opciones] -jar jarfile [args...]\n           (para ejecutar un archivo jar)\n   o  {0} [opciones] -mp <ruta_m\u00F3dulo> -m <nombre_m\u00F3dulo>[/<clase_principal>] [args...]\n           (para ejecutar una clase principal en un m\u00F3dulo)\ndonde las opciones incluyen:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  usar un modelo de datos de {0} bits, si est\u00E1 disponible\n
 java.launcher.opt.vmselect   =\    {0}\t  para seleccionar la VM "{1}"\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  porque la ejecuci\u00F3n se est\u00E1 llevando a cabo en una m\u00E1quina de clase de servidor.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <ruta de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n    -classpath <ruta de b\u00FAsqueda de clases de los directorios y los archivos zip/jar>\n                  Lista separada por {0} de directorios, archivos JAR\n                  y archivos ZIP para buscar archivos de clase.\n    -mp <ruta de m\u00F3dulo>\n    -modulepath <ruta de m\u00F3dulo>...\n                  Lista de directorios separados por {0}, cada directorio\n                  es un directorio de m\u00F3dulos.\n    -upgrademodulepath <ruta de m\u00F3dulo>...\n                  Lista de directorios separados por {0}, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n                  actualizables en la imagen de tiempo de ejecuci\u00F3n\n    -m <nombre_m\u00F3dulo> | <nombre_m\u00F3dulo>/<clase_principal>\n                  m\u00F3dulo principal o inicial que resolver\n    -addmods <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n                  m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial\n    -limitmods <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n                  limita el universo de los m\u00F3dulos observables\n    -listmods[:<nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]]\n                  muestra los m\u00F3dulos observables y sale\n    -D<nombre>=<valor>\n                  define una propiedad del sistema\n    -verbose:[class|gc|jni]\n                  activa la salida verbose\n    -version      imprime la versi\u00F3n del producto y sale\n    -showversion  imprime la versi\u00F3n del producto y sale\n    -? -help      imprime este mensaje de ayuda\n    -X            imprime la ayuda de opciones no est\u00E1ndar\n    -ea[:<nombre_paquete>...|:<nombre_clase>]\n    -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  activar afirmaciones con la granularidad especificada\n    -da[:<nombre_paquete>...|:<nombre_clase>]\n    -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  desactivar afirmaciones con la granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre_bib>[=<opciones>]\n                  cargar biblioteca de agentes nativos <nombre_bib>, p. ej,. -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre_ruta>[=<opciones>]\n                  cargar biblioteca de agentes nativos por ruta completa\n    -javaagent:<ruta_jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta_imagen>\n                  mostrar pantalla de bienvenida con la imagen especificada\n    @<ruta_archivo>   leer opciones del archivo especificado\n
+java.launcher.opt.footer     =\    -cp <ruta de acceso de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n    -classpath <ruta de acceso de b\u00FAsqueda de clases de los directorios y archivos zip/jar>\n                  Lista separada por {0} de directorios, archivos JAR\n                  y archivos ZIP para buscar archivos de clase.\n    -mp <ruta_m\u00F3dulo>\n    -modulepath <ruta_m\u00F3dulo>...\n                  Lista separada por {0} de directorios, cada directorio\n                  es un directorio de m\u00F3dulos.\n    -upgrademodulepath <ruta_m\u00F3dulo>...\n                  Lista separada por {0} de directorios, cada directorio\n                  es un directorio de m\u00F3dulos que sustituye a los m\u00F3dulos\n                  actualizables en la imagen de tiempo de ejecuci\u00F3n\n    -m <nombre_m\u00F3dulo>[/<clase_principal>]\n                  m\u00F3dulo inicial que resolver y nombre de la clase principal\n                  que ejecutar si el m\u00F3dulo no la especifica\n    -addmods <nombre_m\u00F3dulo>[,<nombre_modulo>...]\n                  m\u00F3dulos ra\u00EDz que resolver, adem\u00E1s del m\u00F3dulo inicial\n    -limitmods <nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]\n                  limitar el universo de los m\u00F3dulos observables\n    -listmods[:<nombre_m\u00F3dulo>[,<nombre_m\u00F3dulo>...]]\n                  mostrar los m\u00F3dulos observables y sale\n    -D<nombre>=<valor>\n                  definir una propiedad del sistema\n    -verbose:[class|gc|jni]\n                  activar la salida verbose\n    -version      imprimir la versi\u00F3n del producto y sale\n    -showversion  imprimir la versi\u00F3n del producto y sale\n    -? -help      imprimir este mensaje de ayuda\n    -X            imprimir la ayuda de opciones no est\u00E1ndar\n    -ea[:<nombre_paquete>...|:<nombre_clase>]\n    -enableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  activar afirmaciones con la granularidad especificada\n    -da[:<nombre_paquete>...|:<nombre_clase>]\n    -disableassertions[:<nombre_paquete>...|:<nombre_clase>]\n                  desactivar afirmaciones con la granularidad especificada\n    -esa | -enablesystemassertions\n                  activar afirmaciones del sistema\n    -dsa | -disablesystemassertions\n                  desactivar afirmaciones del sistema\n    -agentlib:<nombre_bib>[=<opciones>]\n                  cargar biblioteca de agentes nativos <nombre_bib>, por ejemplo, -agentlib:jdwp\n                  ver tambi\u00E9n -agentlib:jdwp=help\n    -agentpath:<nombre_ruta>[=<opciones>]\n                  cargar biblioteca de agentes nativos por ruta completa\n    -javaagent:<ruta_jar>[=<opciones>]\n                  cargar agente de lenguaje de programaci\u00F3n Java, ver java.lang.instrument\n    -splash:<ruta_imagen>\n                  mostrar pantalla de bienvenida con la imagen especificada\n    @<ruta_archivo>   leer opciones del archivo especificado\n
 See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obtener m\u00E1s informaci\u00F3n.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                      agregar al final de la ruta de la clase de inicializaci\u00F3n de datos\n    -Xdiag            mostrar mensajes de diagn\u00F3stico adicionales\n    -Xdiag:resolver   mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n    -Xnoclassgc       desactivar la recopilaci\u00F3n de basura de clases\n    -Xincgc           activar la recopilaci\u00F3n de basura de clases\n    -Xloggc:<archivo>    registrar el estado de GC en un archivo con registros de hora\n    -Xbatch           desactivar compilaci\u00F3n en segundo plano\n    -Xms<tama\u00F1o>      definir tama\u00F1o de pila Java inicial\n    -Xmx<tama\u00F1o>      definir tama\u00F1o de pila Java m\u00E1ximo\n    -Xss<tama\u00F1o>      definir tama\u00F1o de la pila del thread de Java\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:on        es obligatorio el uso de datos de clase compartidos, de lo contrario se emitir\u00E1 un fallo.\n    -XshowSettings    mostrar todos los valores y continuar\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:vm mostrar todos los valores de la VM y continuar\n    -XshowSettings:properties\n                      mostrar todos los valores de las propiedades y continuar\n    -XshowSettings:locale\n                      mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XaddReads:<m\u00F3dulo>=<otros-m\u00F3dulos>(,<otros-m\u00F3dulos>)*\n                      <m\u00F3dulo> lee otros m\u00F3dulos,\n                      independientemente de su declaraci\u00F3n\n    -XaddExports:<m\u00F3dulo>/<paquete>=<otros-m\u00F3dulos>(,<otros-m\u00F3dulos>)*\n                      <m\u00F3dulo> exporta <paquete> a otros m\u00F3dulos,\n                      independientemente de su declaraci\u00F3n\n    -Xpatch:<m\u00F3dulo>=<archivo>({0}<archivo>)*\n                      Sustituye o aumenta un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR\n    -Xdisable-@files  desactiva la ampliaci\u00F3n de archivos de argumentos\n\nLas opciones -X no son est\u00E1ndar, por lo que podr\u00EDan cambiarse sin previo aviso.\n
+java.launcher.X.usage=\    -Xmixed           ejecuci\u00F3n de modo mixto (por defecto)\n    -Xint             solo ejecuci\u00F3n de modo interpretado\n    -Xbootclasspath/a:<directorios y archivos zip/jar separados por {0}>\n                       agregar al final de la ruta de acceso de la clase de inicializaci\u00F3n de datos\n    -Xdiag             mostrar mensajes de diagn\u00F3stico adicionales\n    -Xdiag:resolver   mostrar mensajes de diagn\u00F3stico de resoluci\u00F3n\n    -Xnoclassgc        desactivar la recolecci\u00F3n de basura de clases\n    -Xloggc:<archivo>     registrar el estado de GC en un archivo con registros de hora\n    -Xbatch           desactivar compilaci\u00F3n en segundo plano\n    -Xms<tama\u00F1o>        definir tama\u00F1o de pila Java inicial\n    -Xmx<tama\u00F1o>        definir tama\u00F1o de pila Java m\u00E1ximo\n    -Xss<tama\u00F1o>        definir tama\u00F1o de la pila del thread de Java\n    -Xprof            datos de salida de creaci\u00F3n de perfil de CPU\n    -Xfuture          activar las comprobaciones m\u00E1s estrictas, anticip\u00E1ndose al futuro valor por defecto\n    -Xrs              reducir el uso de se\u00F1ales de sistema operativo por parte de Java/VM (consulte la documentaci\u00F3n)\n    -Xcheck:jni       realizar comprobaciones adicionales para las funciones de JNI\n    -Xshare:off       no intentar usar datos de clase compartidos\n    -Xshare:auto      usar datos de clase compartidos si es posible (valor por defecto)\n    -Xshare:on         es obligatorio el uso de datos de clase compartidos, de lo contrario se emitir\u00E1 un fallo.\n    -XshowSettings    show all settings and continue\n    -XshowSettings:all\n                      mostrar todos los valores y continuar\n    -XshowSettings:vm show all vm related settings and continue\n    -XshowSettings:properties\n                      mostrar todos los valores y continuar\n    -XshowSettings:locale\n                       mostrar todos los valores relacionados con la configuraci\u00F3n regional y continuar\n    -XaddReads:<m\u00F3dulo>=<otro_m\u00F3dulo>(,<otro_m\u00F3dulo>)*\n                      <module> lee otros m\u00F3dulos,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo\n    -XaddExports:<m\u00F3dulo>/<paquete>=<otro_m\u00F3dulo>(,<otro_m\u00F3dulo>)*\n                      <m\u00F3dulo> exporta <paquete> a otros m\u00F3dulos,\n                      independientemente de la declaraci\u00F3n del m\u00F3dulo\n    -Xpatch:<m\u00F3dulo>=<archivo>({0}<archivo>)*\n                      Anular o aumentar un m\u00F3dulo con clases y recursos\n                      en directorios o archivos JAR\n    -Xdisable-@files  desactivar la ampliaci\u00F3n de archivos de argumentos\n\nLas opciones -X no son est\u00E1ndar y est\u00E1n sujetas a cambios sin previo aviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLas siguientes opciones son espec\u00EDficas para Mac OS X:\n    -XstartOnFirstThread\n                      ejecuta el m\u00E9todo main() del primer thread (AppKit)\n    -Xdock:name=<nombre de aplicaci\u00F3n>"\n                      sustituye al nombre por defecto de la aplicaci\u00F3n que se muestra en el Dock\n    -Xdock:icon=<ruta de acceso a archivo de icono>\n                      sustituye al icono por defecto que se muestra en el Dock\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_fr.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Syntaxe : {0} [options] class [args...]\n           (pour l''ex\u00E9cution d''une classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (pour l''ex\u00E9cution d''un fichier JAR)\n   ou  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (pour l''ex\u00E9cution de la classe principale dans un module)\no\u00F9 les options incluent :\n
+java.launcher.opt.header  =   Syntaxe : {0} [options] class [args...]\n           (pour l''ex\u00E9cution d''une classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (pour l''ex\u00E9cution d''un fichier JAR)\n   ou  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (pour l''ex\u00E9cution de la classe principale dans un module)\no\u00F9 options comprend les \u00E9l\u00E9ments suivants :\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  utilisez le mod\u00E8le de donn\u00E9es {0} bits s''il est disponible\n
 java.launcher.opt.vmselect   =\    {0}\t  pour s\u00E9lectionner la machine virtuelle "{1}"\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  car vous ex\u00E9cutez une machine de classe de serveur.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <chemin de recherche de classe de r\u00E9pertoire et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoire et de fichiers ZIP/JAR>\n                  Liste de r\u00E9pertoires, d''archives JAR et\n                  d''archives ZIP s\u00E9par\u00E9s par des {0}, dans laquelle rechercher des fichiers de classe.\n    -mp <chemin de module>\n    -modulepath <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    -upgrademodulepath <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules qui remplace des modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n    -m <modulename> | <modulename>/<mainclass>\n                  modules racines \u00E0 r\u00E9soudre en plus du module initial\n    -addmods <modulename>[,<modulename>...]\n                  modules racines \u00E0 r\u00E9soudre en plus du module initial\n    -limitmods <modulename>[,<modulename>...]\n                  limitation de l''univers de modules observables\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n    -D<name>=<value>\n                  d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|gc|jni]\n                  activation de la sortie en mode verbose\n    -version      impression de la version du produit et fin de l''op\u00E9ration\n    -showversion  impression de la version du produit et poursuite de l''op\u00E9ration\n    -? -help      impression du message d''aide\n    -X            impression de l''aide sur les options non standard\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activation des assertions avec la granularit\u00E9* sp\u00E9cifi\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -esa | -enablesystemassertions\n                  activation des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactivation des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agent natif <libname>, par exemple -agentlib:jdwp\n                  voir aussi, -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n    -javaagent:<jarpath>[=<options>]\n                  chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n    -splash:<imagepath>\n                  affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n    @<filepath>   lire les options \u00E0 partir du fichier indiqu\u00E9\n
+java.launcher.opt.footer     =\    -cp <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n    -classpath <chemin de recherche de classe de r\u00E9pertoires et de fichiers ZIP/JAR>\n                  Liste de r\u00E9pertoires, d''archives JAR\n                  et d''archives ZIP s\u00E9par\u00E9s par des {0} dans laquelle rechercher les fichiers de classe.\n    -mp <chemin de module>\n    -modulepath <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules.\n    -upgrademodulepath <chemin de module>...\n                  Liste de r\u00E9pertoires s\u00E9par\u00E9s par des {0}, chaque r\u00E9pertoire\n                  est un r\u00E9pertoire de modules qui remplace des modules\n                  pouvant \u00EAtre mis \u00E0 niveau dans l''image d''ex\u00E9cution\n    -m <modulename>[/<mainclass>]\n                  module initial \u00E0 r\u00E9soudre et nom de la classe principale\n                  \u00E0 ex\u00E9cuter si elle n''est pas indiqu\u00E9e par le module\n    -addmods <modulename>[,<modulename>...]\n                  modules racines \u00E0 r\u00E9soudre en plus du module initial\n    -limitmods <modulename>[,<modulename>...]\n                  limitation de l''univers de modules observables\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u00E9num\u00E9ration des modules observables et fin de l''op\u00E9ration\n    -D<name>=<value>\n                  d\u00E9finition d''une propri\u00E9t\u00E9 syst\u00E8me\n    -verbose:[class|gc|jni]\n                  activation de la sortie en mode verbose\n    -version      impression de la version du produit et fin de l''op\u00E9ration\n    -showversion  impression de la version du produit et poursuite de l''op\u00E9ration\n    -? -help      impression du message d''aide\n    -X            impression de l''aide sur les options non standard\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  activation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  d\u00E9sactivation des assertions avec la granularit\u00E9 sp\u00E9cifi\u00E9e\n    -esa | -enablesystemassertions\n                  activation des assertions syst\u00E8me\n    -dsa | -disablesystemassertions\n                  d\u00E9sactivation des assertions syst\u00E8me\n    -agentlib:<libname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agent natif <libname>, par exemple : -agentlib:jdwp\n                  voir aussi -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  chargement de la biblioth\u00E8que d''agent natif via le chemin d''acc\u00E8s complet\n    -javaagent:<jarpath>[=<options>]\n                  chargement de l''agent du langage de programmation Java, voir java.lang.instrument\n    -splash:<imagepath>\n                  affichage de l''\u00E9cran d''accueil avec l''image indiqu\u00E9e\n    @<filepath>   lire les options \u00E0 partir du fichier indiqu\u00E9\n
 See http://www.oracle.com/technetwork/java/javase/documentation/index.html pour plus de d\u00E9tails.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xdiag:resolver   affichage de messages de diagnostic du r\u00E9solveur\n    -Xnoclassgc       d\u00E9sactivation du nettoyage de la m\u00E9moire de la classe\n    -Xincgc           activation du nettoyage de la m\u00E9moire incr\u00E9mentiel\n    -Xloggc:<file>    journalisation du statut de nettoyage de la m\u00E9moire dans un fichier avec horodatage\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xss<size>        d\u00E9finition de la taille de pile de threads Java\n    -Xprof            sortie des donn\u00E9es de profilage d''UC\n    -Xfuture          activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xrs              r\u00E9duction de l''utilisation des signaux d''OS par Java/la machine virtuelle (voir documentation)\n    -Xcheck:jni       ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9e\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9e si possible (valeur par d\u00E9faut)\n    -Xshare:on        utilisation des donn\u00E9es de classe partag\u00E9e obligatoire ou \u00E9chec de l''op\u00E9ration\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                      affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                      affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> lecture de tous les modules,\n                      quelle que soit la d\u00E9claration de module\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> exporte <package> vers d''autres modules,\n                      quelle que soit la d\u00E9claration de module\n    -Xpatch:<module>=<file>({0}<file>)*\n                      Remplacement ou augmentation d''un module avec des classes et des ressources\n                      dans des fichiers ou r\u00E9pertoires JAR\n    -Xdisable-@files  d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nLes options -X ne sont pas standard et sont susceptibles de modification sans pr\u00E9avis.\n
+java.launcher.X.usage=\    -Xmixed           ex\u00E9cution en mode mixte (valeur par d\u00E9faut)\n    -Xint             ex\u00E9cution en mode interpr\u00E9t\u00E9 uniquement\n    -Xbootclasspath/a:<r\u00E9pertoires et fichiers ZIP/JAR s\u00E9par\u00E9s par des {0}>\n                      ajout \u00E0 la fin du chemin de classe bootstrap\n    -Xdiag            affichage de messages de diagnostic suppl\u00E9mentaires\n    -Xdiag:resolver   affichage de messages de diagnostic du r\u00E9solveur\n    -Xnoclassgc       d\u00E9sactivation du nettoyage de la m\u00E9moire de la classe\n    -Xloggc:<file>    journalisation du statut de nettoyage de la m\u00E9moire dans un fichier avec horodatage\n    -Xbatch           d\u00E9sactivation de la compilation en arri\u00E8re-plan\n    -Xms<size>        d\u00E9finition de la taille initiale des portions de m\u00E9moire Java\n    -Xmx<size>        d\u00E9finition de la taille maximale des portions de m\u00E9moire Java\n    -Xss<size>        d\u00E9finition de la taille de pile de threads Java\n    -Xprof            sortie des donn\u00E9es de profilage d''UC\n    -Xfuture          activation des contr\u00F4les les plus stricts en vue d''anticiper la future valeur par d\u00E9faut\n    -Xrs              r\u00E9duction de l''utilisation des signaux d''OS par Java/la machine virtuelle (voir documentation)\n    -Xcheck:jni       ex\u00E9cution de contr\u00F4les suppl\u00E9mentaires pour les fonctions JNI\n    -Xshare:off       aucune tentative d''utilisation des donn\u00E9es de classe partag\u00E9e\n    -Xshare:auto      utilisation des donn\u00E9es de classe partag\u00E9e si possible (valeur par d\u00E9faut)\n    -Xshare:on        utilisation des donn\u00E9es de classe partag\u00E9e obligatoire ou \u00E9chec de l''op\u00E9ration\n    -XshowSettings    affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:all\n                      affichage de tous les param\u00E8tres et poursuite de l''op\u00E9ration\n    -XshowSettings:vm affichage de tous les param\u00E8tres de machine virtuelle et poursuite de l''op\u00E9ration\n    -XshowSettings:properties\n                      affichage de tous les param\u00E8tres de propri\u00E9t\u00E9 et poursuite de l''op\u00E9ration\n    -XshowSettings:locale\n                      affichage de tous les param\u00E8tres d''environnement local et poursuite de l''op\u00E9ration\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> lecture de tous les modules,\n                      quelle que soit la d\u00E9claration de module\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> exporte <package> vers d''autres modules,\n                      quelle que soit la d\u00E9claration de module\n    -Xpatch:<module>=<file>({0}<file>)*\n                      Remplacement ou augmentation d''un module avec des classes et des ressources\n                      dans des fichiers ou r\u00E9pertoires JAR\n    -Xdisable-@files  d\u00E9sactivation d''autres d\u00E9veloppements de fichier d''argument\n\nLes options -X ne sont pas standard et sont susceptibles de modification sans pr\u00E9avis.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLes options suivantes sont propres \u00E0 Mac OS X :\n    -XstartOnFirstThread\n                      ex\u00E9cute la m\u00E9thode main() sur le premier thread (AppKit)\n    -Xdock:name=<application name>"\n                      remplace le nom d'application par d\u00E9faut affich\u00E9 dans l'ancrage\n    -Xdock:icon=<path to icon file>\n                      remplace l'ic\u00F4ne par d\u00E9faut affich\u00E9e dans l'ancrage\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_it.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Uso: {0} [options] class [args...]\n           (per eseguire una classe)\n   oppure  {0} [options] -jar jarfile [args...]\n           (per eseguire un file jar)\n   oppure  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (per eseguire la classe principale in un modulo)\nin cui options include:\n
+java.launcher.opt.header  =   Uso: {0} [options] class [args...]\n           (per eseguire una classe)\n   oppure {0} [options] -jar jarfile [args...]\n           (per eseguire un file jar)\n   oppure {0} [options] -mp <percorsomodulo> -m <nomemodulo>[/<classeprincipale>] [args...]\n           (per eseguire la classe principale in un modulo)\nin cui options include:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  usare un modello di dati {0}-bit se disponibile\n
 java.launcher.opt.vmselect   =\    {0}\t  per selezionare la VM "{1}"\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  perch\u00E9 si utilizza un computer di classe server.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n                  Una lista separata da {0} di directory, archivi JAR\n                  e ZIP utilizzata per la ricerca di file di classe.\n    -mp <percorsomodulo>\n    -modulepath <percorsomodulo>...\n                  Una lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory di moduli.\n    -upgrademodulepath <percorso modulo>...\n                  Una lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory dei moduli che sostituiscono i moduli\n                  aggiornabili nell''immagine in fase di esecuzione\n    -m <nomemodulo>| <nomemodulo>/<classeprincipale>\n                  il modulo iniziale o principale da risolvere\n    -addmods <nomemodulo>[,<nomemodulo>...]\n                  moduli root da risolvere in aggiunta al modulo iniziale\n    -limitmods <nomemodulo>[,<nomemodulo>...]\n                  limita l''universe dei moduli osservabili\n    -listmods[:<nomemodulo>[,<nomemodulo>...]]\n                  elenca i moduli osservabili ed esce\n    -D<nome>=<valore>\n                  imposta una propriet\u00E0 di sistema\n    -verbose:[class|gc|jni]\n                  abilita l''output descrittivo\n    -version      stampa la versione del prodotto ed esce\n    -showversion  stampa la versione del prodotto e continua\n    -? -help      stampa questo messaggio della Guida\n    -X            stampa la Guida sulle opzioni non standard\n    -ea[:<nomepackage>...|:<nomeclasse>]\n    -enableassertions[:<nomepackage>...|:<nomeclasse>]\n                  abilita le asserzioni con la granularit\u00E0 specificata\n    -da[:<nomepackage>...|:<nomeclasse>]\n    -disableassertions[:<nomepackage>...|:<nomeclasse>]\n                  disabilita le asserzioni con la granularit\u00E0 specificata\n    -esa | -enablesystemassertions\n                  abilita le asserzioni di sistema\n    -dsa | -disablesystemassertions\n                  disabilita le asserzioni di sistema\n    -agentlib:<nomelibreria>[=<opzioni>]\n                  load native agent library <nomelibreria>, ad esempio -agentlib:jdwp\n                  vedere anche -agentlib:jdwp=help\n    -agentpath:<nomepercorso>[=<opzioni>]\n                  carica la libreria agenti nativa con il percorso completo\n    -javaagent:<percorsojar>[=<opzioni>]\n                  carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument\n    -splash:<percorsoimmagine>\n                  mostra la schermata iniziale con l''immagine specificata\n    @<percorsofile>   legge le opzioni dal file specificato\n
+java.launcher.opt.footer     =\    -cp <classpath di ricerca di directory e file zip/jar>\n    -classpath <classpath di ricerca di directory e file zip/jar>\n                  Una lista separata da {0} di directory, archivi JAR\n                  e ZIP utilizzata per la ricerca di file di classe.\n    -mp <percorso modulo>\n    -modulepath <percorso modulo>...\n                  Una lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory di moduli.\n    -upgrademodulepath <percorso modulo>...\n                  Una lista separata da {0} di directory; ciascuna directory\n                  \u00E8 una directory dei moduli che sostituiscono i moduli\n                  aggiornabili nell''immagine in fase di esecuzione\n    -m <nomemodulo>[/<classeprincipale>]\n                  il modulo iniziale da risolvere e il nome della classe principale\n                  da eseguire se non viene specificata dal modulo\n    -addmods <nomemodulo>[,<nomemodulo>...]\n                  moduli root da risolvere in aggiunta al modulo iniziale\n    -limitmods <nomemodulo>[,<nomemodulo>...]\n                  limita l''universe dei moduli osservabili\n    -listmods[:<nomemodulo>[,<nomemodulo>...]]\n                  elenca i moduli osservabili ed esce\n    -D<nome>=<valore>\n                  imposta una propriet\u00E0 di sistema\n    -verbose:[class|gc|jni]\n                  abilita l''output descrittivo\n    -version      stampa la versione del prodotto ed esce\n    -showversion  stampa la versione del prodotto e continua\n    -? -help      stampa questo messaggio della Guida\n    -X            stampa la Guida sulle opzioni non standard\n    -ea[:<nomepackage>...|:<nomeclasse>]\n    -enableassertions[:<nomepackage>...|:<nomeclasse>]\n                  abilita le asserzioni con la granularit\u00E0 specificata\n    -da[:<nomepackage>...|:<nomeclasse>]\n    -disableassertions[:<nomepackage>...|:<nomeclasse>]\n                  disabilita le asserzioni con la granularit\u00E0 specificata\n    -esa | -enablesystemassertions\n                  abilita le asserzioni di sistema\n    -dsa | -disablesystemassertions\n                  disabilita le asserzioni di sistema\n    -agentlib:<nomelibreria>[=<opzioni>]\n                  load native agent library <nomelibreria>, ad esempio -agentlib:jdwp\n                  vedere anche -agentlib:jdwp=help\n    -agentpath:<nomepercorso>[=<opzioni>]\n                  carica la libreria agenti nativa con il percorso completo\n    -javaagent:<percorsojar>[=<opzioni>]\n                  carica l''agente del linguaggio di programmazione Java. Vedere java.lang.instrument\n    -splash:<percorsoimmagine>\n                  mostra la schermata iniziale con l''immagine specificata\n    @<percorsofile>   legge le opzioni dal file specificato\n
 See Per ulteriori dettagli, vedere http://www.oracle.com/technetwork/java/javase/documentation/index.html.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           esecuzione in modalit\u00E0 mista (impostazione predefinita)\n    -Xint             esecuzione solo in modalit\u00E0 convertita\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      aggiunge alla fine del classpath di bootstrap\n     -Xdiag            mostra messaggi di diagnostica aggiuntivi\n    -Xdiag:resolver   mostra i messaggi di diagnostica del resolver\n    -Xnoclassgc       disabilita la garbage collection della classe\n    -Xincgc           abilita la garbage collection incrementale\n    -Xloggc:<file>    registra lo stato GC in un file con indicatori orari\n    -Xbatch           disabilita la compilazione in background\n    -Xms<size>        imposta la dimensione heap Java iniziale\n    -Xmx<size>        imposta la dimensione heap Java massima\n    -Xss<size>        imposta la dimensione dello stack di thread Java\n    -Xprof            visualizza i dati di profilo della CPU\n    -Xfuture          abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future\n    -Xrs              riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione)\n    -Xcheck:jni       esegue controlli aggiuntivi per le funzioni JNI\n    -Xshare:off       non tenta di utilizzare i dati della classe condivisi\n    -Xshare:auto      utilizza i dati di classe condivisi se possibile (impostazione predefinita)\n    -Xshare:on        richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    mostra tutte le impostazioni e continua\n    -XshowSettings:all\n                      mostra tutte le impostazioni e continua\n    -XshowSettings:vm mostra tutte le impostazioni correlate alla VM e continua\n    -XshowSettings:properties\n                      mostra tutte le impostazioni delle propriet\u00E0 e continua\n    -XshowSettings:locale\n                      mostra tutte le impostazioni correlate alle impostazioni nazionali e continua\n   -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> legge altri moduli,\n                      indipendentemente dalla dichiarazione del modulo\n   -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> esporta il <package> in altri moduli,\n                      indipendentemente dalla dichiarazione del modulo\n    -Xpatch:<module>=<file>({0}<file>)*\n                      sostituisce o migliora un modulo con classi e risorse\n                      in file JAR o directory\n    -Xdisable-@files  disabilita l''ulteriore espansione del file di argomenti\n\nLe opzioni -X non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
+java.launcher.X.usage=\    -Xmixed           esecuzione in modalit\u00E0 mista (impostazione predefinita)\n    -Xint             esecuzione solo in modalit\u00E0 convertita\n    -Xbootclasspath/a:<directory e file zip/jar separati da {0}>\n                      aggiunge alla fine del classpath di bootstrap\n     -Xdiag            mostra messaggi di diagnostica aggiuntivi\n    -Xdiag:resolver   mostra i messaggi di diagnostica del resolver\n    -Xnoclassgc       disabilita la garbage collection della classe\n    -Xloggc:<file>    registra lo stato GC in un file con indicatori orari\n    -Xbatch           disabilita la compilazione in background\n    -Xms<size>        imposta la dimensione heap Java iniziale\n    -Xmx<size>        imposta la dimensione heap Java massima\n    -Xss<size>        imposta la dimensione dello stack di thread Java\n    -Xprof            visualizza i dati di profilo della CPU\n    -Xfuture          abilita i controlli pi\u00F9 limitativi anticipando le impostazioni predefinite future\n    -Xrs              riduce l''uso di segnali del sistema operativo da Java/VM (vedere la documentazione)\n    -Xcheck:jni       esegue controlli aggiuntivi per le funzioni JNI\n    -Xshare:off       non tenta di utilizzare i dati della classe condivisi\n    -Xshare:auto      utilizza i dati di classe condivisi se possibile (impostazione predefinita)\n    -Xshare:on        richiede l''uso dei dati di classe condivisi, altrimenti l''esecuzione non riesce.\n    -XshowSettings    mostra tutte le impostazioni e continua\n    -XshowSettings:all\n                      mostra tutte le impostazioni e continua\n    -XshowSettings:vm mostra tutte le impostazioni correlate alla VM e continua\n    -XshowSettings:properties\n                      mostra tutte le impostazioni delle propriet\u00E0 e continua\n    -XshowSettings:locale\n                      mostra tutte le impostazioni correlate alle impostazioni nazionali e continua\n   -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> legge altri moduli,\n                      indipendentemente dalla dichiarazione del modulo\n   -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> esporta il <package> in altri moduli,\n                      indipendentemente dalla dichiarazione del modulo\n    -Xpatch:<module>=<file>({0}<file>)*\n                      sostituisce o migliora un modulo con classi e risorse\n                      in file JAR o directory\n    -Xdisable-@files  disabilita l''ulteriore espansione del file di argomenti\n\nLe opzioni -X non sono opzioni standard e sono soggette a modifiche senza preavviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nLe opzioni riportate di seguito sono specifiche del sistema operativo Mac OS X:\n    -XstartOnFirstThread\n                      Esegue il metodo main() sul primo thread (AppKit).\n    -Xdock:name=<nome applicazione>"\n                      Sostituisce il nome applicazione predefinito visualizzato nel dock\n    -Xdock:icon=<percorso file icona>\n                      Sostituisce l'icona predefinita visualizzata nel dock\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ja.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n           (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -jar jarfile [args...]\n           (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\noptions\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n
+java.launcher.opt.header  =   \u4F7F\u7528\u65B9\u6CD5: {0} [options] class [args...]\n           (\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -jar jarfile [args...]\n           (jar\u30D5\u30A1\u30A4\u30EB\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n   \u307E\u305F\u306F  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u3092\u5B9F\u884C\u3059\u308B\u5834\u5408)\n\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u4F7F\u7528\u53EF\u80FD\u306A\u5834\u5408\u306F{0}\u30D3\u30C3\u30C8\u306E\u30C7\u30FC\u30BF\u30FB\u30E2\u30C7\u30EB\u3092\u4F7F\u7528\u3059\u308B\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\u3092\u9078\u629E\u3059\u308B\u5834\u5408\n
@@ -34,13 +34,13 @@
 java.launcher.ergo.message2  =\                  \u3053\u308C\u306F\u30B5\u30FC\u30D0\u30FC\u30AF\u30E9\u30B9\u306E\u30DE\u30B7\u30F3\u3067\u5B9F\u884C\u3057\u3066\u3044\u308B\u305F\u3081\u3067\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n                  JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n    -mp <module path>\n    -modulepath <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    -upgrademodulepath <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    -m <modulename> | <modulename>/<mainclass>\n                  \u89E3\u6C7A\u3059\u308B\u521D\u671F\u307E\u305F\u306F\u30E1\u30A4\u30F3\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\n    -addmods <modulename>[,<modulename>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\n    -limitmods <modulename>[,<modulename>...]\n                  \u76E3\u8996\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E6\u30CB\u30D0\u30FC\u30B9\u3092\u5236\u9650\u3059\u308B\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u76E3\u8996\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u3066\u7D42\u4E86\u3059\u308B\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n    -verbose:[class|gc|jni]\n                  \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n    -showversion  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -? -help      \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n    -X            \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -esa | -enablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -dsa | -disablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -agentlib:<libname>[=<options>]\n                  \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: -agentlib:jdwp\n                  -agentlib:jdwp=help\u3082\u53C2\u7167\n    -agentpath:<pathname>[=<options>]\n                  \
-\u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n    -javaagent:<jarpath>[=<options>]\n                  Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n    -splash:<imagepath>\n                  \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n    @<filepath>   \u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n
+java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3001\n                  JAR\u30A2\u30FC\u30AB\u30A4\u30D6\u304A\u3088\u3073ZIP\u30A2\u30FC\u30AB\u30A4\u30D6\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\n    -mp <module path>\n    -modulepath <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\u3002\n    -upgrademodulepath <module path>...\n                  \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30EA\u30B9\u30C8\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\n                  \u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30A4\u30E1\u30FC\u30B8\u3067\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7F6E\u63DB\u3059\u308B\n                  \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3059\n    -m <modulename>[/<mainclass>]\n                  \u89E3\u6C7A\u3059\u308B\u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u304A\u3088\u3073\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\n                  \u5B9F\u884C\u3059\u308B\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9\u306E\u540D\u524D\n    -addmods <modulename>[,<modulename>...]\n                  \u521D\u671F\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u52A0\u3048\u3066\u89E3\u6C7A\u3059\u308B\u30EB\u30FC\u30C8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\n    -limitmods <modulename>[,<modulename>...]\n                  \u76E3\u8996\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30E6\u30CB\u30D0\u30FC\u30B9\u3092\u5236\u9650\u3059\u308B\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u76E3\u8996\u53EF\u80FD\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u30EA\u30B9\u30C8\u3057\u3066\u7D42\u4E86\u3059\u308B\n    -D<name>=<value>\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\u3059\u308B\n    -verbose:[class|gc|jni]\n                  \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n    -version      \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D42\u4E86\u3059\u308B\n    -showversion  \u88FD\u54C1\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -? -help      \u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n    -X            \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u95A2\u3059\u308B\u30D8\u30EB\u30D7\u3092\u51FA\u529B\u3059\u308B\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u6307\u5B9A\u3057\u305F\u7C92\u5EA6\u3067\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -esa | -enablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -dsa | -disablesystemassertions\n                  \u30B7\u30B9\u30C6\u30E0\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -agentlib:<libname>[=<options>]\n                  \u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA<libname>\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002\u4F8B: \
+-agentlib:jdwp\n                  -agentlib:jdwp=help\u3082\u53C2\u7167\n    -agentpath:<pathname>[=<options>]\n                  \u30D5\u30EB\u30D1\u30B9\u540D\u3067\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30ED\u30FC\u30C9\u3059\u308B\n    -javaagent:<jarpath>[=<options>]\n                  Java\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u3002java.lang.instrument\u3092\u53C2\u7167\n    -splash:<imagepath>\n                  \u6307\u5B9A\u3057\u305F\u30A4\u30E1\u30FC\u30B8\u3067\u30B9\u30D7\u30E9\u30C3\u30B7\u30E5\u753B\u9762\u3092\u8868\u793A\u3059\u308B\n    @<filepath>   \u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\n
 See \u8A73\u7D30\u306F\u3001http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xdiag:resolver   \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xincgc           \u5897\u5206\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xss<size>        Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xprof            CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\n                      <module>\u306F\u4ED6\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAD\u307F\u53D6\u308B\n    \
--XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\n                      <module>\u306F<package>\u3092\u4ED6\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3059\u308B\n    -Xpatch:<module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3059\u308B\n    -Xdisable-@files  \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n\n-X\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u6A19\u6E96\u306A\u306E\u3067\u3001\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n
+java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u30E2\u30FC\u30C9\u306E\u5B9F\u884C(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xint             \u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u30FB\u30E2\u30FC\u30C9\u306E\u5B9F\u884C\u306E\u307F\n    -Xbootclasspath/a:<{0}\u3067\u533A\u5207\u3089\u308C\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304A\u3088\u3073zip/jar\u30D5\u30A1\u30A4\u30EB>\n                      \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D1\u30B9\u306E\u6700\u5F8C\u306B\u8FFD\u52A0\u3059\u308B\n    -Xdiag            \u8FFD\u52A0\u306E\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xdiag:resolver   \u30EA\u30BE\u30EB\u30D0\u8A3A\u65AD\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3059\u308B\n    -Xnoclassgc       \u30AF\u30E9\u30B9\u306E\u30AC\u30D9\u30FC\u30B8\u30FB\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xloggc:<file>    \u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u3044\u305F\u30D5\u30A1\u30A4\u30EB\u306BGC\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30ED\u30B0\u3092\u8A18\u9332\u3059\u308B\n    -Xbatch           \u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\n    -Xms<size>        Java\u306E\u521D\u671F\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xmx<size>        Java\u306E\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xss<size>        Java\u306E\u30B9\u30EC\u30C3\u30C9\u30FB\u30B9\u30BF\u30C3\u30AF\u30FB\u30B5\u30A4\u30BA\u3092\u8A2D\u5B9A\u3059\u308B\n    -Xprof            CPU\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30C7\u30FC\u30BF\u3092\u51FA\u529B\u3059\u308B\n    -Xfuture          \u5C06\u6765\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u898B\u8D8A\u3057\u3066\u3001\u6700\u3082\u53B3\u5BC6\u306A\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B\n    -Xrs              Java/VM\u306B\u3088\u308BOS\u30B7\u30B0\u30CA\u30EB\u306E\u4F7F\u7528\u3092\u524A\u6E1B\u3059\u308B(\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u53C2\u7167)\n    -Xcheck:jni       JNI\u95A2\u6570\u306B\u5BFE\u3059\u308B\u8FFD\u52A0\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u5B9F\u884C\u3059\u308B\n    -Xshare:off       \u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3088\u3046\u3068\u3057\u306A\u3044\n    -Xshare:auto      \u53EF\u80FD\u3067\u3042\u308C\u3070\u5171\u6709\u30AF\u30E9\u30B9\u306E\u30C7\u30FC\u30BF\u3092\u4F7F\u7528\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n    -Xshare:on        \u5171\u6709\u30AF\u30E9\u30B9\u30FB\u30C7\u30FC\u30BF\u306E\u4F7F\u7528\u3092\u5FC5\u9808\u306B\u3057\u3001\u3067\u304D\u306A\u3051\u308C\u3070\u5931\u6557\u3059\u308B\u3002\n    -XshowSettings    \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:all\n                      \u3059\u3079\u3066\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:vm \u3059\u3079\u3066\u306EVM\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:properties\n                      \u3059\u3079\u3066\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XshowSettings:locale\n                      \u3059\u3079\u3066\u306E\u30ED\u30B1\u30FC\u30EB\u95A2\u9023\u306E\u8A2D\u5B9A\u3092\u8868\u793A\u3057\u3066\u7D9A\u884C\u3059\u308B\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\n                      <module>\u306F\u4ED6\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u8AAD\u307F\u53D6\u308B\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      \u30E2\u30B8\u30E5\u30FC\u30EB\u5BA3\u8A00\u306B\u95A2\u4FC2\u306A\u304F\u3001\n               \
+       <module>\u306F<package>\u3092\u4ED6\u306E\u30E2\u30B8\u30E5\u30FC\u30EB\u306B\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3059\u308B\n    -Xpatch:<module>=<file>({0}<file>)*\n                      JAR\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30EA\u30BD\u30FC\u30B9\u3067\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\n                      \u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u62E1\u5F35\u3059\u308B\n    -Xdisable-@files  \u3055\u3089\u306A\u308B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u3092\u7121\u52B9\u306B\u3059\u308B\n\n-X\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u975E\u6A19\u6E96\u306A\u306E\u3067\u3001\u4E88\u544A\u306A\u304F\u5909\u66F4\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306FMac OS X\u56FA\u6709\u3067\u3059\u3002\n    -XstartOnFirstThread\n                      main()\u30E1\u30BD\u30C3\u30C9\u3092\u6700\u521D(AppKit)\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u5B9F\u884C\u3059\u308B\n    -Xdock:name=<application name>"\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u540D\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n    -Xdock:icon=<path to icon file>\n                      Dock\u306B\u8868\u793A\u3055\u308C\u308B\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30A2\u30A4\u30B3\u30F3\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n           (\uD074\uB798\uC2A4 \uC2E4\uD589)\n   \uB610\uB294  {0} [options] -jar jarfile [args...]\n           (jar \uD30C\uC77C \uC2E4\uD589)\n   \uB610\uB294  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n
+java.launcher.opt.header  =   \uC0AC\uC6A9\uBC95: {0} [options] class [args...]\n           (\uD074\uB798\uC2A4 \uC2E4\uD589)\n   \uB610\uB294  {0} [options] -jar jarfile [args...]\n           (jar \uD30C\uC77C \uC2E4\uD589)\n   \uB610\uB294  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\uBAA8\uB4C8\uC758 \uAE30\uBCF8 \uD074\uB798\uC2A4 \uC2E4\uD589)\n\uC5EC\uAE30\uC11C options\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0 {0}\uBE44\uD2B8 \uB370\uC774\uD130 \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.\n
 java.launcher.opt.vmselect   =\    {0}\t  "{1}" VM\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.\n
@@ -34,13 +34,13 @@
 java.launcher.ergo.message2  =\                  \uC11C\uBC84\uAE09 \uC2DC\uC2A4\uD15C\uC5D0\uC11C \uC2E4\uD589 \uC911\uC774\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n    -classpath <\uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C\uC758 \uD074\uB798\uC2A4 \uAC80\uC0C9 \uACBD\uB85C>\n                  \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n                  JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -mp <\uBAA8\uB4C8 \uACBD\uB85C>\n    -modulepath <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    -upgrademodulepath <\uBAA8\uB4C8 \uACBD\uB85C>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uB85C, \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC\n                  \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB300\uCCB4\uD569\uB2C8\uB2E4.\n    -m <modulename> | <modulename>/<mainclass>\n                  \uBD84\uC11D\uD560 \uCD08\uAE30 \uB610\uB294 \uAE30\uBCF8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n    -addmods <modulename>[,<modulename>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n    -limitmods <modulename>[,<modulename>...]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    -listmods[:<modulename>[,<modulename>...]]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -D<name>=<value>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -version      \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -? -help      \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -X            \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -esa | -enablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -dsa | -disablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -agentlib:<libname>[=<options>]\n                  \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <libname>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp).\n                  -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -agentpath:<pathname>[=<options>]\n                  \uC804\uCCB4 \uACBD\uB85C\uBA85\uC744 \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n    \
--javaagent:<jarpath>[=<options>]\n                  Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -splash:<imagepath>\n                  \uC774\uBBF8\uC9C0\uAC00 \uC9C0\uC815\uB41C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    @<filepath>   \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n
+java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uAC80\uC0C9\uD560 {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC,\n                  JAR \uC544\uCE74\uC774\uBE0C \uBC0F ZIP \uC544\uCE74\uC774\uBE0C \uBAA9\uB85D\uC785\uB2C8\uB2E4.\n    -mp <module path>\n    -modulepath <module path>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    -upgrademodulepath <module path>...\n                  {0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBAA9\uB85D\uC785\uB2C8\uB2E4. \uAC01 \uB514\uB809\uD1A0\uB9AC\uB294\n                  \uB7F0\uD0C0\uC784 \uC774\uBBF8\uC9C0\uC5D0\uC11C \uC5C5\uADF8\uB808\uC774\uB4DC \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744\n                  \uB300\uCCB4\uD558\uB294 \uBAA8\uB4C8\uC758 \uB514\uB809\uD1A0\uB9AC\uC785\uB2C8\uB2E4.\n    -m <modulename>[/<mainclass>]\n                  \uBD84\uC11D\uD560 \uCD08\uAE30 \uBAA8\uB4C8 \uBC0F \uBAA8\uB4C8\uC5D0\uC11C \uC9C0\uC815\uB418\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uC2E4\uD589\uD560\n                  \uAE30\uBCF8 \uD074\uB798\uC2A4\uC758 \uC774\uB984\uC785\uB2C8\uB2E4.\n    -addmods <modulename>[,<modulename>...]\n                  \uCD08\uAE30 \uBAA8\uB4C8 \uC678\uC5D0 \uBD84\uC11D\uD560 \uB8E8\uD2B8 \uBAA8\uB4C8\uC785\uB2C8\uB2E4.\n    -limitmods <modulename>[,<modulename>...]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC758 \uBC94\uC704\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.\n    -listmods[:<modulename>[,<modulename>...]]\n                  \uAD00\uCC30 \uAC00\uB2A5\uD55C \uBAA8\uB4C8\uC744 \uB098\uC5F4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -D<name>=<value>\n                  \uC2DC\uC2A4\uD15C \uC18D\uC131\uC744 \uC124\uC815\uD569\uB2C8\uB2E4.\n    -verbose:[class|gc|jni]\n                  \uC0C1\uC138 \uC815\uBCF4 \uCD9C\uB825\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -version      \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uC885\uB8CC\uD569\uB2C8\uB2E4.\n    -showversion  \uC81C\uD488 \uBC84\uC804\uC744 \uC778\uC1C4\uD558\uACE0 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -? -help      \uC774 \uB3C4\uC6C0\uB9D0 \uBA54\uC2DC\uC9C0\uB97C \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -X            \uBE44\uD45C\uC900 \uC635\uC158\uC5D0 \uB300\uD55C \uB3C4\uC6C0\uB9D0\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \uC138\uBD84\uC131\uC774 \uC9C0\uC815\uB41C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -esa | -enablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -dsa | -disablesystemassertions\n                  \uC2DC\uC2A4\uD15C \uAC80\uC99D\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -agentlib:<libname>[=<options>]\n                  \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC <libname>\uC744 \uB85C\uB4DC\uD569\uB2C8\uB2E4(\uC608: -agentlib:jdwp)\n                  -agentlib:jdwp=help\uB3C4 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -agentpath:<pathname>[=<options>]\n                  \uC804\uCCB4 \uACBD\uB85C \uC774\uB984\uC744 \uC0AC\uC6A9\uD574\uC11C \uACE0\uC720 \uC5D0\uC774\uC804\uD2B8 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4.\n    -javaagent:<jarpath>[=<options>]\n \
+                 Java \uD504\uB85C\uADF8\uB798\uBC0D \uC5B8\uC5B4 \uC5D0\uC774\uC804\uD2B8\uB97C \uB85C\uB4DC\uD569\uB2C8\uB2E4. java.lang.instrument\uB97C \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.\n    -splash:<imagepath>\n                  \uC9C0\uC815\uB41C \uC774\uBBF8\uC9C0\uB85C \uC2A4\uD50C\uB798\uC2DC \uD654\uBA74\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    @<filepath>   \uC9C0\uC815\uB41C \uD30C\uC77C\uC5D0\uC11C \uC635\uC158\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n
 See \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 http://www.oracle.com/technetwork/java/javase/documentation/index.html\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xdiag:resolver   \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xincgc           \uC99D\uBD84\uC801\uC778 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xloggc:<file>    \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<size>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<size>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xss<size>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xprof            CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm\n                      \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module>\uC740 \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774\n                      \uB2E4\uB978 \uBAA8\uB4C8\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module>\uC740 \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774\n                      <package>\uB97C \uB2E4\uB978 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD569\uB2C8\uB2E4.\n    \
--Xpatch:<module>=<file>({0}<file>)*\n                      JAR \uD30C\uC77C/\uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n                      \uBAA8\uB4C8\uC744 \uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n    -Xdisable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n-X \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
+java.launcher.X.usage=\    -Xmixed           \uD63C\uD569 \uBAA8\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xint             \uD574\uC11D\uB41C \uBAA8\uB4DC\uB9CC \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xbootclasspath/a:<{0}(\uC73C)\uB85C \uAD6C\uBD84\uB41C \uB514\uB809\uD1A0\uB9AC \uBC0F zip/jar \uD30C\uC77C>\n                      \uBD80\uD2B8\uC2A4\uD2B8\uB7A9 \uD074\uB798\uC2A4 \uACBD\uB85C \uB05D\uC5D0 \uCD94\uAC00\uD569\uB2C8\uB2E4.\n    -Xdiag            \uCD94\uAC00 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xdiag:resolver   \uBD84\uC11D\uAE30 \uC9C4\uB2E8 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n    -Xnoclassgc       \uD074\uB798\uC2A4\uC758 \uBD88\uD544\uC694\uD55C \uC815\uBCF4 \uBAA8\uC74C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xloggc:<file>    \uC2DC\uAC04 \uAE30\uB85D\uACFC \uD568\uAED8 \uD30C\uC77C\uC5D0 GC \uC0C1\uD0DC\uB97C \uAE30\uB85D\uD569\uB2C8\uB2E4.\n    -Xbatch           \uBC31\uADF8\uB77C\uC6B4\uB4DC \uCEF4\uD30C\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xms<size>        \uCD08\uAE30 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xmx<size>        \uCD5C\uB300 Java \uD799 \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xss<size>        Java \uC2A4\uB808\uB4DC \uC2A4\uD0DD \uD06C\uAE30\uB97C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xprof            CPU \uD504\uB85C\uD30C\uC77C \uC791\uC131 \uB370\uC774\uD130\uB97C \uCD9C\uB825\uD569\uB2C8\uB2E4.\n    -Xfuture          \uBBF8\uB798 \uAE30\uBCF8\uAC12\uC744 \uC608\uCE21\uD558\uC5EC \uAC00\uC7A5 \uC5C4\uACA9\uD55C \uAC80\uC0AC\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n    -Xrs              Java/VM\uC5D0 \uC758\uD55C OS \uC2E0\uD638 \uC0AC\uC6A9\uC744 \uC904\uC785\uB2C8\uB2E4(\uC124\uBA85\uC11C \uCC38\uC870).\n    -Xcheck:jni       JNI \uD568\uC218\uC5D0 \uB300\uD55C \uCD94\uAC00 \uAC80\uC0AC\uB97C \uC218\uD589\uD569\uB2C8\uB2E4.\n    -Xshare:off       \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130 \uC0AC\uC6A9\uC744 \uC2DC\uB3C4\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n    -Xshare:auto      \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).\n    -Xshare:on        \uACF5\uC720 \uD074\uB798\uC2A4 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC744 \uACBD\uC6B0 \uC2E4\uD328\uD569\uB2C8\uB2E4.\n    -XshowSettings    \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:all\n                      \uBAA8\uB4E0 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:vm \uBAA8\uB4E0 VM \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:properties\n                      \uBAA8\uB4E0 \uC18D\uC131 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XshowSettings:locale\n                      \uBAA8\uB4E0 \uB85C\uCF00\uC77C \uAD00\uB828 \uC124\uC815\uC744 \uD45C\uC2DC\uD55C \uD6C4 \uACC4\uC18D\uD569\uB2C8\uB2E4.\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module>\uC740 \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774\n                      \uB2E4\uB978 \uBAA8\uB4C8\uC744 \uC77D\uC2B5\uB2C8\uB2E4.\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module>\uC740 \uBAA8\uB4C8 \uC120\uC5B8\uC5D0 \uAD00\uACC4\uC5C6\uC774\n                      <package>\uB97C \uB2E4\uB978 \uBAA8\uB4C8\uB85C \uC775\uC2A4\uD3EC\uD2B8\uD569\uB2C8\uB2E4.\n    -Xpatch:<module>=<file>({0}<file>)*\n                      JAR \uD30C\uC77C/\uB514\uB809\uD1A0\uB9AC\uC758 \uD074\uB798\uC2A4\uC640 \uB9AC\uC18C\uC2A4\uB85C\n                      \uBAA8\uB4C8\uC744 \
+\uBB34\uD6A8\uD654\uD558\uAC70\uB098 \uC778\uC218\uD654\uD569\uB2C8\uB2E4.\n    -Xdisable-@files  \uCD94\uAC00 \uC778\uC218 \uD30C\uC77C \uD655\uC7A5\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.\n\n-X \uC635\uC158\uC740 \uBE44\uD45C\uC900 \uC635\uC158\uC774\uBBC0\uB85C \uD1B5\uC9C0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\uB2E4\uC74C\uC740 Mac OS X\uC5D0 \uD2B9\uC815\uB41C \uC635\uC158\uC785\uB2C8\uB2E4.\n    -XstartOnFirstThread\n                      \uCCAB\uBC88\uC9F8 (AppKit) \uC2A4\uB808\uB4DC\uC5D0 main() \uBA54\uC18C\uB4DC\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n    -Xdock:name=<application name>"\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC774\uB984\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n    -Xdock:icon=<path to icon file>\n                      \uACE0\uC815\uC73C\uB85C \uD45C\uC2DC\uB41C \uAE30\uBCF8 \uC544\uC774\uCF58\uC744 \uBB34\uD6A8\uD654\uD569\uB2C8\uB2E4.\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_pt_BR.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Uso: {0} [options] class [args...]\n           (para executar uma classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (para executar um arquivo jar)\n   ou  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (para executar a classe principal em um m\u00F3dulo class in a module)\nem que as op\u00E7\u00F5es incluem:\n
+java.launcher.opt.header  =   Uso: {0} [options] class [args...]\n           (para executar uma classe)\n   ou  {0} [options] -jar jarfile [args...]\n           (para executar um arquivo jar)\n   ou  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (para executar a classe principal em um m\u00F3dulo)\nem que as op\u00E7\u00F5es incluem:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  usar um modelo de dados de {0} bits, se estiver dispon\u00EDvel\n
 java.launcher.opt.vmselect   =\    {0}\t  para selecionar a VM "{1}"\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  porque a execu\u00E7\u00E3o est\u00E1 sendo feita em uma m\u00E1quina de classe de servidor.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR,\n                  e arquivos compactados ZIP para procurar arquivos de classe.\n    -mp <caminho do m\u00F3dulo>\n    -modulepath <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos.\n    -upgrademodulepath <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  pass\u00EDveis de upgrade na imagem de runtime\n    -m <modulename> | <modulename>/<mainclass>\n                  o m\u00F3dulo inicial ou principal a ser resolvido\n    -addmods <modulename>[,<modulename>...]\n                  m\u00F3dulos raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial\n    -limitmods <modulename>[,<modulename>...]\n                  limita o universo de m\u00F3dulos observ\u00E1veis\n    -listmods[:<modulename>[,<modulename>...]]\n                  lista os m\u00F3dulos observ\u00E1veis e sai\n    -D<name>=<value>\n                  define uma propriedade de sistema\n    -verbose:[class|gc|jni]\n                  ativa sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda em op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<libname>[=<options>]\n                  carrega a biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n                  consulte tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carrega a biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carrega o agente de linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<imagepath>\n                  mostra a tela inicial com a imagem especificada\n    @<filepath>   op\u00E7\u00F5es de leitura do arquivo especificado\n
+java.launcher.opt.footer     =\    -cp <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n    -classpath <caminho de pesquisa de classe de diret\u00F3rios e arquivos zip/jar>\n                  Uma lista separada por {0} de diret\u00F3rios, arquivos compactados JAR\n                  e arquivos compactados ZIP para procurar arquivos de classe.\n    -mp <caminho do m\u00F3dulo>\n    -modulepath <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos.\n    -upgrademodulepath <caminho do m\u00F3dulo>...\n                  Uma lista separada por {0} de diret\u00F3rios, cada um\n                  sendo um diret\u00F3rio de m\u00F3dulos que substituem m\u00F3dulos\n                  pass\u00EDveis de upgrade na imagem de runtime\n    -m <modulename>[/<mainclass>]\n                  o m\u00F3dulo inicial ou principal a ser resolvido e o nome da classe principal\n                  a ser executada se n\u00E3o for especificada pelo m\u00F3dulo\n    -addmods <modulename>[,<modulename>...]\n                  m\u00F3dulos raiz a serem resolvidos al\u00E9m do m\u00F3dulo inicial\n    -limitmods <modulename>[,<modulename>...]\n                  limita o universo de m\u00F3dulos observ\u00E1veis\n    -listmods[:<modulename>[,<modulename>...]]\n                  lista os m\u00F3dulos observ\u00E1veis e sai\n    -D<name>=<value>\n                  define uma propriedade de sistema\n    -verbose:[class|gc|jni]\n                  ativa sa\u00EDda detalhada\n    -version      imprime a vers\u00E3o do produto e sai\n    -showversion  imprime a vers\u00E3o do produto e continua\n    -? -help      imprime esta mensagem de ajuda\n    -X            imprime a ajuda em op\u00E7\u00F5es n\u00E3o padronizadas\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  ativa asser\u00E7\u00F5es com granularidade especificada\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  desativa asser\u00E7\u00F5es com granularidade especificada\n    -esa | -enablesystemassertions\n                  ativa asser\u00E7\u00F5es do sistema\n    -dsa | -disablesystemassertions\n                  desativa asser\u00E7\u00F5es do sistema\n    -agentlib:<libname>[=<options>]\n                  carrega a biblioteca de agente nativo <libname>, por exemplo, -agentlib:jdwp\n                  consulte tamb\u00E9m -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  carrega a biblioteca de agente nativo por nome do caminho completo\n    -javaagent:<jarpath>[=<options>]\n                  carrega o agente de linguagem de programa\u00E7\u00E3o Java; consulte java.lang.instrument\n    -splash:<imagepath>\n                  mostra a tela inicial com a imagem especificada\n    @<filepath>   op\u00E7\u00F5es de leitura do arquivo especificado\n
 See http://www.oracle.com/technetwork/java/javase/documentation/index.html para obter mais detalhes.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (padr\u00E3o)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexos ao final do caminho de classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xdiag:resolver   mostra mensagens de diagn\u00F3stico do resolvedor\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xincgc           ativa a coleta de lixo incremental\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor padr\u00E3o futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (padr\u00E3o)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> l\u00EA outros m\u00F3dulos,\n                      n\u00E3o importando a declara\u00E7\u00E3o do m\u00F3dulo\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> exports <package> para outros m\u00F3dulos,\n                      n\u00E3o importando a declara\u00E7\u00E3o do m\u00F3dulo\n    -Xpatch:<module>=<file>({0}<file>)*\n                      Substitui ou aumenta um m\u00F3dulo com classes e recursos\n                      em arquivos JAR ou diret\u00F3rios\n    -Xdisable-@files  desativa uma expans\u00E3o adicional de arquivo de argumentos\n\nAs op\u00E7\u00F5es -X n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
+java.launcher.X.usage=\    -Xmixed           execu\u00E7\u00E3o no modo misto (padr\u00E3o)\n    -Xint             execu\u00E7\u00E3o somente no modo interpretado\n    -Xbootclasspath:<diret\u00F3rios e arquivos zip/jar separados por {0}>\n                      anexos ao final do caminho de classe de inicializa\u00E7\u00E3o\n    -Xdiag            mostra mensagens de diagn\u00F3stico adicionais\n    -Xdiag:resolver   mostra mensagens de diagn\u00F3stico do resolvedor\n    -Xnoclassgc       desativa a coleta de lixo da classe\n    -Xloggc:<arquivo>    registra o status do GC status em um arquivo com marca\u00E7\u00F5es de data e hor\u00E1rio\n    -Xbatch           desativa a compila\u00E7\u00E3o em segundo plano\n    -Xms<tamanho>        define o tamanho inicial do heap Java\n    -Xmx<tamanho>        define o tamanho m\u00E1ximo do heap Java\n    -Xss<tamanho>        define o tamanho da pilha de threads java\n    -Xprof            produz dados de perfil da cpu\n    -Xfuture          ativa verifica\u00E7\u00F5es de n\u00EDvel m\u00E1ximo de exig\u00EAncia, prevendo o valor padr\u00E3o futuro\n    -Xrs              reduz o uso de sinais do SO pelo(a) Java/VM (consulte a documenta\u00E7\u00E3o)\n    -Xcheck:jni       executa verifica\u00E7\u00F5es adicionais de fun\u00E7\u00F5es da JNI\n    -Xshare:off       n\u00E3o tenta usar dados da classe compartilhada\n    -Xshare:auto      se poss\u00EDvel, usa dados da classe compartilhada (padr\u00E3o)\n    -Xshare:on        requer o uso de dados da classe compartilhada, caso contr\u00E1rio haver\u00E1 falha.\n    -XshowSettings    mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:all\n                      mostra todas as defini\u00E7\u00F5es e continua\n    -XshowSettings:vm mostra todas as defini\u00E7\u00F5es relacionadas \u00E0 vm e continua\n    -XshowSettings:properties\n                      mostra todas as defini\u00E7\u00F5es da propriedade e continua\n    -XshowSettings:locale\n                      mostra todas as defini\u00E7\u00F5es relativas \u00E0s configura\u00E7\u00F5es regionais e continua\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> l\u00EA outros m\u00F3dulos,\n                      n\u00E3o importando a declara\u00E7\u00E3o do m\u00F3dulo\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> exporta <package> para outros m\u00F3dulos,\n                      n\u00E3o importando a declara\u00E7\u00E3o do m\u00F3dulo\n    -Xpatch:<module>=<file>({0}<file>)*\n                      Substitui ou aumenta um m\u00F3dulo com classes e recursos\n                      em arquivos JAR ou diret\u00F3rios\n    -Xdisable-@files  desativa uma expans\u00E3o adicional de arquivo de argumentos\n\nAs op\u00E7\u00F5es -X n\u00E3o s\u00E3o padronizadas e est\u00E3o sujeitas a altera\u00E7\u00F5es sem aviso.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nAs op\u00E7\u00F5es a seguir s\u00E3o espec\u00EDficas para o Mac OS X:\n    -XstartOnFirstThread\n                      executa o m\u00E9todo main() no primeiro thread (AppKit)\n    -Xdock:name=<nome do aplicativo>"\n                      substitui o nome do aplicativo padr\u00E3o exibido no encaixe\n    -Xdock:icon=<caminho para o arquivo do \u00EDcone>\n                      substitui o \u00EDcone exibido no encaixe\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_sv.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   Syntax: {0} [options] class [args...]\n           (f\u00F6r att k\u00F6ra en klass)\n   eller  {0} [options] -jar jarfile [args...]\n           (f\u00F6r att k\u00F6ra en jar-fil)\n   eller  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n
+java.launcher.opt.header  =   Syntax: {0} [options] class [args...]\n           (f\u00F6r att k\u00F6ra en klass)\n   eller  {0} [options] -jar jarfile [args...]\n           (f\u00F6r att k\u00F6ra en jar-fil)\n   eller {0} [options] -mp <moduls\u00F6kv\u00E4g> -m <modulnamn>[/<huvudklass>] [args...]\n           (f\u00F6r att k\u00F6ra huvudklassen i en modul)\nmed alternativen:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  anv\u00E4nd en {0}-bitsdatamodell om det finns\n
 java.launcher.opt.vmselect   =\    {0}\t  f\u00F6r att v\u00E4lja "{1}" VM\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  eftersom du k\u00F6r en serverklassmaskin.\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n                  och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n    -mp <module path>\n    -modulepath <module path>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje\n                  katalog \u00E4r en katalog med moduler.\n    -upgrademodulepath <module path>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje\n                  katalog \u00E4r en katalog med moduler som ers\u00E4tter\n                  uppgraderingsbara moduler i exekveringsavbilden\n    -m <modulename> | <modulename>/<mainclass>\n                  den ursprungliga modulen eller huvudmodulen att l\u00F6sa\n    -addmods <modulename>[,<modulename>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen\n    -limitmods <modulename>[,<modulename>...]\n                  begr\u00E4nsar universumet med observerbara moduler\n    -listmods[:<modulename>[,<modulename>...]]\n                  lista observerbara moduler och avsluta\n    -D<name>=<value>\n                  ange en systemegenskap\n    -verbose:[class|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion och avsluta\n    -showversion  skriv ut produktversion och forts\u00E4tt\n    -? -help      skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n    -X            skriv ut f\u00F6r icke-standardalternativ\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<libname>[=<options>]\n                  ladda det ursprungliga agentbiblioteket <libname>, exempel: -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jarpath>[=<options>]\n                  ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n    -splash:<imagepath>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n    @<filepath>   l\u00E4s alternativ fr\u00E5n den angivna filen\n
+java.launcher.opt.footer     =\    -cp <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n    -classpath <klass\u00F6kv\u00E4g till kataloger och zip-/jar-filer>\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, JAR-arkiv\n                  och ZIP-arkiv att s\u00F6ka efter klassfiler i.\n    -mp <moduls\u00F6kv\u00E4g>\n    -modulepath <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje\n                  katalog \u00E4r en katalog med moduler.\n    -upgrademodulepath <moduls\u00F6kv\u00E4g>...\n                  En {0}-avgr\u00E4nsad lista \u00F6ver kataloger, d\u00E4r varje\n                  katalog \u00E4r en katalog med moduler som ers\u00E4tter\n                  uppgraderingsbara moduler i exekveringsavbilden\n    -m <modulnamn>[/<huvudklass>]\n                  den ursprungliga modulen att k\u00F6ra, och namnet p\u00E5\n                  huvudklassen att k\u00F6ra om den inte anges av modulen\n    -addmods <modulnamn>[,<modulnamn>...]\n                  rotmoduler att l\u00F6sa f\u00F6rutom den ursprungliga modulen\n    -limitmods <modulnamn>[,<modulnamn>...]\n                  begr\u00E4nsar universumet med observerbara moduler\n    -listmods[:<modulnamn>[,<modulnamn>...]]\n                  lista observerbara moduler och avsluta\n    -D<namn>=<v\u00E4rde>\n                  ange en systemegenskap\n    -verbose:[class|gc|jni]\n                  aktivera utf\u00F6rliga utdata\n    -version      skriv ut produktversion och avsluta\n    -showversion  skriv ut produktversion och forts\u00E4tt\n    -? -help      skriv ut det h\u00E4r hj\u00E4lpmeddelandet\n    -X            skriv ut hj\u00E4lp f\u00F6r icke-standardalternativ\n    -ea[:<paketnamn>...|:<klassnamn>]\n    -enableassertions[:<paketnamn>...|:<klassnamn>]\n                  aktivera verifieringar med den angivna detaljgraden\n    -da[:<paketnamn>...|:<klassnamn>]\n    -disableassertions[:<paketnamn>...|:<klassnamn>]\n                  avaktivera verifieringar med den angivna detaljgraden\n    -esa | -enablesystemassertions\n                  aktivera systemverifieringar\n    -dsa | -disablesystemassertions\n                  avaktivera systemverifieringar\n    -agentlib:<biblioteksnamn>[=<alternativnamn>]\n                  ladda det ursprungliga agentbiblioteket <biblioteksnamn>, exempel: -agentlib:jdwp\n                  se \u00E4ven -agentlib:jdwp=help\n    -agentpath:<s\u00F6kv\u00E4gsnamn>[=<alternativ>]\n                  ladda det ursprungliga agentbiblioteket med fullst\u00E4ndigt s\u00F6kv\u00E4gsnamn\n    -javaagent:<jar-s\u00F6kv\u00E4g>[=<alternativ>]\n                  ladda agenten f\u00F6r programmeringsspr\u00E5ket Java, se java.lang.instrument\n    -splash:<bilds\u00F6kv\u00E4g>\n                  visa v\u00E4lkomstsk\u00E4rmen med den angivna bilden\n    @<fils\u00F6kv\u00E4g>   l\u00E4s alternativ fr\u00E5n den angivna filen\n
 See Se http://www.oracle.com/technetwork/java/javase/documentation/index.html f\u00F6r mer information.
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xbootclasspath/a:<directories and zip/jar files separated by {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xdiag:resolver   visa diagnostiska meddelanden f\u00F6r matchning\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xincgc           aktivera inkrementell skr\u00E4pinsamling\n    -Xloggc:<file>    logga GC-status till en fil med tidsst\u00E4mplar\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xms<size>        ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<size>        ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xss<size>        ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xprof            utdata f\u00F6r processorprofilering\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> l\u00E4ser andra moduler,\n                      oavsett moduldeklarationen\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> exporterar <package> till andra moduler,\n                      oavsett moduldeklarationen\n    -Xpatch:<module>=<file>({0}<file>)*\n                      \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger\n    -Xdisable-@files  avaktivera framtida argumentfilsut\u00F6kning\n\n-X-alternativen \u00E4r inte standard och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
+java.launcher.X.usage=\    -Xmixed           exekvering i blandat l\u00E4ge (standard)\n    -Xint             endast exekvering i tolkat l\u00E4ge\n    -Xbootclasspath/a:<kataloger och zip-/jar-filer avgr\u00E4nsade med {0}>\n                      l\u00E4gg till sist i klass\u00F6kv\u00E4gen f\u00F6r programladdning\n    -Xdiag            visa fler diagnostiska meddelanden\n    -Xdiag:resolver   visa diagnostiska meddelanden f\u00F6r matchning\n    -Xnoclassgc       avaktivera klasskr\u00E4pinsamling\n    -Xloggc:<fil>    logga GC-status till en fil med tidsst\u00E4mplar\n    -Xbatch           avaktivera bakgrundskompilering\n    -Xms<storlek>        ange ursprunglig storlek f\u00F6r Java-heap-utrymmet\n    -Xmx<storlek>        ange st\u00F6rsta storlek f\u00F6r Java-heap-utrymmet\n    -Xss<storlek>        ange storlek f\u00F6r java-tr\u00E5dsstacken\n    -Xprof            utdata f\u00F6r processorprofilering\n    -Xfuture          aktivera str\u00E4ngaste kontroller, f\u00F6rv\u00E4ntad framtida standard\n    -Xrs              minska operativsystemssignalanv\u00E4ndning f\u00F6r Java/VM (se dokumentationen)\n    -Xcheck:jni       utf\u00F6r fler kontroller f\u00F6r JNI-funktioner\n    -Xshare:off       f\u00F6rs\u00F6k inte anv\u00E4nda delade klassdata\n    -Xshare:auto      anv\u00E4nd delade klassdata om m\u00F6jligt (standard)\n    -Xshare:on        kr\u00E4v anv\u00E4ndning av delade klassdata, utf\u00F6r inte i annat fall.\n    -XshowSettings    visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:all\n                      visa alla inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:vm visa alla vm-relaterade inst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:properties\n                      visa alla egenskapsinst\u00E4llningar och forts\u00E4tt\n    -XshowSettings:locale\n                      visa alla spr\u00E5kkonventionsrelaterade inst\u00E4llningar och forts\u00E4tt\n    -XaddReads:<modul>=<annan modul>(,<annan modul>)*\n                      <modul> l\u00E4ser andra moduler,\n                      oavsett moduldeklarationen\n    -XaddExports:<modul>/<paket>=<annan modul>(,<annan modul>)*\n                      <modul> exporterar <packet> till andra moduler,\n                      oavsett moduldeklarationen\n    -Xpatch:<modul>=<fil>({0}<fil>)*\n                      \u00C5sidos\u00E4tt eller ut\u00F6ka en modul med klasser och resurser\n                      i JAR-filer eller kataloger\n    -Xdisable-@files  avaktivera framtida argumentfilsut\u00F6kning\n\n-X-alternativen \u00E4r inte standard och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande.\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\nF\u00F6ljande alternativ \u00E4r specifika f\u00F6r Mac OS X:\n    -XstartOnFirstThread\n                      k\u00F6r huvudmetoden() p\u00E5 den f\u00F6rsta (AppKit) tr\u00E5den\n    -Xdock:name=<application name>"\n                      \u00E5sidosatt standardapplikationsnamn visas i docka\n    -Xdock:icon=<path to icon file>\n                      \u00E5sidosatt standardikon visas i docka\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_CN.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] class [args...]\n           (\u6267\u884C\u7C7B)\n   or  {0} [options] -jar jarfile [args...]\n           (\u6267\u884C jar \u6587\u4EF6)\n   or  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D options \u5305\u62EC:\n
+java.launcher.opt.header  =   \u7528\u6CD5:  {0} [options] class [args...]\n           (\u6267\u884C\u7C7B)\n   \u6216  {0} [options] -jar jarfile [args...]\n           (\u6267\u884C jar \u6587\u4EF6)\n   \u6216  {0} [options] -mp <\u6A21\u5757\u8DEF\u5F84> -m <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>] [args...]\n           (\u6267\u884C\u6A21\u5757\u4E2D\u7684\u4E3B\u7C7B)\n\u5176\u4E2D\u9009\u9879\u5305\u62EC:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u4F7F\u7528 {0} \u4F4D\u6570\u636E\u6A21\u578B (\u5982\u679C\u53EF\u7528)\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9009\u62E9 "{1}" VM\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  \u56E0\u4E3A\u60A8\u662F\u5728\u670D\u52A1\u5668\u7C7B\u8BA1\u7B97\u673A\u4E0A\u8FD0\u884C\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n    -mp <\u6A21\u5757\u8DEF\u5F84>\n    -modulepath <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    -upgrademodulepath <module path>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    -m <modulename> | <modulename>/<mainclass>\n                  \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757\u6216\u4E3B\u6A21\u5757\n    -addmods <modulename>[,<modulename>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\n    -limitmods <modulename>[,<modulename>...]\n                  \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    -D<name>=<value>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n    -showversion  \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n    -? -help      \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n    -X            \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u7981\u7528\u5177\u6709\u6307\u5B9A\u7C92\u5EA6\u7684\u65AD\u8A00\n    -esa | -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | -disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<libname>[=<options>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <libname>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jarpath>[=<options>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<imagepath>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n    @<filepath>   \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n
+java.launcher.opt.footer     =\    -cp <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n    -classpath <\u76EE\u5F55\u548C zip/jar \u6587\u4EF6\u7684\u7C7B\u641C\u7D22\u8DEF\u5F84>\n                  \u7528\u4E8E\u641C\u7D22\u7C7B\u6587\u4EF6\u7684\u76EE\u5F55, JAR \u6863\u6848\n                  \u548C ZIP \u6863\u6848\u7684\u5217\u8868, \u4F7F\u7528 {0} \u5206\u9694\u3002\n    -mp <\u6A21\u5757\u8DEF\u5F84>\n    -modulepath <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55\u3002\n    -upgrademodulepath <\u6A21\u5757\u8DEF\u5F84>...\n                  \u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u5217\u8868, \u6BCF\u4E2A\u76EE\u5F55\n                  \u90FD\u662F\u4E00\u4E2A\u5305\u542B\u6A21\u5757\u7684\u76EE\u5F55, \u8FD9\u4E9B\u6A21\u5757\n                  \u7528\u4E8E\u66FF\u6362\u8FD0\u884C\u65F6\u6620\u50CF\u4E2D\u7684\u53EF\u5347\u7EA7\u6A21\u5757\n    -m <\u6A21\u5757\u540D\u79F0>[/<\u4E3B\u7C7B>]\n                  \u8981\u89E3\u6790\u7684\u521D\u59CB\u6A21\u5757, \u4EE5\u53CA\u5728\u672A\u7531\u6A21\u5757\u6307\u5B9A\u65F6\n                  \u8981\u6267\u884C\u7684\u4E3B\u7C7B\u540D\u79F0\n    -addmods <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9664\u4E86\u521D\u59CB\u6A21\u5757\u4E4B\u5916\u8981\u89E3\u6790\u7684\u6839\u6A21\u5757\n    -limitmods <\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]\n                  \u9650\u5236\u53EF\u89C2\u5BDF\u6A21\u5757\u7684\u9886\u57DF\n    -listmods[:<\u6A21\u5757\u540D\u79F0>[,<\u6A21\u5757\u540D\u79F0>...]]\n                  \u5217\u51FA\u53EF\u89C2\u5BDF\u6A21\u5757\u5E76\u9000\u51FA\n    -D<\u540D\u79F0>=<\u503C>\n                  \u8BBE\u7F6E\u7CFB\u7EDF\u5C5E\u6027\n    -verbose:[class|gc|jni]\n                  \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n    -version      \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u9000\u51FA\n    -showversion  \u8F93\u51FA\u4EA7\u54C1\u7248\u672C\u5E76\u7EE7\u7EED\n    -? -help      \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\n    -X            \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u5E2E\u52A9\n    -ea[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n    -enableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u6309\u6307\u5B9A\u7684\u7C92\u5EA6\u542F\u7528\u65AD\u8A00\n    -da[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7A0B\u5E8F\u5305\u540D\u79F0>]\n    -disableassertions[:<\u7A0B\u5E8F\u5305\u540D\u79F0>...|:<\u7C7B\u540D>]\n                  \u7981\u7528\u5177\u6709\u6307\u5B9A\u7C92\u5EA6\u7684\u65AD\u8A00\n    -esa | -enablesystemassertions\n                  \u542F\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -dsa | -disablesystemassertions\n                  \u7981\u7528\u7CFB\u7EDF\u65AD\u8A00\n    -agentlib:<\u5E93\u540D>[=<\u9009\u9879>]\n                  \u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93 <\u5E93\u540D>, \u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8BF7\u53C2\u9605 -agentlib:jdwp=help\n    -agentpath:<\u8DEF\u5F84\u540D>[=<\u9009\u9879>]\n                  \u6309\u5B8C\u6574\u8DEF\u5F84\u540D\u52A0\u8F7D\u672C\u673A\u4EE3\u7406\u5E93\n    -javaagent:<jar \u8DEF\u5F84>[=<\u9009\u9879>]\n                  \u52A0\u8F7D Java \u7F16\u7A0B\u8BED\u8A00\u4EE3\u7406, \u8BF7\u53C2\u9605 java.lang.instrument\n    -splash:<\u56FE\u50CF\u8DEF\u5F84>\n                  \u4F7F\u7528\u6307\u5B9A\u7684\u56FE\u50CF\u663E\u793A\u542F\u52A8\u5C4F\u5E55\n    @<\u6587\u4EF6\u8DEF\u5F84>   \u4ECE\u6307\u5B9A\u6587\u4EF6\u4E2D\u8BFB\u53D6\u9009\u9879\n
 See \u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605 http://www.oracle.com/technetwork/java/javase/documentation/index.html\u3002
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xdiag:resolver   \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xincgc           \u542F\u7528\u589E\u91CF\u5783\u573E\u6536\u96C6\n    -Xloggc:<file>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xms<size>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<size>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xss<size>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xprof            \u8F93\u51FA cpu \u5206\u6790\u6570\u636E\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      <module> \u8BFB\u53D6\u5176\u4ED6\u6A21\u5757,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      <module> \u5C06 <package> \u5BFC\u51FA\u5230\u5176\u4ED6\u6A21\u5757,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\n    -Xpatch:<module>=<file>({0}<file>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\n    -Xdisable-@files  \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n-X \u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u6267\u884C (\u9ED8\u8BA4\u503C)\n    -Xint             \u4EC5\u89E3\u91CA\u6A21\u5F0F\u6267\u884C\n    -Xbootclasspath/a:<\u7528 {0} \u5206\u9694\u7684\u76EE\u5F55\u548C zip/jar \u6587\u4EF6>\n                      \u9644\u52A0\u5728\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u672B\u5C3E\n    -Xdiag            \u663E\u793A\u9644\u52A0\u8BCA\u65AD\u6D88\u606F\n    -Xdiag:resolver   \u663E\u793A\u89E3\u6790\u5668\u8BCA\u65AD\u6D88\u606F\n    -Xnoclassgc       \u7981\u7528\u7C7B\u5783\u573E\u6536\u96C6\n    -Xloggc:<\u6587\u4EF6>    \u5C06 GC \u72B6\u6001\u8BB0\u5F55\u5728\u6587\u4EF6\u4E2D (\u5E26\u65F6\u95F4\u6233)\n    -Xbatch           \u7981\u7528\u540E\u53F0\u7F16\u8BD1\n    -Xms<\u5927\u5C0F>        \u8BBE\u7F6E\u521D\u59CB Java \u5806\u5927\u5C0F\n    -Xmx<\u5927\u5C0F>        \u8BBE\u7F6E\u6700\u5927 Java \u5806\u5927\u5C0F\n    -Xss<\u5927\u5C0F>        \u8BBE\u7F6E Java \u7EBF\u7A0B\u5806\u6808\u5927\u5C0F\n    -Xprof            \u8F93\u51FA cpu \u5206\u6790\u6570\u636E\n    -Xfuture          \u542F\u7528\u6700\u4E25\u683C\u7684\u68C0\u67E5, \u9884\u671F\u5C06\u6765\u7684\u9ED8\u8BA4\u503C\n    -Xrs              \u51CF\u5C11 Java/VM \u5BF9\u64CD\u4F5C\u7CFB\u7EDF\u4FE1\u53F7\u7684\u4F7F\u7528 (\u8BF7\u53C2\u9605\u6587\u6863)\n    -Xcheck:jni       \u5BF9 JNI \u51FD\u6570\u6267\u884C\u5176\u4ED6\u68C0\u67E5\n    -Xshare:off       \u4E0D\u5C1D\u8BD5\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E\n    -Xshare:auto      \u5728\u53EF\u80FD\u7684\u60C5\u51B5\u4E0B\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E (\u9ED8\u8BA4\u503C)\n    -Xshare:on        \u8981\u6C42\u4F7F\u7528\u5171\u4EAB\u7C7B\u6570\u636E, \u5426\u5219\u5C06\u5931\u8D25\u3002\n    -XshowSettings    \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:all\n                      \u663E\u793A\u6240\u6709\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:vm \u663E\u793A\u6240\u6709\u4E0E vm \u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:properties\n                      \u663E\u793A\u6240\u6709\u5C5E\u6027\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XshowSettings:locale\n                      \u663E\u793A\u6240\u6709\u4E0E\u533A\u57DF\u8BBE\u7F6E\u76F8\u5173\u7684\u8BBE\u7F6E\u5E76\u7EE7\u7EED\n    -XaddReads:<\u6A21\u5757>=<\u5176\u4ED6\u6A21\u5757>(,<\u5176\u4ED6\u6A21\u5757>)*\n                      <\u6A21\u5757> \u8BFB\u53D6\u5176\u4ED6\u6A21\u5757,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\n    -XaddExports:<\u6A21\u5757>/<\u7A0B\u5E8F\u5305>=<\u5176\u4ED6\u6A21\u5757>(,<\u5176\u4ED6\u6A21\u5757>)*\n                      <\u6A21\u5757> \u5C06 <\u7A0B\u5E8F\u5305> \u5BFC\u51FA\u5230\u5176\u4ED6\u6A21\u5757,\n                      \u800C\u65E0\u8BBA\u6A21\u5757\u58F0\u660E\u5982\u4F55\n    -Xpatch:<\u6A21\u5757>=<\u6587\u4EF6>({0}<\u6587\u4EF6>)*\n                      \u4F7F\u7528 JAR \u6587\u4EF6\u6216\u76EE\u5F55\u4E2D\u7684\u7C7B\u548C\u8D44\u6E90\n                      \u8986\u76D6\u6216\u589E\u5F3A\u6A21\u5757\n    -Xdisable-@files  \u7981\u6B62\u8FDB\u4E00\u6B65\u6269\u5C55\u53C2\u6570\u6587\u4EF6\n\n-X \u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4EE5\u4E0B\u9009\u9879\u4E3A Mac OS X \u7279\u5B9A\u7684\u9009\u9879:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u4E2A (AppKit) \u7EBF\u7A0B\u4E0A\u8FD0\u884C main() \u65B9\u6CD5\n    -Xdock:name=<\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0>"\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u5E94\u7528\u7A0B\u5E8F\u540D\u79F0\n    -Xdock:icon=<\u56FE\u6807\u6587\u4EF6\u7684\u8DEF\u5F84>\n                      \u8986\u76D6\u505C\u9760\u680F\u4E2D\u663E\u793A\u7684\u9ED8\u8BA4\u56FE\u6807\n\n
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher_zh_TW.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -24,7 +24,7 @@
 #
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] class [args...]\n           (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n   \u6216  {0} [options] -jar jarfile [args...]\n           (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n   \u6216  {0} [-options] -mp <modulepath> -m <modulename> | <modulename>/<mainclass>\n           (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n
+java.launcher.opt.header  =   \u7528\u6CD5: {0} [options] class [args...]\n           (\u7528\u65BC\u57F7\u884C\u985E\u5225)\n   \u6216  {0} [options] -jar jarfile [args...]\n           (\u7528\u65BC\u57F7\u884C jar \u6A94\u6848)\n   \u6216  {0} [options] -mp <modulepath> -m <modulename>[/<mainclass>] [args...]\n           (\u7528\u65BC\u57F7\u884C\u6A21\u7D44\u4E2D\u7684\u4E3B\u8981\u985E\u5225)\n\u5176\u4E2D\u7684\u9078\u9805\u5305\u62EC:\n
 
 java.launcher.opt.datamodel  =\    -d{0}\t  \u4F7F\u7528 {0} \u4F4D\u5143\u8CC7\u6599\u6A21\u578B (\u5982\u679C\u6709\u7684\u8A71)\n
 java.launcher.opt.vmselect   =\    {0}\t  \u9078\u53D6 "{1}" VM\n
@@ -34,11 +34,11 @@
 java.launcher.ergo.message2  =\                  \u56E0\u70BA\u60A8\u6B63\u5728\u4F3A\u670D\u5668\u985E\u5225\u6A5F\u5668\u4E0A\u57F7\u884C\u3002\n
 
 # Translators please note do not translate the options themselves
-java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  \u4F7F\u7528\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001JAR \u5B58\u6A94\u4EE5\u53CA\n                  ZIP \u5B58\u6A94\u6E05\u55AE\u4F86\u641C\u5C0B\u985E\u5225\u6A94\u6848\u3002\n    -mp <module path>\n    -modulepath <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u5747\u70BA\u6A21\u7D44\u76EE\u9304\u3002\n    -upgrademodulepath <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u5747\u70BA\u6A21\u7D44\u76EE\u9304\uFF0C\u4E14\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n                  \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n    -m <modulename> | <modulename>/<mainclass>\n                  \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6216\u4E3B\u8981\u6A21\u7D44\n    -addmods <modulename>[,<modulename>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\n    -limitmods <modulename>[,<modulename>...]\n                  \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n    -verbose:[class|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version     \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n    -? -help      \u5217\u5370\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n                  \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                   \u4EE5\u6307\u5B9A\u5F71\u50CF\u986F\u793A\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n    @<filepath>   \u5F9E\u6307\u5B9A\u6A94\u6848\u8B80\u53D6\u9078\u9805\n
+java.launcher.opt.footer     =\    -cp <class search path of directories and zip/jar files>\n    -classpath <class search path of directories and zip/jar files>\n                  \u7528\u4F86\u641C\u5C0B\u985E\u5225\u6A94\u6848\u4E4B\u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u3001\n                  JAR \u5B58\u6A94\u4EE5\u53CA ZIP \u5B58\u6A94\u6E05\u55AE\u3002\n    -mp <module path>\n    -modulepath <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u5747\u70BA\u6A21\u7D44\u76EE\u9304\u3002\n    -upgrademodulepath <module path>...\n                  \u4EE5 {0} \u5340\u9694\u7684\u76EE\u9304\u6E05\u55AE\uFF0C\u6BCF\u500B\u76EE\u9304\n                  \u5747\u70BA\u6A21\u7D44\u76EE\u9304\uFF0C\u4E14\u7576\u4E2D\u7684\u6A21\u7D44\u53EF\u53D6\u4EE3\n                  \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5F71\u50CF\u4E2D\u7684\u53EF\u5347\u7D1A\u6A21\u7D44\n    -m <modulename>[/<mainclass>]\n                  \u8981\u89E3\u6790\u7684\u8D77\u59CB\u6A21\u7D44, \u4EE5\u53CA\u6A21\u7D44\u672A\u6307\u5B9A\u6642\n                  \u6240\u8981\u57F7\u884C\u7684\u4E3B\u8981\u985E\u5225\u540D\u7A31\n    -addmods <modulename>[,<modulename>...]\n                  \u9664\u4E86\u8D77\u59CB\u6A21\u7D44\u5916\uFF0C\u8981\u89E3\u6790\u7684\u6839\u6A21\u7D44\n    -limitmods <modulename>[,<modulename>...]\n                  \u9650\u5236\u53EF\u76E3\u6E2C\u6A21\u7D44\u7684\u7BC4\u570D\n    -listmods[:<modulename>[,<modulename>...]]\n                  \u5217\u51FA\u53EF\u76E3\u6E2C\u6A21\u7D44\u4E26\u7D50\u675F\n    -D<name>=<value>\n                  \u8A2D\u5B9A\u7CFB\u7D71\u5C6C\u6027\n    -verbose:[class|gc|jni]\n                  \u555F\u7528\u8A73\u7D30\u8CC7\u8A0A\u8F38\u51FA\n    -version     \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7D50\u675F\n    -showversion  \u5217\u5370\u7522\u54C1\u7248\u672C\u4E26\u7E7C\u7E8C\n    -? -help      \u5217\u5370\u6B64\u8AAA\u660E\u8A0A\u606F\n    -X            \u5217\u5370\u975E\u6A19\u6E96\u9078\u9805\u7684\u8AAA\u660E\n    -ea[:<packagename>...|:<classname>]\n    -enableassertions[:<packagename>...|:<classname>]\n                  \u555F\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -da[:<packagename>...|:<classname>]\n    -disableassertions[:<packagename>...|:<classname>]\n                  \u505C\u7528\u542B\u6307\u5B9A\u8A73\u7D30\u7A0B\u5EA6\u7684\u5BA3\u544A\n    -esa | -enablesystemassertions\n                  \u555F\u7528\u7CFB\u7D71\u5BA3\u544A\n    -dsa | -disablesystemassertions\n                  \u505C\u7528\u7CFB\u7D71\u5BA3\u544A\n    -agentlib:<libname>[=<options>]\n                  \u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB <libname>\uFF0C\u4F8B\u5982 -agentlib:jdwp\n                  \u53E6\u8ACB\u53C3\u95B1 -agentlib:jdwp=help\n    -agentpath:<pathname>[=<options>]\n                  \u4F7F\u7528\u5B8C\u6574\u8DEF\u5F91\u540D\u7A31\u8F09\u5165\u539F\u751F\u4EE3\u7406\u7A0B\u5F0F\u7A0B\u5F0F\u5EAB\n    -javaagent:<jarpath>[=<options>]\n                  \u8F09\u5165 Java \u7A0B\u5F0F\u8A9E\u8A00\u4EE3\u7406\u7A0B\u5F0F\uFF0C\u8ACB\u53C3\u95B1 java.lang.instrument\n    -splash:<imagepath>\n                   \u4EE5\u6307\u5B9A\u5F71\u50CF\u986F\u793A\u8EDF\u9AD4\u8CC7\u8A0A\u756B\u9762\n    @<filepath>   \u5F9E\u6307\u5B9A\u6A94\u6848\u8B80\u53D6\u9078\u9805\n
 See \u8ACB\u53C3\u95B1 http://www.oracle.com/technetwork/java/javase/documentation/index.html \u66B8\u89E3\u8A73\u7D30\u8CC7\u8A0A\u3002
 
 # Translators please note do not translate the options themselves
-java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xbootclasspath/a:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n                      \u9644\u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xdiag            \u986F\u793A\u5176\u4ED6\u7684\u8A3A\u65B7\u8A0A\u606F\n    -Xdiag:resolver   \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xincgc           \u555F\u7528\u6F38\u9032\u8CC7\u6E90\u56DE\u6536\n    -Xloggc:<file>    \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xprof            \u8F38\u51FA CPU \u5206\u6790\u8CC7\u6599\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xcheck:jni       \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:auto      \u5118\u53EF\u80FD\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\n                      <module> \u6703\u8B80\u53D6\u5176\u4ED6\u6A21\u7D44\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C<module> \u6703\u5C07 <package>\n                      \u532F\u51FA\u81F3\u5176\u4ED6\u6A21\u7D44\n    -Xpatch:<module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\u7684\n                      \u6A21\u7D44\u985E\u578B\u548C\u8CC7\u6E90\n    -Xdisable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n-X  \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
+java.launcher.X.usage=\    -Xmixed           \u6DF7\u5408\u6A21\u5F0F\u57F7\u884C (\u9810\u8A2D)\n    -Xint             \u50C5\u9650\u89E3\u8B6F\u6A21\u5F0F\u57F7\u884C\n    -Xbootclasspath/a:<\u4EE5 {0} \u5206\u9694\u7684\u76EE\u9304\u548C zip/jar \u6A94\u6848>\n                      \u9644\u52A0\u5728\u555F\u52D5\u5B89\u88DD\u985E\u5225\u8DEF\u5F91\u7684\u7D50\u5C3E\n    -Xdiag            \u986F\u793A\u5176\u4ED6\u7684\u8A3A\u65B7\u8A0A\u606F\n    -Xdiag:resolver   \u986F\u793A\u89E3\u6790\u5668\u8A3A\u65B7\u8A0A\u606F\n    -Xnoclassgc       \u505C\u7528\u985E\u5225\u8CC7\u6E90\u56DE\u6536\n    -Xloggc:<file>    \u5C07 GC \u72C0\u614B\u548C\u6642\u6233\u8A18\u9304\u81F3\u6A94\u6848\n    -Xbatch           \u505C\u7528\u80CC\u666F\u7DE8\u8B6F\n    -Xms<size>        \u8A2D\u5B9A\u8D77\u59CB Java \u5806\u96C6\u5927\u5C0F\n    -Xmx<size>        \u8A2D\u5B9A Java \u5806\u96C6\u5927\u5C0F\u4E0A\u9650\n    -Xss<size>        \u8A2D\u5B9A Java \u57F7\u884C\u7DD2\u5806\u758A\u5927\u5C0F\n    -Xprof            \u8F38\u51FA CPU \u5206\u6790\u8CC7\u6599\n    -Xfuture          \u555F\u7528\u6700\u56B4\u683C\u7684\u6AA2\u67E5\uFF0C\u9810\u5148\u4F5C\u70BA\u5C07\u4F86\u7684\u9810\u8A2D\n    -Xrs              \u6E1B\u5C11 Java/VM \u4F7F\u7528\u4F5C\u696D\u7CFB\u7D71\u4FE1\u865F (\u8ACB\u53C3\u95B1\u6587\u4EF6)\n    -Xcheck:jni       \u57F7\u884C\u5176\u4ED6\u7684 JNI \u51FD\u6578\u6AA2\u67E5\n    -Xshare:off       \u4E0D\u5617\u8A66\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\n    -Xshare:auto      \u5118\u53EF\u80FD\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599 (\u9810\u8A2D)\n    -Xshare:on        \u9700\u8981\u4F7F\u7528\u5171\u7528\u985E\u5225\u8CC7\u6599\uFF0C\u5426\u5247\u5931\u6557\u3002\n    -XshowSettings    \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:all\n                      \u986F\u793A\u6240\u6709\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:vm \u986F\u793A\u6240\u6709 VM \u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:properties\n                      \u986F\u793A\u6240\u6709\u5C6C\u6027\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XshowSettings:locale\n                      \u986F\u793A\u6240\u6709\u5730\u5340\u8A2D\u5B9A\u76F8\u95DC\u8A2D\u5B9A\u503C\u4E26\u7E7C\u7E8C\n    -XaddReads:<module>=<other-module>(,<other-module>)*\n                      \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C\n                      <module> \u6703\u8B80\u53D6\u5176\u4ED6\u6A21\u7D44\n    -XaddExports:<module>/<package>=<other-module>(,<other-module>)*\n                      \u7121\u8AD6\u6A21\u7D44\u5BA3\u544A\u70BA\u4F55\uFF0C<module> \u6703\u5C07 <package>\n                      \u532F\u51FA\u81F3\u5176\u4ED6\u6A21\u7D44\n    -Xpatch:<module>=<file>({0}<file>)*\n                      \u8986\u5BEB\u6216\u52A0\u5F37 JAR \u6A94\u6848\u6216\u76EE\u9304\u4E2D\u7684\n                      \u6A21\u7D44\u985E\u578B\u548C\u8CC7\u6E90\n    -Xdisable-@files  \u505C\u7528\u9032\u4E00\u6B65\u7684\u5F15\u6578\u6A94\u6848\u64F4\u5145\n\n-X  \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002\n
 
 # Translators please note do not translate the options themselves
 java.launcher.X.macosx.usage=\n\u4E0B\u5217\u662F Mac OS X \u7279\u5B9A\u9078\u9805:\n    -XstartOnFirstThread\n                      \u5728\u7B2C\u4E00\u500B (AppKit) \u57F7\u884C\u7DD2\u57F7\u884C main() \u65B9\u6CD5\n    -Xdock:name=<application name>"\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u61C9\u7528\u7A0B\u5F0F\u540D\u7A31\n    -Xdock:icon=<path to icon file>\n                      \u8986\u5BEB\u7D50\u5408\u8AAA\u660E\u756B\u9762\u4E2D\u986F\u793A\u7684\u9810\u8A2D\u5716\u793A\n\n
--- a/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -351,11 +351,14 @@
             new LinkedHashMap<>();
         for (TypeAnnotation t : typeAnnos) {
             Annotation a = t.getAnnotation();
-            Class<? extends Annotation> klass = a.annotationType();
-            AnnotationType type = AnnotationType.getInstance(klass);
-            if (type.retention() == RetentionPolicy.RUNTIME)
-                if (result.put(klass, a) != null)
+            if (a != null) {
+                Class<? extends Annotation> klass = a.annotationType();
+                AnnotationType type = AnnotationType.getInstance(klass);
+                if (type.retention() == RetentionPolicy.RUNTIME &&
+                    result.put(klass, a) != null) {
                     throw new AnnotationFormatError("Duplicate annotation for class: "+klass+": " + a);
+                }
+            }
         }
         return result;
     }
--- a/jdk/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/AbstractDrbg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -377,11 +377,12 @@
 
             instantiateIfNecessary(null);
 
-            // Step 7: Auto reseed
+            // Step 7: Auto reseed (reseedCounter might overflow)
             // Double checked locking, safe because reseedCounter is volatile
-            if (reseedCounter > reseedInterval || pr) {
+            if (reseedCounter < 0 || reseedCounter > reseedInterval || pr) {
                 synchronized (this) {
-                    if (reseedCounter > reseedInterval || pr) {
+                    if (reseedCounter < 0 || reseedCounter > reseedInterval
+                            || pr) {
                         reseedAlgorithm(getEntropyInput(pr), ai);
                         ai = null;
                     }
--- a/jdk/src/java.base/share/classes/sun/security/provider/AbstractHashDrbg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/AbstractHashDrbg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,7 +27,8 @@
 
 import sun.security.util.HexDumpEncoder;
 
-import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Locale;
 
 public abstract class AbstractHashDrbg extends AbstractDrbg {
@@ -113,16 +114,13 @@
         // 800-90Ar1 10.1.2.3: Hmac_DRBG Instantiate Process.
 
         // Step 1: entropy_input || nonce || personalization_string.
-        byte[] seed = Arrays.copyOf(entropy, entropy.length + nonce.length +
-                ((personalizationString == null) ? 0
-                        : personalizationString.length));
-        System.arraycopy(nonce, 0, seed, entropy.length, nonce.length);
+        List<byte[]> inputs = new ArrayList<>(3);
+        inputs.add(entropy);
+        inputs.add(nonce);
         if (personalizationString != null) {
-            System.arraycopy(personalizationString, 0,
-                    seed, entropy.length + nonce.length,
-                    personalizationString.length);
+            inputs.add(personalizationString);
         }
-        hashReseedInternal(seed);
+        hashReseedInternal(inputs);
     }
 
     @Override
@@ -140,13 +138,17 @@
         // 800-90Ar1 10.1.2.4: Hmac_DRBG Reseed Process.
 
         // Step 1: entropy_input || additional_input.
+        List<byte[]> inputs = new ArrayList<>(2);
+        inputs.add(ei);
         if (additionalInput != null) {
-            ei = Arrays.copyOf(ei, ei.length + additionalInput.length);
-            System.arraycopy(additionalInput, 0, ei,
-                    ei.length - additionalInput.length, additionalInput.length);
+            inputs.add(additionalInput);
         }
-        hashReseedInternal(ei);
+        hashReseedInternal(inputs);
     }
 
-    protected abstract void hashReseedInternal(byte[] seed);
+    /**
+     * Operates on multiple inputs.
+     * @param inputs not null, each element neither null
+     */
+    protected abstract void hashReseedInternal(List<byte[]> inputs);
 }
--- a/jdk/src/java.base/share/classes/sun/security/provider/CtrDrbg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/CtrDrbg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -242,6 +242,11 @@
             if (personalizationString == null) {
                 more = nonce;
             } else {
+                if (nonce.length + personalizationString.length < 0) {
+                    // Length must be represented as a 32 bit integer in df()
+                    throw new IllegalArgumentException(
+                            "nonce plus personalization string is too long");
+                }
                 more = Arrays.copyOf(
                         nonce, nonce.length + personalizationString.length);
                 System.arraycopy(personalizationString, 0, more, nonce.length,
@@ -256,50 +261,73 @@
         reseedAlgorithm(ei, more);
     }
 
+    /**
+     * Block_cipher_df in 10.3.2
+     *
+     * @param input the input string
+     * @return the output block (always of seedLen)
+     */
     private byte[] df(byte[] input) {
+        // 800-90Ar1 10.3.2
+        // 2. L = len (input_string)/8
         int l = input.length;
+        // 3. N = number_of_bits_to_return/8
         int n = seedLen;
-        int slen = 4 + 4 + l + 1;
-        byte[] s = new byte[(slen + blockLen - 1) / blockLen * blockLen];
-        s[0] = (byte)(l >> 24);
-        s[1] = (byte)(l >> 16);
-        s[2] = (byte)(l >> 8);
-        s[3] = (byte)(l);
-        s[4] = (byte)(n >> 24);
-        s[5] = (byte)(n >> 16);
-        s[6] = (byte)(n >> 8);
-        s[7] = (byte)(n);
-        System.arraycopy(input, 0, s, 8, l);
-        s[8+l] = (byte)0x80;
+        // 4. S = L || N || input_string || 0x80
+        byte[] ln = new byte[8];
+        ln[0] = (byte)(l >> 24);
+        ln[1] = (byte)(l >> 16);
+        ln[2] = (byte)(l >> 8);
+        ln[3] = (byte)(l);
+        ln[4] = (byte)(n >> 24);
+        ln[5] = (byte)(n >> 16);
+        ln[6] = (byte)(n >> 8);
+        ln[7] = (byte)(n);
 
+        // 5. Zero padding of S
+        // Not necessary, see bcc
+
+        // 8. K = leftmost (0x00010203...1D1E1F, keylen).
         byte[] k = new byte[keyLen];
         for (int i = 0; i < k.length; i++) {
             k[i] = (byte)i;
         }
 
+        // 6. temp = the Null String
         byte[] temp = new byte[seedLen];
 
+        // 7. i = 0
         for (int i = 0; i * blockLen < temp.length; i++) {
-            byte[] iv = new byte[blockLen + s.length];
+            // 9.1 IV = i || 0^(outlen - len (i)). outLen is blockLen
+            byte[] iv = new byte[blockLen];
             iv[0] = (byte)(i >> 24);
             iv[1] = (byte)(i >> 16);
             iv[2] = (byte)(i >> 8);
             iv[3] = (byte)(i);
-            System.arraycopy(s, 0, iv, blockLen, s.length);
+
             int tailLen = temp.length - blockLen*i;
             if (tailLen > blockLen) {
                 tailLen = blockLen;
             }
-            System.arraycopy(bcc(k, iv), 0, temp, blockLen*i, tailLen);
+            // 9.2 temp = temp || BCC (K, (IV || S)).
+            System.arraycopy(bcc(k, iv, ln, input, new byte[]{(byte)0x80}),
+                    0, temp, blockLen*i, tailLen);
         }
 
+        // 10. K = leftmost(temp, keylen)
         k = Arrays.copyOf(temp, keyLen);
+
+        // 11. x = select(temp, keylen+1, keylen+outlen)
         byte[] x = Arrays.copyOfRange(temp, keyLen, temp.length);
 
+        // 12. temp = the Null string
+        // No need to clean up, temp will be overwritten
+
         for (int i = 0; i * blockLen < seedLen; i++) {
             try {
                 cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(k, keyAlg));
                 int tailLen = temp.length - blockLen*i;
+                // 14. requested_bits = leftmost(temp, nuumber_of_bits_to_return)
                 if (tailLen > blockLen) {
                     tailLen = blockLen;
                 }
@@ -309,21 +337,45 @@
                 throw new InternalError(e);
             }
         }
+
+        // 15. Return
         return temp;
     }
 
-    private byte[] bcc(byte[] k, byte[] data) {
+    /**
+     * Block_Encrypt in 10.3.3
+     *
+     * @param k the key
+     * @param data after concatenated, the data to be operated upon. This is
+     *             a series of byte[], each with an arbitrary length. Note
+     *             that the full length is not necessarily a multiple of
+     *             outlen. XOR with zero is no-op.
+     * @return the result
+     */
+    private byte[] bcc(byte[] k, byte[]... data) {
         byte[] chain = new byte[blockLen];
-        int n = data.length / blockLen;
-        for (int i = 0; i < n; i++) {
-            byte[] inputBlock = Arrays.copyOfRange(
-                    data, i * blockLen, i * blockLen + blockLen);
-            for (int j = 0; j < blockLen; j++) {
-                inputBlock[j] ^= chain[j];
+        int n1 = 0; // index in data
+        int n2 = 0; // index in data[n1]
+        // pack blockLen of bytes into chain from data[][], again and again
+        while (n1 < data.length) {
+            int j;
+            out: for (j = 0; j < blockLen; j++) {
+                while (n2 >= data[n1].length) {
+                    n1++;
+                    if (n1 >= data.length) {
+                        break out;
+                    }
+                    n2 = 0;
+                }
+                chain[j] ^= data[n1][n2];
+                n2++;
+            }
+            if (j == 0) { // all data happens to be consumed in the last loop
+                break;
             }
             try {
                 cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(k, keyAlg));
-                chain = cipher.doFinal(inputBlock);
+                chain = cipher.doFinal(chain);
             } catch (GeneralSecurityException e) {
                 throw new InternalError(e);
             }
@@ -341,6 +393,11 @@
 
             // Step 1: cat bytes
             if (additionalInput != null) {
+                if (ei.length + additionalInput.length < 0) {
+                    // Length must be represented as a 32 bit integer in df()
+                    throw new IllegalArgumentException(
+                            "entropy plus additional input is too long");
+                }
                 byte[] temp = Arrays.copyOf(
                         ei, ei.length + additionalInput.length);
                 System.arraycopy(additionalInput, 0, temp, ei.length,
@@ -430,10 +487,10 @@
 
         // Step 3. temp = Null
         int pos = 0;
+        int len = result.length;
 
         // Step 4. Loop
-        while (pos < result.length) {
-            int tailLen = result.length - pos;
+        while (len > 0) {
             // Step 4.1. Increment
             addOne(v, ctrLen);
             try {
@@ -443,10 +500,15 @@
 
                 // Step 4.3 and 5. Cat bytes and leftmost
                 System.arraycopy(out, 0, result, pos,
-                        (tailLen > blockLen) ? blockLen : tailLen);
+                        (len > blockLen) ? blockLen : len);
             } catch (GeneralSecurityException e) {
                 throw new InternalError(e);
             }
+            len -= blockLen;
+            if (len <= 0) {
+                // shortcut, so that pos needn't be updated
+                break;
+            }
             pos += blockLen;
         }
 
--- a/jdk/src/java.base/share/classes/sun/security/provider/HashDrbg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/HashDrbg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -31,7 +31,9 @@
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchProviderException;
 import java.security.SecureRandomParameters;
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
 public class HashDrbg extends AbstractHashDrbg {
 
@@ -70,7 +72,7 @@
         }
     }
 
-    private byte[] hashDf(int requested, byte[]... inputs) {
+    private byte[] hashDf(int requested, List<byte[]> inputs) {
         return hashDf(digest, outLen, requested, inputs);
     }
 
@@ -79,6 +81,9 @@
      * The function is used inside Hash_DRBG, and can also be used as an
      * approved conditioning function as described in 800-90B 6.4.2.2.
      *
+     * Note: In each current call, requested is seedLen, therefore small,
+     * no need to worry about overflow.
+     *
      * @param digest a {@code MessageDigest} object in reset state
      * @param outLen {@link MessageDigest#getDigestLength} of {@code digest}
      * @param requested requested output length, in bytes
@@ -86,12 +91,18 @@
      * @return the condensed/expanded output
      */
     public static byte[] hashDf(MessageDigest digest, int outLen,
-                                int requested, byte[]... inputs) {
+                                int requested, List<byte[]> inputs) {
+        // 1. temp = the Null string.
+        // 2. len = upper_int(no_of_bits_to_return / outLen)
         int len = (requested + outLen - 1) / outLen;
         byte[] temp = new byte[len * outLen];
+        // 3. counter = 0x01
         int counter = 1;
 
+        // 4. For i = 1 to len do
         for (int i=0; i<len; i++) {
+            // 4.1 temp = temp
+            //      || Hash (counter || no_of_bits_to_return || input_string).
             digest.update((byte) counter);
             digest.update((byte)(requested >> 21)); // requested*8 as int32
             digest.update((byte)(requested >> 13));
@@ -105,14 +116,17 @@
             } catch (DigestException e) {
                 throw new AssertionError("will not happen", e);
             }
+            // 4.2 counter = counter + 1
             counter++;
         }
+        // 5. requested_bits = leftmost (temp, no_of_bits_to_return).
         return temp.length == requested? temp: Arrays.copyOf(temp, requested);
+        // 6. Return
     }
 
     // This method is used by both instantiation and reseeding.
     @Override
-    protected final synchronized void hashReseedInternal(byte[] input) {
+    protected final synchronized void hashReseedInternal(List<byte[]> inputs) {
 
         // 800-90Ar1 10.1.1.2: Instantiate Process.
         // 800-90Ar1 10.1.1.3: Reseed Process.
@@ -121,16 +135,21 @@
         // Step 2: seed = Hash_df (seed_material, seedlen).
         if (v != null) {
             // Step 1 of 10.1.1.3: Prepend 0x01 || V
-            seed = hashDf(seedLen, ONE, v, input);
+            inputs.add(0, ONE);
+            inputs.add(1, v);
+            seed = hashDf(seedLen, inputs);
         } else {
-            seed = hashDf(seedLen, input);
+            seed = hashDf(seedLen, inputs);
         }
 
         // Step 3. V = seed.
         v = seed;
 
         // Step 4. C = Hash_df ((0x00 || V), seedlen).
-        c = hashDf(seedLen, ZERO, v);
+        inputs = new ArrayList<>(2);
+        inputs.add(ZERO);
+        inputs.add(v);
+        c = hashDf(seedLen, inputs);
 
         // Step 5. reseed_counter = 1.
         reseedCounter = 1;
@@ -197,7 +216,7 @@
         }
 
         // Step 3. Hashgen (requested_number_of_bits, V).
-        hashGen(result, result.length, v);
+        hashGen(result, v);
 
         // Step 4. H = Hash (0x03 || V).
         digest.update((byte)3);
@@ -222,10 +241,7 @@
     }
 
     // 800-90Ar1 10.1.1.4: Hashgen
-    private void hashGen(byte[] output, int len, byte[] v) {
-
-        // Step 1. m
-        int m = (len + outLen - 1) / outLen;
+    private void hashGen(byte[] output, byte[] v) {
 
         // Step 2. data = V
         byte[] data = v;
@@ -233,32 +249,36 @@
         // Step 3: W is output not filled
 
         // Step 4: For i = 1 to m
-        for (int i = 0; i < m; i++) {
-            int tailLen = len - i * outLen;
-            if (tailLen < outLen) {
+        int pos = 0;
+        int len = output.length;
+
+        while (len > 0) {
+            if (len < outLen) {
                 // Step 4.1 w = Hash (data).
                 // Step 4.2 W = W || w.
-                System.arraycopy(digest.digest(data), 0, output, i * outLen,
-                        tailLen);
+                System.arraycopy(digest.digest(data), 0, output, pos,
+                        len);
             } else {
                 try {
                     // Step 4.1 w = Hash (data).
                     digest.update(data);
                     // Step 4.2 digest into right position, no need to cat
-                    digest.digest(output, i*outLen, outLen);
+                    digest.digest(output, pos, outLen);
                 } catch (DigestException e) {
                     throw new AssertionError("will not happen", e);
                 }
             }
-            // Unless this is the last around, we will need to increment data.
-            // but we cannot change v, so a copy is made.
-            if (i != m - 1) {
-                if (data == v) {
-                    data = Arrays.copyOf(v, v.length);
-                }
-                // Step 4.3 data = (data + 1) mod 2^seedlen.
-                addBytes(data, seedLen, ONE);
+            len -= outLen;
+            if (len <= 0) {
+                // shortcut, so that data and pos needn't be updated
+                break;
             }
+            // Step 4.3 data = (data + 1) mod 2^seedlen.
+            if (data == v) {
+                data = Arrays.copyOf(v, v.length);
+            }
+            addBytes(data, seedLen, ONE);
+            pos += outLen;
         }
 
         // Step 5: No need to truncate
--- a/jdk/src/java.base/share/classes/sun/security/provider/HmacDrbg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/HmacDrbg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -32,6 +32,8 @@
 import java.security.NoSuchProviderException;
 import java.security.SecureRandomParameters;
 import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
 public class HmacDrbg extends AbstractHashDrbg {
 
@@ -56,7 +58,7 @@
     }
 
     // 800-90Ar1 10.1.2.2: HMAC_DRBG Update Process
-    private void update(byte[]... inputs) {
+    private void update(List<byte[]> inputs) {
         try {
             // Step 1. K = HMAC (K, V || 0x00 || provided_data).
             mac.init(new SecretKeySpec(k, macAlg));
@@ -71,7 +73,7 @@
             mac.init(new SecretKeySpec(k, macAlg));
             v = mac.doFinal(v);
 
-            if (inputs.length != 0) {
+            if (!inputs.isEmpty()) {
                 // Step 4. K = HMAC (K, V || 0x01 || provided_data).
                 mac.update(v);
                 mac.update((byte) 1);
@@ -116,7 +118,7 @@
 
     // This method is used by both instantiation and reseeding.
     @Override
-    protected final synchronized void hashReseedInternal(byte[] input) {
+    protected final synchronized void hashReseedInternal(List<byte[]> input) {
 
         // 800-90Ar1 10.1.2.3: Instantiate Process.
         // 800-90Ar1 10.1.2.4: Reseed Process.
@@ -156,16 +158,15 @@
 
         // Step 2. HMAC_DRBG_Update
         if (additionalInput != null) {
-            update(additionalInput);
+            update(Collections.singletonList(additionalInput));
         }
 
         // Step 3. temp = Null.
         int pos = 0;
+        int len = result.length;
 
         // Step 4. Loop
-        while (pos < result.length) {
-            int tailLen = result.length - pos;
-
+        while (len > 0) {
             // Step 4.1 V = HMAC (Key, V).
             try {
                 mac.init(new SecretKeySpec(k, macAlg));
@@ -175,7 +176,13 @@
             v = mac.doFinal(v);
             // Step 4.2 temp = temp || V.
             System.arraycopy(v, 0, result, pos,
-                    tailLen > outLen ? outLen : tailLen);
+                    len > outLen ? outLen : len);
+
+            len -= outLen;
+            if (len <= 0) {
+                // shortcut, so that pos needn't be updated
+                break;
+            }
             pos += outLen;
         }
 
@@ -183,9 +190,9 @@
 
         // Step 6. HMAC_DRBG_Update (additional_input, Key, V).
         if (additionalInput != null) {
-            update(additionalInput);
+            update(Collections.singletonList(additionalInput));
         } else {
-            update();
+            update(Collections.emptyList());
         }
 
         // Step 7. reseed_counter = reseed_counter + 1.
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/AlgorithmChecker.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,6 +27,7 @@
 
 import java.security.AlgorithmConstraints;
 import java.security.CryptoPrimitive;
+import java.security.Timestamp;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Date;
@@ -77,6 +78,7 @@
     private final PublicKey trustedPubKey;
     private final Date pkixdate;
     private PublicKey prevPubKey;
+    private final Timestamp jarTimestamp;
 
     private static final Set<CryptoPrimitive> SIGNATURE_PRIMITIVE_SET =
         Collections.unmodifiableSet(EnumSet.of(CryptoPrimitive.SIGNATURE));
@@ -142,6 +144,29 @@
         this.trustedPubKey = null;
         this.constraints = constraints;
         this.pkixdate = null;
+        this.jarTimestamp = null;
+    }
+
+    /**
+     * Create a new {@code AlgorithmChecker} with the given
+     * {@code Timestamp}.
+     * <p>
+     * Note that this constructor will be used to check a certification
+     * path for signed JAR files that are timestamped.
+     *
+     * @param jarTimestamp Timestamp passed for JAR timestamp constraint
+     *                     checking. Set to null if not applicable.
+     */
+    public AlgorithmChecker(Timestamp jarTimestamp) {
+        this.prevPubKey = null;
+        this.trustedPubKey = null;
+        this.constraints = certPathDefaultConstraints;
+        if (jarTimestamp == null) {
+            throw new IllegalArgumentException(
+                    "Timestamp cannot be null");
+        }
+        this.pkixdate = jarTimestamp.getTimestamp();
+        this.jarTimestamp = jarTimestamp;
     }
 
     /**
@@ -162,7 +187,7 @@
 
         if (anchor == null) {
             throw new IllegalArgumentException(
-                        "The trust anchor cannot be null");
+                    "The trust anchor cannot be null");
         }
 
         if (anchor.getTrustedCert() != null) {
@@ -179,6 +204,7 @@
         this.prevPubKey = trustedPubKey;
         this.constraints = constraints;
         this.pkixdate = pkixdate;
+        this.jarTimestamp = null;
     }
 
     /**
@@ -209,6 +235,10 @@
         return AnchorCertificates.contains(cert);
     }
 
+    Timestamp getJarTimestamp() {
+        return jarTimestamp;
+    }
+
     @Override
     public void init(boolean forward) throws CertPathValidatorException {
         //  Note that this class does not support forward mode.
@@ -296,8 +326,7 @@
         // permits() will throw exception on failure.
         certPathDefaultConstraints.permits(primitives,
                 new CertConstraintParameters((X509Certificate)cert,
-                        trustedMatch, pkixdate));
-                // new CertConstraintParameters(x509Cert, trustedMatch));
+                        trustedMatch, pkixdate, jarTimestamp));
         // If there is no previous key, set one and exit
         if (prevPubKey == null) {
             prevPubKey = currPubKey;
@@ -442,7 +471,7 @@
      * Check the signature algorithm with the specified public key.
      *
      * @param key the public key to verify the CRL signature
-     * @param crl the target CRL
+     * @param algorithmId signature algorithm Algorithm ID
      */
     static void check(PublicKey key, AlgorithmId algorithmId)
                         throws CertPathValidatorException {
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 
 import java.security.InvalidAlgorithmParameterException;
 import java.security.PublicKey;
+import java.security.Timestamp;
 import java.security.cert.*;
 import java.security.interfaces.DSAPublicKey;
 import java.util.*;
@@ -85,6 +86,7 @@
         private CertSelector constraints;
         private Set<TrustAnchor> anchors;
         private List<X509Certificate> certs;
+        private Timestamp timestamp;
 
         ValidatorParams(CertPath cp, PKIXParameters params)
             throws InvalidAlgorithmParameterException
@@ -100,6 +102,10 @@
         ValidatorParams(PKIXParameters params)
             throws InvalidAlgorithmParameterException
         {
+            if (params instanceof PKIXTimestampParameters) {
+                timestamp = ((PKIXTimestampParameters) params).getTimestamp();
+            }
+
             this.anchors = params.getTrustAnchors();
             // Make sure that none of the trust anchors include name constraints
             // (not supported).
@@ -189,6 +195,10 @@
         PKIXParameters getPKIXParameters() {
             return params;
         }
+
+        Timestamp timestamp() {
+            return timestamp;
+        }
     }
 
     static class BuilderParams extends ValidatorParams {
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -172,7 +172,11 @@
         List<PKIXCertPathChecker> certPathCheckers = new ArrayList<>();
         // add standard checkers that we will be using
         certPathCheckers.add(untrustedChecker);
-        certPathCheckers.add(new AlgorithmChecker(anchor, params.date()));
+        if (params.timestamp() == null) {
+            certPathCheckers.add(new AlgorithmChecker(anchor, params.date()));
+        } else {
+            certPathCheckers.add(new AlgorithmChecker(params.timestamp()));
+        }
         certPathCheckers.add(new KeyChecker(certPathLen,
                                             params.targetCertConstraints()));
         certPathCheckers.add(new ConstraintsChecker(certPathLen));
@@ -189,8 +193,14 @@
                                              rootNode);
         certPathCheckers.add(pc);
         // default value for date is current time
-        BasicChecker bc = new BasicChecker(anchor, params.date(),
-                                           params.sigProvider(), false);
+        BasicChecker bc;
+        if (params.timestamp() == null) {
+            bc = new BasicChecker(anchor, params.date(), params.sigProvider(),
+                    false);
+        } else {
+            bc = new BasicChecker(anchor, params.timestamp().getTimestamp(),
+                    params.sigProvider(), false);
+        }
         certPathCheckers.add(bc);
 
         boolean revCheckerAdded = false;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXTimestampParameters.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+package sun.security.provider.certpath;
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.Timestamp;
+import java.security.cert.CertSelector;
+import java.security.cert.CertStore;
+import java.security.cert.PKIXBuilderParameters;
+import java.security.cert.PKIXCertPathChecker;
+import java.security.cert.TrustAnchor;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * This class is a wrapper for PKIXBuilderParameters so that a Timestamp object
+ * can be passed alone when PKIXCertPath is checking signed jar files.
+ */
+
+public class PKIXTimestampParameters extends PKIXBuilderParameters {
+
+    private final PKIXBuilderParameters p;
+    private Timestamp jarTimestamp;
+
+    public PKIXTimestampParameters(PKIXBuilderParameters params,
+            Timestamp timestamp) throws InvalidAlgorithmParameterException {
+        super(params.getTrustAnchors(), null);
+        p = params;
+        jarTimestamp = timestamp;
+    }
+
+    public Timestamp getTimestamp() {
+        return jarTimestamp;
+    }
+    public void setTimestamp(Timestamp t) {
+        jarTimestamp = t;
+    }
+
+    @Override
+    public void setDate(Date d) {
+        p.setDate(d);
+    }
+
+    @Override
+    public void addCertPathChecker(PKIXCertPathChecker c) {
+        p.addCertPathChecker(c);
+    }
+
+    @Override
+    public void setMaxPathLength(int maxPathLength) {
+        p.setMaxPathLength(maxPathLength);
+    }
+
+    @Override
+    public int getMaxPathLength() {
+        return p.getMaxPathLength();
+    }
+
+    @Override
+    public String toString() {
+        return p.toString();
+    }
+
+    @Override
+    public Set<TrustAnchor> getTrustAnchors() {
+        return p.getTrustAnchors();
+    }
+
+    @Override
+    public void setTrustAnchors(Set<TrustAnchor> trustAnchors)
+            throws InvalidAlgorithmParameterException {
+        // To avoid problems with PKIXBuilderParameter's constructors
+        if (p == null) {
+            return;
+        }
+        p.setTrustAnchors(trustAnchors);
+    }
+
+    @Override
+    public Set<String> getInitialPolicies() {
+        return p.getInitialPolicies();
+    }
+
+    @Override
+    public void setInitialPolicies(Set<String> initialPolicies) {
+        p.setInitialPolicies(initialPolicies);
+    }
+
+    @Override
+    public void setCertStores(List<CertStore> stores) {
+        p.setCertStores(stores);
+    }
+
+    @Override
+    public void addCertStore(CertStore store) {
+        p.addCertStore(store);
+    }
+
+    @Override
+    public List<CertStore> getCertStores() {
+        return p.getCertStores();
+    }
+
+    @Override
+    public void setRevocationEnabled(boolean val) {
+        p.setRevocationEnabled(val);
+    }
+
+    @Override
+    public boolean isRevocationEnabled() {
+        return p.isRevocationEnabled();
+    }
+
+    @Override
+    public void setExplicitPolicyRequired(boolean val) {
+        p.setExplicitPolicyRequired(val);
+    }
+
+    @Override
+    public boolean isExplicitPolicyRequired() {
+        return p.isExplicitPolicyRequired();
+    }
+
+    @Override
+    public void setPolicyMappingInhibited(boolean val) {
+        p.setPolicyMappingInhibited(val);
+    }
+
+    @Override
+    public boolean isPolicyMappingInhibited() {
+        return p.isPolicyMappingInhibited();
+    }
+
+    @Override
+    public void setAnyPolicyInhibited(boolean val) {
+        p.setAnyPolicyInhibited(val);
+    }
+
+    @Override
+    public boolean isAnyPolicyInhibited() {
+        return p.isAnyPolicyInhibited();
+    }
+
+    @Override
+    public void setPolicyQualifiersRejected(boolean qualifiersRejected) {
+        p.setPolicyQualifiersRejected(qualifiersRejected);
+    }
+
+    @Override
+    public boolean getPolicyQualifiersRejected() {
+        return p.getPolicyQualifiersRejected();
+    }
+
+    @Override
+    public Date getDate() {
+        return p.getDate();
+    }
+
+    @Override
+    public void setCertPathCheckers(List<PKIXCertPathChecker> checkers) {
+        p.setCertPathCheckers(checkers);
+    }
+
+    @Override
+    public List<PKIXCertPathChecker> getCertPathCheckers() {
+        return p.getCertPathCheckers();
+    }
+
+    @Override
+    public String getSigProvider() {
+        return p.getSigProvider();
+    }
+
+    @Override
+    public void setSigProvider(String sigProvider) {
+        p.setSigProvider(sigProvider);
+    }
+
+    @Override
+    public CertSelector getTargetCertConstraints() {
+        return p.getTargetCertConstraints();
+    }
+
+    @Override
+    public void setTargetCertConstraints(CertSelector selector) {
+        // To avoid problems with PKIXBuilderParameter's constructors
+        if (p == null) {
+            return;
+        }
+        p.setTargetCertConstraints(selector);
+    }
+
+}
--- a/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/util/CertConstraintParameters.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,6 +25,7 @@
 
 package sun.security.util;
 
+import java.security.Timestamp;
 import java.security.cert.X509Certificate;
 import java.util.Date;
 
@@ -40,16 +41,19 @@
     private final boolean trustedMatch;
     // PKIXParameter date
     private final Date pkixDate;
+    // Timestamp of the signed JAR file
+    private final Timestamp jarTimestamp;
 
     public CertConstraintParameters(X509Certificate c, boolean match,
-            Date pkixdate) {
+            Date pkixdate, Timestamp jarTime) {
         cert = c;
         trustedMatch = match;
         pkixDate = pkixdate;
+        jarTimestamp = jarTime;
     }
 
     public CertConstraintParameters(X509Certificate c) {
-        this(c, false, null);
+        this(c, false, null, null);
     }
 
     // Returns if the trust anchor has a match if anchor checking is enabled.
@@ -65,4 +69,8 @@
         return pkixDate;
     }
 
+    public Timestamp getJARTimestamp() {
+        return jarTimestamp;
+    }
+
 }
--- a/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java	Fri Jul 08 12:17:10 2016 -0700
@@ -594,7 +594,9 @@
                  throws CertPathValidatorException {
              Date currentDate;
 
-             if (cp.getPKIXParamDate() != null) {
+             if (cp.getJARTimestamp() != null) {
+                 currentDate = cp.getJARTimestamp().getTimestamp();
+             } else if (cp.getPKIXParamDate() != null) {
                  currentDate = cp.getPKIXParamDate();
              } else {
                  currentDate = new Date();
--- a/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/validator/PKIXValidator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 import javax.security.auth.x500.X500Principal;
 import sun.security.action.GetBooleanAction;
 import sun.security.provider.certpath.AlgorithmChecker;
+import sun.security.provider.certpath.PKIXTimestampParameters;
 
 /**
  * Validator implementation built on the PKIX CertPath API. This
@@ -194,13 +195,23 @@
                 ("null or zero-length certificate chain");
         }
 
+        // Check if 'parameter' affects 'pkixParameters'
+        PKIXBuilderParameters pkixParameters = null;
+        if (parameter instanceof Timestamp && plugin) {
+            try {
+                pkixParameters = new PKIXTimestampParameters(
+                        (PKIXBuilderParameters) parameterTemplate.clone(),
+                        (Timestamp) parameter);
+            } catch (InvalidAlgorithmParameterException e) {
+                // ignore exception
+            }
+        } else {
+            pkixParameters = (PKIXBuilderParameters) parameterTemplate.clone();
+        }
+
         // add new algorithm constraints checker
-        PKIXBuilderParameters pkixParameters =
-                    (PKIXBuilderParameters) parameterTemplate.clone();
-        AlgorithmChecker algorithmChecker = null;
         if (constraints != null) {
-            algorithmChecker = new AlgorithmChecker(constraints);
-            pkixParameters.addCertPathChecker(algorithmChecker);
+            pkixParameters.addCertPathChecker(new AlgorithmChecker(constraints));
         }
 
         // attach it to the PKIXBuilderParameters.
--- a/jdk/src/java.base/share/classes/sun/security/validator/Validator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/validator/Validator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -221,13 +221,6 @@
      * Validate the given certificate chain. If otherCerts is non-null, it is
      * a Collection of additional X509Certificates that could be helpful for
      * path building.
-     * <p>
-     * Parameter is an additional parameter with variant specific meaning.
-     * Currently, it is only defined for TLS_SERVER variant validators, where
-     * it must be non null and the name of the TLS key exchange algorithm being
-     * used (see JSSE X509TrustManager specification). In the future, it
-     * could be used to pass in a PKCS#7 object for code signing to check time
-     * stamps.
      *
      * @return a non-empty chain that was used to validate the path. The
      * end entity cert is at index 0, the trust anchor at index n-1.
@@ -254,12 +247,12 @@
      *        represented with a zero-length byte array.
      * @param constraints algorithm constraints for certification path
      *        processing
-     * @param parameter an additional parameter with variant specific meaning.
-     *        Currently, it is only defined for TLS_SERVER variant validators,
-     *        where it must be non null and the name of the TLS key exchange
-     *        algorithm being used (see JSSE X509TrustManager specification).
-     *        In the future, it could be used to pass in a PKCS#7 object for
-     *        code signing to check time stamps.
+     * @param parameter an additional parameter object to pass specific data.
+     *        This parameter object maybe one of the two below:
+     *        1) TLS_SERVER variant validators, where it must be non null and
+     *        the name of the TLS key exchange algorithm being used
+     *        (see JSSE X509TrustManager specification).
+     *        2) {@code Timestamp} object from a signed JAR file.
      * @return a non-empty chain that was used to validate the path. The
      *        end entity cert is at index 0, the trust anchor at index n-1.
      */
--- a/jdk/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,7 +72,53 @@
 public class JavaTimeSupplementary extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] rocMonthNarrows = {
+        final String[] sharedQuarterNames = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1",
+            "2",
+            "3",
+            "4",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedDayNames = {
+            "Sun",
+            "Mon",
+            "Tue",
+            "Wed",
+            "Thu",
+            "Fri",
+            "Sat",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "T",
+            "W",
+            "T",
+            "F",
+            "S",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "AH",
+        };
+
+        final String[] sharedMonthNarrows = {
             "1",
             "2",
             "3",
@@ -87,31 +133,62 @@
             "12",
             "",
         };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "GGGGG y-MM-dd",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "",
+            "Meiji",
+            "Taisho",
+            "Showa",
+            "Heisei",
+        };
+
+        final String[] sharedShortEras = {
+            "Before R.O.C.",
+            "R.O.C.",
+        };
+
+        final String[] sharedMonthNames = {
+            "Jan",
+            "Feb",
+            "Mar",
+            "Apr",
+            "May",
+            "Jun",
+            "Jul",
+            "Aug",
+            "Sep",
+            "Oct",
+            "Nov",
+            "Dec",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNarrows },
             { "field.dayperiod",
                 "Dayperiod" },
             { "field.era",
@@ -133,52 +210,15 @@
             { "field.zone",
                 "Zone" },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Sun",
-                    "Mon",
-                    "Tue",
-                    "Wed",
-                    "Thu",
-                    "Fri",
-                    "Sat",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNames",
-                new String[] {
-                    "Sun",
-                    "Mon",
-                    "Tue",
-                    "Wed",
-                    "Thu",
-                    "Fri",
-                    "Sat",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "W",
-                    "T",
-                    "F",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "Muh.",
@@ -214,63 +254,23 @@
                 }
             },
             { "islamic.MonthNarrows",
-                rocMonthNarrows },
+                sharedMonthNarrows },
             { "islamic.QuarterNames",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
                 new String[] {
                     "BC",
@@ -284,13 +284,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "G y MMMM d (EEEE)",
@@ -300,23 +294,9 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "",
-                    "Meiji",
-                    "Taisho",
-                    "Showa",
-                    "Heisei",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "",
-                    "Meiji",
-                    "Taisho",
-                    "Showa",
-                    "Heisei",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.long.Eras",
                 new String[] {
                     "BCE",
@@ -324,13 +304,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "BC",
@@ -338,137 +312,37 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayNames",
-                new String[] {
-                    "Sun",
-                    "Mon",
-                    "Tue",
-                    "Wed",
-                    "Thu",
-                    "Fri",
-                    "Sat",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "W",
-                    "T",
-                    "F",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "Jan",
-                    "Feb",
-                    "Mar",
-                    "Apr",
-                    "May",
-                    "Jun",
-                    "Jul",
-                    "Aug",
-                    "Sep",
-                    "Oct",
-                    "Nov",
-                    "Dec",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "Jan",
-                    "Feb",
-                    "Mar",
-                    "Apr",
-                    "May",
-                    "Jun",
-                    "Jul",
-                    "Aug",
-                    "Sep",
-                    "Oct",
-                    "Nov",
-                    "Dec",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
-                rocMonthNarrows },
+                sharedMonthNarrows },
             { "roc.QuarterNames",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary_en.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/text/resources/JavaTimeSupplementary_en.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,15 +72,64 @@
 public class JavaTimeSupplementary_en extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1st quarter",
+            "2nd quarter",
+            "3rd quarter",
+            "4th quarter",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, MMMM d, y GGGG",
+            "MMMM d, y GGGG",
+            "MMM d, y GGGG",
+            "M/d/y G",
+        };
+
+        final String[] sharedDayNames = {
+            "Sunday",
+            "Monday",
+            "Tuesday",
+            "Wednesday",
+            "Thursday",
+            "Friday",
+            "Saturday",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, MMMM d, y G",
+            "MMMM d, y G",
+            "MMM d, y G",
+            "M/d/y GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "1st quarter",
-                    "2nd quarter",
-                    "3rd quarter",
-                    "4th quarter",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Buddhist Calendar" },
             { "calendarname.gregorian",
@@ -124,62 +173,19 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y GGGG",
-                    "MMMM d, y GGGG",
-                    "MMM d, y GGGG",
-                    "M/d/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayNames",
-                new String[] {
-                    "Sunday",
-                    "Monday",
-                    "Tuesday",
-                    "Wednesday",
-                    "Thursday",
-                    "Friday",
-                    "Saturday",
-                }
-            },
+                sharedDayNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1st quarter",
-                    "2nd quarter",
-                    "3rd quarter",
-                    "4th quarter",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -187,21 +193,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "Before Christ",
@@ -209,21 +203,9 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "M/d/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y GGGG",
-                    "MMMM d, y GGGG",
-                    "MMM d, y GGGG",
-                    "M/d/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
                 new String[] {
                     "Sun",
@@ -236,22 +218,9 @@
                 }
             },
             { "roc.DayNames",
-                new String[] {
-                    "Sunday",
-                    "Monday",
-                    "Tuesday",
-                    "Wednesday",
-                    "Thursday",
-                    "Friday",
-                    "Saturday",
-                }
-            },
+                sharedDayNames },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthNames",
                 new String[] {
                     "January",
@@ -287,53 +256,19 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1st quarter",
-                    "2nd quarter",
-                    "3rd quarter",
-                    "4th quarter",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/util/resources/LocaleData.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -228,6 +228,9 @@
 
     private static class LocaleDataStrategy implements Bundles.Strategy {
         private static final LocaleDataStrategy INSTANCE = new LocaleDataStrategy();
+        // TODO: avoid hard-coded Locales
+        private static Set<Locale> JAVA_BASE_LOCALES
+            = Set.of(Locale.ROOT, Locale.ENGLISH, Locale.US, new Locale("en", "US", "POSIX"));
 
         private LocaleDataStrategy() {
         }
@@ -275,11 +278,7 @@
         }
 
         boolean inJavaBaseModule(String baseName, Locale locale) {
-            // TODO: avoid hard-coded Locales
-            return locale.equals(Locale.ROOT) ||
-                (locale.getLanguage() == "en" &&
-                    (locale.getCountry().isEmpty() ||
-                     locale.getCountry() == "US"));
+            return JAVA_BASE_LOCALES.contains(locale);
         }
 
         @Override
@@ -313,6 +312,9 @@
     private static class SupplementaryStrategy extends LocaleDataStrategy {
         private static final SupplementaryStrategy INSTANCE
                 = new SupplementaryStrategy();
+        // TODO: avoid hard-coded Locales
+        private static Set<Locale> JAVA_BASE_LOCALES
+            = Set.of(Locale.ROOT, Locale.ENGLISH, Locale.US);
 
         private SupplementaryStrategy() {
         }
@@ -332,8 +334,7 @@
 
         @Override
         boolean inJavaBaseModule(String baseName, Locale locale) {
-            // TODO: avoid hard-coded Locales
-            return locale.equals(Locale.ROOT) || locale.getLanguage() == "en";
+            return JAVA_BASE_LOCALES.contains(locale);
         }
     }
 }
--- a/jdk/src/java.base/share/conf/security/java.security	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/conf/security/java.security	Fri Jul 08 12:17:10 2016 -0700
@@ -116,15 +116,7 @@
 # Example:
 #   jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \
 #         MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE
-#ifdef solaris-sparc
-jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \
-      HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE
-#endif
-#ifdef solaris-x86
-jdk.security.provider.preferred=AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, \
-      HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE, RSA:SunRsaSign, \
-      SHA1withRSA:SunRsaSign, Group.SHA2RSA:SunRsaSign
-#endif
+#jdk.security.provider.preferred=
 
 
 #
--- a/jdk/src/java.base/share/native/libjli/java.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/share/native/libjli/java.c	Fri Jul 08 12:17:10 2016 -0700
@@ -435,7 +435,8 @@
     ret = 1;
 
     /*
-     * Get the application's main class.
+     * Get the application's main class. It also checks if the main
+     * method exists.
      *
      * See bugid 5030265.  The Main-Class name has already been parsed
      * from the manifest, but not parsed properly for UTF-8 support.
@@ -467,6 +468,16 @@
      */
     appClass = GetApplicationClass(env);
     NULL_CHECK_RETURN_VALUE(appClass, -1);
+
+    /* Build platform specific argument array */
+    mainArgs = CreateApplicationArgs(env, argv, argc);
+    CHECK_EXCEPTION_NULL_LEAVE(mainArgs);
+
+    if (dryRun) {
+        ret = 0;
+        LEAVE();
+    }
+
     /*
      * PostJVMInit uses the class name as the application name for GUI purposes,
      * for example, on OSX this sets the application name in the menu bar for
@@ -476,6 +487,7 @@
      */
     PostJVMInit(env, appClass, vm);
     CHECK_EXCEPTION_LEAVE(1);
+
     /*
      * The LoadMainClass not only loads the main class, it will also ensure
      * that the main method's signature is correct, therefore further checking
@@ -486,22 +498,15 @@
                                        "([Ljava/lang/String;)V");
     CHECK_EXCEPTION_NULL_LEAVE(mainID);
 
-    /* Build platform specific argument array */
-    mainArgs = CreateApplicationArgs(env, argv, argc);
-    CHECK_EXCEPTION_NULL_LEAVE(mainArgs);
+    /* Invoke main method. */
+    (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
 
-    if (dryRun) {
-        ret = 0;
-    } else {
-        /* Invoke main method. */
-        (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
+    /*
+     * The launcher's exit code (in the absence of calls to
+     * System.exit) will be non-zero if main threw an exception.
+     */
+    ret = (*env)->ExceptionOccurred(env) == NULL ? 0 : 1;
 
-        /*
-         * The launcher's exit code (in the absence of calls to
-         * System.exit) will be non-zero if main threw an exception.
-         */
-        ret = (*env)->ExceptionOccurred(env) == NULL ? 0 : 1;
-    }
     LEAVE();
 }
 
--- a/jdk/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/unix/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/windows/classes/java/lang/ClassLoaderHelper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/src/java.base/windows/conf/tzmappings	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.base/windows/conf/tzmappings	Fri Jul 08 12:17:10 2016 -0700
@@ -164,39 +164,63 @@
 GMT Standard Time:88,89::GMT:
 Greenwich:88,89::GMT:
 Greenwich Standard Time:88,89::GMT:
-Argentina Standard Time:900,900::America/Buenos_Aires:
-Azerbaijan Standard Time:901,901:AZ:Asia/Baku:
-Bangladesh Standard Time:902,902::Asia/Dhaka:
-Central Brazilian Standard Time:903,903:BR:America/Cuiaba:
-Central Standard Time (Mexico):904,904::America/Mexico_City:
-Georgian Standard Time:905,905:GE:Asia/Tbilisi:
-Jordan Standard Time:906,906:JO:Asia/Amman:
-Kamchatka Standard Time:907,907:RU:Asia/Kamchatka:
-Mauritius Standard Time:908,908:MU:Indian/Mauritius:
-Middle East Standard Time:909,909:LB:Asia/Beirut:
-Montevideo Standard Time:910,910:UY:America/Montevideo:
-Morocco Standard Time:911,911:MA:Africa/Casablanca:
-Mountain Standard Time (Mexico):912,912:MX:America/Chihuahua:
-Namibia Standard Time:913,913:NA:Africa/Windhoek:
-Pacific Standard Time (Mexico):914,914:MX:America/Tijuana:
-Pakistan Standard Time:915,915::Asia/Karachi:
-Paraguay Standard Time:916,916:PY:America/Asuncion:
-Syria Standard Time:917,917:SY:Asia/Damascus:
-UTC:918,918::UTC:
-UTC+12:919,919::GMT+1200:
-UTC-02:920,920::GMT-0200:
-UTC-11:921,921::GMT-1100:
-Ulaanbaatar Standard Time:922,922::Asia/Ulaanbaatar:
-Venezuela Standard Time:923,923::America/Caracas:
-Magadan Standard Time:924,924::Asia/Magadan:
-Kaliningrad Standard Time:925,925:RU:Europe/Kaliningrad:
-Turkey Standard Time:926,926::Asia/Istanbul:
-Bahia Standard Time:927,927::America/Bahia:
-Libya Standard Time:928,928:LY:Africa/Tripoli:
-Belarus Standard Time:929,929:BY:Europe/Minsk:
-Line Islands Standard Time:930,930::Pacific/Kiritimati:
-Russia Time Zone 10:931,931::Asia/Srednekolymsk:
-Russia Time Zone 11:932,932::Asia/Anadyr:
-Russia Time Zone 3:933,933::Europe/Samara:
-Western Brazilian Standard Time:934,934:BR:America/Rio_Branco:
-Armenian Standard Time:935,935:AM:Asia/Yerevan:
+Aleutian Standard Time:900,900:US:America/Adak:
+Altai Standard Time:901,901::Asia/Barnaul:
+Argentina Standard Time:902,902::America/Buenos_Aires:
+Armenian Standard Time:903,903:AM:Asia/Yerevan:
+Astrakhan Standard Time:904,904::Europe/Astrakhan:
+Aus Central W. Standard Time:905,905::Australia/Eucla:
+Azerbaijan Standard Time:906,906:AZ:Asia/Baku:
+Bahia Standard Time:907,907::America/Bahia:
+Bangladesh Standard Time:908,908::Asia/Dhaka:
+Belarus Standard Time:909,909:BY:Europe/Minsk:
+Bougainville Standard Time:910,910::Pacific/Bougainville:
+Central Brazilian Standard Time:911,911:BR:America/Cuiaba:
+Central Standard Time (Mexico):912,912::America/Mexico_City:
+Chatham Islands Standard Time:913,913::Pacific/Chatham:
+Cuba Standard Time:914,914:CU:America/Havana:
+Easter Island Standard Time:915,915:CL:Pacific/Easter:
+Eastern Standard Time (Mexico):916,916::America/Cancun:
+Georgian Standard Time:917,917:GE:Asia/Tbilisi:
+Haiti Standard Time:918,918:HT:America/Port-au-Prince:
+Jordan Standard Time:919,919:JO:Asia/Amman:
+Kaliningrad Standard Time:920,920:RU:Europe/Kaliningrad:
+Kamchatka Standard Time:921,921:RU:Asia/Kamchatka:
+Libya Standard Time:922,922:LY:Africa/Tripoli:
+Line Islands Standard Time:923,923::Pacific/Kiritimati:
+Lord Howe Standard Time:924,924::Australia/Lord_Howe:
+Magadan Standard Time:925,925::Asia/Magadan:
+Marquesas Standard Time:926,926::Pacific/Marquesas:
+Mauritius Standard Time:927,927:MU:Indian/Mauritius:
+Middle East Standard Time:928,928:LB:Asia/Beirut:
+Montevideo Standard Time:929,929:UY:America/Montevideo:
+Morocco Standard Time:930,930:MA:Africa/Casablanca:
+Mountain Standard Time (Mexico):931,931:MX:America/Chihuahua:
+Namibia Standard Time:932,932:NA:Africa/Windhoek:
+Norfolk Standard Time:933,933::Pacific/Norfolk:
+North Korea Standard Time:934,934:KP:Asia/Pyongyang:
+Pacific Standard Time (Mexico):935,935:MX:America/Tijuana:
+Pakistan Standard Time:936,936::Asia/Karachi:
+Paraguay Standard Time:937,937:PY:America/Asuncion:
+Russia Time Zone 10:938,938::Asia/Srednekolymsk:
+Russia Time Zone 11:939,939::Asia/Anadyr:
+Russia Time Zone 3:940,940::Europe/Samara:
+Saint Pierre Standard Time:941,941:PM:America/Miquelon:
+Sakhalin Standard Time:942,942::Asia/Sakhalin:
+Syria Standard Time:943,943:SY:Asia/Damascus:
+Tocantins Standard Time:944,944::America/Araguaina:
+Tomsk Standard Time:945,945::Asia/Tomsk:
+Transbaikal Standard Time:946,946::Asia/Chita:
+Turkey Standard Time:947,947::Asia/Istanbul:
+Turks And Caicos Standard Time:948,948:TC:America/Grand_Turk:
+UTC+12:949,949::GMT+1200:
+UTC-02:950,950::GMT-0200:
+UTC-08:951,951::GMT-0800:
+UTC-09:952,952::GMT-0900:
+UTC-11:953,953::GMT-1100:
+UTC:954,954::UTC:
+Ulaanbaatar Standard Time:955,955::Asia/Ulaanbaatar:
+Venezuela Standard Time:956,956::America/Caracas:
+W. Mongolia Standard Time:957,957::Asia/Hovd:
+West Bank Standard Time:958,958::Asia/Gaza:
+Western Brazilian Standard Time:959,959:BR:America/Rio_Branco:
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/ScreenMenu.java	Fri Jul 08 12:17:10 2016 -0700
@@ -110,6 +110,7 @@
         final Component[] items = fInvoker.getMenuComponents();
         if (needsUpdate(items, childHashArray)) {
             removeAll();
+            fItems.clear();
             if (count <= 0) return;
 
             childHashArray = new int[count];
@@ -246,7 +247,7 @@
         synchronized (getTreeLock()) {
             super.addNotify();
             if (fModelPtr == 0) {
-                fInvoker.addContainerListener(this);
+                fInvoker.getPopupMenu().addContainerListener(this);
                 fInvoker.addComponentListener(this);
                 fPropertyListener = new ScreenMenuPropertyListener(this);
                 fInvoker.addPropertyChangeListener(fPropertyListener);
@@ -281,7 +282,7 @@
             if (fModelPtr != 0) {
                 removeMenuListeners(fModelPtr);
                 fModelPtr = 0;
-                fInvoker.removeContainerListener(this);
+                fInvoker.getPopupMenu().removeContainerListener(this);
                 fInvoker.removeComponentListener(this);
                 fInvoker.removePropertyChangeListener(fPropertyListener);
             }
@@ -302,11 +303,10 @@
     @Override
     public void componentRemoved(final ContainerEvent e) {
         final Component child = e.getChild();
-        final MenuItem sm = fItems.get(child);
+        final MenuItem sm = fItems.remove(child);
         if (sm == null) return;
 
         remove(sm);
-        fItems.remove(sm);
     }
 
     /**
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 import java.awt.event.InputEvent;
 import java.awt.event.MouseWheelEvent;
 import java.awt.event.KeyEvent;
+import java.util.Locale;
 
 /**
  * Translates NSEvents/NPCocoaEvents into AWT events.
@@ -170,6 +171,16 @@
                 }
             }
 
+            // If Pinyin Simplified input method is selected, CAPS_LOCK key is supposed to switch
+            // input to latin letters.
+            // It is necessary to use testCharIgnoringModifiers instead of testChar for event
+            // generation in such case to avoid uppercase letters in text components.
+            LWCToolkit lwcToolkit = (LWCToolkit)Toolkit.getDefaultToolkit();
+            if (lwcToolkit.getLockingKeyState(KeyEvent.VK_CAPS_LOCK) &&
+                    Locale.SIMPLIFIED_CHINESE.equals(lwcToolkit.getDefaultKeyboardLocale())) {
+                testChar = testCharIgnoringModifiers;
+            }
+
             jkeyCode = out[0];
             jkeyLocation = out[1];
             jeventType = isNpapiCallback ? NSEvent.npToJavaEventType(eventType) :
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Fri Jul 08 12:17:10 2016 -0700
@@ -51,6 +51,7 @@
     private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
     private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
     private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
+    private static native void nativeSetNSWindowLocationByPlatform(long nsWindowPtr);
     private static native void nativeSetNSWindowStandardFrame(long nsWindowPtr,
             double x, double y, double w, double h);
     private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
@@ -530,6 +531,10 @@
 
         boolean wasMaximized = isMaximized();
 
+        if (visible && target.isLocationByPlatform()) {
+            nativeSetNSWindowLocationByPlatform(getNSWindowPtr());
+        }
+
         // Actually show or hide the window
         LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null || !visible) {
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTEvent.m	Fri Jul 08 12:17:10 2016 -0700
@@ -131,7 +131,7 @@
     {0x3A, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_ALT},       // ****
     {0x3B, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_CONTROL},   // ****
     {0x3C, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
-    {0x3D, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
+    {0x3D, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_ALT_GRAPH},
     {0x3E, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED},
     {0x3F, NO,  KL_UNKNOWN,  java_awt_event_KeyEvent_VK_UNDEFINED}, // the 'fn' key on PowerBooks
     {0x40, NO,  KL_STANDARD, java_awt_event_KeyEvent_VK_F17},
@@ -293,18 +293,18 @@
         61,
         java_awt_event_InputEvent_ALT_DOWN_MASK | java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK,
         java_awt_event_InputEvent_ALT_MASK | java_awt_event_InputEvent_ALT_GRAPH_MASK,
-        java_awt_event_KeyEvent_VK_ALT
+        java_awt_event_KeyEvent_VK_ALT | java_awt_event_KeyEvent_VK_ALT_GRAPH
     },
-    {
-        NSCommandKeyMask,
-        //kCGSFlagsMaskAppleLeftCommandKey,
-        //kCGSFlagsMaskAppleRightCommandKey,
-        55,
-        54,
-        java_awt_event_InputEvent_META_DOWN_MASK,
-        java_awt_event_InputEvent_META_MASK,
-        java_awt_event_KeyEvent_VK_META
-    },
+	{
+		NSCommandKeyMask,
+		//kCGSFlagsMaskAppleLeftCommandKey,
+		//kCGSFlagsMaskAppleRightCommandKey,
+		55,
+		54,
+		java_awt_event_InputEvent_META_DOWN_MASK,
+		java_awt_event_InputEvent_META_MASK,
+		java_awt_event_KeyEvent_VK_META
+	},
     // NSNumericPadKeyMask
     {
         NSHelpKeyMask,
@@ -554,20 +554,20 @@
  */
 jint NsKeyModifiersToJavaModifiers(NSUInteger nsFlags, BOOL isExtMods)
 {
-    jint javaModifiers = 0;
-    const struct _nsKeyToJavaModifier* cur;
+	jint javaModifiers = 0;
+	const struct _nsKeyToJavaModifier* cur;
+	
+	for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
+		if ((cur->nsMask & nsFlags) != 0) {
+				javaModifiers |= isExtMods ? cur->javaExtMask : cur->javaMask;
+				if (cur->nsMask == NSAlternateKeyMask && leftAltKeyPressed == NO) {
+					continue;
+			}
+			break;
+		}
+	}
 
-    for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
-        if ((cur->nsMask & nsFlags) != 0) {
-            javaModifiers |= isExtMods ? cur->javaExtMask : cur->javaMask;
-            if (cur->nsMask == NSAlternateKeyMask && leftAltKeyPressed == NO) {
-                continue;
-            }
-            break;
-        }
-    }
-
-    return javaModifiers;
+	return javaModifiers;
 }
 
 /*
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Fri Jul 08 12:17:10 2016 -0700
@@ -529,8 +529,10 @@
 }
 
 -(BOOL) isCodePointInUnicodeBlockNeedingIMEvent: (unichar) codePoint {
-    if ((codePoint >= 0x3000) && (codePoint <= 0x303F)) {
-        // Code point is in 'CJK Symbols and Punctuation' Unicode block.
+    if (((codePoint >= 0x3000) && (codePoint <= 0x303F)) ||
+        ((codePoint >= 0xFF00) && (codePoint <= 0xFFEF))) {
+        // Code point is in 'CJK Symbols and Punctuation' or
+        // 'Halfwidth and Fullwidth Forms' Unicode block.
         return YES;
     }
     return NO;
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,6 +55,11 @@
 // window or the app currently has no key window.
 static AWTWindow* lastKeyWindow = nil;
 
+// This variable contains coordinates of a window's top left
+// which was positioned via java.awt.Window.setLocationByPlatform.
+// It would be NSZeroPoint if 'Location by Platform' is not used.
+static NSPoint lastTopLeftPoint;
+
 // --------------------------------------------------------------
 // NSWindow/NSPanel descendants implementation
 #define AWT_NS_WINDOW_IMPLEMENTATION                            \
@@ -1084,6 +1089,31 @@
 
 /*
  * Class:     sun_lwawt_macosx_CPlatformWindow
+ * Method:    nativeSetNSWindowLocationByPlatform
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowLocationByPlatform
+(JNIEnv *env, jclass clazz, jlong windowPtr)
+{
+    JNF_COCOA_ENTER(env);
+
+    NSWindow *nsWindow = OBJC(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+
+        if (NSEqualPoints(lastTopLeftPoint, NSZeroPoint)) {
+            // This is the first usage of lastTopLeftPoint. So invoke cascadeTopLeftFromPoint
+            // twice to avoid positioning the window's top left to zero-point, since it may
+            // cause negative user experience.
+            lastTopLeftPoint = [nsWindow cascadeTopLeftFromPoint:lastTopLeftPoint];
+        }
+        lastTopLeftPoint = [nsWindow cascadeTopLeftFromPoint:lastTopLeftPoint];
+    }];
+
+    JNF_COCOA_EXIT(env);
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformWindow
  * Method:    nativeSetNSWindowMinMax
  * Signature: (JDDDD)V
  */
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m	Fri Jul 08 12:17:10 2016 -0700
@@ -33,6 +33,7 @@
 #import "LWCToolkit.h"
 #import "sun_lwawt_macosx_CRobot.h"
 #import "java_awt_event_InputEvent.h"
+#import "java_awt_event_KeyEvent.h"
 #import "sizecalc.h"
 
 // Starting number for event numbers generated by Robot.
@@ -258,26 +259,30 @@
 Java_sun_lwawt_macosx_CRobot_keyEvent
 (JNIEnv *env, jobject peer, jint javaKeyCode, jboolean keyPressed)
 {
-    /*
-     * Well, using CGEventCreateKeyboardEvent/CGEventPost would have been
-     * a better solution, however, it gives me all kinds of trouble and I have
-     * no idea how to solve them without inserting delays between simulated
-     * events. So, I've ended up disabling it and opted for another approach
-     * that uses Accessibility API instead.
-     */
     CGKeyCode keyCode = GetCGKeyCode(javaKeyCode);
-    AXUIElementRef elem = AXUIElementCreateSystemWide();
-    AXUIElementPostKeyboardEvent(elem, (CGCharCode)0, keyCode, keyPressed);
-    CFRelease(elem);
 
-
-#if 0
-    CGEventRef event = CGEventCreateKeyboardEvent(NULL, keyCode, keyPressed);
-    if (event != NULL) {
-        CGEventPost(kCGSessionEventTap, event);
-        CFRelease(event);
+    if ((javaKeyCode >= java_awt_event_KeyEvent_VK_0) &&
+		(javaKeyCode <= java_awt_event_KeyEvent_VK_9))
+    {
+        AXUIElementRef elem = AXUIElementCreateSystemWide();
+        AXUIElementPostKeyboardEvent(elem, (CGCharCode)0, keyCode, keyPressed);
+        CFRelease(elem);
+    } else {
+        /*
+         * JDK-8155740: AXUIElementPostKeyboardEvent posts correct key codes for
+         * number keys whereas CGEventPost posts Numpad keys for corresponding
+         * number key. Hence AXUIElementPostKeyboardEvent is used for posting
+         * numbers and CGEventCreateKeyboardEvent/CGEventPost is used for other
+         * keys.
+         * Key code for modifier key is required to distinguish between ALT and
+         * ALT-GR key for fixing issue 8155740.
+         */
+        CGEventRef event = CGEventCreateKeyboardEvent(NULL, keyCode, keyPressed);
+        if (event != NULL) {
+            CGEventPost(kCGSessionEventTap, event);
+            CFRelease(event);
+        }
     }
-#endif
 }
 
 /*
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobotKeyCode.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobotKeyCode.m	Fri Jul 08 12:17:10 2016 -0700
@@ -53,6 +53,7 @@
             [NSNumber numberWithInt : OSX_Shift], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_SHIFT],
             [NSNumber numberWithInt : OSX_Control], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_CONTROL],
             [NSNumber numberWithInt : OSX_Option], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_ALT],
+            [NSNumber numberWithInt : OSX_RightOption], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_ALT_GRAPH],
             [NSNumber numberWithInt : OSX_CapsLock], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_CAPS_LOCK],
             [NSNumber numberWithInt : OSX_Escape], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_ESCAPE],
             [NSNumber numberWithInt : OSX_kVK_Space], [NSNumber numberWithInt : java_awt_event_KeyEvent_VK_SPACE],
--- a/jdk/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/macosx/native/libosxui/JRSUIConstantSync.m	Fri Jul 08 12:17:10 2016 -0700
@@ -90,7 +90,7 @@
     apple_laf_JRSUIConstants_ ## clazz ## __ ## constant
 
 #define CONSTANT_CHECK(clazz, constant)                                \
-    JRS_CONSTANT(clazz, constant) == JNI_CONSTANT(clazz, constant)
+    ( JRS_CONSTANT(clazz, constant) == JNI_CONSTANT(clazz, constant) )
 
 #define CONSISTENCY_CHECK(clazz, constant)                            \
     if ( !CONSTANT_CHECK(clazz, constant) ) return NO;
--- a/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/accessibility/internal/resources/accessibility_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -20,8 +20,8 @@
 columnheader=\uC5F4 \uBA38\uB9AC\uAE00
 combobox=\uCF64\uBCF4 \uC0C1\uC790
 canvas=\uCE94\uBC84\uC2A4
-desktopicon=\uBC14\uD0D5 \uD654\uBA74 \uC544\uC774\uCF58
-desktoppane=\uBC14\uD0D5 \uD654\uBA74 \uCC3D
+desktopicon=\uBC14\uD0D5\uD654\uBA74 \uC544\uC774\uCF58
+desktoppane=\uBC14\uD0D5\uD654\uBA74 \uCC3D
 dialog=\uB300\uD654\uC0C1\uC790
 directorypane=\uB514\uB809\uD1A0\uB9AC \uCC3D
 glasspane=\uAE00\uB798\uC2A4 \uCC3D
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1655,7 +1655,7 @@
 
                     // Whenever end pixels can fit into odd number of bytes,
                     // an extra padding byte will be present, so skip that.
-                    if ((((int)Math.ceil(end/2)) & 1) ==1 ) {
+                    if ((((end + 1) / 2) & 1) == 1) {
                         count++;
                     }
                     break;
--- a/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java	Fri Jul 08 12:17:10 2016 -0700
@@ -519,28 +519,129 @@
     /**
      * Skip over a complete image in the stream, leaving the stream
      * positioned such that the next byte to be read is the first
-     * byte of the next image.  For JPEG, this means that we read
+     * byte of the next image. For JPEG, this means that we read
      * until we encounter an EOI marker or until the end of the stream.
-     * If the stream ends before an EOI marker is encountered, an
-     * IndexOutOfBoundsException is thrown.
+     * We can find data same as EOI marker in some headers
+     * or comments, so we have to skip bytes related to these headers.
+     * If the stream ends before an EOI marker is encountered,
+     * an IndexOutOfBoundsException is thrown.
      */
     private void skipImage() throws IOException {
         if (debug) {
             System.out.println("skipImage called");
         }
+        // verify if image starts with an SOI marker
+        int initialFF = iis.read();
+        if (initialFF == 0xff) {
+            int soiMarker = iis.read();
+            if (soiMarker != JPEG.SOI) {
+                throw new IOException("skipImage : Invalid image doesn't "
+                        + "start with SOI marker");
+            }
+        } else {
+            throw new IOException("skipImage : Invalid image doesn't start "
+                    + "with 0xff");
+        }
         boolean foundFF = false;
+        String IOOBE = "skipImage : Reached EOF before we got EOI marker";
+        int markerLength = 2;
         for (int byteval = iis.read();
              byteval != -1;
              byteval = iis.read()) {
 
             if (foundFF == true) {
-                if (byteval == JPEG.EOI) {
-                    return;
+                switch (byteval) {
+                    case JPEG.EOI:
+                        if (debug) {
+                            System.out.println("skipImage : Found EOI at " +
+                                    (iis.getStreamPosition() - markerLength));
+                        }
+                        return;
+                    case JPEG.SOI:
+                        throw new IOException("skipImage : Found extra SOI"
+                                + " marker before getting to EOI");
+                    case 0:
+                    // markers which doesn't contain length data
+                    case JPEG.RST0:
+                    case JPEG.RST1:
+                    case JPEG.RST2:
+                    case JPEG.RST3:
+                    case JPEG.RST4:
+                    case JPEG.RST5:
+                    case JPEG.RST6:
+                    case JPEG.RST7:
+                    case JPEG.TEM:
+                        break;
+                    // markers which contains length data
+                    case JPEG.SOF0:
+                    case JPEG.SOF1:
+                    case JPEG.SOF2:
+                    case JPEG.SOF3:
+                    case JPEG.DHT:
+                    case JPEG.SOF5:
+                    case JPEG.SOF6:
+                    case JPEG.SOF7:
+                    case JPEG.JPG:
+                    case JPEG.SOF9:
+                    case JPEG.SOF10:
+                    case JPEG.SOF11:
+                    case JPEG.DAC:
+                    case JPEG.SOF13:
+                    case JPEG.SOF14:
+                    case JPEG.SOF15:
+                    case JPEG.SOS:
+                    case JPEG.DQT:
+                    case JPEG.DNL:
+                    case JPEG.DRI:
+                    case JPEG.DHP:
+                    case JPEG.EXP:
+                    case JPEG.APP0:
+                    case JPEG.APP1:
+                    case JPEG.APP2:
+                    case JPEG.APP3:
+                    case JPEG.APP4:
+                    case JPEG.APP5:
+                    case JPEG.APP6:
+                    case JPEG.APP7:
+                    case JPEG.APP8:
+                    case JPEG.APP9:
+                    case JPEG.APP10:
+                    case JPEG.APP11:
+                    case JPEG.APP12:
+                    case JPEG.APP13:
+                    case JPEG.APP14:
+                    case JPEG.APP15:
+                    case JPEG.COM:
+                        // read length of header from next 2 bytes
+                        int lengthHigherBits, lengthLowerBits, length;
+                        lengthHigherBits = iis.read();
+                        if (lengthHigherBits != (-1)) {
+                            lengthLowerBits = iis.read();
+                            if (lengthLowerBits != (-1)) {
+                                length = (lengthHigherBits << 8) |
+                                        lengthLowerBits;
+                                // length contains already read 2 bytes
+                                length -= 2;
+                            } else {
+                                throw new IndexOutOfBoundsException(IOOBE);
+                            }
+                        } else {
+                            throw new IndexOutOfBoundsException(IOOBE);
+                        }
+                        // skip the length specified in marker
+                        iis.skipBytes(length);
+                        break;
+                    case (-1):
+                        throw new IndexOutOfBoundsException(IOOBE);
+                    default:
+                        throw new IOException("skipImage : Invalid marker "
+                                + "starting with ff "
+                                + Integer.toHexString(byteval));
                 }
             }
-            foundFF = (byteval == 0xff) ? true : false;
+            foundFF = (byteval == 0xff);
         }
-        throw new IndexOutOfBoundsException();
+        throw new IndexOutOfBoundsException(IOOBE);
     }
 
     /**
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxMenuItemUI.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifCheckBoxMenuItemUI.java	Fri Jul 08 12:17:10 2016 -0700
@@ -89,7 +89,9 @@
             Point p = e.getPoint();
             if(p.x >= 0 && p.x < menuItem.getWidth() &&
                p.y >= 0 && p.y < menuItem.getHeight()) {
-                manager.clearSelectedPath();
+                if (UIManager.getBoolean("CheckBoxMenuItem.closeOnMouseClick")) {
+                    manager.clearSelectedPath();
+                }
                 menuItem.doClick(0);
             } else {
                 manager.processMouseEvent(e);
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/MotifRadioButtonMenuItemUI.java	Fri Jul 08 12:17:10 2016 -0700
@@ -97,7 +97,10 @@
             Point p = e.getPoint();
             if(p.x >= 0 && p.x < menuItem.getWidth() &&
                p.y >= 0 && p.y < menuItem.getHeight()) {
-                manager.clearSelectedPath();
+                String property = "RadioButtonMenuItem.closeOnMouseClick";
+                if (UIManager.getBoolean(property)) {
+                    manager.clearSelectedPath();
+                }
                 menuItem.doClick(0);
             } else {
                 manager.processMouseEvent(e);
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -38,7 +38,7 @@
 FileChooser.viewMenuButtonToolTipText = \uBCF4\uAE30 \uBA54\uB274
 FileChooser.viewMenuButtonAccessibleName = \uBCF4\uAE30 \uBA54\uB274
 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4
-FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68
+FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68
 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30
 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984
 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -36,7 +36,7 @@
 FileChooser.detailsViewButtonToolTip.textAndMnemonic=\uC138\uBD80\uC815\uBCF4
 FileChooser.detailsViewButtonAccessibleName=\uC138\uBD80\uC815\uBCF4
 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4
-FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68
+FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68
 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30
 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984
 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -36,7 +36,7 @@
 FileChooser.detailsViewButtonToolTip.textAndMnemonic=\uC138\uBD80\uC815\uBCF4
 FileChooser.detailsViewButtonAccessibleName=\uC138\uBD80\uC815\uBCF4
 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4
-FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68
+FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68
 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30
 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984
 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/jdk/src/java.desktop/share/classes/java/awt/font/TextLayout.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/TextLayout.java	Fri Jul 08 12:17:10 2016 -0700
@@ -248,7 +248,6 @@
     // all are recomputed from scratch in buildCache()
     private TextLine.TextLineMetrics lineMetrics = null;
     private float visibleAdvance;
-    private int hashCodeCache;
 
     /*
      * TextLayouts are supposedly immutable.  If you mutate a TextLayout under
@@ -722,9 +721,6 @@
         naturalBounds = null;
         boundsRect = null;
 
-        // hashCode will be regenerated on demand
-        hashCodeCache = 0;
-
         cacheIsValid = true;
     }
 
@@ -2569,33 +2565,8 @@
     }
 
     /**
-     * Returns the hash code of this {@code TextLayout}.
-     * @return the hash code of this {@code TextLayout}.
-     */
-    public int hashCode() {
-        if (hashCodeCache == 0) {
-            ensureCache();
-            hashCodeCache = textLine.hashCode();
-        }
-        return hashCodeCache;
-    }
-
-    /**
-     * Returns {@code true} if the specified {@code Object} is a
-     * {@code TextLayout} object and if the specified {@code Object}
-     * equals this {@code TextLayout}.
-     * @param obj an {@code Object} to test for equality
-     * @return {@code true} if the specified {@code Object}
-     *      equals this {@code TextLayout}; {@code false}
-     *      otherwise.
-     */
-    public boolean equals(Object obj) {
-        return (obj instanceof TextLayout) && equals((TextLayout)obj);
-    }
-
-    /**
      * Returns {@code true} if the two layouts are equal.
-     * Two layouts are equal if they contain equal glyphvectors in the same order.
+     * Obeys the general contract of {@link java.lang.Object equals(Object)}.
      * @param rhs the {@code TextLayout} to compare to this
      *       {@code TextLayout}
      * @return {@code true} if the specified {@code TextLayout}
@@ -2603,16 +2574,7 @@
      *
      */
     public boolean equals(TextLayout rhs) {
-
-        if (rhs == null) {
-            return false;
-        }
-        if (rhs == this) {
-            return true;
-        }
-
-        ensureCache();
-        return textLine.equals(rhs.textLine);
+        return equals((Object)rhs);
     }
 
     /**
--- a/jdk/src/java.desktop/share/classes/java/awt/font/TextLine.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/TextLine.java	Fri Jul 08 12:17:10 2016 -0700
@@ -880,11 +880,6 @@
         return dstShape;
     }
 
-    public int hashCode() {
-        return (fComponents.length << 16) ^
-                    (fComponents[0].hashCode() << 3) ^ (fCharsLimit-fCharsStart);
-    }
-
     public String toString() {
         StringBuilder buf = new StringBuilder();
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/DefaultDesktopManager.java	Fri Jul 08 12:17:10 2016 -0700
@@ -194,17 +194,15 @@
             int layer = JLayeredPane.getLayer(f);
             JLayeredPane.putLayer(desktopIcon, layer);
         }
-
+        d.setComponentOrderCheckingEnabled(true);
+        c.remove(f);
+        c.add(desktopIcon);
         if (findNext) {
             if (d.selectFrame(true) == null) {
                 // The icon is the last frame.
                 f.restoreSubcomponentFocus();
             }
         }
-        d.setComponentOrderCheckingEnabled(false);
-        c.remove(f);
-        c.add(desktopIcon);
-        d.setComponentOrderCheckingEnabled(true);
         c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JCheckBoxMenuItem.java	Fri Jul 08 12:17:10 2016 -0700
@@ -56,6 +56,15 @@
  * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
+ * Some times it is required to select several check box menu items from a menu.
+ * In this case it is useful that clicking on one check box menu item does not
+ * close the menu. Such behavior can be controlled by the Look and Feel property
+ * named {@code "CheckBoxMenuItem.closeOnMouseClick"}. The default value is
+ * {@code true}. Setting the property to {@code false} prevents the menu from
+ * closing when it is clicked by the mouse.
+ * Note: some {@code L&F}s may ignore this property. All built-in {@code L&F}s
+ * inherit this behaviour.
+ * <p>
  * For further information and examples of using check box menu items,
  * see <a
  href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComboBox.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1240,19 +1240,22 @@
             } else if (currentEvent instanceof ActionEvent) {
                 modifiers = ((ActionEvent)currentEvent).getModifiers();
             }
-            // Process the listeners last to first, notifying
-            // those that are interested in this event
-            for ( int i = listeners.length-2; i>=0; i-=2 ) {
-                if ( listeners[i]==ActionListener.class ) {
-                    // Lazily create the event:
-                    if ( e == null )
-                        e = new ActionEvent(this,ActionEvent.ACTION_PERFORMED,
-                                            getActionCommand(),
-                                            mostRecentEventTime, modifiers);
-                    ((ActionListener)listeners[i+1]).actionPerformed(e);
+            try {
+                // Process the listeners last to first, notifying
+                // those that are interested in this event
+                for ( int i = listeners.length-2; i>=0; i-=2 ) {
+                    if ( listeners[i]==ActionListener.class ) {
+                        // Lazily create the event:
+                        if ( e == null )
+                            e = new ActionEvent(this,ActionEvent.ACTION_PERFORMED,
+                                                getActionCommand(),
+                                                mostRecentEventTime, modifiers);
+                        ((ActionListener)listeners[i+1]).actionPerformed(e);
+                    }
                 }
+            } finally {
+                firingActionEvent = false;
             }
-            firingActionEvent = false;
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Jul 08 12:17:10 2016 -0700
@@ -844,9 +844,10 @@
                     Rectangle cr;
 
                     cr = comp.getBounds(tmpRect);
-
-                    boolean hitClip = g.hitClip(cr.x, cr.y, cr.width,
-                                                cr.height);
+                    Shape clip = g.getClip();
+                    boolean hitClip = (clip != null)
+                            ? clip.intersects(cr.x, cr.y, cr.width, cr.height)
+                            : true;
 
                     if (hitClip) {
                         if (checkSiblings && i > 0) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1185,7 +1185,7 @@
         if (k == null) {
             // try to dynamically load the support
             String classname = getKitTypeRegistry().get(type);
-            ClassLoader loader = getKitLoaderRegistry().get(type).orElse(null);
+            ClassLoader loader = getKitLoaderRegistry().get(type);
             try {
                 Class<?> c;
                 if (loader != null) {
@@ -1242,7 +1242,11 @@
      */
     public static void registerEditorKitForContentType(String type, String classname, ClassLoader loader) {
         getKitTypeRegistry().put(type, classname);
-        getKitLoaderRegistry().put(type, Optional.ofNullable(loader));
+        if (loader != null) {
+            getKitLoaderRegistry().put(type, loader);
+        } else {
+            getKitLoaderRegistry().remove(type);
+        }
         getKitRegisty().remove(type);
     }
 
@@ -1267,10 +1271,10 @@
         return tmp;
     }
 
-    private static Hashtable<String, Optional<ClassLoader>> getKitLoaderRegistry() {
+    private static Hashtable<String, ClassLoader> getKitLoaderRegistry() {
         loadDefaultKitsIfNecessary();
         @SuppressWarnings("unchecked")
-        Hashtable<String,  Optional<ClassLoader>> tmp =
+        Hashtable<String,  ClassLoader> tmp =
             (Hashtable)SwingUtilities.appContextGet(kitLoaderRegistryKey);
         return tmp;
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JRadioButtonMenuItem.java	Fri Jul 08 12:17:10 2016 -0700
@@ -50,6 +50,15 @@
  * href="http://docs.oracle.com/javase/tutorial/uiswing/misc/action.html">How
  * to Use Actions</a>, a section in <em>The Java Tutorial</em>.
  * <p>
+ * Some menus can have several button groups with radio button menu items. In
+ * this case it is useful that clicking on one radio button menu item does not
+ * close the menu. Such behavior can be controlled by the Look and Feel property
+ * named {@code "RadioButtonMenuItem.closeOnMouseClick"}. The default value is
+ * {@code true}. Setting the property to {@code false} prevents the menu from
+ * closing when it is clicked by the mouse.
+ * Note: some {@code L&F}s may ignore this property. All built-in {@code L&F}s
+ * inherit this behaviour.
+ * <p>
  * For further documentation and examples see
  * <a
  href="http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html">How to Use Menus</a>,
--- a/jdk/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ProgressMonitor.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -369,16 +369,24 @@
 
 
     /**
-     * Returns true if the user hits the Cancel button in the progress dialog.
+     * Returns true if the user hits the Cancel button or closes
+     * the progress dialog.
      *
-     * @return true if the user hits the Cancel button in the progress dialog
+     * @return true if the user hits the Cancel button or closes
+     * the progress dialog
      */
     public boolean isCanceled() {
-        if (pane == null) return false;
+        if (pane == null) {
+            return false;
+        }
+
         Object v = pane.getValue();
-        return ((v != null) &&
-                (cancelOption.length == 1) &&
-                (v.equals(cancelOption[0])));
+        if (v == null) {
+            return false;
+        }
+
+        return (((cancelOption.length == 1) && v.equals(cancelOption[0])) ||
+                v.equals(Integer.valueOf(JOptionPane.CLOSED_OPTION)));
     }
 
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ToolTipManager.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -231,12 +231,10 @@
         GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
         GraphicsDevice devices[] = env.getScreenDevices();
         for (GraphicsDevice device : devices) {
-            GraphicsConfiguration configs[] = device.getConfigurations();
-            for (GraphicsConfiguration config : configs) {
-                Rectangle rect = config.getBounds();
-                if (rect.contains(toFind)) {
-                    return config;
-                }
+            GraphicsConfiguration config = device.getDefaultConfiguration();
+            Rectangle rect = config.getBounds();
+            if (rect.contains(toFind)) {
+                return config;
             }
         }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/DiagramComponent.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/colorchooser/DiagramComponent.java	Fri Jul 08 12:17:10 2016 -0700
@@ -60,7 +60,8 @@
         getInsets(this.insets);
         this.width = getWidth() - this.insets.left - this.insets.right;
         this.height = getHeight() - this.insets.top - this.insets.bottom;
-
+        if ((this.width <= 0) || (this.height <= 0))
+            return;
         boolean update = (this.image == null)
                 || (this.width != this.image.getWidth())
                 || (this.height != this.image.getHeight());
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,11 +24,10 @@
  */
 package javax.swing.plaf;
 
-import javax.swing.Action;
-import javax.swing.BoundedRangeModel;
 import java.awt.Point;
 import java.awt.Rectangle;
-import java.awt.Insets;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
 import javax.swing.text.*;
 
 /**
@@ -64,6 +63,27 @@
     public abstract Rectangle modelToView(JTextComponent t, int pos, Position.Bias bias) throws BadLocationException;
 
     /**
+     * Converts the given location in the model to a place in
+     * the view coordinate system.
+     *
+     * @implSpec This implementation calls
+     * {@link #modelToView(JTextComponent, int, Position.Bias) modelToView(t, pos, bias)}.
+     *
+     * @param t the text component for which this UI is installed
+     * @param pos  the local location in the model to translate {@code >= 0}
+     * @param bias the bias for the position
+     * @return the coordinates as a {@code Rectangle2D}
+     * @exception BadLocationException  if the given position does not
+     *            represent a valid location in the associated document
+     *
+     * @since 9
+     */
+    public Rectangle2D modelToView2D(JTextComponent t, int pos, Position.Bias bias)
+            throws BadLocationException {
+        return modelToView(t, pos, bias);
+    }
+
+    /**
      * Converts the given place in the view coordinate system
      * to the nearest representative location in the model.
      *
@@ -95,6 +115,33 @@
                                     Position.Bias[] biasReturn);
 
     /**
+     * Provides a mapping from the view coordinate space to the logical
+     * coordinate space of the model.
+     *
+     * @implSpec This implementation calls
+     * {@link #viewToModel(JTextComponent, Point, Position.Bias[])
+     * viewToModel(t, new Point((int) pt.getX(), (int) pt.getY()),
+     *             biasReturn)}.
+     *
+     * @param t the text component for which this UI is installed
+     * @param pt the location in the view to translate.
+     * @param biasReturn
+     *           filled in by this method to indicate whether
+     *           the point given is closer to the previous or the next
+     *           character in the model
+     *
+     * @return the location within the model that best represents the
+     *         given point in the view {@code >= 0}
+     *
+     * @since 9
+     */
+    public int viewToModel2D(JTextComponent t, Point2D pt,
+                             Position.Bias[] biasReturn) {
+        return viewToModel(t, new Point((int) pt.getX(), (int) pt.getY()),
+                           biasReturn);
+    }
+
+    /**
      * Provides a way to determine the next visually represented model
      * location that one might place a caret.  Some views may not be visible,
      * they might not be in the same order found in the model, or they just
@@ -179,4 +226,22 @@
     public String getToolTipText(JTextComponent t, Point pt) {
         return null;
     }
+    /**
+     * Returns the string to be used as the tooltip at the passed in location.
+     *
+     * @implSpec This implementation calls
+     * {@link #getToolTipText(JTextComponent, Point)
+     *     getToolTipText(t, new Point((int) pt.getX(), (int) pt.getY())))}.
+     *
+     * @param t  the text component for which this UI is installed
+     * @param pt a {@code Point} specifying location for which to get a tooltip
+     * @return a {@code String} containing the tooltip
+     *
+     * @see javax.swing.text.JTextComponent#getToolTipText
+     *
+     * @since 9
+     */
+    public String getToolTipText2D(JTextComponent t, Point2D pt) {
+        return getToolTipText(t, new Point((int) pt.getX(), (int) pt.getY()));
+    }
 }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1049,6 +1049,8 @@
                 @SuppressWarnings("unchecked")
                 JComboBox<Object> comboBox = (JComboBox)e.getSource();
                 setListSelection(comboBox.getSelectedIndex());
+            } else {
+                setListSelection(-1);
             }
         }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Fri Jul 08 12:17:10 2016 -0700
@@ -31,10 +31,10 @@
 import java.awt.Font;
 import java.awt.FontMetrics;
 import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Insets;
 import java.awt.Rectangle;
 import java.awt.Toolkit;
-import java.awt.event.KeyEvent;
 import java.awt.event.InputEvent;
 
 import sun.swing.SwingUtilities2;
@@ -386,4 +386,102 @@
         return (event.getModifiers() &
                 Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()) != 0;
     }
+
+    /**
+     * Draws the given string at the specified location using text properties
+     * and anti-aliasing hints from the provided component.
+     * Nothing is drawn for the null string.
+     *
+     * @param c the component that will display the string, may be null
+     * @param g the graphics context, must not be null
+     * @param string the string to display, may be null
+     * @param x the x coordinate to draw the text at
+     * @param y the y coordinate to draw the text at
+     * @throws NullPointerException if the specified {@code g} is {@code null}
+     *
+     * @since 9
+     */
+    public static void drawString(JComponent c, Graphics2D g, String string,
+                                  float x, float y) {
+        SwingUtilities2.drawString(c, g, string, (int) x, (int) y);
+    }
+
+    /**
+     * Draws the given string at the specified location underlining
+     * the specified character. The provided component is used to query text
+     * properties and anti-aliasing hints.
+     * <p>
+     * The {@code underlinedIndex} parameter points to a char value
+     * (Unicode code unit) in the given string.
+     * If the char value specified at the underlined index is in
+     * the high-surrogate range and the char value at the following index is in
+     * the low-surrogate range then the supplementary character corresponding
+     * to this surrogate pair is underlined.
+     * <p>
+     * No character is underlined if the index is negative or greater
+     * than the string length {@code (index < 0 || index >= string.length())}
+     * or if the char value specified at the given index
+     * is in the low-surrogate range.
+     *
+     * @param c the component that will display the string, may be null
+     * @param g the graphics context, must not be null
+     * @param string the string to display, may be null
+     * @param underlinedIndex index of a a char value (Unicode code unit)
+     *        in the string to underline
+     * @param x the x coordinate to draw the text at
+     * @param y the y coordinate to draw the text at
+     * @throws NullPointerException if the specified {@code g} is {@code null}
+     *
+     * @see #getStringWidth
+     *
+     * @since 9
+     */
+    public static void drawStringUnderlineCharAt(JComponent c, Graphics2D g,
+            String string, int underlinedIndex, float x, float y) {
+        SwingUtilities2.drawStringUnderlineCharAt(c, g, string, underlinedIndex,
+                                                  (int) x, (int) y);
+    }
+
+    /**
+     * Clips the passed in string to the space provided.
+     * The provided component is used to query text properties and anti-aliasing hints.
+     * The unchanged string is returned if the space provided is greater than
+     * the string width.
+     *
+     * @param c the component, may be null
+     * @param fm the FontMetrics used to measure the string width, must be
+     *           obtained from the correct font and graphics. Must not be null.
+     * @param string the string to clip, may be null
+     * @param availTextWidth the amount of space that the string can be drawn in
+     * @return the clipped string that fits in the provided space, an empty
+     *         string if the given string argument is {@code null} or empty
+     * @throws NullPointerException if the specified {@code fm} is {@code null}
+     *
+     * @see #getStringWidth
+     *
+     * @since 9
+     */
+    public static String getClippedString(JComponent c, FontMetrics fm,
+                                          String string, int availTextWidth) {
+        return SwingUtilities2.clipStringIfNecessary(c, fm, string, availTextWidth);
+    }
+
+    /**
+     * Returns the width of the passed in string using text properties
+     * and anti-aliasing hints from the provided component.
+     * If the passed string is {@code null}, returns zero.
+     *
+     * @param c the component, may be null
+     * @param fm the FontMetrics used to measure the advance string width, must
+     *           be obtained from the correct font and graphics. Must not be null.
+     * @param string the string to get the advance width of, may be null
+     * @return the advance width of the specified string, zero is returned for
+     *         {@code null} string
+     * @throws NullPointerException if the specified {@code fm} is {@code null}
+     *
+     * @since 9
+     */
+    public static float getStringWidth(JComponent c, FontMetrics fm, String string) {
+        return SwingUtilities2.stringWidth(c, fm, string);
+    }
 }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicLookAndFeel.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1055,6 +1055,7 @@
             "RadioButtonMenuItem.checkIcon", radioButtonMenuItemIcon,
             "RadioButtonMenuItem.arrowIcon", menuItemArrowIcon,
             "RadioButtonMenuItem.commandSound", null,
+            "RadioButtonMenuItem.closeOnMouseClick", Boolean.TRUE,
 
             "CheckBoxMenuItem.font", dialogPlain12,
             "CheckBoxMenuItem.acceleratorFont", dialogPlain12,
@@ -1071,6 +1072,7 @@
             "CheckBoxMenuItem.checkIcon", checkBoxMenuItemIcon,
             "CheckBoxMenuItem.arrowIcon", menuItemArrowIcon,
             "CheckBoxMenuItem.commandSound", null,
+            "CheckBoxMenuItem.closeOnMouseClick", Boolean.TRUE,
 
             "Menu.font", dialogPlain12,
             "Menu.acceleratorFont", dialogPlain12,
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	Fri Jul 08 12:17:10 2016 -0700
@@ -936,6 +936,15 @@
         }
     }
 
+    boolean closeOnMouseClick() {
+        if (menuItem instanceof JCheckBoxMenuItem) {
+            return UIManager.getBoolean("CheckBoxMenuItem.closeOnMouseClick");
+        } else if (menuItem instanceof JRadioButtonMenuItem) {
+            return UIManager.getBoolean("RadioButtonMenuItem.closeOnMouseClick");
+        }
+        return true;
+    }
+
     /**
      * Call this method when a menu item is to be activated.
      * This method handles some of the details of menu item activation
@@ -958,11 +967,14 @@
             BasicLookAndFeel.playSound(menuItem, getPropertyPrefix() +
                                        ".commandSound");
         }
-        // Visual feedback
-        if (msm == null) {
-            msm = MenuSelectionManager.defaultManager();
+        if (closeOnMouseClick()) {
+            // Visual feedback
+            if (msm == null) {
+                msm = MenuSelectionManager.defaultManager();
+            }
+
+            msm.clearSelectedPath();
         }
-        msm.clearSelectedPath();
         menuItem.doClick(0);
     }
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1856,7 +1856,9 @@
             // otherwise 1 extra row is printed per page than that are displayed
             // when there is no scrollPane and we do printing of table
             // but not when rmax is already pointing to index of last row
-            if (rMax != (table.getRowCount() - 1)) {
+            // and if there is any selected rows
+            if (rMax != (table.getRowCount() - 1) &&
+                    (table.getSelectedRow() == -1)) {
                 rMax = rMax - 1;
             }
         }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf	Fri Jul 08 12:17:10 2016 -0700
@@ -13407,7 +13407,7 @@
             <cacheSettingsInherited>false</cacheSettingsInherited>
             <cacheMode>NO_CACHING</cacheMode>
             <uiproperties>
-               <uiProperty name="rendererUseListColors" type="BOOLEAN" value="true"/>
+               <uiProperty name="rendererUseListColors" type="BOOLEAN" value="false"/>
                <uiProperty name="rendererUseUIBorder" type="BOOLEAN" value="true"/>
                <uiProperty name="cellNoFocusBorder" type="BORDER">
                    <border type="empty" top="2" left="5" bottom="2" right="5"/>
@@ -13513,10 +13513,10 @@
                   <uiproperties/>
                </style>
                <backgroundStates>
-                  <state stateKeys="Disabled">
+                  <state stateKeys="Selected">
                      <style>
                         <textForeground>
-                           <matte red="142" green="143" blue="145" alpha="255" uiDefaultParentName="nimbusDisabledText" hueOffset="0.0" saturationOffset="0.0" brightnessOffset="0.0" alphaOffset="0"/>
+                           <matte red="255" green="255" blue="255" alpha="255" uiDefaultParentName="nimbusLightBackground" hueOffset="0.0" saturationOffset="0.0" brightnessOffset="0.0" alphaOffset="0"/>
                         </textForeground>
                         <textBackground/>
                         <background>
@@ -13541,6 +13541,56 @@
                         </layer>
                      </canvas>
                   </state>
+                  <state stateKeys="Disabled+Selected">
+                     <style>
+                        <textForeground/>
+                        <textBackground/>
+                        <background>
+                           <matte red="57" green="105" blue="138" alpha="255" uiDefaultParentName="nimbusSelectionBackground" hueOffset="0.0" saturationOffset="0.0" brightnessOffset="0.0" alphaOffset="0"/>
+                        </background>
+                        <inherit-background>false</inherit-background>
+                        <uiproperties/>
+                     </style>
+                     <canvas>
+                        <size width="100" height="30"/>
+                        <nextLayerNameIndex>2</nextLayerNameIndex>
+                        <stretchingInsets top="0" bottom="0" left="0" right="0"/>
+                        <layer name="Layer 1">
+                           <opacity>1.0</opacity>
+                           <fillOpacity>1.0</fillOpacity>
+                           <blendingMode>NORMAL</blendingMode>
+                           <locked>false</locked>
+                           <visible>true</visible>
+                           <shapes/>
+                           <effects/>
+                        </layer>
+                     </canvas>
+                  </state>
+                  <state stateKeys="Disabled">
+                     <style>
+                        <textForeground>
+                           <matte red="142" green="143" blue="145" alpha="255" uiDefaultParentName="nimbusDisabledText" hueOffset="0.0" saturationOffset="0.0" brightnessOffset="0.0" alphaOffset="0"/>
+                        </textForeground>
+                        <textBackground/>
+                        <background/>
+                        <inherit-textForeground>false</inherit-textForeground>
+                        <uiproperties/>
+                     </style>
+                     <canvas>
+                        <size width="100" height="30"/>
+                        <nextLayerNameIndex>2</nextLayerNameIndex>
+                        <stretchingInsets top="0" bottom="0" left="0" right="0"/>
+                        <layer name="Layer 1">
+                           <opacity>1.0</opacity>
+                           <fillOpacity>1.0</fillOpacity>
+                           <blendingMode>NORMAL</blendingMode>
+                           <locked>false</locked>
+                           <visible>true</visible>
+                           <shapes/>
+                           <effects/>
+                        </layer>
+                     </canvas>
+                  </state>
                </backgroundStates>
                <foregroundStates/>
                <borderStates/>
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/PasswordView.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/PasswordView.java	Fri Jul 08 12:17:10 2016 -0700
@@ -139,6 +139,26 @@
     }
 
     /**
+     * Renders the echo character, or whatever graphic should be used
+     * to display the password characters.  The color in the Graphics
+     * object is set to the appropriate foreground color for selected
+     * or unselected text.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawEchoCharacter(Graphics, int, int, char)
+     *      drawEchoCharacter((Graphics) g, (int) x, (int) y, c)}.
+     *
+     * @param g the graphics context
+     * @param x the starting X coordinate {@code >= 0}
+     * @param y the starting Y coordinate {@code >= 0}
+     * @param c the echo character
+     * @return the updated X position {@code >= 0}
+     */
+    protected float drawEchoCharacter(Graphics2D g, float x, float y, char c) {
+        return drawEchoCharacter((Graphics) g, (int) x, (int) y, c);
+    }
+
+    /**
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/PlainView.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,6 +27,7 @@
 import java.util.Vector;
 import java.util.Properties;
 import java.awt.*;
+import java.util.Objects;
 import javax.swing.event.*;
 
 /**
@@ -60,6 +61,17 @@
     }
 
     /**
+     * Returns the tab size set for the document, defaulting to 8.
+     *
+     * @implSpec This implementation calls {@link #getTabSize() getTabSize()}.
+     *
+     * @return the tab size
+     */
+    protected float getFractionalTabSize() {
+        return getTabSize();
+    }
+
+    /**
      * Renders a line of text, suppressing whitespace at the end
      * and expanding any tabs.  This is implemented to make calls
      * to the methods <code>drawUnselectedText</code> and
@@ -93,6 +105,28 @@
         }
     }
 
+    /**
+     * Renders a line of text, suppressing whitespace at the end
+     * and expanding any tabs.  This is implemented to make calls
+     * to the methods {@code drawUnselectedText} and
+     * {@code drawSelectedText} so that the way selected and
+     * unselected text are rendered can be customized.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawLine(int, Graphics, int, int)
+     * drawLine(lineIndex, (Graphics)g, (int) x, (int) y)}.
+     *
+     * @param lineIndex the line to draw {@code >= 0}
+     * @param g the {@code Graphics} context
+     * @param x the starting X position {@code >= 0}
+     * @param y the starting Y position {@code >= 0}
+     * @see #drawUnselectedText
+     * @see #drawSelectedText
+     */
+    protected void drawLine(int lineIndex, Graphics2D g, float x, float y) {
+        drawLine(lineIndex, (Graphics)g, (int) x, (int) y);
+    }
+
     private int drawElement(int lineIndex, Element elem, Graphics g, int x, int y) throws BadLocationException {
         int p0 = elem.getStartOffset();
         int p1 = elem.getEndOffset();
@@ -157,6 +191,27 @@
     }
 
     /**
+     * Renders the given range in the model as normal unselected
+     * text.  Uses the foreground or disabled color to render the text.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawUnselectedText(Graphics, int, int, int, int)
+     * drawUnselectedText((Graphics)g, (int) x, (int) y, p0, p1)}.
+     *
+     * @param g the graphics context
+     * @param x the starting X coordinate {@code >= 0}
+     * @param y the starting Y coordinate {@code >= 0}
+     * @param p0 the beginning position in the model {@code >= 0}
+     * @param p1 the ending position in the model {@code >= 0}
+     * @return the X location of the end of the range {@code >= 0}
+     * @exception BadLocationException if the range is invalid
+     */
+    protected float drawUnselectedText(Graphics2D g, float x, float y,
+                                       int p0, int p1) throws BadLocationException {
+        return drawUnselectedText((Graphics)g, (int) x, (int) y, p0, p1);
+    }
+
+    /**
      * Renders the given range in the model as selected text.  This
      * is implemented to render the text in the color specified in
      * the hosting component.  It assumes the highlighter will render
@@ -182,6 +237,30 @@
     }
 
     /**
+     * Renders the given range in the model as selected text.  This
+     * is implemented to render the text in the color specified in
+     * the hosting component.  It assumes the highlighter will render
+     * the selected background.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawSelectedText(Graphics, int, int, int, int)
+     * drawSelectedText((Graphics)g, (int) x, (int) y, p0, p1)}.
+     *
+     * @param g the graphics context
+     * @param x the starting X coordinate {@code >= 0}
+     * @param y the starting Y coordinate {@code >= 0}
+     * @param p0 the beginning position in the model {@code >= 0}
+     * @param p1 the ending position in the model {@code >= 0}
+     * @return the location of the end of the range
+     * @exception BadLocationException if the range is invalid
+     */
+
+    protected float drawSelectedText(Graphics2D g, float x,
+                                     float y, int p0, int p1) throws BadLocationException {
+        return drawSelectedText((Graphics)g, (int) x, (int) y, p0, p1);
+    }
+
+    /**
      * Gives access to a buffer that can be used to fetch
      * text from the associated document.
      *
@@ -203,7 +282,8 @@
     protected void updateMetrics() {
         Component host = getContainer();
         Font f = host.getFont();
-        if (font != f) {
+        FontMetrics fm = (font == null) ? null : host.getFontMetrics(font);
+        if (font != f || !Objects.equals(metrics, fm)) {
             // The font changed, we need to recalculate the
             // longest line.
             calculateLongestLine();
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/Utilities.java	Fri Jul 08 12:17:10 2016 -0700
@@ -86,6 +86,27 @@
 
     /**
      * Draws the given text, expanding any tabs that are contained
+     * using the given tab expansion technique.
+     *
+     * @param s  the source of the text
+     * @param x  the X origin {@code >= 0}
+     * @param y  the Y origin {@code >= 0}
+     * @param g  the graphics context
+     * @param e  how to expand the tabs.  If this value is null,
+     *           tabs will be expanded as a space character.
+     * @param startOffset starting offset of the text in the document {@code >= 0}
+     * @return  the X location at the end of the rendered text
+     */
+    public static final float drawTabbedText(Segment s, float x, float y,
+                                             Graphics2D g,
+                                             TabExpander e,
+                                             int startOffset)
+    {
+        return drawTabbedText(s, (int) x, (int) y, (Graphics) g, e, startOffset);
+    }
+
+    /**
+     * Draws the given text, expanding any tabs that are contained
      * using the given tab expansion technique.  This particular
      * implementation renders in a 1.1 style coordinate system
      * where ints are used and 72dpi is assumed.
@@ -208,6 +229,23 @@
         return getTabbedTextWidth(null, s, metrics, x, e, startOffset, null);
     }
 
+    /**
+     * Determines the width of the given segment of text taking tabs
+     * into consideration.
+     *
+     * @param s  the source of the text
+     * @param metrics the font metrics to use for the calculation
+     * @param x  the X origin {@code >= 0}
+     * @param e  how to expand the tabs.  If this value is null,
+     *   tabs will be expanded as a space character.
+     * @param startOffset starting offset of the text in the document {@code >= 0}
+     * @return  the width of the text
+     */
+    public static final float getTabbedTextWidth(Segment s, FontMetrics metrics,
+                                                 float x, TabExpander e,
+                                                 int startOffset) {
+        return getTabbedTextWidth(s, metrics, (int) x, e, startOffset);
+    }
 
     // In addition to the previous method it can extend spaces for
     // justification.
@@ -336,6 +374,34 @@
         return getTabbedTextOffset(null, s, metrics, x0, x, e, startOffset, round, null);
     }
 
+    /**
+     * Determines the relative offset into the given text that
+     * best represents the given span in the view coordinate
+     * system.
+     *
+     * @param s  the source of the text
+     * @param metrics the font metrics to use for the calculation
+     * @param x0 the starting view location representing the start
+     *   of the given text {@code >= 0}.
+     * @param x  the target view location to translate to an
+     *   offset into the text {@code >= 0}.
+     * @param e  how to expand the tabs.  If this value is null,
+     *   tabs will be expanded as a space character.
+     * @param startOffset starting offset of the text in the document {@code >= 0}
+     * @param round whether or not to round
+     * @return  the offset into the text {@code >= 0}
+     */
+    public static final int getTabbedTextOffset(Segment s,
+                                                FontMetrics metrics,
+                                                float x0, float x,
+                                                TabExpander e,
+                                                int startOffset,
+                                                boolean round)
+    {
+        return getTabbedTextOffset(null, s, metrics, (int) x0, (int) x, e,
+                                   startOffset, round, null);
+    }
+
     // In addition to the previous method it can extend spaces for
     // justification.
     //
@@ -499,6 +565,26 @@
     }
 
     /**
+     * Determine where to break the given text to fit
+     * within the given span. This tries to find a word boundary.
+     * @param s  the source of the text
+     * @param metrics the font metrics to use for the calculation
+     * @param x0 the starting view location representing the start
+     *        of the given text.
+     * @param x  the target view location to translate to an
+     *        offset into the text.
+     * @param e  how to expand the tabs.  If this value is null,
+     *        tabs will be expanded as a space character.
+     * @param startOffset starting offset in the document of the text
+     * @return  the offset into the given text
+     */
+    public static final int getBreakLocation(Segment s, FontMetrics metrics,
+                                             float x0, float x, TabExpander e,
+                                             int startOffset) {
+        return getBreakLocation(s, metrics, (int) x0, (int) x, e, startOffset);
+    }
+
+    /**
      * Determines the starting row model position of the row that contains
      * the specified model position.  The component given must have a
      * size to compute the result.  If the component doesn't have a size
@@ -598,6 +684,24 @@
 
     /**
      * Determines the position in the model that is closest to the given
+     * view location in the row above.  The component given must have a
+     * size to compute the result.  If the component doesn't have a size
+     * a value of -1 will be returned.
+     *
+     * @param c the editor
+     * @param offs the offset in the document {@code >= 0}
+     * @param x the X coordinate {@code >= 0}
+     * @return the position {@code >= 0} if the request can be computed, otherwise
+     *  a value of -1 will be returned.
+     * @exception BadLocationException if the offset is out of range
+     */
+    public static final int getPositionAbove(JTextComponent c, int offs, float x)
+            throws BadLocationException {
+        return getPositionAbove(c, offs, (int) x);
+    }
+
+    /**
+     * Determines the position in the model that is closest to the given
      * view location in the row below.  The component given must have a
      * size to compute the result.  If the component doesn't have a size
      * a value of -1 will be returned.
@@ -635,6 +739,24 @@
     }
 
     /**
+     * Determines the position in the model that is closest to the given
+     * view location in the row below.  The component given must have a
+     * size to compute the result.  If the component doesn't have a size
+     * a value of -1 will be returned.
+     *
+     * @param c the editor
+     * @param offs the offset in the document {@code >= 0}
+     * @param x the X coordinate {@code >= 0}
+     * @return the position {@code >= 0} if the request can be computed, otherwise
+     *  a value of -1 will be returned.
+     * @exception BadLocationException if the offset is out of range
+     */
+    public static final int getPositionBelow(JTextComponent c, int offs, float x)
+            throws BadLocationException {
+        return getPositionBelow(c, offs, (int) x);
+    }
+
+    /**
      * Determines the start of a word for the given model location.
      * Uses BreakIterator.getWordInstance() to actually get the words.
      *
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java	Fri Jul 08 12:17:10 2016 -0700
@@ -87,6 +87,17 @@
     }
 
     /**
+     * Returns the tab size set for the document, defaulting to 8.
+     *
+     * @implSpec This implementation calls {@link #getTabSize() getTabSize()}.
+     *
+     * @return the tab size
+     */
+    protected float getFractionalTabSize() {
+        return getTabSize();
+    }
+
+    /**
      * Renders a line of text, suppressing whitespace at the end
      * and expanding any tabs.  This is implemented to make calls
      * to the methods <code>drawUnselectedText</code> and
@@ -125,6 +136,29 @@
         }
     }
 
+    /**
+     * Renders a line of text, suppressing whitespace at the end
+     * and expanding any tabs.  This is implemented to make calls
+     * to the methods <code>drawUnselectedText</code> and
+     * <code>drawSelectedText</code> so that the way selected and
+     * unselected text are rendered can be customized.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawLine(int, int, Graphics, int, int)
+     * drawLine(p0, p1, (Graphics) g, (int) x, (int) y)}.
+     *
+     * @param p0 the starting document location to use &gt;= 0
+     * @param p1 the ending document location to use &gt;= p1
+     * @param g the graphics context
+     * @param x the starting X position &gt;= 0
+     * @param y the starting Y position &gt;= 0
+     * @see #drawUnselectedText
+     * @see #drawSelectedText
+     */
+    protected void drawLine(int p0, int p1, Graphics2D g, float x, float y) {
+        drawLine(p0, p1, (Graphics) g, (int) x, (int) y);
+    }
+
     private int drawText(Element elem, int p0, int p1, Graphics g, int x, int y) throws BadLocationException {
         p1 = Math.min(getDocument().getLength(), p1);
         AttributeSet attr = elem.getAttributes();
@@ -184,6 +218,26 @@
     }
 
     /**
+     * Renders the given range in the model as normal unselected
+     * text.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawUnselectedText(Graphics, int, int, int, int)
+     * drawUnselectedText((Graphics)g, (int) x, (int) y, p0, p1)}.
+     *
+     * @param g the graphics context
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= p0
+     * @return the X location of the end of the range &gt;= 0
+     * @exception BadLocationException if the range is invalid
+     */
+    protected float drawUnselectedText(Graphics2D g, float x, float y,
+                                     int p0, int p1) throws BadLocationException {
+        return drawUnselectedText((Graphics) g, (int) x, (int) y, p0, p1);
+    }
+    /**
      * Renders the given range in the model as selected text.  This
      * is implemented to render the text in the color specified in
      * the hosting component.  It assumes the highlighter will render
@@ -209,6 +263,28 @@
     }
 
     /**
+     * Renders the given range in the model as selected text.  This
+     * is implemented to render the text in the color specified in
+     * the hosting component.  It assumes the highlighter will render
+     * the selected background.
+     *
+     * @implSpec This implementation calls
+     * {@link #drawSelectedText(Graphics, int, int, int, int)
+     * drawSelectedText((Graphics)g, (int) x, (int) y, p0, p1)}.
+     *
+     * @param g the graphics context
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= p0
+     * @return the location of the end of the range.
+     * @exception BadLocationException if the range is invalid
+     */
+    protected float drawSelectedText(Graphics2D g, float x, float y,
+                                     int p0, int p1) throws BadLocationException {
+        return drawSelectedText((Graphics) g, (int) x, (int) y, p0, p1);
+    }
+    /**
      * Gives access to a buffer that can be used to fetch
      * text from the associated document.
      *
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_de.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_de.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Warnung: F\u00FCr <embed>-Tag ist ein \"height\"-Attribut erforderlich."},
             {"appletviewer.parse.warning.embed.requireswidth", "Warnung: F\u00FCr <embed>-Tag ist ein \"width\"-Attribut erforderlich."},
             {"appletviewer.parse.warning.appnotLongersupported", "Warnung: <app>-Tag wird nicht mehr unterst\u00FCtzt. Verwenden Sie stattdessen <applet>:"},
-            {"appletviewer.deprecated", "AppletViewer ist veraltet."},
+            {"appletviewer.deprecated", "Warnung: Applet-API und AppletViewer sind veraltet."},
             {"appletviewer.usage", "Verwendung: appletviewer <Optionen> url(s)\n\nwobei die <Optionen> Folgendes umfassen:\n  -encoding <Codierung>    Zeichencodierung f\u00FCr HTML-Dateien angeben\n  -J<Laufzeitkennzeichen>        Argument an den Java-Interpreter \u00FCbergeben\n\nDie Option \"-J\" ist nicht standardm\u00E4\u00DFig und kann ohne vorherige Ank\u00FCndigung ge\u00E4ndert werden."},
             {"appletviewer.main.err.unsupportedopt", "Nicht unterst\u00FCtzte Option: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Unbekanntes Argument: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_es.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_es.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Advertencia: la etiqueta <embed> requiere el atributo height."},
             {"appletviewer.parse.warning.embed.requireswidth", "Advertencia: la etiqueta <embed> requiere el atributo width."},
             {"appletviewer.parse.warning.appnotLongersupported", "Advertencia: la etiqueta <app> ya no est\u00E1 soportada, utilice <applet> en su lugar:"},
-            {"appletviewer.deprecated", "AppletViewer est\u00E1 anticuado."},
+            {"appletviewer.deprecated", "Advertencia: la API de applet y AppletViewer est\u00E1n anticuados."},
             {"appletviewer.usage", "Sintaxis: appletviewer <opciones> url(s)\n\ndonde <opciones> incluye:\n  -encoding <codificaci\u00F3n>    Especificar la codificaci\u00F3n de caracteres utilizada por los archivos HTML\n  -J<indicador de tiempo de ejecuci\u00F3n>        Transferir argumento al int\u00E9rprete de Java\n\nLa opci\u00F3n -J es no est\u00E1ndar y est\u00E1 sujeta a cambios sin previo aviso."},
             {"appletviewer.main.err.unsupportedopt", "Opci\u00F3n no soportada: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Argumento no reconocido: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_fr.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_fr.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Avertissement : la balise <embed> requiert un attribut de hauteur."},
             {"appletviewer.parse.warning.embed.requireswidth", "Avertissement : la balise <embed> requiert un attribut de largeur."},
             {"appletviewer.parse.warning.appnotLongersupported", "Avertissement : la balise <app> n'est plus prise en charge, utilisez <applet> \u00E0 la place :"},
-            {"appletviewer.deprecated", "AppletViewer est en phase d'abandon."},
+            {"appletviewer.deprecated", "Avertissement : l'API d'applet et AppletViewer sont en phase d'abandon."},
             {"appletviewer.usage", "Syntaxe : appletviewer <options> url(s)\n\no\u00F9 <options> inclut :\n  -encoding <encoding>    Indiquer l'encodage de caract\u00E8res utilis\u00E9 par les fichiers HTML\n  -J<runtime flag>        Transmettre l'argument \u00E0 l'interpr\u00E9teur Java\n\nL'option -J n'est pas standard et elle peut \u00EAtre modifi\u00E9e sans pr\u00E9avis."},
             {"appletviewer.main.err.unsupportedopt", "Option non prise en charge : {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Argument non reconnu : {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_it.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_it.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Avvertenza: la tag <embed> richiede un attributo height."},
             {"appletviewer.parse.warning.embed.requireswidth", "Avvertenza: la tag <embed> richiede un attributo width."},
             {"appletviewer.parse.warning.appnotLongersupported", "Avvertenza: la tag <app> non \u00E8 pi\u00F9 supportata. Utilizzare <applet>:"},
-            {"appletviewer.deprecated", "AppletViewer non pi\u00F9 valido."},
+            {"appletviewer.deprecated", "Avvertenza: l'API dell'applet e AppletViewer non sono pi\u00F9 validi."},
             {"appletviewer.usage", "Uso: appletviewer <options> url(s)\n\ndove <options> includono:\n  -encoding <encoding>    Specifica la codifica dei caratteri utilizzata dai file HTML\n  -J<runtime flag>        Passa l'argomento all'interpreter Java\n\nL'opzione -J non \u00E8 standard ed \u00E8 soggetta a modifica senza preavviso."},
             {"appletviewer.main.err.unsupportedopt", "Opzione non supportata: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Argomento non riconosciuto: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ja.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ja.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed>\u30BF\u30B0\u306Bheight\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
             {"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed>\u30BF\u30B0\u306Bwidth\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
             {"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: <app>\u30BF\u30B0\u306F\u73FE\u5728\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u304B\u308F\u308A\u306B<applet>\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
-            {"appletviewer.deprecated", "AppletViewer\u306F\u975E\u63A8\u5968\u3067\u3059\u3002"},
+            {"appletviewer.deprecated", "\u8B66\u544A: \u30A2\u30D7\u30EC\u30C3\u30C8API\u304A\u3088\u3073AppletViewer\u306F\u975E\u63A8\u5968\u3067\u3059\u3002"},
             {"appletviewer.usage", "\u4F7F\u7528\u65B9\u6CD5: appletviewer <options> url(s)\n\n<options>\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059:\n  -encoding <encoding>    HTML\u30D5\u30A1\u30A4\u30EB\u306B\u3088\u3063\u3066\u4F7F\u7528\u3055\u308C\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B\n  -J<runtime flag>        \u5F15\u6570\u3092Java\u30A4\u30F3\u30BF\u30D7\u30EA\u30BF\u306B\u6E21\u3059\n\n-J\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u3001\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
             {"appletviewer.main.err.unsupportedopt", "\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "\u8A8D\u8B58\u3055\u308C\u306A\u3044\u5F15\u6570: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_ko.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "\uACBD\uACE0: <embed> \uD0DC\uADF8\uC5D0\uB294 height \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
             {"appletviewer.parse.warning.embed.requireswidth", "\uACBD\uACE0: <embed> \uD0DC\uADF8\uC5D0\uB294 width \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4."},
             {"appletviewer.parse.warning.appnotLongersupported", "\uACBD\uACE0: <app> \uD0DC\uADF8\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 <applet>\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."},
-            {"appletviewer.deprecated", "AppletViewer\uB294 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+            {"appletviewer.deprecated", "\uACBD\uACE0: \uC560\uD50C\uB9BF API \uBC0F AppletViewer\uAC00 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
             {"appletviewer.usage", "\uC0AC\uC6A9\uBC95: appletviewer <options> url(s)\n\n\uC5EC\uAE30\uC11C <options>\uB294 \uB2E4\uC74C\uACFC \uAC19\uC2B5\uB2C8\uB2E4.\n  -encoding <encoding>    HTML \uD30C\uC77C\uC5D0 \uC0AC\uC6A9\uB420 \uBB38\uC790 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4.\n  -J<runtime flag>        Java \uC778\uD130\uD504\uB9AC\uD130\uB85C \uC778\uC218\uB97C \uC804\uB2EC\uD569\uB2C8\uB2E4.\n\n-J \uC635\uC158\uC740 \uD45C\uC900\uC774 \uC544\uB2C8\uBA70 \uC608\uACE0 \uC5C6\uC774 \uBCC0\uACBD\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
             {"appletviewer.main.err.unsupportedopt", "\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC635\uC158: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "\uC54C \uC218 \uC5C6\uB294 \uC778\uC218: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_pt_BR.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Advert\u00EAncia: a tag <embed> requer um atributo de altura."},
             {"appletviewer.parse.warning.embed.requireswidth", "Advert\u00EAncia: a tag <embed> requer um atributo de largura."},
             {"appletviewer.parse.warning.appnotLongersupported", "Advert\u00EAncia: a tag <app> n\u00E3o \u00E9 mais suportada; use <applet>:"},
-            {"appletviewer.deprecated", "O AppletViewer est\u00E1 obsoleto."},
+            {"appletviewer.deprecated", "Advert\u00EAncia: A API do e o AppletViewer est\u00E3o obsoletos."},
             {"appletviewer.usage", "Uso: appletviewer <op\u00E7\u00F5es> url(s)\n\nem que as <op\u00E7\u00F5es> incluem:\n  -encoding <codifica\u00E7\u00E3o>    Especifica a codifica\u00E7\u00E3o de caractere usada pelos arquivos HTML\n  -J<flag de runtime>        Informa o argumento ao intepretador java\n\nA op\u00E7\u00E3o -J n\u00E3o \u00E9 padr\u00E3o e est\u00E1 sujeita \u00E0 altera\u00E7\u00E3o sem notifica\u00E7\u00E3o."},
             {"appletviewer.main.err.unsupportedopt", "Op\u00E7\u00E3o n\u00E3o suportada: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Argumento n\u00E3o reconhecido: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_sv.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_sv.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "Varning: <embed>-taggen kr\u00E4ver ett h\u00F6jdattribut."},
             {"appletviewer.parse.warning.embed.requireswidth", "Varning: <embed>-taggen kr\u00E4ver ett breddattribut."},
             {"appletviewer.parse.warning.appnotLongersupported", "Varning: <app>-taggen st\u00F6ds inte l\u00E4ngre, anv\u00E4nd <applet> ist\u00E4llet:"},
-            {"appletviewer.deprecated", "AppletViewer \u00E4r inaktuellt."},
+            {"appletviewer.deprecated", "Varning: Applet-API:t och AppletViewer \u00E4r inaktuella."},
             {"appletviewer.usage", "Syntax: appletviewer <options> url(s)\n\nd\u00E4r <options> \u00E4r:\n  -encoding <encoding>    Ange teckenkodning som anv\u00E4nds av HTML-filer\n  -J<runtime flag>        \u00D6verf\u00F6r argument till java-tolken\n\nAlternativet -J \u00E4r inte standard och kan \u00E4ndras utan f\u00F6reg\u00E5ende meddelande."},
             {"appletviewer.main.err.unsupportedopt", "Alternativ som inte st\u00F6ds: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "Ok\u00E4nt argument: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_zh_CN.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_zh_CN.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed> \u6807\u8BB0\u9700\u8981\u9AD8\u5EA6\u5C5E\u6027\u3002"},
             {"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed> \u6807\u8BB0\u9700\u8981\u5BBD\u5EA6\u5C5E\u6027\u3002"},
             {"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: \u4E0D\u518D\u652F\u6301 <app> \u6807\u8BB0, \u8BF7\u6539\u7528 <applet>:"},
-            {"appletviewer.deprecated", "AppletViewer \u5DF2\u8FC7\u65F6\u3002"},
+            {"appletviewer.deprecated", "\u8B66\u544A: \u5C0F\u5E94\u7528\u7A0B\u5E8F API \u548C AppletViewer \u5DF2\u8FC7\u65F6\u3002"},
             {"appletviewer.usage", "\u7528\u6CD5: appletviewer <options> url(s)\n\n\u5176\u4E2D <options> \u5305\u62EC:\n  -encoding <encoding>    \u6307\u5B9A HTML \u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801\n  -J<runtime flag>        \u5C06\u53C2\u6570\u4F20\u9012\u5230 java \u89E3\u91CA\u5668\n\n-J \u9009\u9879\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002"},
             {"appletviewer.main.err.unsupportedopt", "\u4E0D\u652F\u6301\u7684\u9009\u9879: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "\u65E0\u6CD5\u8BC6\u522B\u7684\u53C2\u6570: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_zh_TW.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/applet/resources/MsgAppletViewer_zh_TW.java	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,7 @@
             {"appletviewer.parse.warning.embed.requiresheight", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u9AD8\u5EA6\u5C6C\u6027\u3002"},
             {"appletviewer.parse.warning.embed.requireswidth", "\u8B66\u544A: <embed> \u6A19\u8A18\u9700\u8981\u5BEC\u5EA6\u5C6C\u6027\u3002"},
             {"appletviewer.parse.warning.appnotLongersupported", "\u8B66\u544A: \u4E0D\u518D\u652F\u63F4 <app> \u6A19\u8A18\uFF0C\u8ACB\u6539\u7528 <applet>:"},
-            {"appletviewer.deprecated", "AppletViewer \u5DF2\u4E0D\u518D\u4F7F\u7528\u3002"},
+            {"appletviewer.deprecated", "\u8B66\u544A: \u5DF2\u4E0D\u518D\u4F7F\u7528 Applet API \u548C AppletViewer\u3002"},
             {"appletviewer.usage", "\u7528\u6CD5: appletviewer <options> url(s)\n\n\u5176\u4E2D\u7684 <options> \u5305\u62EC:\n  -encoding <encoding>    \u6307\u5B9A HTML \u6A94\u6848\u4F7F\u7528\u7684\u5B57\u5143\u7DE8\u78BC\n  -J<runtime flag>        \u5C07\u5F15\u6578\u50B3\u9001\u81F3 Java \u89E3\u8B6F\u5668\n\n-J \u9078\u9805\u4E0D\u662F\u6A19\u6E96\u9078\u9805\uFF0C\u82E5\u6709\u8B8A\u66F4\u4E0D\u53E6\u884C\u901A\u77E5\u3002"},
             {"appletviewer.main.err.unsupportedopt", "\u4E0D\u652F\u63F4\u7684\u9078\u9805: {0}"},
             {"appletviewer.main.err.unrecognizedarg", "\u7121\u6CD5\u8FA8\u8B58\u7684\u5F15\u6578: {0}"},
--- a/jdk/src/java.desktop/share/classes/sun/dc/DuctusRenderingEngine.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,836 +0,0 @@
-/*
- * Copyright (c) 2007, 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.dc;
-
-import java.awt.Shape;
-import java.awt.BasicStroke;
-import java.awt.geom.Path2D;
-import java.awt.geom.PathIterator;
-import java.awt.geom.AffineTransform;
-
-import sun.awt.geom.PathConsumer2D;
-import sun.java2d.pipe.Region;
-import sun.java2d.pipe.AATileGenerator;
-import sun.java2d.pipe.RenderingEngine;
-
-import sun.dc.pr.Rasterizer;
-import sun.dc.pr.PathStroker;
-import sun.dc.pr.PathDasher;
-import sun.dc.pr.PRException;
-import sun.dc.path.PathConsumer;
-import sun.dc.path.PathException;
-import sun.dc.path.FastPathProducer;
-
-public class DuctusRenderingEngine extends RenderingEngine {
-    static final float PenUnits = 0.01f;
-    static final int MinPenUnits = 100;
-    static final int MinPenUnitsAA = 20;
-    static final float MinPenSizeAA = PenUnits * MinPenUnitsAA;
-
-    static final float UPPER_BND = Float.MAX_VALUE / 2.0f;
-    static final float LOWER_BND = -UPPER_BND;
-
-    private static final int RasterizerCaps[] = {
-        Rasterizer.BUTT, Rasterizer.ROUND, Rasterizer.SQUARE
-    };
-
-    private static final int RasterizerCorners[] = {
-        Rasterizer.MITER, Rasterizer.ROUND, Rasterizer.BEVEL
-    };
-
-    static float[] getTransformMatrix(AffineTransform transform) {
-        float matrix[] = new float[4];
-        double dmatrix[] = new double[6];
-        transform.getMatrix(dmatrix);
-        for (int i = 0; i < 4; i++) {
-            matrix[i] = (float) dmatrix[i];
-        }
-        return matrix;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public Shape createStrokedShape(Shape src,
-                                    float width,
-                                    int caps,
-                                    int join,
-                                    float miterlimit,
-                                    float dashes[],
-                                    float dashphase)
-    {
-        FillAdapter filler = new FillAdapter();
-        PathStroker stroker = new PathStroker(filler);
-        PathDasher dasher = null;
-
-        try {
-            PathConsumer consumer;
-
-            stroker.setPenDiameter(width);
-            stroker.setPenT4(null);
-            stroker.setCaps(RasterizerCaps[caps]);
-            stroker.setCorners(RasterizerCorners[join], miterlimit);
-            if (dashes != null) {
-                dasher = new PathDasher(stroker);
-                dasher.setDash(dashes, dashphase);
-                dasher.setDashT4(null);
-                consumer = dasher;
-            } else {
-                consumer = stroker;
-            }
-
-            feedConsumer(consumer, src.getPathIterator(null));
-        } finally {
-            stroker.dispose();
-            if (dasher != null) {
-                dasher.dispose();
-            }
-        }
-
-        return filler.getShape();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void strokeTo(Shape src,
-                         AffineTransform transform,
-                         BasicStroke bs,
-                         boolean thin,
-                         boolean normalize,
-                         boolean antialias,
-                         PathConsumer2D sr)
-    {
-        PathStroker stroker = new PathStroker(sr);
-        PathConsumer consumer = stroker;
-
-        float matrix[] = null;
-        if (!thin) {
-            stroker.setPenDiameter(bs.getLineWidth());
-            if (transform != null) {
-                matrix = getTransformMatrix(transform);
-            }
-            stroker.setPenT4(matrix);
-            stroker.setPenFitting(PenUnits, MinPenUnits);
-        }
-        stroker.setCaps(RasterizerCaps[bs.getEndCap()]);
-        stroker.setCorners(RasterizerCorners[bs.getLineJoin()],
-                           bs.getMiterLimit());
-        float[] dashes = bs.getDashArray();
-        if (dashes != null) {
-            PathDasher dasher = new PathDasher(stroker);
-            dasher.setDash(dashes, bs.getDashPhase());
-            if (transform != null && matrix == null) {
-                matrix = getTransformMatrix(transform);
-            }
-            dasher.setDashT4(matrix);
-            consumer = dasher;
-        }
-
-        try {
-            PathIterator pi = src.getPathIterator(transform);
-
-            feedConsumer(pi, consumer, normalize, 0.25f);
-        } catch (PathException e) {
-            throw new InternalError("Unable to Stroke shape ("+
-                                    e.getMessage()+")", e);
-        } finally {
-            while (consumer != null && consumer != sr) {
-                PathConsumer next = consumer.getConsumer();
-                consumer.dispose();
-                consumer = next;
-            }
-        }
-    }
-
-    /*
-     * Feed a path from a PathIterator to a Ductus PathConsumer.
-     */
-    public static void feedConsumer(PathIterator pi, PathConsumer consumer,
-                                    boolean normalize, float norm)
-        throws PathException
-    {
-        consumer.beginPath();
-        boolean pathClosed = false;
-        boolean skip = false;
-        boolean subpathStarted = false;
-        float mx = 0.0f;
-        float my = 0.0f;
-        float point[]  = new float[6];
-        float rnd = (0.5f - norm);
-        float ax = 0.0f;
-        float ay = 0.0f;
-
-        while (!pi.isDone()) {
-            int type = pi.currentSegment(point);
-            if (pathClosed == true) {
-                pathClosed = false;
-                if (type != PathIterator.SEG_MOVETO) {
-                    // Force current point back to last moveto point
-                    consumer.beginSubpath(mx, my);
-                    subpathStarted = true;
-                }
-            }
-            if (normalize) {
-                int index;
-                switch (type) {
-                case PathIterator.SEG_CUBICTO:
-                    index = 4;
-                    break;
-                case PathIterator.SEG_QUADTO:
-                    index = 2;
-                    break;
-                case PathIterator.SEG_MOVETO:
-                case PathIterator.SEG_LINETO:
-                    index = 0;
-                    break;
-                case PathIterator.SEG_CLOSE:
-                default:
-                    index = -1;
-                    break;
-                }
-                if (index >= 0) {
-                    float ox = point[index];
-                    float oy = point[index+1];
-                    float newax = (float) Math.floor(ox + rnd) + norm;
-                    float neway = (float) Math.floor(oy + rnd) + norm;
-                    point[index] = newax;
-                    point[index+1] = neway;
-                    newax -= ox;
-                    neway -= oy;
-                    switch (type) {
-                    case PathIterator.SEG_CUBICTO:
-                        point[0] += ax;
-                        point[1] += ay;
-                        point[2] += newax;
-                        point[3] += neway;
-                        break;
-                    case PathIterator.SEG_QUADTO:
-                        point[0] += (newax + ax) / 2;
-                        point[1] += (neway + ay) / 2;
-                        break;
-                    case PathIterator.SEG_MOVETO:
-                    case PathIterator.SEG_LINETO:
-                    case PathIterator.SEG_CLOSE:
-                        break;
-                    }
-                    ax = newax;
-                    ay = neway;
-                }
-            }
-            switch (type) {
-            case PathIterator.SEG_MOVETO:
-
-                /* Checking SEG_MOVETO coordinates if they are out of the
-                 * [LOWER_BND, UPPER_BND] range. This check also handles NaN
-                 * and Infinity values. Skipping next path segment in case of
-                 * invalid data.
-                 */
-                if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                    point[1] < UPPER_BND && point[1] > LOWER_BND)
-                {
-                    mx = point[0];
-                    my = point[1];
-                    consumer.beginSubpath(mx, my);
-                    subpathStarted = true;
-                    skip = false;
-                } else {
-                    skip = true;
-                }
-                break;
-            case PathIterator.SEG_LINETO:
-                /* Checking SEG_LINETO coordinates if they are out of the
-                 * [LOWER_BND, UPPER_BND] range. This check also handles NaN
-                 * and Infinity values. Ignoring current path segment in case
-                 * of invalid data. If segment is skipped its endpoint
-                 * (if valid) is used to begin new subpath.
-                 */
-                if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                    point[1] < UPPER_BND && point[1] > LOWER_BND)
-                {
-                    if (skip) {
-                        consumer.beginSubpath(point[0], point[1]);
-                        subpathStarted = true;
-                        skip = false;
-                    } else {
-                        consumer.appendLine(point[0], point[1]);
-                    }
-                }
-                break;
-            case PathIterator.SEG_QUADTO:
-                // Quadratic curves take two points
-
-                /* Checking SEG_QUADTO coordinates if they are out of the
-                 * [LOWER_BND, UPPER_BND] range. This check also handles NaN
-                 * and Infinity values. Ignoring current path segment in case
-                 * of invalid endpoints's data. Equivalent to the SEG_LINETO
-                 * if endpoint coordinates are valid but there are invalid data
-                 * among other coordinates
-                 */
-                if (point[2] < UPPER_BND && point[2] > LOWER_BND &&
-                    point[3] < UPPER_BND && point[3] > LOWER_BND)
-                {
-                    if (skip) {
-                        consumer.beginSubpath(point[2], point[3]);
-                        subpathStarted = true;
-                        skip = false;
-                    } else {
-                        if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                            point[1] < UPPER_BND && point[1] > LOWER_BND)
-                        {
-                            consumer.appendQuadratic(point[0], point[1],
-                                                     point[2], point[3]);
-                        } else {
-                            consumer.appendLine(point[2], point[3]);
-                        }
-                    }
-                }
-                break;
-            case PathIterator.SEG_CUBICTO:
-                // Cubic curves take three points
-
-                /* Checking SEG_CUBICTO coordinates if they are out of the
-                 * [LOWER_BND, UPPER_BND] range. This check also handles NaN
-                 * and Infinity values. Ignoring current path segment in case
-                 * of invalid endpoints's data. Equivalent to the SEG_LINETO
-                 * if endpoint coordinates are valid but there are invalid data
-                 * among other coordinates
-                 */
-                if (point[4] < UPPER_BND && point[4] > LOWER_BND &&
-                    point[5] < UPPER_BND && point[5] > LOWER_BND)
-                {
-                    if (skip) {
-                        consumer.beginSubpath(point[4], point[5]);
-                        subpathStarted = true;
-                        skip = false;
-                    } else {
-                        if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                            point[1] < UPPER_BND && point[1] > LOWER_BND &&
-                            point[2] < UPPER_BND && point[2] > LOWER_BND &&
-                            point[3] < UPPER_BND && point[3] > LOWER_BND)
-                        {
-                            consumer.appendCubic(point[0], point[1],
-                                                 point[2], point[3],
-                                                 point[4], point[5]);
-                        } else {
-                            consumer.appendLine(point[4], point[5]);
-                        }
-                    }
-                }
-                break;
-            case PathIterator.SEG_CLOSE:
-                if (subpathStarted) {
-                    consumer.closedSubpath();
-                    subpathStarted = false;
-                    pathClosed = true;
-                }
-                break;
-            }
-            pi.next();
-        }
-
-        consumer.endPath();
-    }
-
-    private static Rasterizer theRasterizer;
-
-    public static synchronized Rasterizer getRasterizer() {
-        Rasterizer r = theRasterizer;
-        if (r == null) {
-            r = new Rasterizer();
-        } else {
-            theRasterizer = null;
-        }
-        return r;
-    }
-
-    public static synchronized void dropRasterizer(Rasterizer r) {
-        r.reset();
-        theRasterizer = r;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public float getMinimumAAPenSize() {
-        return MinPenSizeAA;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public AATileGenerator getAATileGenerator(Shape s,
-                                              AffineTransform at,
-                                              Region clip,
-                                              BasicStroke bs,
-                                              boolean thin,
-                                              boolean normalize,
-                                              int bbox[])
-    {
-        Rasterizer r = getRasterizer();
-        PathIterator pi = s.getPathIterator(at);
-
-        if (bs != null) {
-            float matrix[] = null;
-            r.setUsage(Rasterizer.STROKE);
-            if (thin) {
-                r.setPenDiameter(MinPenSizeAA);
-            } else {
-                r.setPenDiameter(bs.getLineWidth());
-                if (at != null) {
-                    matrix = getTransformMatrix(at);
-                    r.setPenT4(matrix);
-                }
-                r.setPenFitting(PenUnits, MinPenUnitsAA);
-            }
-            r.setCaps(RasterizerCaps[bs.getEndCap()]);
-            r.setCorners(RasterizerCorners[bs.getLineJoin()],
-                         bs.getMiterLimit());
-            float[] dashes = bs.getDashArray();
-            if (dashes != null) {
-                r.setDash(dashes, bs.getDashPhase());
-                if (at != null && matrix == null) {
-                    matrix = getTransformMatrix(at);
-                }
-                r.setDashT4(matrix);
-            }
-        } else {
-            r.setUsage(pi.getWindingRule() == PathIterator.WIND_EVEN_ODD
-                       ? Rasterizer.EOFILL
-                       : Rasterizer.NZFILL);
-        }
-
-        r.beginPath();
-        {
-            boolean pathClosed = false;
-            boolean skip = false;
-            boolean subpathStarted = false;
-            float mx = 0.0f;
-            float my = 0.0f;
-            float point[]  = new float[6];
-            float ax = 0.0f;
-            float ay = 0.0f;
-
-            while (!pi.isDone()) {
-                int type = pi.currentSegment(point);
-                if (pathClosed == true) {
-                    pathClosed = false;
-                    if (type != PathIterator.SEG_MOVETO) {
-                        // Force current point back to last moveto point
-                        r.beginSubpath(mx, my);
-                        subpathStarted = true;
-                    }
-                }
-                if (normalize) {
-                    int index;
-                    switch (type) {
-                    case PathIterator.SEG_CUBICTO:
-                        index = 4;
-                        break;
-                    case PathIterator.SEG_QUADTO:
-                        index = 2;
-                        break;
-                    case PathIterator.SEG_MOVETO:
-                    case PathIterator.SEG_LINETO:
-                        index = 0;
-                        break;
-                    case PathIterator.SEG_CLOSE:
-                    default:
-                        index = -1;
-                        break;
-                    }
-                    if (index >= 0) {
-                        float ox = point[index];
-                        float oy = point[index+1];
-                        float newax = (float) Math.floor(ox) + 0.5f;
-                        float neway = (float) Math.floor(oy) + 0.5f;
-                        point[index] = newax;
-                        point[index+1] = neway;
-                        newax -= ox;
-                        neway -= oy;
-                        switch (type) {
-                        case PathIterator.SEG_CUBICTO:
-                            point[0] += ax;
-                            point[1] += ay;
-                            point[2] += newax;
-                            point[3] += neway;
-                            break;
-                        case PathIterator.SEG_QUADTO:
-                            point[0] += (newax + ax) / 2;
-                            point[1] += (neway + ay) / 2;
-                            break;
-                        case PathIterator.SEG_MOVETO:
-                        case PathIterator.SEG_LINETO:
-                        case PathIterator.SEG_CLOSE:
-                            break;
-                        }
-                        ax = newax;
-                        ay = neway;
-                    }
-                }
-                switch (type) {
-                case PathIterator.SEG_MOVETO:
-
-                   /* Checking SEG_MOVETO coordinates if they are out of the
-                    * [LOWER_BND, UPPER_BND] range. This check also handles NaN
-                    * and Infinity values. Skipping next path segment in case
-                    * of invalid data.
-                    */
-
-                    if (point[0] < UPPER_BND &&  point[0] > LOWER_BND &&
-                        point[1] < UPPER_BND &&  point[1] > LOWER_BND)
-                    {
-                        mx = point[0];
-                        my = point[1];
-                        r.beginSubpath(mx, my);
-                        subpathStarted = true;
-                        skip = false;
-                    } else {
-                        skip = true;
-                    }
-                    break;
-
-                case PathIterator.SEG_LINETO:
-                    /* Checking SEG_LINETO coordinates if they are out of the
-                     * [LOWER_BND, UPPER_BND] range. This check also handles
-                     * NaN and Infinity values. Ignoring current path segment
-                     * in case of invalid data. If segment is skipped its
-                     * endpoint (if valid) is used to begin new subpath.
-                     */
-                    if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                        point[1] < UPPER_BND && point[1] > LOWER_BND)
-                    {
-                        if (skip) {
-                            r.beginSubpath(point[0], point[1]);
-                            subpathStarted = true;
-                            skip = false;
-                        } else {
-                            r.appendLine(point[0], point[1]);
-                        }
-                    }
-                    break;
-
-                case PathIterator.SEG_QUADTO:
-                    // Quadratic curves take two points
-
-                    /* Checking SEG_QUADTO coordinates if they are out of the
-                     * [LOWER_BND, UPPER_BND] range. This check also handles
-                     * NaN and Infinity values. Ignoring current path segment
-                     * in case of invalid endpoints's data. Equivalent to the
-                     * SEG_LINETO if endpoint coordinates are valid but there
-                     * are invalid data among other coordinates
-                     */
-                    if (point[2] < UPPER_BND && point[2] > LOWER_BND &&
-                        point[3] < UPPER_BND && point[3] > LOWER_BND)
-                    {
-                        if (skip) {
-                            r.beginSubpath(point[2], point[3]);
-                            subpathStarted = true;
-                            skip = false;
-                        } else {
-                            if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                                point[1] < UPPER_BND && point[1] > LOWER_BND)
-                            {
-                                r.appendQuadratic(point[0], point[1],
-                                                  point[2], point[3]);
-                            } else {
-                                r.appendLine(point[2], point[3]);
-                            }
-                        }
-                    }
-                    break;
-                case PathIterator.SEG_CUBICTO:
-                    // Cubic curves take three points
-
-                    /* Checking SEG_CUBICTO coordinates if they are out of the
-                     * [LOWER_BND, UPPER_BND] range. This check also handles
-                     * NaN and Infinity values. Ignoring  current path segment
-                     * in case of invalid endpoints's data. Equivalent to the
-                     * SEG_LINETO if endpoint coordinates are valid but there
-                     * are invalid data among other coordinates
-                     */
-
-                    if (point[4] < UPPER_BND && point[4] > LOWER_BND &&
-                        point[5] < UPPER_BND && point[5] > LOWER_BND)
-                    {
-                        if (skip) {
-                            r.beginSubpath(point[4], point[5]);
-                            subpathStarted = true;
-                            skip = false;
-                        } else {
-                            if (point[0] < UPPER_BND && point[0] > LOWER_BND &&
-                                point[1] < UPPER_BND && point[1] > LOWER_BND &&
-                                point[2] < UPPER_BND && point[2] > LOWER_BND &&
-                                point[3] < UPPER_BND && point[3] > LOWER_BND)
-                            {
-                                r.appendCubic(point[0], point[1],
-                                              point[2], point[3],
-                                              point[4], point[5]);
-                            } else {
-                                r.appendLine(point[4], point[5]);
-                            }
-                        }
-                    }
-                    break;
-                case PathIterator.SEG_CLOSE:
-                    if (subpathStarted) {
-                        r.closedSubpath();
-                        subpathStarted = false;
-                        pathClosed = true;
-                    }
-                    break;
-                }
-                pi.next();
-            }
-        }
-
-        try {
-            r.endPath();
-            r.getAlphaBox(bbox);
-            clip.clipBoxToBounds(bbox);
-            if (bbox[0] >= bbox[2] || bbox[1] >= bbox[3]) {
-                dropRasterizer(r);
-                return null;
-            }
-            r.setOutputArea(bbox[0], bbox[1],
-                            bbox[2] - bbox[0],
-                            bbox[3] - bbox[1]);
-        } catch (PRException e) {
-            /*
-             * This exeption is thrown from the native part of the Ductus
-             * (only in case of a debug build) to indicate that some
-             * segments of the path have very large coordinates.
-             * See 4485298 for more info.
-             */
-            System.err.println("DuctusRenderingEngine.getAATileGenerator: "+e);
-        }
-
-        return r;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public AATileGenerator getAATileGenerator(double x, double y,
-                                              double dx1, double dy1,
-                                              double dx2, double dy2,
-                                              double lw1, double lw2,
-                                              Region clip,
-                                              int bbox[])
-    {
-        // REMIND: Deal with large coordinates!
-        double ldx1, ldy1, ldx2, ldy2;
-        boolean innerpgram = (lw1 > 0 && lw2 > 0);
-
-        if (innerpgram) {
-            ldx1 = dx1 * lw1;
-            ldy1 = dy1 * lw1;
-            ldx2 = dx2 * lw2;
-            ldy2 = dy2 * lw2;
-            x -= (ldx1 + ldx2) / 2.0;
-            y -= (ldy1 + ldy2) / 2.0;
-            dx1 += ldx1;
-            dy1 += ldy1;
-            dx2 += ldx2;
-            dy2 += ldy2;
-            if (lw1 > 1 && lw2 > 1) {
-                // Inner parallelogram was entirely consumed by stroke...
-                innerpgram = false;
-            }
-        } else {
-            ldx1 = ldy1 = ldx2 = ldy2 = 0;
-        }
-
-        Rasterizer r = getRasterizer();
-
-        r.setUsage(Rasterizer.EOFILL);
-
-        r.beginPath();
-        r.beginSubpath((float) x, (float) y);
-        r.appendLine((float) (x+dx1), (float) (y+dy1));
-        r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2));
-        r.appendLine((float) (x+dx2), (float) (y+dy2));
-        r.closedSubpath();
-        if (innerpgram) {
-            x += ldx1 + ldx2;
-            y += ldy1 + ldy2;
-            dx1 -= 2.0 * ldx1;
-            dy1 -= 2.0 * ldy1;
-            dx2 -= 2.0 * ldx2;
-            dy2 -= 2.0 * ldy2;
-            r.beginSubpath((float) x, (float) y);
-            r.appendLine((float) (x+dx1), (float) (y+dy1));
-            r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2));
-            r.appendLine((float) (x+dx2), (float) (y+dy2));
-            r.closedSubpath();
-        }
-
-        try {
-            r.endPath();
-            r.getAlphaBox(bbox);
-            clip.clipBoxToBounds(bbox);
-            if (bbox[0] >= bbox[2] || bbox[1] >= bbox[3]) {
-                dropRasterizer(r);
-                return null;
-            }
-            r.setOutputArea(bbox[0], bbox[1],
-                            bbox[2] - bbox[0],
-                            bbox[3] - bbox[1]);
-        } catch (PRException e) {
-            /*
-             * This exeption is thrown from the native part of the Ductus
-             * (only in case of a debug build) to indicate that some
-             * segments of the path have very large coordinates.
-             * See 4485298 for more info.
-             */
-            System.err.println("DuctusRenderingEngine.getAATileGenerator: "+e);
-        }
-
-        return r;
-    }
-
-    private void feedConsumer(PathConsumer consumer, PathIterator pi) {
-        try {
-            consumer.beginPath();
-            boolean pathClosed = false;
-            float mx = 0.0f;
-            float my = 0.0f;
-            float point[]  = new float[6];
-
-            while (!pi.isDone()) {
-                int type = pi.currentSegment(point);
-                if (pathClosed == true) {
-                    pathClosed = false;
-                    if (type != PathIterator.SEG_MOVETO) {
-                        // Force current point back to last moveto point
-                        consumer.beginSubpath(mx, my);
-                    }
-                }
-                switch (type) {
-                case PathIterator.SEG_MOVETO:
-                    mx = point[0];
-                    my = point[1];
-                    consumer.beginSubpath(point[0], point[1]);
-                    break;
-                case PathIterator.SEG_LINETO:
-                    consumer.appendLine(point[0], point[1]);
-                    break;
-                case PathIterator.SEG_QUADTO:
-                    consumer.appendQuadratic(point[0], point[1],
-                                             point[2], point[3]);
-                    break;
-                case PathIterator.SEG_CUBICTO:
-                    consumer.appendCubic(point[0], point[1],
-                                         point[2], point[3],
-                                         point[4], point[5]);
-                    break;
-                case PathIterator.SEG_CLOSE:
-                    consumer.closedSubpath();
-                    pathClosed = true;
-                    break;
-                }
-                pi.next();
-            }
-
-            consumer.endPath();
-        } catch (PathException e) {
-            throw new InternalError("Unable to Stroke shape ("+
-                                    e.getMessage()+")", e);
-        }
-    }
-
-    private class FillAdapter implements PathConsumer {
-        boolean closed;
-        Path2D.Float path;
-
-        public FillAdapter() {
-            // Ductus only supplies float coordinates so
-            // Path2D.Double is not necessary here.
-            path = new Path2D.Float(Path2D.WIND_NON_ZERO);
-        }
-
-        public Shape getShape() {
-            return path;
-        }
-
-        public void dispose() {
-        }
-
-        public PathConsumer getConsumer() {
-            return null;
-        }
-
-        public void beginPath() {}
-
-        public void beginSubpath(float x0, float y0) {
-            if (closed) {
-                path.closePath();
-                closed = false;
-            }
-            path.moveTo(x0, y0);
-        }
-
-        public void appendLine(float x1, float y1) {
-            path.lineTo(x1, y1);
-        }
-
-        public void appendQuadratic(float xm, float ym, float x1, float y1) {
-            path.quadTo(xm, ym, x1, y1);
-        }
-
-        public void appendCubic(float xm, float ym,
-                                float xn, float yn,
-                                float x1, float y1) {
-            path.curveTo(xm, ym, xn, yn, x1, y1);
-        }
-
-        public void closedSubpath() {
-            closed = true;
-        }
-
-        public void endPath() {
-            if (closed) {
-                path.closePath();
-                closed = false;
-            }
-        }
-
-        public void useProxy(FastPathProducer proxy)
-            throws PathException
-        {
-            proxy.sendTo(this);
-        }
-
-        public long getCPathConsumer() {
-            return 0;
-        }
-    }
-}
--- a/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/font/CompositeFont.java	Fri Jul 08 12:17:10 2016 -0700
@@ -289,10 +289,21 @@
                 if (componentNames[slot] == null) {
                     componentNames[slot] = name;
                 } else if (!componentNames[slot].equalsIgnoreCase(name)) {
-                    components[slot] =
-                        (PhysicalFont) fm.findFont2D(componentNames[slot],
-                                                     style,
+                    /* If a component specifies the file with a bad font,
+                     * the corresponding slot will be initialized by
+                     * default physical font. In such case findFont2D may
+                     * return composite font which cannot be casted to
+                     * physical font.
+                     */
+                    try {
+                        components[slot] =
+                            (PhysicalFont) fm.findFont2D(componentNames[slot],
+                                                         style,
                                                 FontManager.PHYSICAL_FALLBACK);
+                    } catch (ClassCastException cce) {
+                        /* Assign default physical font to the slot */
+                        components[slot] = fm.getDefaultPhysicalFont();
+                    }
                 }
             }
             deferredInitialisation[slot] = false;
--- a/jdk/src/java.desktop/share/classes/sun/font/ScriptRunData.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/font/ScriptRunData.java	Fri Jul 08 12:17:10 2016 -0700
@@ -44,7 +44,7 @@
         if (cp >= data[cache] && cp < data[cache+2]) {
             return data[cache+1];
         }
-        if (cp >= CHAR_START & cp < CHAR_LIMIT) {
+        if ((cp >= CHAR_START) && (cp < CHAR_LIMIT)) {
             int probe = dataPower;
             int index = 0;
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/ArrayCache.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/ArrayCache.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
         for (int i = 0; i < BUCKETS; i++, arraySize <<= 2) {
             ARRAY_SIZES[i] = arraySize;
 
-            if (doTrace) {
+            if (DO_TRACE) {
                 logInfo("arraySize[" + i + "]: " + arraySize);
             }
         }
@@ -71,7 +71,7 @@
         for (int i = 0; i < BUCKETS; i++, arraySize <<= 1) {
             DIRTY_BYTE_ARRAY_SIZES[i] = arraySize;
 
-            if (doTrace) {
+            if (DO_TRACE) {
                 logInfo("dirty arraySize[" + i + "]: " + arraySize);
             }
         }
@@ -83,7 +83,7 @@
         THRESHOLD_LARGE_ARRAY_SIZE = 8L * THRESHOLD_ARRAY_SIZE; // 16M
         THRESHOLD_HUGE_ARRAY_SIZE  = 8L * THRESHOLD_LARGE_ARRAY_SIZE; // 128M
 
-        if (doStats || doMonitors) {
+        if (DO_STATS || DO_MONITORS) {
             logInfo("ArrayCache.BUCKETS        = " + BUCKETS);
             logInfo("ArrayCache.MIN_ARRAY_SIZE = " + MIN_ARRAY_SIZE);
             logInfo("ArrayCache.MAX_ARRAY_SIZE = " + MAX_ARRAY_SIZE);
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/ByteArrayCache.java	Fri Jul 08 12:17:10 2016 -0700
@@ -54,7 +54,7 @@
     }
 
     byte[] getArray() {
-        if (doStats) {
+        if (DO_STATS) {
             getOp++;
         }
 
@@ -64,7 +64,7 @@
             return array;
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             createOp++;
         }
 
@@ -73,18 +73,18 @@
 
     void putDirtyArray(final byte[] array, final int length) {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
         // NO clean-up of array data = DIRTY ARRAY
 
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(array, 0, array.length, BYTE_0);
         }
@@ -97,12 +97,12 @@
                   final int fromIndex, final int toIndex)
     {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
@@ -125,7 +125,7 @@
             Arrays.fill(array, fromIndex, toIndex, value);
         }
 
-        if (doChecks) {
+        if (DO_CHECKS) {
             check(array, fromIndex, toIndex, value);
         }
     }
@@ -133,7 +133,7 @@
     static void check(final byte[] array, final int fromIndex,
                       final int toIndex, final byte value)
     {
-        if (doChecks) {
+        if (DO_CHECKS) {
             // check zero on full array:
             for (int i = 0; i < array.length; i++) {
                 if (array[i] != value) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Curve.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package sun.java2d.marlin;
 
-import java.util.Iterator;
-
 final class Curve {
 
     float ax, ay, bx, by, cx, cy, dx, dy;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,9 +41,9 @@
  */
 final class Dasher implements sun.awt.geom.PathConsumer2D, MarlinConst {
 
-    static final int recLimit = 4;
+    static final int REC_LIMIT = 4;
     static final float ERR = 0.01f;
-    static final float minTincrement = 1f / (1 << recLimit);
+    static final float MIN_T_INC = 1f / (1 << REC_LIMIT);
 
     private PathConsumer2D out;
     private float[] dash;
@@ -139,7 +139,7 @@
      * clean up before reusing this instance
      */
     void dispose() {
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(curCurvepts, 0f);
             Arrays.fill(firstSegmentsBuffer, 0f);
@@ -217,8 +217,8 @@
                 int segIdx = firstSegidx;
                 float[] buf = firstSegmentsBuffer;
                 if (segIdx + len  > buf.length) {
-                    if (doStats) {
-                        RendererContext.stats.stat_array_dasher_firstSegmentsBuffer
+                    if (DO_STATS) {
+                        rdrCtx.stats.stat_array_dasher_firstSegmentsBuffer
                             .add(segIdx + len);
                     }
                     firstSegmentsBuffer = buf
@@ -403,8 +403,8 @@
         private final float[] curLeafCtrlPolyLengths = new float[3];
 
         LengthIterator() {
-            this.recCurveStack = new float[recLimit + 1][8];
-            this.sides = new Side[recLimit];
+            this.recCurveStack = new float[REC_LIMIT + 1][8];
+            this.sides = new Side[REC_LIMIT];
             // if any methods are called without first initializing this object
             // on a curve, we want it to fail ASAP.
             this.nextT = Float.MAX_VALUE;
@@ -421,7 +421,7 @@
         void reset() {
             // keep data dirty
             // as it appears not useful to reset data:
-            if (doCleanDirty) {
+            if (DO_CLEAN_DIRTY) {
                 final int recLimit = recCurveStack.length - 1;
                 for (int i = recLimit; i >= 0; i--) {
                     Arrays.fill(recCurveStack[i], 0f);
@@ -607,7 +607,7 @@
             if (len >= 0f) {
                 lastT = nextT;
                 lenAtLastT = lenAtNextT;
-                nextT += (1 << (recLimit - recLevel)) * minTincrement;
+                nextT += (1 << (REC_LIMIT - recLevel)) * MIN_T_INC;
                 lenAtNextT += len;
                 // invalidate caches
                 flatLeafCoefCache[2] = -1f;
@@ -641,7 +641,7 @@
             final float lineLen = Helpers.linelen(curve[0], curve[1],
                                                   curve[curveType-2],
                                                   curve[curveType-1]);
-            if ((polyLen - lineLen) < ERR || recLevel == recLimit) {
+            if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
                 return (polyLen + lineLen) / 2f;
             }
             return -1f;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java	Fri Jul 08 12:17:10 2016 -0700
@@ -54,7 +54,7 @@
     }
 
     float[] getArray() {
-        if (doStats) {
+        if (DO_STATS) {
             getOp++;
         }
 
@@ -65,7 +65,7 @@
             return array;
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             createOp++;
         }
 
@@ -74,18 +74,18 @@
 
     void putDirtyArray(final float[] array, final int length) {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
         // NO clean-up of array data = DIRTY ARRAY
 
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(array, 0, array.length, 0f);
         }
@@ -98,12 +98,12 @@
                   final int fromIndex, final int toIndex)
     {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
@@ -126,7 +126,7 @@
             Arrays.fill(array, fromIndex, toIndex, value);
         }
 
-        if (doChecks) {
+        if (DO_CHECKS) {
             check(array, fromIndex, toIndex, value);
         }
     }
@@ -134,7 +134,7 @@
     static void check(final float[] array, final int fromIndex,
                       final int toIndex, final float value)
     {
-        if (doChecks) {
+        if (DO_CHECKS) {
             // check zero on full array:
             for (int i = 0; i < array.length; i++) {
                 if (array[i] != value) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Helpers.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -248,9 +248,9 @@
      * the 6 right coordinates
      * @since 1.7
      */
-    static void subdivideCubic(float src[], int srcoff,
-                               float left[], int leftoff,
-                               float right[], int rightoff)
+    static void subdivideCubic(float[] src, int srcoff,
+                               float[] left, int leftoff,
+                               float[] right, int rightoff)
     {
         float x1 = src[srcoff + 0];
         float y1 = src[srcoff + 1];
@@ -299,9 +299,9 @@
     }
 
 
-    static void subdivideCubicAt(float t, float src[], int srcoff,
-                                 float left[], int leftoff,
-                                 float right[], int rightoff)
+    static void subdivideCubicAt(float t, float[] src, int srcoff,
+                                 float[] left, int leftoff,
+                                 float[] right, int rightoff)
     {
         float x1 = src[srcoff + 0];
         float y1 = src[srcoff + 1];
@@ -349,9 +349,9 @@
         }
     }
 
-    static void subdivideQuad(float src[], int srcoff,
-                              float left[], int leftoff,
-                              float right[], int rightoff)
+    static void subdivideQuad(float[] src, int srcoff,
+                              float[] left, int leftoff,
+                              float[] right, int rightoff)
     {
         float x1 = src[srcoff + 0];
         float y1 = src[srcoff + 1];
@@ -387,9 +387,9 @@
         }
     }
 
-    static void subdivideQuadAt(float t, float src[], int srcoff,
-                                float left[], int leftoff,
-                                float right[], int rightoff)
+    static void subdivideQuadAt(float t, float[] src, int srcoff,
+                                float[] left, int leftoff,
+                                float[] right, int rightoff)
     {
         float x1 = src[srcoff + 0];
         float y1 = src[srcoff + 1];
@@ -425,9 +425,9 @@
         }
     }
 
-    static void subdivideAt(float t, float src[], int srcoff,
-                            float left[], int leftoff,
-                            float right[], int rightoff, int size)
+    static void subdivideAt(float t, float[] src, int srcoff,
+                            float[] left, int leftoff,
+                            float[] right, int rightoff, int size)
     {
         switch(size) {
         case 8:
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/IntArrayCache.java	Fri Jul 08 12:17:10 2016 -0700
@@ -54,7 +54,7 @@
     }
 
     int[] getArray() {
-        if (doStats) {
+        if (DO_STATS) {
             getOp++;
         }
 
@@ -64,7 +64,7 @@
             return array;
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             createOp++;
         }
 
@@ -73,18 +73,18 @@
 
     void putDirtyArray(final int[] array, final int length) {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
         // NO clean-up of array data = DIRTY ARRAY
 
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(array, 0, array.length, 0);
         }
@@ -97,12 +97,12 @@
                   final int fromIndex, final int toIndex)
     {
         if (length != arraySize) {
-            if (doChecks) {
+            if (DO_CHECKS) {
                 MarlinUtils.logInfo("ArrayCache: bad length = " + length);
             }
             return;
         }
-        if (doStats) {
+        if (DO_STATS) {
             returnOp++;
         }
 
@@ -125,7 +125,7 @@
             Arrays.fill(array, fromIndex, toIndex, value);
         }
 
-        if (doChecks) {
+        if (DO_CHECKS) {
             check(array, fromIndex, toIndex, value);
         }
     }
@@ -133,7 +133,7 @@
     static void check(final int[] array, final int fromIndex,
                       final int toIndex, final int value)
     {
-        if (doChecks) {
+        if (DO_CHECKS) {
             // check zero on full array:
             for (int i = 0; i < array.length; i++) {
                 if (array[i] != value) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinCache.java	Fri Jul 08 12:17:10 2016 -0700
@@ -60,7 +60,7 @@
         ALPHA_MAP_UNSAFE = new OffHeapArray(_ALPHA_MAP, _ALPHA_MAP.length); // 1K
         ALPHA_MAP =_ALPHA_MAP;
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long addr = ALPHA_MAP_UNSAFE.address;
 
         for (int i = 0; i < _ALPHA_MAP.length; i++) {
@@ -157,7 +157,7 @@
                     || (width * heightSubPixel) >
                             ((edgeSumDeltaY - heightSubPixel) << BLOCK_SIZE_LG);
 
-                if (doTrace && !useRLE) {
+                if (DO_TRACE && !useRLE) {
                     final float meanCrossings
                         = ((float) edgeSumDeltaY) / heightSubPixel;
                     final float meanDist = width / (meanCrossings - 1);
@@ -180,8 +180,8 @@
         final int nxTiles = (width + TILE_SIZE) >> TILE_SIZE_LG;
 
         if (nxTiles > INITIAL_ARRAY) {
-            if (doStats) {
-                RendererContext.stats.stat_array_marlincache_touchedTile
+            if (DO_STATS) {
+                rdrCtx.stats.stat_array_marlincache_touchedTile
                     .add(nxTiles);
             }
             touchedTile = rdrCtx.getIntArray(nxTiles);
@@ -206,7 +206,7 @@
             // note: may throw OOME:
             rowAAChunk.resize(INITIAL_CHUNK_ARRAY);
         }
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             rowAAChunk.fill(BYTE_0);
         }
@@ -217,15 +217,15 @@
         bboxY0 = pminY;
 
         // reset current pos
-        if (doStats) {
-            RendererContext.stats.stat_cache_rowAAChunk.add(rowAAChunkPos);
+        if (DO_STATS) {
+            rdrCtx.stats.stat_cache_rowAAChunk.add(rowAAChunkPos);
         }
         rowAAChunkPos = 0L;
 
         // Reset touchedTile:
         if (tileMin != Integer.MAX_VALUE) {
-            if (doStats) {
-                RendererContext.stats.stat_cache_tiles.add(tileMax - tileMin);
+            if (DO_STATS) {
+                rdrCtx.stats.stat_cache_tiles.add(tileMax - tileMin);
             }
             // clean only dirty touchedTile:
             if (tileMax == 1) {
@@ -238,7 +238,7 @@
             tileMax = Integer.MIN_VALUE;
         }
 
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             rowAAChunk.fill(BYTE_0);
         }
@@ -267,14 +267,14 @@
     void copyAARowNoRLE(final int[] alphaRow, final int y,
                    final int px0, final int px1)
     {
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_copyAARow.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_copyAARow.start();
         }
 
         // skip useless pixels above boundary
         final int px_bbox1 = FloatMath.min(px1, bboxX1);
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("row = [" + px0 + " ... " + px_bbox1
                                 + " (" + px1 + ") [ for y=" + y);
         }
@@ -305,8 +305,8 @@
         if (_rowAAChunk.length < needSize) {
             expandRowAAChunk(needSize);
         }
-        if (doStats) {
-            RendererContext.stats.stat_cache_rowAA.add(px_bbox1 - px0);
+        if (DO_STATS) {
+            rdrCtx.stats.stat_cache_rowAA.add(px_bbox1 - px0);
         }
 
         // rowAA contains only alpha values for range[x0; x1[
@@ -316,7 +316,7 @@
         final int from = px0      - bboxX0; // first pixel inclusive
         final int to   = px_bbox1 - bboxX0; //  last pixel exclusive
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long SIZE_BYTE = 1L;
         final long addr_alpha = ALPHA_MAP_UNSAFE.address;
         long addr_off = _rowAAChunk.address + pos;
@@ -361,23 +361,23 @@
             tileMax = tx;
         }
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("clear = [" + from + " ... " + to + "[");
         }
 
         // Clear alpha row for reuse:
         IntArrayCache.fill(alphaRow, from, px1 - bboxX0, 0);
 
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_copyAARow.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_copyAARow.stop();
         }
     }
 
     void copyAARowRLE_WithBlockFlags(final int[] blkFlags, final int[] alphaRow,
                       final int y, final int px0, final int px1)
     {
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_copyAARow.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_copyAARow.start();
         }
 
         // Copy rowAA data into the piscesCache if one is present
@@ -391,7 +391,7 @@
         final int px_bbox1 = FloatMath.min(px1, bboxX1);
         final int to       = px_bbox1 - _bboxX0; //  last pixel exclusive
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("row = [" + px0 + " ... " + px_bbox1
                                 + " (" + px1 + ") [ for y=" + y);
         }
@@ -410,7 +410,7 @@
             expandRowAAChunk(needSize);
         }
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long SIZE_INT = 4L;
         final long addr_alpha = ALPHA_MAP_UNSAFE.address;
         long addr_off = _rowAAChunk.address + initialPos;
@@ -465,7 +465,7 @@
                             // note: it should check X is smaller than 23bits (overflow)!
 
                             // check address alignment to 4 bytes:
-                            if (doCheckUnsafe) {
+                            if (DO_CHECK_UNSAFE) {
                                 if ((addr_off & 3) != 0) {
                                     MarlinUtils.logInfo("Misaligned Unsafe address: " + addr_off);
                                 }
@@ -490,8 +490,8 @@
                             }
                             addr_off += SIZE_INT;
 
-                            if (doStats) {
-                                RendererContext.stats.hist_tile_generator_encoding_runLen
+                            if (DO_STATS) {
+                                rdrCtx.stats.hist_tile_generator_encoding_runLen
                                     .add(runLen);
                             }
                             cx0 = cx;
@@ -513,7 +513,7 @@
                         }
                     }
                 }
-            } else if (doStats) {
+            } else if (DO_STATS) {
                 skip++;
             }
         }
@@ -528,7 +528,7 @@
         // note: it should check X is smaller than 23bits (overflow)!
 
         // check address alignment to 4 bytes:
-        if (doCheckUnsafe) {
+        if (DO_CHECK_UNSAFE) {
             if ((addr_off & 3) != 0) {
                 MarlinUtils.logInfo("Misaligned Unsafe address: " + addr_off);
             }
@@ -553,8 +553,8 @@
         }
         addr_off += SIZE_INT;
 
-        if (doStats) {
-            RendererContext.stats.hist_tile_generator_encoding_runLen
+        if (DO_STATS) {
+            rdrCtx.stats.hist_tile_generator_encoding_runLen
                 .add(runLen);
         }
 
@@ -566,9 +566,9 @@
         // update current position:
         rowAAChunkPos = len;
 
-        if (doStats) {
-            RendererContext.stats.stat_cache_rowAA.add(rowAALen[row]);
-            RendererContext.stats.hist_tile_generator_encoding_ratio.add(
+        if (DO_STATS) {
+            rdrCtx.stats.stat_cache_rowAA.add(rowAALen[row]);
+            rdrCtx.stats.hist_tile_generator_encoding_ratio.add(
                 (100 * skip) / (blkE - blkW)
             );
         }
@@ -589,13 +589,13 @@
             alphaRow[to    ] = 0;
             alphaRow[to + 1] = 0;
         }
-        if (doChecks) {
+        if (DO_CHECKS) {
             IntArrayCache.check(blkFlags, blkW, blkE, 0);
             IntArrayCache.check(alphaRow, from, px1 - bboxX0, 0);
         }
 
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_copyAARow.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_copyAARow.stop();
         }
     }
 
@@ -611,8 +611,8 @@
     }
 
     private void expandRowAAChunk(final long needSize) {
-        if (doStats) {
-            RendererContext.stats.stat_array_marlincache_rowAAChunk
+        if (DO_STATS) {
+            rdrCtx.stats.stat_array_marlincache_rowAAChunk
                 .add(needSize);
         }
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinConst.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,54 +30,55 @@
  */
 interface MarlinConst {
     // enable Logs (logger or stdout)
-    static final boolean enableLogs = MarlinProperties.isLoggingEnabled();
+    static final boolean ENABLE_LOGS = MarlinProperties.isLoggingEnabled();
     // use Logger instead of stdout
-    static final boolean useLogger = enableLogs && MarlinProperties.isUseLogger();
+    static final boolean USE_LOGGER = ENABLE_LOGS && MarlinProperties.isUseLogger();
 
     // log new RendererContext
-    static final boolean logCreateContext = enableLogs
+    static final boolean LOG_CREATE_CONTEXT = ENABLE_LOGS
         && MarlinProperties.isLogCreateContext();
     // log misc.Unsafe alloc/realloc/free
-    static final boolean logUnsafeMalloc = enableLogs
+    static final boolean LOG_UNSAFE_MALLOC = ENABLE_LOGS
         && MarlinProperties.isLogUnsafeMalloc();
     // do check unsafe alignment:
-    static final boolean doCheckUnsafe = false;
+    static final boolean DO_CHECK_UNSAFE = false;
 
     // do statistics
-    static final boolean doStats = enableLogs && MarlinProperties.isDoStats();
+    static final boolean DO_STATS = ENABLE_LOGS && MarlinProperties.isDoStats();
     // do monitors
     // disabled to reduce byte-code size a bit...
-    static final boolean doMonitors = false;
-//    static final boolean doMonitors = enableLogs && MarlinProperties.isDoMonitors();
+    static final boolean DO_MONITORS = false;
+//    static final boolean DO_MONITORS = ENABLE_LOGS && MarlinProperties.isDoMonitors();
     // do checks
-    static final boolean doChecks = enableLogs && MarlinProperties.isDoChecks();
+    static final boolean DO_CHECKS = ENABLE_LOGS && MarlinProperties.isDoChecks();
 
     // do AA range checks: disable when algorithm / code is stable
     static final boolean DO_AA_RANGE_CHECK = false;
 
     // enable logs
-    static final boolean doLogWidenArray = enableLogs && false;
+    static final boolean DO_LOG_WIDEN_ARRAY = ENABLE_LOGS && false;
     // enable oversize logs
-    static final boolean doLogOverSize = enableLogs && false;
+    static final boolean DO_LOG_OVERSIZE = ENABLE_LOGS && false;
     // enable traces
-    static final boolean doTrace = enableLogs && false;
+    static final boolean DO_TRACE = ENABLE_LOGS && false;
+
     // do flush monitors
-    static final boolean doFlushMonitors = true;
+    static final boolean DO_FLUSH_MONITORS = true;
     // use one polling thread to dump statistics/monitors
-    static final boolean useDumpThread = false;
+    static final boolean USE_DUMP_THREAD = false;
     // thread dump interval (ms)
-    static final long statDump = 5000L;
+    static final long DUMP_INTERVAL = 5000L;
 
     // do clean dirty array
-    static final boolean doCleanDirty = false;
+    static final boolean DO_CLEAN_DIRTY = false;
 
     // flag to use line simplifier
-    static final boolean useSimplifier = MarlinProperties.isUseSimplifier();
+    static final boolean USE_SIMPLIFIER = MarlinProperties.isUseSimplifier();
 
     // flag to enable logs related bounds checks
-    static final boolean doLogBounds = enableLogs && false;
+    static final boolean DO_LOG_BOUNDS = ENABLE_LOGS && false;
 
-    // Initial Array sizing (initial context capacity) ~ 512K
+    // Initial Array sizing (initial context capacity) ~ 350K
 
     // 2048 pixel (width x height) for initial capacity
     static final int INITIAL_PIXEL_DIM
@@ -88,8 +89,6 @@
     static final int INITIAL_SMALL_ARRAY  = 1024;
     static final int INITIAL_MEDIUM_ARRAY = 4096;
     static final int INITIAL_LARGE_ARRAY  = 8192;
-    static final int INITIAL_ARRAY_16K    = 16384;
-    static final int INITIAL_ARRAY_32K    = 32768;
     // alpha row dimension
     static final int INITIAL_AA_ARRAY     = INITIAL_PIXEL_DIM;
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinRenderingEngine.java	Fri Jul 08 12:17:10 2016 -0700
@@ -85,7 +85,7 @@
                                     int caps,
                                     int join,
                                     float miterlimit,
-                                    float dashes[],
+                                    float[] dashes,
                                     float dashphase)
     {
         final RendererContext rdrCtx = getRendererContext();
@@ -278,7 +278,7 @@
                         int caps,
                         int join,
                         float miterlimit,
-                        float dashes[],
+                        float[] dashes,
                         float dashphase,
                         PathConsumer2D pc2d)
     {
@@ -340,8 +340,8 @@
                     if (dashLen <= INITIAL_ARRAY) {
                         newDashes = rdrCtx.dasher.dashes_initial;
                     } else {
-                        if (doStats) {
-                            RendererContext.stats.stat_array_dasher_dasher
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_array_dasher_dasher
                                 .add(dashLen);
                         }
                         newDashes = rdrCtx.getDirtyFloatArray(dashLen);
@@ -380,7 +380,7 @@
             at = null;
         }
 
-        if (useSimplifier) {
+        if (USE_SIMPLIFIER) {
             // Use simplifier after stroker before Renderer
             // to remove collinear segments (notably due to cap square)
             pc2d = rdrCtx.simplifier.init(pc2d);
@@ -474,9 +474,6 @@
 
         @Override
         public final int currentSegment(final float[] coords) {
-            if (doMonitors) {
-                RendererContext.stats.mon_npi_currentSegment.start();
-            }
             int lastCoord;
             final int type = src.currentSegment(coords);
 
@@ -495,17 +492,11 @@
                     // we don't want to deal with this case later. We just exit now
                     curx_adjust = movx_adjust;
                     cury_adjust = movy_adjust;
-
-                    if (doMonitors) {
-                        RendererContext.stats.mon_npi_currentSegment.stop();
-                    }
                     return type;
                 default:
                     throw new InternalError("Unrecognized curve type");
             }
 
-            // TODO: handle NaN, Inf and overflow
-
             // normalize endpoint
             float coord, x_adjust, y_adjust;
 
@@ -543,10 +534,6 @@
             }
             curx_adjust = x_adjust;
             cury_adjust = y_adjust;
-
-            if (doMonitors) {
-                RendererContext.stats.mon_npi_currentSegment.stop();
-            }
             return type;
         }
 
@@ -790,7 +777,7 @@
                                               BasicStroke bs,
                                               boolean thin,
                                               boolean normalize,
-                                              int bbox[])
+                                              int[] bbox)
     {
         MarlinTileGenerator ptg = null;
         Renderer r = null;
@@ -808,6 +795,7 @@
                 final PathIterator pi = getNormalizingPathIterator(rdrCtx, norm,
                                             s.getPathIterator(_at));
 
+                // note: Winding rule may be EvenOdd ONLY for fill operations !
                 r = rdrCtx.renderer.init(clip.getLoX(), clip.getLoY(),
                                          clip.getWidth(), clip.getHeight(),
                                          pi.getWindingRule());
@@ -848,7 +836,7 @@
                                                     double dx2, double dy2,
                                                     double lw1, double lw2,
                                                     Region clip,
-                                                    int bbox[])
+                                                    int[] bbox)
     {
         // REMIND: Deal with large coordinates!
         double ldx1, ldy1, ldx2, ldy2;
@@ -949,17 +937,17 @@
 
     // --- RendererContext handling ---
     // use ThreadLocal or ConcurrentLinkedQueue to get one RendererContext
-    private static final boolean useThreadLocal;
+    private static final boolean USE_THREAD_LOCAL;
 
     // reference type stored in either TL or CLQ
     static final int REF_TYPE;
 
     // Per-thread RendererContext
-    private static final ReentrantContextProvider<RendererContext> rdrCtxProvider;
+    private static final ReentrantContextProvider<RendererContext> RDR_CTX_PROVIDER;
 
     // Static initializer to use TL or CLQ mode
     static {
-        useThreadLocal = MarlinProperties.isUseThreadLocal();
+        USE_THREAD_LOCAL = MarlinProperties.isUseThreadLocal();
 
         // Soft reference by default:
         final String refType = AccessController.doPrivileged(
@@ -978,8 +966,8 @@
                 break;
         }
 
-        if (useThreadLocal) {
-            rdrCtxProvider = new ReentrantContextProviderTL<RendererContext>(REF_TYPE)
+        if (USE_THREAD_LOCAL) {
+            RDR_CTX_PROVIDER = new ReentrantContextProviderTL<RendererContext>(REF_TYPE)
                 {
                     @Override
                     protected RendererContext newContext() {
@@ -987,7 +975,7 @@
                     }
                 };
         } else {
-            rdrCtxProvider = new ReentrantContextProviderCLQ<RendererContext>(REF_TYPE)
+            RDR_CTX_PROVIDER = new ReentrantContextProviderCLQ<RendererContext>(REF_TYPE)
                 {
                     @Override
                     protected RendererContext newContext() {
@@ -997,14 +985,14 @@
         }
     }
 
-    private static boolean settingsLogged = !enableLogs;
+    private static boolean SETTINGS_LOGGED = !ENABLE_LOGS;
 
     private static void logSettings(final String reClass) {
         // log information at startup
-        if (settingsLogged) {
+        if (SETTINGS_LOGGED) {
             return;
         }
-        settingsLogged = true;
+        SETTINGS_LOGGED = true;
 
         String refType;
         switch (REF_TYPE) {
@@ -1029,7 +1017,7 @@
         logInfo("sun.java2d.renderer                  = "
                 + reClass);
         logInfo("sun.java2d.renderer.useThreadLocal   = "
-                + useThreadLocal);
+                + USE_THREAD_LOCAL);
         logInfo("sun.java2d.renderer.useRef           = "
                 + refType);
 
@@ -1063,23 +1051,23 @@
 
         // optimisation parameters
         logInfo("sun.java2d.renderer.useSimplifier    = "
-                + MarlinConst.useSimplifier);
+                + MarlinConst.USE_SIMPLIFIER);
 
         // debugging parameters
         logInfo("sun.java2d.renderer.doStats          = "
-                + MarlinConst.doStats);
+                + MarlinConst.DO_STATS);
         logInfo("sun.java2d.renderer.doMonitors       = "
-                + MarlinConst.doMonitors);
+                + MarlinConst.DO_MONITORS);
         logInfo("sun.java2d.renderer.doChecks         = "
-                + MarlinConst.doChecks);
+                + MarlinConst.DO_CHECKS);
 
         // logging parameters
         logInfo("sun.java2d.renderer.useLogger        = "
-                + MarlinConst.useLogger);
+                + MarlinConst.USE_LOGGER);
         logInfo("sun.java2d.renderer.logCreateContext = "
-                + MarlinConst.logCreateContext);
+                + MarlinConst.LOG_CREATE_CONTEXT);
         logInfo("sun.java2d.renderer.logUnsafeMalloc  = "
-                + MarlinConst.logUnsafeMalloc);
+                + MarlinConst.LOG_UNSAFE_MALLOC);
 
         // quality settings
         logInfo("Renderer settings:");
@@ -1098,9 +1086,9 @@
      */
     @SuppressWarnings({"unchecked"})
     static RendererContext getRendererContext() {
-        final RendererContext rdrCtx = rdrCtxProvider.acquire();
-        if (doMonitors) {
-            RendererContext.stats.mon_pre_getAATileGenerator.start();
+        final RendererContext rdrCtx = RDR_CTX_PROVIDER.acquire();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_pre_getAATileGenerator.start();
         }
         return rdrCtx;
     }
@@ -1112,9 +1100,9 @@
     static void returnRendererContext(final RendererContext rdrCtx) {
         rdrCtx.dispose();
 
-        if (doMonitors) {
-            RendererContext.stats.mon_pre_getAATileGenerator.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_pre_getAATileGenerator.stop();
         }
-        rdrCtxProvider.release(rdrCtx);
+        RDR_CTX_PROVIDER.release(rdrCtx);
     }
 }
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinTileGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,9 +37,13 @@
     private final MarlinCache cache;
     private int x, y;
 
+    // per-thread renderer context
+    final RendererContext rdrCtx;
+
     MarlinTileGenerator(Renderer r) {
         this.rdr = r;
         this.cache = r.cache;
+        this.rdrCtx = r.rdrCtx;
     }
 
     MarlinTileGenerator init() {
@@ -55,19 +59,19 @@
      */
     @Override
     public void dispose() {
-        if (doMonitors) {
+        if (DO_MONITORS) {
             // called from AAShapePipe.renderTiles() (render tiles end):
-            RendererContext.stats.mon_pipe_renderTiles.stop();
+            rdrCtx.stats.mon_pipe_renderTiles.stop();
         }
         // dispose cache:
         cache.dispose();
         // dispose renderer:
         rdr.dispose();
         // recycle the RendererContext instance
-        MarlinRenderingEngine.returnRendererContext(rdr.rdrCtx);
+        MarlinRenderingEngine.returnRendererContext(rdrCtx);
     }
 
-    void getBbox(int bbox[]) {
+    void getBbox(int[] bbox) {
         bbox[0] = cache.bboxX0;
         bbox[1] = cache.bboxY0;
         bbox[2] = cache.bboxX1;
@@ -80,9 +84,9 @@
      */
     @Override
     public int getTileWidth() {
-        if (doMonitors) {
+        if (DO_MONITORS) {
             // called from AAShapePipe.renderTiles() (render tiles start):
-            RendererContext.stats.mon_pipe_renderTiles.start();
+            rdrCtx.stats.mon_pipe_renderTiles.start();
         }
         return TILE_SIZE;
     }
@@ -126,8 +130,8 @@
         // values anyway.
         final int alpha = (al == 0x00 ? 0x00
                               : (al == MAX_TILE_ALPHA_SUM ? 0xff : 0x80));
-        if (doStats) {
-            RendererContext.stats.hist_tile_generator_alpha.add(alpha);
+        if (DO_STATS) {
+            rdrCtx.stats.hist_tile_generator_alpha.add(alpha);
         }
         return alpha;
     }
@@ -157,7 +161,7 @@
      * once per tile, but not both.
      */
     @Override
-    public void getAlpha(final byte tile[], final int offset,
+    public void getAlpha(final byte[] tile, final int offset,
                                             final int rowstride)
     {
         if (cache.useRLE) {
@@ -172,11 +176,11 @@
      * Either this method, or the nextTile() method should be called
      * once per tile, but not both.
      */
-    private void getAlphaNoRLE(final byte tile[], final int offset,
+    private void getAlphaNoRLE(final byte[] tile, final int offset,
                                final int rowstride)
     {
-        if (doMonitors) {
-            RendererContext.stats.mon_ptg_getAlpha.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_ptg_getAlpha.start();
         }
 
         // local vars for performance:
@@ -192,12 +196,12 @@
         final int y0 = 0;
         final int y1 = FloatMath.min(this.y + TILE_SIZE, _cache.bboxY1) - this.y;
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("getAlpha = [" + x0 + " ... " + x1
                                 + "[ [" + y0 + " ... " + y1 + "[");
         }
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long SIZE = 1L;
         final long addr_rowAA = _cache.rowAAChunk.address;
         long addr;
@@ -252,7 +256,7 @@
                 cx++;
             }
 
-            if (doTrace) {
+            if (DO_TRACE) {
                 for (int i = idx - (x1 - x0); i < idx; i++) {
                     System.out.print(hex(tile[i], 2));
                 }
@@ -264,8 +268,8 @@
 
         nextTile();
 
-        if (doMonitors) {
-            RendererContext.stats.mon_ptg_getAlpha.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_ptg_getAlpha.stop();
         }
     }
 
@@ -274,11 +278,11 @@
      * Either this method, or the nextTile() method should be called
      * once per tile, but not both.
      */
-    private void getAlphaRLE(final byte tile[], final int offset,
+    private void getAlphaRLE(final byte[] tile, final int offset,
                              final int rowstride)
     {
-        if (doMonitors) {
-            RendererContext.stats.mon_ptg_getAlpha.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_ptg_getAlpha.start();
         }
 
         // Decode run-length encoded alpha mask data
@@ -302,12 +306,12 @@
         final int y0 = 0;
         final int y1 = FloatMath.min(this.y + TILE_SIZE, _cache.bboxY1) - this.y;
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("getAlpha = [" + x0 + " ... " + x1
                                 + "[ [" + y0 + " ... " + y1 + "[");
         }
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long SIZE_BYTE = 1L;
         final long SIZE_INT = 4L;
         final long addr_rowAA = _cache.rowAAChunk.address;
@@ -438,7 +442,7 @@
                 cx++;
             }
 
-            if (doTrace) {
+            if (DO_TRACE) {
                 for (int i = idx - (x1 - x0); i < idx; i++) {
                     System.out.print(hex(tile[i], 2));
                 }
@@ -450,8 +454,8 @@
 
         nextTile();
 
-        if (doMonitors) {
-            RendererContext.stats.mon_ptg_getAlpha.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_ptg_getAlpha.stop();
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/MarlinUtils.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,13 +28,13 @@
 
 public final class MarlinUtils {
     // Marlin logger
-    private static final sun.util.logging.PlatformLogger log;
+    private static final sun.util.logging.PlatformLogger LOG;
 
     static {
-        if (MarlinConst.useLogger) {
-            log = sun.util.logging.PlatformLogger.getLogger("sun.java2d.marlin");
+        if (MarlinConst.USE_LOGGER) {
+            LOG = sun.util.logging.PlatformLogger.getLogger("sun.java2d.marlin");
         } else {
-            log = null;
+            LOG = null;
         }
     }
 
@@ -43,18 +43,18 @@
     }
 
     public static void logInfo(final String msg) {
-        if (MarlinConst.useLogger) {
-            log.info(msg);
-        } else if (MarlinConst.enableLogs) {
+        if (MarlinConst.USE_LOGGER) {
+            LOG.info(msg);
+        } else if (MarlinConst.ENABLE_LOGS) {
             System.out.print("INFO: ");
             System.out.println(msg);
         }
     }
 
     public static void logException(final String msg, final Throwable th) {
-        if (MarlinConst.useLogger) {
-            log.warning(msg, th);
-        } else if (MarlinConst.enableLogs) {
+        if (MarlinConst.USE_LOGGER) {
+            LOG.warning(msg, th);
+        } else if (MarlinConst.ENABLE_LOGS) {
             System.out.print("WARNING: ");
             System.out.println(msg);
             th.printStackTrace(System.err);
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/OffHeapArray.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
 
 package sun.java2d.marlin;
 
-import static sun.java2d.marlin.MarlinConst.logUnsafeMalloc;
+import static sun.java2d.marlin.MarlinConst.LOG_UNSAFE_MALLOC;
 import jdk.internal.misc.Unsafe;
 import jdk.internal.ref.CleanerFactory;
 
@@ -36,12 +36,12 @@
 final class OffHeapArray  {
 
     // unsafe reference
-    static final Unsafe unsafe;
+    static final Unsafe UNSAFE;
     // size of int / float
     static final int SIZE_INT;
 
     static {
-        unsafe   = Unsafe.getUnsafe();
+        UNSAFE   = Unsafe.getUnsafe();
         SIZE_INT = Unsafe.ARRAY_INT_INDEX_SCALE;
     }
 
@@ -52,10 +52,10 @@
 
     OffHeapArray(final Object parent, final long len) {
         // note: may throw OOME:
-        this.address = unsafe.allocateMemory(len);
+        this.address = UNSAFE.allocateMemory(len);
         this.length  = len;
         this.used    = 0;
-        if (logUnsafeMalloc) {
+        if (LOG_UNSAFE_MALLOC) {
             MarlinUtils.logInfo(System.currentTimeMillis()
                                 + ": OffHeapArray.allocateMemory =   "
                                 + len + " to addr = " + this.address);
@@ -72,9 +72,9 @@
      */
     void resize(final long len) {
         // note: may throw OOME:
-        this.address = unsafe.reallocateMemory(address, len);
+        this.address = UNSAFE.reallocateMemory(address, len);
         this.length  = len;
-        if (logUnsafeMalloc) {
+        if (LOG_UNSAFE_MALLOC) {
             MarlinUtils.logInfo(System.currentTimeMillis()
                                 + ": OffHeapArray.reallocateMemory = "
                                 + len + " to addr = " + this.address);
@@ -82,8 +82,8 @@
     }
 
     void free() {
-        unsafe.freeMemory(this.address);
-        if (logUnsafeMalloc) {
+        UNSAFE.freeMemory(this.address);
+        if (LOG_UNSAFE_MALLOC) {
             MarlinUtils.logInfo(System.currentTimeMillis()
                                 + ": OffHeapArray.freeMemory =       "
                                 + this.length
@@ -92,6 +92,6 @@
     }
 
     void fill(final byte val) {
-        unsafe.setMemory(this.address, this.length, val);
+        UNSAFE.setMemory(this.address, this.length, val);
     }
 }
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Renderer.java	Fri Jul 08 12:17:10 2016 -0700
@@ -189,8 +189,8 @@
             maxDD /= 4f; // error divided by 2^2 = 4
 
             count <<= 1;
-            if (doStats) {
-                RendererContext.stats.stat_rdr_quadBreak_dec.add(count);
+            if (DO_STATS) {
+                rdrCtx.stats.stat_rdr_quadBreak_dec.add(count);
             }
         }
 
@@ -214,15 +214,15 @@
 
                 addLine(x0, y0, x1, y1);
 
-                if (doStats) { nL++; }
+                if (DO_STATS) { nL++; }
                 x0 = x1;
                 y0 = y1;
             }
         }
         addLine(x0, y0, x2, y2);
 
-        if (doStats) {
-            RendererContext.stats.stat_rdr_quadBreak.add(nL + 1);
+        if (DO_STATS) {
+            rdrCtx.stats.stat_rdr_quadBreak.add(nL + 1);
         }
     }
 
@@ -268,8 +268,8 @@
                 dy = (dy - ddy) / 2f;
 
                 count <<= 1;
-                if (doStats) {
-                    RendererContext.stats.stat_rdr_curveBreak_dec.add(count);
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_rdr_curveBreak_dec.add(count);
                 }
             }
 
@@ -289,8 +289,8 @@
                 dddy *= 8f;
 
                 count >>= 1;
-                if (doStats) {
-                    RendererContext.stats.stat_rdr_curveBreak_inc.add(count);
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_rdr_curveBreak_inc.add(count);
                 }
             }
             if (--count > 0) {
@@ -307,21 +307,21 @@
 
             addLine(x0, y0, x1, y1);
 
-            if (doStats) { nL++; }
+            if (DO_STATS) { nL++; }
             x0 = x1;
             y0 = y1;
         }
-        if (doStats) {
-            RendererContext.stats.stat_rdr_curveBreak.add(nL);
+        if (DO_STATS) {
+            rdrCtx.stats.stat_rdr_curveBreak.add(nL);
         }
     }
 
     private void addLine(float x1, float y1, float x2, float y2) {
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_addLine.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_addLine.start();
         }
-        if (doStats) {
-            RendererContext.stats.stat_rdr_addLine.add(1);
+        if (DO_STATS) {
+            rdrCtx.stats.stat_rdr_addLine.add(1);
         }
         int or = 1; // orientation of the line. 1 if y increases, 0 otherwise.
         if (y2 < y1) {
@@ -349,11 +349,11 @@
         /* skip horizontal lines in pixel space and clip edges
            out of y range [boundsMinY; boundsMaxY] */
         if (firstCrossing >= lastCrossing) {
-            if (doMonitors) {
-                RendererContext.stats.mon_rdr_addLine.stop();
+            if (DO_MONITORS) {
+                rdrCtx.stats.mon_rdr_addLine.stop();
             }
-            if (doStats) {
-                RendererContext.stats.stat_rdr_addLine_skip.add(1);
+            if (DO_STATS) {
+                rdrCtx.stats.stat_rdr_addLine_skip.add(1);
             }
             return;
         }
@@ -405,14 +405,14 @@
             final long edgeNewSize = ArrayCache.getNewLargeSize(_edges.length,
                                         edgePtr + _SIZEOF_EDGE_BYTES);
 
-            if (doStats) {
-                RendererContext.stats.stat_rdr_edges_resizes.add(edgeNewSize);
+            if (DO_STATS) {
+                rdrCtx.stats.stat_rdr_edges_resizes.add(edgeNewSize);
             }
             _edges.resize(edgeNewSize);
         }
 
 
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long SIZE_INT = 4L;
         long addr   = _edges.address + edgePtr;
 
@@ -486,8 +486,8 @@
         // update free pointer (ie length in bytes)
         _edges.used += _SIZEOF_EDGE_BYTES;
 
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_addLine.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_addLine.stop();
         }
     }
 
@@ -552,7 +552,7 @@
         this.boundsMaxY =
             (pix_boundsY + pix_boundsHeight) << SUBPIXEL_LG_POSITIONS_Y;
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("boundsXY = [" + boundsMinX + " ... "
                                 + boundsMaxX + "[ [" + boundsMinY + " ... "
                                 + boundsMaxY + "[");
@@ -563,10 +563,10 @@
         final int edgeBucketsLength = (boundsMaxY - boundsMinY) + 1;
 
         if (edgeBucketsLength > INITIAL_BUCKET_ARRAY) {
-            if (doStats) {
-                RendererContext.stats.stat_array_renderer_edgeBuckets
+            if (DO_STATS) {
+                rdrCtx.stats.stat_array_renderer_edgeBuckets
                     .add(edgeBucketsLength);
-                RendererContext.stats.stat_array_renderer_edgeBucketCounts
+                rdrCtx.stats.stat_array_renderer_edgeBucketCounts
                     .add(edgeBucketsLength);
             }
             edgeBuckets = rdrCtx.getIntArray(edgeBucketsLength);
@@ -592,13 +592,13 @@
      * Disposes this renderer and recycle it clean up before reusing this instance
      */
     void dispose() {
-        if (doStats) {
-            RendererContext.stats.stat_rdr_activeEdges.add(activeEdgeMaxUsed);
-            RendererContext.stats.stat_rdr_edges.add(edges.used);
-            RendererContext.stats.stat_rdr_edges_count
+        if (DO_STATS) {
+            rdrCtx.stats.stat_rdr_activeEdges.add(activeEdgeMaxUsed);
+            rdrCtx.stats.stat_rdr_edges.add(edges.used);
+            rdrCtx.stats.stat_rdr_edges_count
                 .add(edges.used / SIZEOF_EDGE_BYTES);
         }
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(crossings,     0);
             Arrays.fill(aux_crossings, 0);
@@ -670,12 +670,12 @@
             // note: may throw OOME:
             edges.resize(INITIAL_EDGES_CAPACITY);
         }
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             edges.fill(BYTE_0);
         }
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_endRendering.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_endRendering.stop();
         }
     }
 
@@ -793,7 +793,7 @@
         final int _ERR_STEP_MAX  = ERR_STEP_MAX;
 
         // unsafe I/O:
-        final Unsafe _unsafe = OffHeapArray.unsafe;
+        final Unsafe _unsafe = OffHeapArray.UNSAFE;
         final long    addr0  = _edges.address;
         long addr;
         final int _SUBPIXEL_LG_POSITIONS_X = SUBPIXEL_LG_POSITIONS_X;
@@ -856,8 +856,8 @@
 
             // bucketCount indicates new edge / edge end:
             if (bucketcount != 0) {
-                if (doStats) {
-                    RendererContext.stats.stat_rdr_activeEdges_updates
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_rdr_activeEdges_updates
                         .add(numCrossings);
                 }
 
@@ -882,19 +882,19 @@
                 ptrLen = bucketcount >> 1; // number of new edge
 
                 if (ptrLen != 0) {
-                    if (doStats) {
-                        RendererContext.stats.stat_rdr_activeEdges_adds
+                    if (DO_STATS) {
+                        rdrCtx.stats.stat_rdr_activeEdges_adds
                             .add(ptrLen);
                         if (ptrLen > 10) {
-                            RendererContext.stats.stat_rdr_activeEdges_adds_high
+                            rdrCtx.stats.stat_rdr_activeEdges_adds_high
                                 .add(ptrLen);
                         }
                     }
                     ptrEnd = numCrossings + ptrLen;
 
                     if (edgePtrsLen < ptrEnd) {
-                        if (doStats) {
-                            RendererContext.stats.stat_array_renderer_edgePtrs
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_array_renderer_edgePtrs
                                 .add(ptrEnd);
                         }
                         this.edgePtrs = _edgePtrs
@@ -908,8 +908,8 @@
                         }
                         // use ArrayCache.getNewSize() to use the same growing
                         // factor than widenDirtyIntArray():
-                        if (doStats) {
-                            RendererContext.stats.stat_array_renderer_aux_edgePtrs
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_array_renderer_aux_edgePtrs
                                 .add(ptrEnd);
                         }
                         this.aux_edgePtrs = _aux_edgePtrs
@@ -936,8 +936,8 @@
                         if (_crossings != crossings_initial) {
                             rdrCtx.putDirtyIntArray(_crossings);
                         }
-                        if (doStats) {
-                            RendererContext.stats.stat_array_renderer_crossings
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_array_renderer_crossings
                                 .add(numCrossings);
                         }
                         this.crossings = _crossings
@@ -947,8 +947,8 @@
                         if (_aux_crossings != aux_crossings_initial) {
                             rdrCtx.putDirtyIntArray(_aux_crossings);
                         }
-                        if (doStats) {
-                            RendererContext.stats.stat_array_renderer_aux_crossings
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_array_renderer_aux_crossings
                                 .add(numCrossings);
                         }
                         this.aux_crossings = _aux_crossings
@@ -956,7 +956,7 @@
 
                         crossingsLen = _crossings.length;
                     }
-                    if (doStats) {
+                    if (DO_STATS) {
                         // update max used mark
                         if (numCrossings > _arrayMaxUsed) {
                             _arrayMaxUsed = numCrossings;
@@ -972,10 +972,10 @@
                  * for newly added edges + final merge pass.
                  */
                 if ((ptrLen < 10) || (numCrossings < 40)) {
-                    if (doStats) {
-                        RendererContext.stats.hist_rdr_crossings
+                    if (DO_STATS) {
+                        rdrCtx.stats.hist_rdr_crossings
                             .add(numCrossings);
-                        RendererContext.stats.hist_rdr_crossings_adds
+                        rdrCtx.stats.hist_rdr_crossings_adds
                             .add(ptrLen);
                     }
 
@@ -1018,23 +1018,23 @@
                         _unsafe.putInt(addr,               curx - ((err >> 30) & _ALL_BUT_LSB));
                         _unsafe.putInt(addr + _OFF_ERROR, (err & _ERR_STEP_MAX));
 
-                        if (doStats) {
-                            RendererContext.stats.stat_rdr_crossings_updates
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_rdr_crossings_updates
                                 .add(numCrossings);
                         }
 
                         // insertion sort of crossings:
                         if (cross < lastCross) {
-                            if (doStats) {
-                                RendererContext.stats.stat_rdr_crossings_sorts
+                            if (DO_STATS) {
+                                rdrCtx.stats.stat_rdr_crossings_sorts
                                     .add(i);
                             }
 
                             /* use binary search for newly added edges
                                in crossings if arrays are large enough */
                             if (useBinarySearch && (i >= prevNumCrossings)) {
-                                if (doStats) {
-                                    RendererContext.stats.
+                                if (DO_STATS) {
+                                    rdrCtx.stats.
                                         stat_rdr_crossings_bsearch.add(i);
                                 }
                                 low = 0;
@@ -1077,14 +1077,14 @@
                         }
                     }
                 } else {
-                    if (doStats) {
-                        RendererContext.stats.stat_rdr_crossings_msorts
+                    if (DO_STATS) {
+                        rdrCtx.stats.stat_rdr_crossings_msorts
                             .add(numCrossings);
-                        RendererContext.stats.hist_rdr_crossings_ratio
+                        rdrCtx.stats.hist_rdr_crossings_ratio
                             .add((1000 * ptrLen) / numCrossings);
-                        RendererContext.stats.hist_rdr_crossings_msorts
+                        rdrCtx.stats.hist_rdr_crossings_msorts
                             .add(numCrossings);
-                        RendererContext.stats.hist_rdr_crossings_msorts_adds
+                        rdrCtx.stats.hist_rdr_crossings_msorts_adds
                             .add(ptrLen);
                     }
 
@@ -1124,8 +1124,8 @@
                         _unsafe.putInt(addr,               curx - ((err >> 30) & _ALL_BUT_LSB));
                         _unsafe.putInt(addr + _OFF_ERROR, (err & _ERR_STEP_MAX));
 
-                        if (doStats) {
-                            RendererContext.stats.stat_rdr_crossings_updates
+                        if (DO_STATS) {
+                            rdrCtx.stats.stat_rdr_crossings_updates
                                 .add(numCrossings);
                         }
 
@@ -1135,8 +1135,8 @@
                             _crossings[i]     = cross;
 
                         } else if (cross < lastCross) {
-                            if (doStats) {
-                                RendererContext.stats.stat_rdr_crossings_sorts
+                            if (DO_STATS) {
+                                rdrCtx.stats.stat_rdr_crossings_sorts
                                     .add(i);
                             }
 
@@ -1356,10 +1356,10 @@
                         useBlkFlags = (maxX > _BLK_SIZE) && (maxX >
                             (((numCrossings >> stroking) - 1) << _BLK_SIZE_LG));
 
-                        if (doStats) {
+                        if (DO_STATS) {
                             tmp = FloatMath.max(1,
                                     ((numCrossings >> stroking) - 1));
-                            RendererContext.stats.hist_tile_generator_encoding_dist
+                            rdrCtx.stats.hist_tile_generator_encoding_dist
                                 .add(maxX / tmp);
                         }
                     }
@@ -1392,15 +1392,15 @@
         edgeCount = numCrossings;
         prevUseBlkFlags = useBlkFlags;
 
-        if (doStats) {
+        if (DO_STATS) {
             // update max used mark
             activeEdgeMaxUsed = _arrayMaxUsed;
         }
     }
 
     boolean endRendering() {
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_endRendering.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_endRendering.start();
         }
         if (edgeMinY == Integer.MAX_VALUE) {
             return false; // undefined edges bounds
@@ -1427,7 +1427,7 @@
         buckets_minY = spminY - _boundsMinY;
         buckets_maxY = maxY   - _boundsMinY;
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("edgesXY = [" + edgeMinX + " ... " + edgeMaxX
                                 + "][" + edgeMinY + " ... " + edgeMaxY + "]");
             MarlinUtils.logInfo("spXY    = [" + spminX + " ... " + spmaxX
@@ -1479,7 +1479,7 @@
         // exclusive:
         bbox_spmaxY = FloatMath.min(spmaxY + 1, pmaxY << SUBPIXEL_LG_POSITIONS_Y);
 
-        if (doLogBounds) {
+        if (DO_LOG_BOUNDS) {
             MarlinUtils.logInfo("pXY       = [" + pminX + " ... " + pmaxX
                                 + "[ [" + pminY + " ... " + pmaxY + "[");
             MarlinUtils.logInfo("bbox_spXY = [" + bbox_spminX + " ... "
@@ -1493,8 +1493,8 @@
 
         // Useful when processing tile line by tile line
         if (width > INITIAL_AA_ARRAY) {
-            if (doStats) {
-                RendererContext.stats.stat_array_renderer_alphaline
+            if (DO_STATS) {
+                rdrCtx.stats.stat_array_renderer_alphaline
                     .add(width);
             }
             alphaLine = rdrCtx.getIntArray(width);
@@ -1509,8 +1509,8 @@
     private int bbox_spminX, bbox_spmaxX, bbox_spminY, bbox_spmaxY;
 
     void endRendering(final int pminY) {
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_endRendering_Y.start();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_endRendering_Y.start();
         }
 
         final int spminY       = pminY << SUBPIXEL_LG_POSITIONS_Y;
@@ -1527,8 +1527,8 @@
             // Process only one tile line:
             _endRendering(fixed_spminY, spmaxY);
         }
-        if (doMonitors) {
-            RendererContext.stats.mon_rdr_endRendering_Y.stop();
+        if (DO_MONITORS) {
+            rdrCtx.stats.mon_rdr_endRendering_Y.stop();
         }
     }
 
@@ -1544,13 +1544,13 @@
                    final boolean useBlockFlags)
     {
         if (useBlockFlags) {
-            if (doStats) {
-                RendererContext.stats.hist_tile_generator_encoding.add(1);
+            if (DO_STATS) {
+                rdrCtx.stats.hist_tile_generator_encoding.add(1);
             }
             cache.copyAARowRLE_WithBlockFlags(blkFlags, alphaRow, pix_y, pix_from, pix_to);
         } else {
-            if (doStats) {
-                RendererContext.stats.hist_tile_generator_encoding.add(0);
+            if (DO_STATS) {
+                rdrCtx.stats.hist_tile_generator_encoding.add(0);
             }
             cache.copyAARowNoRLE(alphaRow, pix_y, pix_from, pix_to);
         }
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/RendererContext.java	Fri Jul 08 12:17:10 2016 -0700
@@ -40,12 +40,12 @@
 final class RendererContext extends ReentrantContext implements MarlinConst {
 
     // RendererContext creation counter
-    private static final AtomicInteger contextCount = new AtomicInteger(1);
+    private static final AtomicInteger CTX_COUNT = new AtomicInteger(1);
     // RendererContext statistics
-    static final RendererStats stats = (doStats || doMonitors)
+    final RendererStats stats = (DO_STATS || DO_MONITORS)
                                        ? RendererStats.getInstance(): null;
 
-    private static final boolean USE_CACHE_HARD_REF = doStats
+    private static final boolean USE_CACHE_HARD_REF = DO_STATS
         || (MarlinRenderingEngine.REF_TYPE == ReentrantContextProvider.REF_WEAK);
 
     /**
@@ -55,10 +55,10 @@
      */
     static RendererContext createContext() {
         final RendererContext newCtx = new RendererContext("ctx"
-                    + Integer.toString(contextCount.getAndIncrement()));
+                    + Integer.toString(CTX_COUNT.getAndIncrement()));
 
-        if (RendererContext.stats != null) {
-            RendererContext.stats.allContexts.add(newCtx);
+        if (DO_STATS || DO_MONITORS) {
+            RendererStats.ALL_CONTEXTS.add(newCtx);
         }
         return newCtx;
     }
@@ -101,7 +101,7 @@
      * @param name context name (debugging)
      */
     RendererContext(final String name) {
-        if (logCreateContext) {
+        if (LOG_CREATE_CONTEXT) {
             MarlinUtils.logInfo("new RendererContext = " + name);
         }
 
@@ -162,7 +162,7 @@
                      : null;
             // create a new ArrayCachesHolder if none is available
             if (holder == null) {
-                if (logCreateContext) {
+                if (LOG_CREATE_CONTEXT) {
                     MarlinUtils.logInfo("new ArrayCachesHolder for "
                                         + "RendererContext = " + name);
                 }
@@ -192,11 +192,11 @@
             return getDirtyByteArrayCache(length).getArray();
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             incOversize();
         }
 
-        if (doLogOverSize) {
+        if (DO_LOG_OVERSIZE) {
             logInfo("getDirtyByteArray[oversize]: length=\t" + length);
         }
 
@@ -216,10 +216,10 @@
                                final int usedSize, final int needSize)
     {
         final int length = in.length;
-        if (doChecks && length >= needSize) {
+        if (DO_CHECKS && length >= needSize) {
             return in;
         }
-        if (doStats) {
+        if (DO_STATS) {
             incResizeDirtyByte();
         }
 
@@ -233,7 +233,7 @@
         // NO clean-up of array data = DIRTY ARRAY
         putDirtyByteArray(in);
 
-        if (doLogWidenArray) {
+        if (DO_LOG_WIDEN_ARRAY) {
             logInfo("widenDirtyByteArray[" + res.length + "]: usedSize=\t"
                     + usedSize + "\tlength=\t" + length + "\tneeded length=\t"
                     + needSize);
@@ -252,11 +252,11 @@
             return getIntArrayCache(length).getArray();
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             incOversize();
         }
 
-        if (doLogOverSize) {
+        if (DO_LOG_OVERSIZE) {
             logInfo("getIntArray[oversize]: length=\t" + length);
         }
 
@@ -268,10 +268,10 @@
                         final int needSize, final int clearTo)
     {
         final int length = in.length;
-        if (doChecks && length >= needSize) {
+        if (DO_CHECKS && length >= needSize) {
             return in;
         }
-        if (doStats) {
+        if (DO_STATS) {
             incResizeInt();
         }
 
@@ -284,7 +284,7 @@
         // maybe return current array:
         putIntArray(in, 0, clearTo); // ensure all array is cleared (grow-reduce algo)
 
-        if (doLogWidenArray) {
+        if (DO_LOG_WIDEN_ARRAY) {
             logInfo("widenIntArray[" + res.length + "]: usedSize=\t"
                     + usedSize + "\tlength=\t" + length + "\tneeded length=\t"
                     + needSize);
@@ -314,11 +314,11 @@
             return getDirtyIntArrayCache(length).getArray();
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             incOversize();
         }
 
-        if (doLogOverSize) {
+        if (DO_LOG_OVERSIZE) {
             logInfo("getDirtyIntArray[oversize]: length=\t" + length);
         }
 
@@ -329,10 +329,10 @@
                              final int usedSize, final int needSize)
     {
         final int length = in.length;
-        if (doChecks && length >= needSize) {
+        if (DO_CHECKS && length >= needSize) {
             return in;
         }
-        if (doStats) {
+        if (DO_STATS) {
             incResizeDirtyInt();
         }
 
@@ -346,7 +346,7 @@
         // NO clean-up of array data = DIRTY ARRAY
         putDirtyIntArray(in);
 
-        if (doLogWidenArray) {
+        if (DO_LOG_WIDEN_ARRAY) {
             logInfo("widenDirtyIntArray[" + res.length + "]: usedSize=\t"
                     + usedSize + "\tlength=\t" + length + "\tneeded length=\t"
                     + needSize);
@@ -374,11 +374,11 @@
             return getDirtyFloatArrayCache(length).getArray();
         }
 
-        if (doStats) {
+        if (DO_STATS) {
             incOversize();
         }
 
-        if (doLogOverSize) {
+        if (DO_LOG_OVERSIZE) {
             logInfo("getDirtyFloatArray[oversize]: length=\t" + length);
         }
 
@@ -389,10 +389,10 @@
                                  final int usedSize, final int needSize)
     {
         final int length = in.length;
-        if (doChecks && length >= needSize) {
+        if (DO_CHECKS && length >= needSize) {
             return in;
         }
-        if (doStats) {
+        if (DO_STATS) {
             incResizeDirtyFloat();
         }
 
@@ -406,7 +406,7 @@
         // NO clean-up of array data = DIRTY ARRAY
         putDirtyFloatArray(in);
 
-        if (doLogWidenArray) {
+        if (DO_LOG_WIDEN_ARRAY) {
             logInfo("widenDirtyFloatArray[" + res.length + "]: usedSize=\t"
                     + usedSize + "\tlength=\t" + length + "\tneeded length=\t"
                     + needSize);
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,24 +42,24 @@
 public final class RendererStats implements MarlinConst {
 
     // singleton
-    private static volatile RendererStats singleton = null;
+    private static volatile RendererStats SINGLETON = null;
 
     static RendererStats getInstance() {
-        if (singleton == null) {
-            singleton = new RendererStats();
+        if (SINGLETON == null) {
+            SINGLETON = new RendererStats();
         }
-        return singleton;
+        return SINGLETON;
     }
 
     public static void dumpStats() {
-        if (singleton != null) {
-            singleton.dump();
+        if (SINGLETON != null) {
+            SINGLETON.dump();
         }
     }
 
     /* RendererContext collection as hard references
        (only used for debugging purposes) */
-    final ConcurrentLinkedQueue<RendererContext> allContexts
+    static final ConcurrentLinkedQueue<RendererContext> ALL_CONTEXTS
         = new ConcurrentLinkedQueue<RendererContext>();
     // stats
     final StatLong stat_cache_rowAA
@@ -208,8 +208,6 @@
     // monitors
     final Monitor mon_pre_getAATileGenerator
         = new Monitor("MarlinRenderingEngine.getAATileGenerator()");
-    final Monitor mon_npi_currentSegment
-        = new Monitor("NormalizingPathIterator.currentSegment()");
     final Monitor mon_rdr_addLine
         = new Monitor("Renderer.addLine()");
     final Monitor mon_rdr_endRendering
@@ -227,7 +225,6 @@
     // all monitors
     final Monitor[] monitors = new Monitor[]{
         mon_pre_getAATileGenerator,
-        mon_npi_currentSegment,
         mon_rdr_addLine,
         mon_rdr_endRendering,
         mon_rdr_endRendering_Y,
@@ -255,14 +252,14 @@
                 hook.setContextClassLoader(null);
                 Runtime.getRuntime().addShutdownHook(hook);
 
-                if (useDumpThread) {
+                if (USE_DUMP_THREAD) {
                     final Timer statTimer = new Timer("RendererStats");
                     statTimer.scheduleAtFixedRate(new TimerTask() {
                         @Override
                         public void run() {
                             dump();
                         }
-                    }, statDump, statDump);
+                    }, DUMP_INTERVAL, DUMP_INTERVAL);
                 }
                 return null;
             }
@@ -270,15 +267,13 @@
     }
 
     void dump() {
-        if (doStats) {
+        if (DO_STATS) {
             ArrayCache.dumpStats();
         }
-        final RendererContext[] all = allContexts.toArray(
-                                          new RendererContext[allContexts.size()]);
-        for (RendererContext rdrCtx : all) {
+        for (RendererContext rdrCtx : ALL_CONTEXTS) {
             logInfo("RendererContext: " + rdrCtx.name);
 
-            if (doMonitors) {
+            if (DO_MONITORS) {
                 for (Monitor monitor : monitors) {
                     if (monitor.count != 0) {
                         logInfo(monitor.toString());
@@ -292,14 +287,14 @@
                                 + ((100d * monitor.sum) / total) + " %");
                     }
                 }
-                if (doFlushMonitors) {
+                if (DO_FLUSH_MONITORS) {
                     for (Monitor m : monitors) {
                         m.reset();
                     }
                 }
             }
 
-            if (doStats) {
+            if (DO_STATS) {
                 for (StatLong stat : statistics) {
                     if (stat.count != 0) {
                         logInfo(stat.toString());
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -180,7 +180,7 @@
     void dispose() {
         reverse.dispose();
 
-        if (doCleanDirty) {
+        if (DO_CLEAN_DIRTY) {
             // Force zero-fill dirty arrays:
             Arrays.fill(offset0, 0f);
             Arrays.fill(offset1, 0f);
@@ -226,7 +226,7 @@
                                boolean rev,
                                float threshold)
     {
-        if ((omx == 0 && omy == 0) || (mx == 0 && my == 0)) {
+        if ((omx == 0f && omy == 0f) || (mx == 0f && my == 0f)) {
             return;
         }
 
@@ -338,12 +338,14 @@
     }
 
     private void drawRoundCap(float cx, float cy, float mx, float my) {
-        emitCurveTo(cx+mx-C*my, cy+my+C*mx,
-                    cx-my+C*mx, cy+mx+C*my,
-                    cx-my,      cy+mx);
-        emitCurveTo(cx-my-C*mx, cy+mx-C*my,
-                    cx-mx-C*my, cy-my+C*mx,
-                    cx-mx,      cy-my);
+        final float Cmx = C * mx;
+        final float Cmy = C * my;
+        emitCurveTo(cx + mx - Cmy, cy + my + Cmx,
+                    cx - my + Cmx, cy + mx + Cmy,
+                    cx - my,       cy + mx);
+        emitCurveTo(cx - my - Cmx, cy + mx - Cmy,
+                    cx - mx - Cmy, cy - my + Cmx,
+                    cx - mx,       cy - my);
     }
 
     // Put the intersection point of the lines (x0, y0) -> (x1, y1)
@@ -412,8 +414,8 @@
         }
         this.sx0 = this.cx0 = x0;
         this.sy0 = this.cy0 = y0;
-        this.cdx = this.sdx = 1;
-        this.cdy = this.sdy = 0;
+        this.cdx = this.sdx = 1f;
+        this.cdy = this.sdy = 0f;
         this.prev = MOVE_TO;
     }
 
@@ -452,10 +454,10 @@
                 return;
             }
             emitMoveTo(cx0, cy0 - lineWidth2);
-            this.cmx = this.smx = 0;
+            this.cmx = this.smx = 0f;
             this.cmy = this.smy = -lineWidth2;
-            this.cdx = this.sdx = 1;
-            this.cdy = this.sdy = 0;
+            this.cdx = this.sdx = 1f;
+            this.cdy = this.sdy = 0f;
             finish();
             return;
         }
@@ -1232,7 +1234,7 @@
             end = 0;
             numCurves = 0;
 
-            if (doStats) {
+            if (DO_STATS) {
                 curveTypesUseMark = 0;
                 curvesUseMark = 0;
             }
@@ -1246,10 +1248,10 @@
             end = 0;
             numCurves = 0;
 
-            if (doStats) {
-                RendererContext.stats.stat_rdr_poly_stack_types
+            if (DO_STATS) {
+                rdrCtx.stats.stat_rdr_poly_stack_types
                     .add(curveTypesUseMark);
-                RendererContext.stats.stat_rdr_poly_stack_curves
+                rdrCtx.stats.stat_rdr_poly_stack_curves
                     .add(curvesUseMark);
                 // reset marks
                 curveTypesUseMark = 0;
@@ -1272,15 +1274,15 @@
         private void ensureSpace(final int n) {
             // use substraction to avoid integer overflow:
             if (curves.length - end < n) {
-                if (doStats) {
-                    RendererContext.stats.stat_array_stroker_polystack_curves
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_array_stroker_polystack_curves
                         .add(end + n);
                 }
                 curves = rdrCtx.widenDirtyFloatArray(curves, end, end + n);
             }
             if (curveTypes.length <= numCurves) {
-                if (doStats) {
-                    RendererContext.stats.stat_array_stroker_polystack_curveTypes
+                if (DO_STATS) {
+                    rdrCtx.stats.stat_array_stroker_polystack_curveTypes
                         .add(numCurves + 1);
                 }
                 curveTypes = rdrCtx.widenDirtyByteArray(curveTypes,
@@ -1323,7 +1325,7 @@
         }
 
         void popAll(PathConsumer2D io) {
-            if (doStats) {
+            if (DO_STATS) {
                 // update used marks:
                 if (numCurves > curveTypesUseMark) {
                     curveTypesUseMark = numCurves;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Version.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Version.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,10 +27,10 @@
 
 public final class Version {
 
-    private static final String version = "marlin-0.7.3.3-Unsafe-OpenJDK";
+    private static final String VERSION = "marlin-0.7.3.4-Unsafe-OpenJDK";
 
     public static String getVersion() {
-        return version;
+        return VERSION;
     }
 
     private Version() {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/stats/Histogram.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package sun.java2d.marlin.stats;
 
-import java.util.Arrays;
-
 /**
  * Generic histogram based on long statistics
  */
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/AAShapePipe.java	Fri Jul 08 12:17:10 2016 -0700
@@ -44,10 +44,10 @@
 public final class AAShapePipe
     implements ShapeDrawPipe, ParallelogramPipe
 {
-    static final RenderingEngine renderengine = RenderingEngine.getInstance();
+    static final RenderingEngine RDR_ENGINE = RenderingEngine.getInstance();
 
     // Per-thread TileState (~1K very small so do not use any Weak Reference)
-    private static final ReentrantContextProvider<TileState> tileStateProvider =
+    private static final ReentrantContextProvider<TileState> TILE_STATE_PROVIDER =
             new ReentrantContextProviderTL<TileState>(
                     ReentrantContextProvider.REF_HARD)
             {
@@ -90,19 +90,19 @@
                                   double dx1, double dy1,
                                   double dx2, double dy2)
     {
-        final TileState ts = tileStateProvider.acquire();
+        final TileState ts = TILE_STATE_PROVIDER.acquire();
         try {
             final int[] abox = ts.abox;
 
             final AATileGenerator aatg =
-                renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
+                RDR_ENGINE.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0,
                                                 sg.getCompClip(), abox);
             if (aatg != null) {
                 renderTiles(sg, ts.computeBBox(ux1, uy1, ux2, uy2),
                             aatg, abox, ts);
             }
         } finally {
-            tileStateProvider.release(ts);
+            TILE_STATE_PROVIDER.release(ts);
         }
     }
 
@@ -115,12 +115,12 @@
                                   double dx2, double dy2,
                                   double lw1, double lw2)
     {
-        final TileState ts = tileStateProvider.acquire();
+        final TileState ts = TILE_STATE_PROVIDER.acquire();
         try {
             final int[] abox = ts.abox;
 
             final AATileGenerator aatg =
-                renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1,
+                RDR_ENGINE.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, lw1,
                                                 lw2, sg.getCompClip(), abox);
             if (aatg != null) {
                 // Note that bbox is of the original shape, not the wide path.
@@ -129,7 +129,7 @@
                             aatg, abox, ts);
             }
         } finally {
-            tileStateProvider.release(ts);
+            TILE_STATE_PROVIDER.release(ts);
         }
     }
 
@@ -138,18 +138,18 @@
                           sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
         final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);
 
-        final TileState ts = tileStateProvider.acquire();
+        final TileState ts = TILE_STATE_PROVIDER.acquire();
         try {
             final int[] abox = ts.abox;
 
             final AATileGenerator aatg =
-                renderengine.getAATileGenerator(s, sg.transform, sg.getCompClip(),
+                RDR_ENGINE.getAATileGenerator(s, sg.transform, sg.getCompClip(),
                                                 bs, thin, adjust, abox);
             if (aatg != null) {
                 renderTiles(sg, s, aatg, abox, ts);
             }
         } finally {
-            tileStateProvider.release(ts);
+            TILE_STATE_PROVIDER.release(ts);
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java	Fri Jul 08 12:17:10 2016 -0700
@@ -501,7 +501,7 @@
         // Note that we only open a file if it has been nominated by
         // the end-user in a dialog that we ouselves put up.
 
-        OutputStream output;
+        OutputStream output = null;
 
         if (epsPrinter == null) {
             if (getPrintService() instanceof PSStreamPrintService) {
@@ -526,6 +526,7 @@
                         spoolFile = new File(mDestination);
                         output =  new FileOutputStream(spoolFile);
                     } catch (IOException ex) {
+                        abortDoc();
                         throw new PrinterIOException(ex);
                     }
                 } else {
@@ -771,6 +772,10 @@
         if (mPSStream != null) {
             mPSStream.println(EOF_COMMENT);
             mPSStream.flush();
+            if (mPSStream.checkError()) {
+                abortDoc();
+                throw new PrinterException("Error while writing to file");
+            }
             if (mDestType != RasterPrinterJob.STREAM) {
                 mPSStream.close();
             }
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Fri Jul 08 12:17:10 2016 -0700
@@ -683,7 +683,21 @@
         float iw = (float)(page.getPaper().getImageableWidth()/DPI);
         float iy = (float)(page.getPaper().getImageableY()/DPI);
         float ih = (float)(page.getPaper().getImageableHeight()/DPI);
-        if (ix < 0) ix = 0f; if (iy < 0) iy = 0f;
+
+        if (ix < 0) ix = 0; if (iy < 0) iy = 0;
+        if (iw <= 0) iw = (float)(page.getPaper().getWidth()/DPI) - (ix*2);
+
+        // If iw is still negative, it means ix is too large to print
+        // anything inside printable area if we have to leave the same margin
+        // in the right side of paper so we go back to default mpa values
+        if (iw < 0) iw = 0;
+
+        if (ih <= 0) ih = (float)(page.getPaper().getHeight()/DPI) - (iy*2);
+
+        // If ih is still negative, it means iy is too large to print
+        // anything inside printable area if we have to leave the same margin
+        // in the bottom side of paper so we go back to default mpa values
+        if (ih < 0) ih = 0;
         try {
             pageAttributes.add(new MediaPrintableArea(ix, iy, iw, ih,
                                                   MediaPrintableArea.INCH));
@@ -1613,6 +1627,9 @@
              (!f.isFile() || !f.canWrite())) ||
             ((pFile != null) &&
              (!pFile.exists() || (pFile.exists() && !pFile.canWrite())))) {
+            if (f.exists()) {
+                f.delete();
+            }
             throw new PrinterException("Cannot write to file:"+
                                        dest);
         }
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java	Fri Jul 08 12:17:10 2016 -0700
@@ -30,6 +30,7 @@
 import static java.awt.RenderingHints.*;
 import java.awt.event.*;
 import java.awt.font.*;
+import java.awt.geom.AffineTransform;
 import java.awt.print.PrinterGraphics;
 import java.text.BreakIterator;
 import java.text.CharacterIterator;
@@ -1060,17 +1061,23 @@
      */
     private static FontRenderContext getFRCProperty(JComponent c) {
         if (c != null) {
+
+            GraphicsConfiguration gc = c.getGraphicsConfiguration();
+            AffineTransform tx = (gc == null) ? null : gc.getDefaultTransform();
             Object aaHint = c.getClientProperty(KEY_TEXT_ANTIALIASING);
-            if (aaHint != null) {
-                return getFRCFromCache(aaHint);
-            }
+            return getFRCFromCache(tx, aaHint);
         }
         return null;
     }
 
     private static final Object APP_CONTEXT_FRC_CACHE_KEY = new Object();
 
-    private static FontRenderContext getFRCFromCache(Object aaHint) {
+    private static FontRenderContext getFRCFromCache(AffineTransform tx,
+                                                     Object aaHint) {
+        if (tx == null && aaHint == null) {
+            return null;
+        }
+
         @SuppressWarnings("unchecked")
         Map<Object, FontRenderContext> cache = (Map<Object, FontRenderContext>)
                 AppContext.getAppContext().get(APP_CONTEXT_FRC_CACHE_KEY);
@@ -1080,15 +1087,45 @@
             AppContext.getAppContext().put(APP_CONTEXT_FRC_CACHE_KEY, cache);
         }
 
-        FontRenderContext frc = cache.get(aaHint);
+        Object key = (tx == null)
+                ? aaHint
+                : (aaHint == null ? tx : new KeyPair(tx, aaHint));
+
+        FontRenderContext frc = cache.get(key);
         if (frc == null) {
-            frc = new FontRenderContext(null, aaHint,
-                    VALUE_FRACTIONALMETRICS_DEFAULT);
-            cache.put(aaHint, frc);
+            aaHint = (aaHint == null) ? VALUE_TEXT_ANTIALIAS_OFF : aaHint;
+            frc = new FontRenderContext(tx, aaHint,
+                                        VALUE_FRACTIONALMETRICS_DEFAULT);
+            cache.put(key, frc);
         }
         return frc;
     }
 
+    private static class KeyPair {
+
+        private final Object key1;
+        private final Object key2;
+
+        public KeyPair(Object key1, Object key2) {
+            this.key1 = key1;
+            this.key2 = key2;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof KeyPair)) {
+                return false;
+            }
+            KeyPair that = (KeyPair) obj;
+            return this.key1.equals(that.key1) && this.key2.equals(that.key2);
+        }
+
+        @Override
+        public int hashCode() {
+            return key1.hashCode() + 37 * key2.hashCode();
+        }
+    }
+
     /*
      * returns true if the Graphics is print Graphics
      * false otherwise
--- a/jdk/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libawt/java2d/loops/AlphaMath.c	Fri Jul 08 12:17:10 2016 -0700
@@ -34,8 +34,8 @@
     unsigned int j;
 
     for (i = 1; i < 256; i++) {                 /* SCALE == (1 << 24) */
-        int inc = (i << 16) + (i<<8) + i;       /* approx. SCALE * (i/255.0) */
-        int val = inc + (1 << 23);              /* inc + SCALE*0.5 */
+        unsigned int inc = (i << 16) + (i<<8) + i;       /* approx. SCALE * (i/255.0) */
+        unsigned int val = inc + (1 << 23);              /* inc + SCALE*0.5 */
         for (j = 1; j < 256; j++) {
             mul8table[i][j] = (val >> 24);      /* val / SCALE */
             val += inc;
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SunLayoutEngine.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SunLayoutEngine.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -151,7 +151,8 @@
     return;
   }
 
-  if (min < 0) min = 0; if (max < min) max = min; /* defensive coding */
+  if (min < 0) min = 0;
+  if (max < min) max = min; /* defensive coding */
   // have to copy, yuck, since code does upcalls now.  this will be soooo slow
   jint len = max - min;
   jchar buffer[256];
--- a/jdk/src/java.desktop/share/native/libfontmanager/scriptMapping.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/scriptMapping.c	Fri Jul 08 12:17:10 2016 -0700
@@ -85,7 +85,7 @@
 int MAX_ICU_SCRIPTCODE = 45;
 
 hb_script_t getHBScriptCode(int code) {
-    if (code > MAX_ICU_SCRIPTCODE) {
+    if ((code < 0) || (code > MAX_ICU_SCRIPTCODE)) {
         return HB_SCRIPT_INVALID;
     }
     return ICU_to_Harfbuzz_ScriptCode[code];
--- a/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_jpeg.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/splashscreen_jpeg.c	Fri Jul 08 12:17:10 2016 -0700
@@ -237,13 +237,14 @@
 SplashDecodeJpegStream(Splash * splash, SplashStream * stream)
 {
     struct jpeg_decompress_struct cinfo;
-    int success = 0;
+    int success;
     struct my_error_mgr jerr;
 
     cinfo.err = jpeg_std_error(&jerr.pub);
     jerr.pub.error_exit = my_error_exit;
 
     if (setjmp(jerr.setjmp_buffer)) {
+        success = 0;
         goto done;
     }
     jpeg_create_decompress(&cinfo);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XKeysym.java	Fri Jul 08 12:17:10 2016 -0700
@@ -952,7 +952,7 @@
         keysym2UCSHash.put( (long)0x9f4, (char)0x251c); // XK_leftt --> BOX DRAWINGS LIGHT VERTICAL AND RIGHT
         keysym2UCSHash.put( (long)0x9f5, (char)0x2524); // XK_rightt --> BOX DRAWINGS LIGHT VERTICAL AND LEFT
         keysym2UCSHash.put( (long)0x9f6, (char)0x2534); // XK_bott --> BOX DRAWINGS LIGHT UP AND HORIZONTAL
-        keysym2UCSHash.put( (long)0x9f7, (char)0x242c); // XK_topt -->
+        keysym2UCSHash.put( (long)0x9f7, (char)0x252c); // XK_topt --> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
         keysym2UCSHash.put( (long)0x9f8, (char)0x2502); // XK_vertbar --> BOX DRAWINGS LIGHT VERTICAL
         keysym2UCSHash.put( (long)0xaa1, (char)0x2003); // XK_emspace --> EM SPACE
         keysym2UCSHash.put( (long)0xaa2, (char)0x2002); // XK_enspace --> EN SPACE
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/keysym2ucs.h	Fri Jul 08 12:17:10 2016 -0700
@@ -1685,7 +1685,7 @@
 0x251c #define XK_leftt                                       0x9f4
 0x2524 #define XK_rightt                                      0x9f5
 0x2534 #define XK_bott                                        0x9f6
-0x242c #define XK_topt                                        0x9f7
+0x252c #define XK_topt                                        0x9f7
 0x2502 #define XK_vertbar                                     0x9f8
 #endif /* XK_SPECIAL */
 
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/Xrandr.h	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/Xrandr.h	Fri Jul 08 12:17:10 2016 -0700
@@ -5,8 +5,8 @@
 /*
  * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
  *
- * Copyright © 2000 Compaq Computer Corporation, Inc.
- * Copyright © 2002 Hewlett-Packard Company, Inc.
+ * Copyright © 2000 Compaq Computer Corporation, Inc.
+ * Copyright © 2002 Hewlett-Packard Company, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -66,6 +66,65 @@
     int mheight;
 } XRRScreenChangeNotifyEvent;
 
+typedef XID RROutput;
+typedef XID RRCrtc;
+typedef XID RRMode;
+
+typedef unsigned long XRRModeFlags;
+
+typedef struct {
+    RRMode              id;
+    unsigned int        width;
+    unsigned int        height;
+    unsigned long       dotClock;
+    unsigned int        hSyncStart;
+    unsigned int        hSyncEnd;
+    unsigned int        hTotal;
+    unsigned int        hSkew;
+    unsigned int        vSyncStart;
+    unsigned int        vSyncEnd;
+    unsigned int        vTotal;
+    char                *name;
+    unsigned int        nameLength;
+    XRRModeFlags        modeFlags;
+} XRRModeInfo;
+
+typedef struct {
+    Time        timestamp;
+    Time        configTimestamp;
+    int         ncrtc;
+    RRCrtc      *crtcs;
+    int         noutput;
+    RROutput    *outputs;
+    int         nmode;
+    XRRModeInfo *modes;
+} XRRScreenResources;
+
+typedef struct {
+    Time            timestamp;
+    RRCrtc          crtc;
+    char            *name;
+    int             nameLen;
+    unsigned long   mm_width;
+    unsigned long   mm_height;
+    Connection      connection;
+    SubpixelOrder   subpixel_order;
+    int             ncrtc;
+    RRCrtc          *crtcs;
+    int             nclone;
+    RROutput        *clones;
+    int             nmode;
+    int             npreferred;
+    RRMode          *modes;
+} XRROutputInfo;
+
+XRRScreenResources *XRRGetScreenResources (Display *dpy, Window window);
+
+void XRRFreeScreenResources (XRRScreenResources *resources);
+
+XRROutputInfo * XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources,
+                                                               RROutput output);
+void XRRFreeOutputInfo (XRROutputInfo *outputInfo);
 
 /* internal representation is private to the library */
 typedef struct _XRRScreenConfiguration XRRScreenConfiguration;
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c	Fri Jul 08 12:17:10 2016 -0700
@@ -1657,6 +1657,16 @@
     (*XRRConfigRotationsType)(XRRScreenConfiguration *config,
                               Rotation *current_rotation);
 
+typedef XRRScreenResources* (*XRRGetScreenResourcesType)(Display *dpy,
+                                                                 Window window);
+
+typedef void (*XRRFreeScreenResourcesType)(XRRScreenResources *resources);
+
+typedef XRROutputInfo * (*XRRGetOutputInfoType)(Display *dpy,
+                                XRRScreenResources *resources, RROutput output);
+
+typedef void (*XRRFreeOutputInfoType)(XRROutputInfo *outputInfo);
+
 static XRRQueryVersionType               awt_XRRQueryVersion;
 static XRRGetScreenInfoType              awt_XRRGetScreenInfo;
 static XRRFreeScreenConfigInfoType       awt_XRRFreeScreenConfigInfo;
@@ -1666,6 +1676,10 @@
 static XRRConfigCurrentConfigurationType awt_XRRConfigCurrentConfiguration;
 static XRRSetScreenConfigAndRateType     awt_XRRSetScreenConfigAndRate;
 static XRRConfigRotationsType            awt_XRRConfigRotations;
+static XRRGetScreenResourcesType         awt_XRRGetScreenResources;
+static XRRFreeScreenResourcesType        awt_XRRFreeScreenResources;
+static XRRGetOutputInfoType              awt_XRRGetOutputInfo;
+static XRRFreeOutputInfoType             awt_XRRFreeOutputInfo;
 
 #define LOAD_XRANDR_FUNC(f) \
     do { \
@@ -1737,6 +1751,10 @@
     LOAD_XRANDR_FUNC(XRRConfigCurrentConfiguration);
     LOAD_XRANDR_FUNC(XRRSetScreenConfigAndRate);
     LOAD_XRANDR_FUNC(XRRConfigRotations);
+    LOAD_XRANDR_FUNC(XRRGetScreenResources);
+    LOAD_XRANDR_FUNC(XRRFreeScreenResources);
+    LOAD_XRANDR_FUNC(XRRGetOutputInfo);
+    LOAD_XRANDR_FUNC(XRRFreeOutputInfo);
 
     return JNI_TRUE;
 }
@@ -1924,36 +1942,73 @@
      jint screen, jobject arrayList)
 {
 #ifndef HEADLESS
-    XRRScreenConfiguration *config;
 
     AWT_LOCK();
 
-    config = awt_XRRGetScreenInfo(awt_display,
-                                  RootWindow(awt_display, screen));
-    if (config != NULL) {
-        int nsizes, i, j;
-        XRRScreenSize *sizes = awt_XRRConfigSizes(config, &nsizes);
+    if (usingXinerama && XScreenCount(awt_display) > 0) {
+        XRRScreenResources *res = awt_XRRGetScreenResources(awt_display,
+                                                    RootWindow(awt_display, 0));
+        if (res) {
+           if (res->noutput > screen) {
+                XRROutputInfo *output_info = awt_XRRGetOutputInfo(awt_display,
+                                                     res, res->outputs[screen]);
+                if (output_info) {
+                    int i;
+                    for (i = 0; i < res->nmode; i++) {
+                        RRMode m = output_info->modes[i];
+                        int j;
+                        XRRModeInfo *mode;
+                        for (j = 0; j < res->nmode; j++) {
+                            mode = &res->modes[j];
+                            if (mode->id == m) {
+                                 float rate = 0;
+                                 if (mode->hTotal && mode->vTotal) {
+                                     rate = ((float)mode->dotClock /
+                                                   ((float)mode->hTotal *
+                                                          (float)mode->vTotal));
+                                 }
+                                 X11GD_AddDisplayMode(env, arrayList,
+                                        mode->width, mode->height,
+                                              BIT_DEPTH_MULTI, (int)(rate +.2));
+                                 break;
+                            }
+                        }
+                    }
+                    awt_XRRFreeOutputInfo(output_info);
+                }
+            }
+            awt_XRRFreeScreenResources(res);
+        }
+    } else {
+        XRRScreenConfiguration *config;
 
-        if (sizes != NULL) {
-            for (i = 0; i < nsizes; i++) {
-                int nrates;
-                XRRScreenSize size = sizes[i];
-                short *rates = awt_XRRConfigRates(config, i, &nrates);
+        config = awt_XRRGetScreenInfo(awt_display,
+                                      RootWindow(awt_display, screen));
+        if (config != NULL) {
+            int nsizes, i, j;
+            XRRScreenSize *sizes = awt_XRRConfigSizes(config, &nsizes);
 
-                for (j = 0; j < nrates; j++) {
-                    X11GD_AddDisplayMode(env, arrayList,
-                                         size.width,
-                                         size.height,
-                                         BIT_DEPTH_MULTI,
-                                         rates[j]);
-                    if ((*env)->ExceptionCheck(env)) {
-                        break;
+            if (sizes != NULL) {
+                for (i = 0; i < nsizes; i++) {
+                    int nrates;
+                    XRRScreenSize size = sizes[i];
+                    short *rates = awt_XRRConfigRates(config, i, &nrates);
+
+                    for (j = 0; j < nrates; j++) {
+                        X11GD_AddDisplayMode(env, arrayList,
+                                             size.width,
+                                             size.height,
+                                             BIT_DEPTH_MULTI,
+                                             rates[j]);
+                        if ((*env)->ExceptionCheck(env)) {
+                            break;
+                        }
                     }
                 }
             }
+
+            awt_XRRFreeScreenConfigInfo(config);
         }
-
-        awt_XRRFreeScreenConfigInfo(config);
     }
 
     AWT_FLUSH_UNLOCK();
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/randr.h	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/randr.h	Fri Jul 08 12:17:10 2016 -0700
@@ -5,8 +5,8 @@
 /*
  * $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $
  *
- * Copyright © 2000, Compaq Computer Corporation,
- * Copyright © 2002, Hewlett Packard, Inc.
+ * Copyright © 2000, Compaq Computer Corporation,
+ * Copyright © 2002, Hewlett Packard, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -31,6 +31,7 @@
 #ifndef _RANDR_H_
 #define _RANDR_H_
 
+typedef unsigned short  Connection;
 typedef unsigned short  Rotation;
 typedef unsigned short  SizeID;
 typedef unsigned short  SubpixelOrder;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,7 +27,9 @@
 
 import java.awt.Image;
 import java.awt.Toolkit;
+import java.awt.image.AbstractMultiResolutionImage;
 import java.awt.image.BufferedImage;
+import java.awt.image.ImageObserver;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -982,11 +984,12 @@
 
     // Return the bits from an HICON.  This has a side effect of setting
     // the imageHash variable for efficient caching / comparing.
-    private static native int[] getIconBits(long hIcon, int iconSize);
+    private static native int[] getIconBits(long hIcon);
     // Dispose the HICON
     private static native void disposeIcon(long hIcon);
 
-    static native int[] getStandardViewButton0(int iconIndex);
+    // Get buttons from native toolbar implementation.
+    static native int[] getStandardViewButton0(int iconIndex, boolean small);
 
     // Should be called from the COM thread
     private long getIShellIcon() {
@@ -1000,12 +1003,17 @@
     private static Image makeIcon(long hIcon, boolean getLargeIcon) {
         if (hIcon != 0L && hIcon != -1L) {
             // Get the bits.  This has the side effect of setting the imageHash value for this object.
-            int size = getLargeIcon ? 32 : 16;
-            int[] iconBits = getIconBits(hIcon, size);
+            final int[] iconBits = getIconBits(hIcon);
             if (iconBits != null) {
-                BufferedImage img = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
+                // icons are always square
+                final int size = (int) Math.sqrt(iconBits.length);
+                final int baseSize = getLargeIcon ? 32 : 16;
+                final BufferedImage img =
+                        new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
                 img.setRGB(0, 0, size, size, iconBits, 0, size);
-                return img;
+                return size == baseSize
+                        ? img
+                        : new MultiResolutionIconImage(baseSize, img);
             }
         }
         return null;
@@ -1298,4 +1306,39 @@
         });
     }
 
+    static class MultiResolutionIconImage extends AbstractMultiResolutionImage {
+
+        final int baseSize;
+        final Image resolutionVariant;
+
+        public MultiResolutionIconImage(int baseSize, Image resolutionVariant) {
+            this.baseSize = baseSize;
+            this.resolutionVariant = resolutionVariant;
+        }
+
+        @Override
+        public int getWidth(ImageObserver observer) {
+            return baseSize;
+        }
+
+        @Override
+        public int getHeight(ImageObserver observer) {
+            return baseSize;
+        }
+
+        @Override
+        protected Image getBaseImage() {
+            return resolutionVariant;
+        }
+
+        @Override
+        public Image getResolutionVariant(double width, double height) {
+            return resolutionVariant;
+        }
+
+        @Override
+        public List<Image> getResolutionVariants() {
+            return Arrays.asList(resolutionVariant);
+        }
+    }
 }
--- a/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,6 +27,7 @@
 
 import java.awt.*;
 import java.awt.image.BufferedImage;
+import java.awt.image.BaseMultiResolutionImage;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -116,13 +117,21 @@
             return result;
         }
 
-        BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
-
-        img.setRGB(0, 0, 16, 16, Win32ShellFolder2.getStandardViewButton0(iconIndex), 0, 16);
+        final int[] iconBits = Win32ShellFolder2
+                .getStandardViewButton0(iconIndex, true);
+        if (iconBits != null) {
+            // icons are always square
+            final int size = (int) Math.sqrt(iconBits.length);
+            final BufferedImage img =
+                    new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB);
+            img.setRGB(0, 0, size, size, iconBits, 0, size);
 
-        STANDARD_VIEW_BUTTONS[iconIndex] = img;
+            STANDARD_VIEW_BUTTONS[iconIndex] = (size == 16)
+                    ? img
+                    : new MultiResolutionIconImage(16, img);
+        }
 
-        return img;
+        return STANDARD_VIEW_BUTTONS[iconIndex];
     }
 
     // Special folders
--- a/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/classes/sun/print/Win32PrintService.java	Fri Jul 08 12:17:10 2016 -0700
@@ -759,10 +759,18 @@
     private boolean isSupportedMediaPrintableArea(MediaPrintableArea mpa) {
 
         getMediaPrintables(null);
+        int units = MediaPrintableArea.INCH;
 
         if (mediaPrintables != null) {
             for (int i=0; i<mediaPrintables.length; i++) {
-                if (mpa.equals(mediaPrintables[i])) {
+                if ((mpa.getX(units) >= mediaPrintables[i].getX(units)) &&
+                    (mpa.getY(units) >= mediaPrintables[i].getY(units)) &&
+                    (mpa.getX(units) + mpa.getWidth(units) <=
+                            mediaPrintables[i].getX(units) +
+                            mediaPrintables[i].getWidth(units)) &&
+                    (mpa.getY(units) + mpa.getHeight(units) <=
+                            mediaPrintables[i].getY(units) +
+                            mediaPrintables[i].getHeight(units))) {
                     return true;
                 }
             }
--- a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -930,19 +930,43 @@
 /*
  * Class:     sun_awt_shell_Win32ShellFolder2
  * Method:    getIconBits
- * Signature: (JI)[I
+ * Signature: (J)[I
  */
 JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
-    (JNIEnv* env, jclass cls, jlong hicon, jint iconSize)
+    (JNIEnv* env, jclass cls, jlong hicon)
 {
+    const int MAX_ICON_SIZE = 128;
+    int iconSize = 0;
     jintArray iconBits = NULL;
 
+    BITMAP bmp;
+    memset(&bmp, 0, sizeof(BITMAP));
+
     // Get the icon info
     ICONINFO iconInfo;
     if (fn_GetIconInfo((HICON)hicon, &iconInfo)) {
         // Get the screen DC
         HDC dc = GetDC(NULL);
         if (dc != NULL) {
+            // find out the icon size in order to deal with different sizes
+            // delivered depending on HiDPI mode or SD DPI mode.
+            if (iconInfo.hbmColor) {
+                const int nWrittenBytes = GetObject(iconInfo.hbmColor, sizeof(bmp), &bmp);
+                if(nWrittenBytes > 0) {
+                    iconSize = bmp.bmWidth;
+                }
+            } else if (iconInfo.hbmMask) {
+                // Icon has no color plane, image data stored in mask
+                const int nWrittenBytes = GetObject(iconInfo.hbmMask, sizeof(bmp), &bmp);
+                if (nWrittenBytes > 0) {
+                    iconSize = bmp.bmWidth;
+                }
+            }
+            // limit iconSize to MAX_ICON_SIZE, so that the colorBits and maskBits
+            // arrays are big enough.
+            // (logic: rather show bad icons than overrun the array size)
+            iconSize = iconSize > MAX_ICON_SIZE ? MAX_ICON_SIZE : iconSize;
+
             // Set up BITMAPINFO
             BITMAPINFO bmi;
             memset(&bmi, 0, sizeof(BITMAPINFO));
@@ -954,7 +978,7 @@
             bmi.bmiHeader.biCompression = BI_RGB;
             // Extract the color bitmap
             int nBits = iconSize * iconSize;
-            long colorBits[1024];
+            long colorBits[MAX_ICON_SIZE * MAX_ICON_SIZE];
             GetDIBits(dc, iconInfo.hbmColor, 0, iconSize, colorBits, &bmi, DIB_RGB_COLORS);
             // XP supports alpha in some icons, and depending on device.
             // This should take precedence over the icon mask bits.
@@ -969,7 +993,7 @@
             }
             if (!hasAlpha) {
                 // Extract the mask bitmap
-                long maskBits[1024];
+                long maskBits[MAX_ICON_SIZE * MAX_ICON_SIZE];
                 GetDIBits(dc, iconInfo.hbmMask, 0, iconSize, maskBits, &bmi, DIB_RGB_COLORS);
                 // Copy the mask alphas into the color bits
                 for (int i = 0; i < nBits; i++) {
@@ -1001,10 +1025,10 @@
 /*
  * Class:     sun_awt_shell_Win32ShellFolder2
  * Method:    getStandardViewButton0
- * Signature: (I)[I
+ * Signature: (IZ)[I
  */
 JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getStandardViewButton0
-    (JNIEnv* env, jclass cls, jint iconIndex)
+    (JNIEnv* env, jclass cls, jint iconIndex, jboolean smallIcon)
 {
     jintArray result = NULL;
 
@@ -1014,7 +1038,8 @@
         NULL, NULL, NULL, NULL);
 
     if (hWndToolbar != NULL) {
-        SendMessage(hWndToolbar, TB_LOADIMAGES, (WPARAM)IDB_VIEW_SMALL_COLOR, (LPARAM)HINST_COMMCTRL);
+        WPARAM size = smallIcon ? (WPARAM)IDB_VIEW_SMALL_COLOR : (WPARAM)IDB_VIEW_LARGE_COLOR;
+        SendMessage(hWndToolbar, TB_LOADIMAGES, size, (LPARAM)HINST_COMMCTRL);
 
         HIMAGELIST hImageList = (HIMAGELIST) SendMessage(hWndToolbar, TB_GETIMAGELIST, 0, 0);
 
@@ -1022,7 +1047,7 @@
             HICON hIcon = ImageList_GetIcon(hImageList, iconIndex, ILD_TRANSPARENT);
 
             if (hIcon != NULL) {
-                result = Java_sun_awt_shell_Win32ShellFolder2_getIconBits(env, cls, ptr_to_jlong(hIcon), 16);
+                result = Java_sun_awt_shell_Win32ShellFolder2_getIconBits(env, cls, ptr_to_jlong(hIcon));
 
                 DestroyIcon(hIcon);
             }
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -257,6 +257,8 @@
         AwtComponent::BuildPrimaryDynamicTable();
         sm_PrimaryDynamicTableBuilt = TRUE;
     }
+
+    deadKeyActive = FALSE;
 }
 
 AwtComponent::~AwtComponent()
@@ -2952,6 +2954,7 @@
     {0x037A, java_awt_event_KeyEvent_VK_DEAD_IOTA},             // ASCII ???
     {0x309B, java_awt_event_KeyEvent_VK_DEAD_VOICED_SOUND},
     {0x309C, java_awt_event_KeyEvent_VK_DEAD_SEMIVOICED_SOUND},
+    {0x0004, java_awt_event_KeyEvent_VK_COMPOSE},
     {0,0}
 };
 
@@ -3444,8 +3447,9 @@
     AwtToolkit::GetKeyboardState(keyboardState);
 
     // apply modifiers to keyboard state if necessary
+    BOOL shiftIsDown = FALSE;
     if (modifiers) {
-        BOOL shiftIsDown = modifiers & java_awt_event_InputEvent_SHIFT_DOWN_MASK;
+        shiftIsDown = modifiers & java_awt_event_InputEvent_SHIFT_DOWN_MASK;
         BOOL altIsDown = modifiers & java_awt_event_InputEvent_ALT_DOWN_MASK;
         BOOL ctrlIsDown = modifiers & java_awt_event_InputEvent_CTRL_DOWN_MASK;
 
@@ -3517,18 +3521,27 @@
         } // ctrlIsDown
     } // modifiers
 
-    // instead of creating our own conversion tables, I'll let Win32
-    // convert the character for me.
     WORD wChar[2];
-    UINT scancode = ::MapVirtualKey(wkey, 0);
-    int converted = ::ToUnicodeEx(wkey, scancode, keyboardState,
-                                  wChar, 2, 0, GetKeyboardLayout());
+    int converted = 1;
+    UINT ch = ::MapVirtualKey(wkey, 2);
+    if (ch & 0x80000000) {
+        // Dead key which is handled as a normal key
+        isDeadKey = deadKeyActive = TRUE;
+    } else if (deadKeyActive) {
+        // We cannot use ::ToUnicodeEx if dead key is active because this will
+        // break dead key function
+        wChar[0] = shiftIsDown ? ch : tolower(ch);
+    } else {
+        UINT scancode = ::MapVirtualKey(wkey, 0);
+        converted = ::ToUnicodeEx(wkey, scancode, keyboardState,
+                                              wChar, 2, 0, GetKeyboardLayout());
+    }
 
     UINT translation;
     BOOL deadKeyFlag = (converted == 2);
 
     // Dead Key
-    if (converted < 0) {
+    if (converted < 0 || isDeadKey) {
         translation = java_awt_event_KeyEvent_CHAR_UNDEFINED;
     } else
     // No translation available -- try known conversions or else punt.
@@ -3682,6 +3695,8 @@
 MsgRouting AwtComponent::WmChar(UINT character, UINT repCnt, UINT flags,
                                 BOOL system)
 {
+    deadKeyActive = FALSE;
+
     // Will only get WmChar messages with DBCS if we create them for
     // an Edit class in the WmForwardChar method. These synthesized
     // DBCS chars are ok to pass on directly to the default window
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Component.h	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -826,6 +826,8 @@
     // 6524352: support finer-resolution
     int m_wheelRotationAmount;
 
+    BOOL deadKeyActive;
+
     /*
      * The association list of children's IDs and corresponding components.
      * Some components like Choice or List are required their sizes while
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -357,9 +357,9 @@
 
         // show the Win32 file dialog
         if (mode == java_awt_FileDialog_LOAD) {
-            result = AwtFileDialog::GetOpenFileName(&ofn);
+            result = ::GetOpenFileName(&ofn);
         } else {
-            result = AwtFileDialog::GetSaveFileName(&ofn);
+            result = ::GetSaveFileName(&ofn);
         }
         // Fix for 4181310: FileDialog does not show up.
         // If the dialog is not shown because of invalid file name
@@ -369,9 +369,9 @@
             if (dlgerr == FNERR_INVALIDFILENAME) {
                 _tcscpy_s(fileBuffer, bufferLimit, TEXT(""));
                 if (mode == java_awt_FileDialog_LOAD) {
-                    result = AwtFileDialog::GetOpenFileName(&ofn);
+                    result = ::GetOpenFileName(&ofn);
                 } else {
-                    result = AwtFileDialog::GetSaveFileName(&ofn);
+                    result = ::GetSaveFileName(&ofn);
                 }
             }
         }
@@ -430,22 +430,6 @@
         delete[] ofn.lpstrFile;
 }
 
-BOOL
-AwtFileDialog::GetOpenFileName(LPOPENFILENAME data) {
-    return static_cast<BOOL>(reinterpret_cast<INT_PTR>(
-        AwtToolkit::GetInstance().InvokeFunction((void*(*)(void*))
-                     ::GetOpenFileName, data)));
-
-}
-
-BOOL
-AwtFileDialog::GetSaveFileName(LPOPENFILENAME data) {
-    return static_cast<BOOL>(reinterpret_cast<INT_PTR>(
-        AwtToolkit::GetInstance().InvokeFunction((void *(*)(void *))
-                     ::GetSaveFileName, data)));
-
-}
-
 BOOL AwtFileDialog::InheritsNativeMouseWheelBehavior() {return true;}
 
 void AwtFileDialog::_DisposeOrHide(void *param)
@@ -593,9 +577,10 @@
      */
     jobject peerGlobal = env->NewGlobalRef(peer);
 
-    AwtToolkit::GetInstance().InvokeFunction(AwtFileDialog::Show, peerGlobal);
-
-    env->DeleteGlobalRef(peerGlobal);
+    if (!AwtToolkit::GetInstance().PostMessage(WM_AWT_INVOKE_METHOD,
+                             (WPARAM)AwtFileDialog::Show, (LPARAM)peerGlobal)) {
+        env->DeleteGlobalRef(peerGlobal);
+    }
 
     CATCH_BAD_ALLOC;
 }
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.h	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_FileDialog.h	Fri Jul 08 12:17:10 2016 -0700
@@ -60,9 +60,6 @@
     static void Initialize(JNIEnv *env, jstring filterDescription);
     static void Show(void *peer);
 
-    static BOOL GetOpenFileName(LPOPENFILENAME);
-    static BOOL GetSaveFileName(LPOPENFILENAME);
-
     virtual BOOL InheritsNativeMouseWheelBehavior();
 
     // some methods called on Toolkit thread
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -1000,8 +1000,19 @@
                 }
             } else {
                 int xRes = devmode->dmPrintQuality;
-                int yRes = (devmode->dmFields & DM_YRESOLUTION) ?
-                  devmode->dmYResolution : devmode->dmPrintQuality;
+
+                /* For some printers, printer quality can specify 1200IQ
+                 * In this case, dmPrintQuality comes out 600 and
+                 * dmYResolution comes out 2, similarly for 2400IQ
+                 * dmPrintQuality comes out 600 and dmYResolution comes out 4
+                 * which is not a valid resolution
+                 * so for IQ setting, we modify y-resolution only when it is
+                 * greater than 10.
+                 */
+                int yRes = (devmode->dmFields & DM_YRESOLUTION) &&
+                           (devmode->dmYResolution > 10) ?
+                           devmode->dmYResolution : devmode->dmPrintQuality;
+
                 env->CallVoidMethod(printCtrl, AwtPrintControl::setResID,
                                     xRes, yRes);
             }
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_TextArea.cpp	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_TextArea.cpp	Fri Jul 08 12:17:10 2016 -0700
@@ -73,7 +73,10 @@
 }
 
 void AwtTextArea::EditSetSel(CHARRANGE &cr) {
+    // Fix for 5003402: added restoring/hiding selection to enable automatic scrolling
+    SendMessage(EM_HIDESELECTION, FALSE, TRUE);
     SendMessage(EM_EXSETSEL, 0, reinterpret_cast<LPARAM>(&cr));
+    SendMessage(EM_HIDESELECTION, TRUE, TRUE);
     // 6417581: force expected drawing
     if (IS_WINVISTA && cr.cpMin == cr.cpMax) {
         ::InvalidateRect(GetHWnd(), NULL, TRUE);
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/pool/Pool.java	Fri Jul 08 12:17:10 2016 -0700
@@ -118,7 +118,11 @@
         PooledConnectionFactory factory) throws NamingException {
 
         d("get(): ", id);
-        d("size: ", map.size());
+        if (debug) {
+            synchronized (map) {
+                d("size: ", map.size());
+            }
+        }
 
         expungeStaleConnections();
 
@@ -141,10 +145,9 @@
                 // Keep the weak reference through the element of a linked list
                 weakRefs.add(weakRef);
             }
+            d("get(): size after: ", map.size());
         }
 
-        d("get(): size after: ", map.size());
-
         return conns.get(timeout, factory); // get one connection from list
     }
 
@@ -209,19 +212,24 @@
         out.println("maximum pool size: " + maxSize);
         out.println("preferred pool size: " + prefSize);
         out.println("initial pool size: " + initSize);
-        out.println("current pool size: " + map.size());
+
+        synchronized (map) {
+            out.println("current pool size: " + map.size());
 
-        for (Map.Entry<Object, ConnectionsRef> entry : map.entrySet()) {
-            id = entry.getKey();
-            conns = entry.getValue().getConnections();
-            out.println("   " + id + ":" + conns.getStats());
+            for (Map.Entry<Object, ConnectionsRef> entry : map.entrySet()) {
+                id = entry.getKey();
+                conns = entry.getValue().getConnections();
+                out.println("   " + id + ":" + conns.getStats());
+            }
         }
 
         out.println("====== Pool end =====================");
     }
 
     public String toString() {
-        return super.toString() + " " + map.toString();
+        synchronized (map) {
+            return super.toString() + " " + map.toString();
+        }
     }
 
     private void d(String msg, int i) {
--- a/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Fri Jul 08 12:17:10 2016 -0700
@@ -562,7 +562,7 @@
         boolean inDirectives = true;
         for (String line: lines) {
             line = line.trim();
-            if (line.isEmpty() || line.startsWith("#")) {
+            if (line.isEmpty() || line.startsWith("#") || line.startsWith(";")) {
                 continue;
             }
             if (inDirectives) {
--- a/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/Big5_HKSCS.java.template	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.charsets/share/classes/sun/nio/cs/ext/Big5_HKSCS.java.template	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/Config.java	Fri Jul 08 12:17:10 2016 -0700
@@ -66,7 +66,7 @@
 
     Config(String filename) throws IOException {
         FileInputStream in = new FileInputStream(expand(filename));
-        reader = new BufferedReader(new InputStreamReader(in));
+        reader = new BufferedReader(new InputStreamReader(in, "ISO-8859-1"));
         parsedKeywords = new HashSet<String>();
         st = new StreamTokenizer(reader);
         setupTokenizer();
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_ja.java	Fri Jul 08 12:17:10 2016 -0700
@@ -243,9 +243,9 @@
         {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.reason.1",
                  "\u3053\u306Ejar\u306B\u306F\u3001\u8A3C\u660E\u66F8\u30C1\u30A7\u30FC\u30F3\u304C\u307E\u3060\u691C\u8A3C\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u7406\u7531: %s"},
         {"no.timestamp.signing",
-                "-tsa\u307E\u305F\u306F-tsacert\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u3053\u306Ejar\u306B\u306F\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650(%1$tY-%1$tm-%1$td)\u5F8C\u307E\u305F\u306F\u5C06\u6765\u306E\u5931\u52B9\u65E5\u5F8C\u306B\u3001\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
+                "-tsa\u307E\u305F\u306F-tsacert\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u3053\u306Ejar\u306B\u306F\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u4ED8\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650(%1$tY-%1$tm-%1$td)\u5F8C\u306B\u3001\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
         {"no.timestamp.verifying",
-                "\u3053\u306Ejar\u306B\u306F\u3001\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u7F72\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650(%1$tY-%1$tm-%1$td)\u5F8C\u307E\u305F\u306F\u5C06\u6765\u306E\u5931\u52B9\u65E5\u5F8C\u306B\u3001\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
+                "\u3053\u306Ejar\u306B\u306F\u3001\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u7F72\u540D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u304C\u306A\u3044\u3068\u3001\u7F72\u540D\u8005\u8A3C\u660E\u66F8\u306E\u6709\u52B9\u671F\u9650(%1$tY-%1$tm-%1$td)\u5F8C\u306B\u3001\u30E6\u30FC\u30B6\u30FC\u306F\u3053\u306Ejar\u3092\u691C\u8A3C\u3067\u304D\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"},
         {"Unknown.password.type.", "\u4E0D\u660E\u306A\u30D1\u30B9\u30EF\u30FC\u30C9\u30FB\u30BF\u30A4\u30D7: "},
         {"Cannot.find.environment.variable.",
                 "\u74B0\u5883\u5909\u6570\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: "},
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java	Fri Jul 08 12:17:10 2016 -0700
@@ -243,9 +243,9 @@
         {"This.jar.contains.entries.whose.certificate.chain.is.not.validated.reason.1",
                  "\u6B64 jar \u5305\u542B\u5176\u8BC1\u4E66\u94FE\u672A\u7ECF\u8FC7\u9A8C\u8BC1\u7684\u6761\u76EE\u3002\u539F\u56E0: %s"},
         {"no.timestamp.signing",
-                "\u672A\u63D0\u4F9B -tsa \u6216 -tsacert, \u6B64 jar \u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u7B7E\u540D\u8005\u8BC1\u4E66\u7684\u5230\u671F\u65E5\u671F (%1$tY-%1$tm-%1$td) \u6216\u4EE5\u540E\u7684\u4EFB\u4F55\u64A4\u9500\u65E5\u671F\u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
+                "\u672A\u63D0\u4F9B -tsa \u6216 -tsacert, \u6B64 jar \u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u7B7E\u540D\u8005\u8BC1\u4E66\u7684\u5230\u671F\u65E5\u671F (%1$tY-%1$tm-%1$td) \u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
         {"no.timestamp.verifying",
-                "\u6B64 jar \u5305\u542B\u7684\u7B7E\u540D\u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u7B7E\u540D\u8005\u8BC1\u4E66\u7684\u5230\u671F\u65E5\u671F (%1$tY-%1$tm-%1$td) \u6216\u4EE5\u540E\u7684\u4EFB\u4F55\u64A4\u9500\u65E5\u671F\u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
+                "\u6B64 jar \u5305\u542B\u7684\u7B7E\u540D\u6CA1\u6709\u65F6\u95F4\u6233\u3002\u5982\u679C\u6CA1\u6709\u65F6\u95F4\u6233, \u5219\u5728\u7B7E\u540D\u8005\u8BC1\u4E66\u7684\u5230\u671F\u65E5\u671F (%1$tY-%1$tm-%1$td) \u4E4B\u540E, \u7528\u6237\u53EF\u80FD\u65E0\u6CD5\u9A8C\u8BC1\u6B64 jar\u3002"},
         {"Unknown.password.type.", "\u672A\u77E5\u53E3\u4EE4\u7C7B\u578B: "},
         {"Cannot.find.environment.variable.",
                 "\u627E\u4E0D\u5230\u73AF\u5883\u53D8\u91CF: "},
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_de.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=Falsche L\u00E4nge bei der Verarbeitung: {0}
 error.create.tempfile=Es konnte keine tempor\u00E4re Datei erstellt werden
 error.hash.dep=Abh\u00E4ngigkeiten bei Hashing-Modul {0}. Modul {1} kann nicht im Modulpfad gefunden werden
-error.module.options.without.info=--module-version oder --hash-dependencies ohne module-info.class
+error.module.options.without.info=--module-version oder --hash-modules ohne module-info.class
 error.unexpected.module-info=Unerwarteter Moduldeskriptor {0}
 error.module.descriptor.not.found=Moduldeskriptor nicht gefunden
+error.versioned.info.without.root=module-info.class in Abschnitt mit Versionsangabe ohne module-info.class in Root ermittelt
+error.versioned.info.name.notequal=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt falschen Namen
+error.versioned.info.requires.public=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt zus\u00E4tzlichen "requires public"
+error.versioned.info.requires.added=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt zus\u00E4tzlichen "requires"
+error.versioned.info.requires.dropped=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt fehlenden "requires"
+error.versioned.info.exports.notequal=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt unterschiedliche "exports"
+error.versioned.info.provides.notequal=module-info.class in Abschnitt mit Versionsangabe enth\u00E4lt unterschiedliche "provides"
+error.invalid.versioned.module.attribute=Ung\u00FCltiges Moduldeskriptorattribut {0}
 error.missing.provider=Serviceprovider nicht gefunden: {0}
 out.added.manifest=Manifest wurde hinzugef\u00FCgt
-out.added.module-info=module-info.class hinzugef\u00FCgt
+out.added.module-info=module-info hinzugef\u00FCgt: {0}
 out.update.manifest=Manifest wurde aktualisiert
-out.update.module-info=module-info.class aktualisiert
+out.update.module-info=module-info aktualisiert: {0}
 out.ignore.entry=Eintrag {0} wird ignoriert
 out.adding={0} wird hinzugef\u00FCgt
 out.deflated=({0} % verkleinert)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Die Manifestinformationen aus der angegebenen\n                             Manifestdatei aufnehmen
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          Keine Manifestdatei f\u00FCr die Eintr\u00E4ge erstellen
 main.help.opt.create.update.module-version=\      --module-version=VERSION    Die Modulversion beim Erstellen eines modularen\n                             JAR-Archivs oder Aktualisieren eines nicht modularen JAR-Archivs
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Die Hashes von Modulabh\u00E4ngigkeiten\n                             entsprechend dem angegebenen Muster beim Erstellen eines\n                             modularen JAR-Archivs oder Aktualisieren eines nicht modularen\n                             JAR-Archivs berechnen und aufzeichnen
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Berechnet und zeichnet die Hashes von Modulen auf, \n                             die mit einem bestimmten Muster \u00FCbereinstimmen, und direkt oder\n                             indirekt von einem modularen JAR-Archiv abh\u00E4ngen, das erstellt\n                             wird, oder einem nicht-modularen JAR-Archiv, das aktualisiert wird
 main.help.opt.create.update.modulepath=\      --modulepath           Ort von Modulabh\u00E4ngigkeit zum Generieren
 \                             des Hash
 main.help.opt.create.update.index=\ Vorgangsmodifikatoren, die nur im Erstellungs-, Aktualisierungs- und Indexgenerierungsmodus g\u00FCltig sind:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ Weitere Optionen:\n
 main.help.opt.other.help=\  -?, --help[:compat]        Diese Meldung oder optional die Kompatibilit\u00E4t, Hilfe angeben
 main.help.opt.other.version=\      --version              Programmversion ausgeben
-main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-dependencies" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional.
+main.help.postopt=\ Ein Archiv ist ein modulares JAR-Archiv, wenn der Moduldeskriptor "module-info.class"\n in der Root der angegebenen Verzeichnisse oder in der Root des JAR-Archivs selbst\n vorhanden ist. Die folgenden Vorg\u00E4nge sind nur g\u00FCltig, wenn Sie ein modulares JAR-Archiv\n erstellen oder ein vorhandenes nicht modulares JAR-Archiv aktualisieren: "--module-version",\n "--hash-modules" und "--modulepath".\n\n Obligatorische oder optionale Argumente zu langen Optionen sind auch f\u00FCr die jeweils\n zugeh\u00F6rigen kurzen Optionen obligatorisch oder optional.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_es.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=longitud incorrecta al procesar: {0}
 error.create.tempfile=No se ha podido crear el archivo temporal
 error.hash.dep=Aplicando hash a las dependencias del m\u00F3dulo {0}, no se ha encontrado el m\u00F3dulo {1} en la ruta del m\u00F3dulo
-error.module.options.without.info=Una de las dependencias --module-version o --hash-dependencies sin module-info.class
+error.module.options.without.info=Uno de --module-version o -hash-modules sin module-info.class
 error.unexpected.module-info=Descriptor de m\u00F3dulo inesperado {0}
 error.module.descriptor.not.found=No se ha encontrado el descriptor de m\u00F3dulo
+error.versioned.info.without.root=Se ha encontrado module-info.class en la secci\u00F3n de versi\u00F3n sin module-info.class en la ra\u00EDz
+error.versioned.info.name.notequal=module-info.class en la secci\u00F3n de versi\u00F3n contiene un nombre incorrecto
+error.versioned.info.requires.public=module-info.class en la secci\u00F3n de versi\u00F3n contiene requisitos p\u00FAblicos adicionales
+error.versioned.info.requires.added=module-info.class en la secci\u00F3n de versi\u00F3n contiene requisitos adicionales
+error.versioned.info.requires.dropped=module-info.class en la secci\u00F3n de versi\u00F3n contiene requisitos que faltan
+error.versioned.info.exports.notequal=module-info.class en la secci\u00F3n de versi\u00F3n contiene exportaciones diferentes
+error.versioned.info.provides.notequal=module-info.class en la secci\u00F3n de versi\u00F3n contiene aportaciones diferentes
+error.invalid.versioned.module.attribute=Atributo de descriptor de m\u00F3dulo no v\u00E1lido {0}
 error.missing.provider=No se ha encontrado el proveedor de servicios: {0}
 out.added.manifest=manifiesto agregado
-out.added.module-info=module-info.class agregado
+out.added.module-info=module-info agregado: {0}
 out.update.manifest=manifiesto actualizado
-out.update.module-info=module-info.class actualizado
+out.update.module-info=module-info actualizado: {0}
 out.ignore.entry=ignorando entrada {0}
 out.adding=agregando: {0}
 out.deflated=(desinflado {0}%)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Incluir la informaci\u00F3n de manifiesto del archivo\n                             de manifiesto proporcionado
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          No crear ning\u00FAn archivo de manifiesto para las entradas
 main.help.opt.create.update.module-version=\      --module-version=VERSION    Versi\u00F3n del m\u00F3dulo, si se va a crear un archivo jar modular\n                             o actualizar un archivo jar no modular
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Calcular y registrar los hash de dependencias\n                             de m\u00F3dulo que coinciden con el patr\u00F3n proporcionado, si se va a crear\n                             un archivo jar modular o actualizar un archivo jar no\n                             modular
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Calcular y registrar los hash de m\u00F3dulos\n                             que coinciden con el patr\u00F3n proporcionado y que dependen\n                             directa o indirectamente de la creaci\u00F3n de un archivo jar modular\n                             o de la actualizaci\u00F3n de un archivo jar no modular
 main.help.opt.create.update.modulepath=\      --modulepath           Ubicaci\u00F3n de la dependencia de m\u00F3dulo para generaci\u00F3n
 \                             hash
 main.help.opt.create.update.index=\ Modificadores de operaci\u00F3n v\u00E1lidos solo en el modo de creaci\u00F3n, actualizaci\u00F3n y generaci\u00F3n de \u00EDndice:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ Otras opciones:\n
 main.help.opt.other.help=\  -?, --help[:compat]        Utilice este valor, u opcionalmente la compatibilidad, ayuda
 main.help.opt.other.version=\      --version              Imprimir versi\u00F3n del programa
-main.help.postopt=\ Un archivo es un jar modular si el descriptor de m\u00F3dulo, 'module-info.class', est\u00E1\n en la ra\u00EDz de los directorios proporcionados o en la ra\u00EDz del archivo jar.\n Las siguientes operaciones solo son v\u00E1lidas si se va a crear un jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-dependencies', y '--modulepath'.\n\n Los argumentos obligatorios u opcionales en las opciones largas tambi\u00E9n son obligatorios u opcionales\n en cualquiera de las opciones cortas.
+main.help.postopt=\ Un archivo es un jar modular si el descriptor de m\u00F3dulo, 'module-info.class', est\u00E1\n en la ra\u00EDz de los directorios proporcionados o en la ra\u00EDz del archivo jar.\n Las siguientes operaciones solo son v\u00E1lidas si se va a crear un jar modular\n o se va a actualizar un jar existente no modular: '--module-version',\n '--hash-modules' y '--modulepath'.\n\n Los argumentos obligatorios u opcionales en las opciones largas tambi\u00E9n son obligatorios u opcionales\n en cualquiera de las opciones cortas.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_fr.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=longueur incorrecte lors du traitement de : {0}
 error.create.tempfile=Impossible de cr\u00E9er un fichier temporaire
 error.hash.dep=Hachage des d\u00E9pendances du module {0}, module {1} introuvable sur le chemin de module
-error.module.options.without.info=Une des options --module-version ou --hash-dependencies sans module-info.class
+error.module.options.without.info=Une des options --module-version ou --hash-modules sans module-info.class
 error.unexpected.module-info=Descripteur de module {0} inattendu
 error.module.descriptor.not.found=Descripteur de module introuvable
+error.versioned.info.without.root=module-info.class a \u00E9t\u00E9 d\u00E9tect\u00E9 dans la section avec num\u00E9ro de version sans module-info.class dans la racine
+error.versioned.info.name.notequal=module-info.class dans la section avec num\u00E9ro de version contient un nom incorrect
+error.versioned.info.requires.public=module-info.class dans la section avec num\u00E9ro de version contient des exigences publiques suppl\u00E9mentaires
+error.versioned.info.requires.added=module-info.class dans la section avec num\u00E9ro de version contient des exigences suppl\u00E9mentaires
+error.versioned.info.requires.dropped=module-info.class dans la section avec num\u00E9ro de version contient des exigences manquantes
+error.versioned.info.exports.notequal=module-info.class dans la section avec num\u00E9ro de version contient des exports diff\u00E9rents
+error.versioned.info.provides.notequal=module-info.class dans la section avec num\u00E9ro de version contient des fournitures diff\u00E9rentes
+error.invalid.versioned.module.attribute=Attribut de descripteur de module non valide {0}
 error.missing.provider=Fournisseur de services introuvable : {0}
 out.added.manifest=manifeste ajout\u00E9
-out.added.module-info=module-info.class ajout\u00E9
+out.added.module-info=module-info ajout\u00E9 : {0}
 out.update.manifest=manifeste mis \u00E0 jour
-out.update.module-info=module-info.class mis \u00E0 jour
+out.update.module-info=module-info mis \u00E0 jour : {0}
 out.ignore.entry=entr\u00E9e {0} ignor\u00E9e
 out.adding=ajout : {0}
 out.deflated=(compression : {0} %)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inclut les informations de manifeste du fichier\n                             manifeste donn\u00E9
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          Ne cr\u00E9e pas de fichier manifeste pour les entr\u00E9es
 main.help.opt.create.update.module-version=\      --module-version=VERSION    Version de module lors de la cr\u00E9ation d'un fichier JAR\n                             modulaire ou de la mise \u00E0 jour d'un fichier JAR non modulaire
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Calcule et enregistre les hachages des d\u00E9pendances\n                             de module mises en correspondance d'apr\u00E8s le mod\u00E8le donn\u00E9, lors\n                             de la cr\u00E9ation d'un JAR modulaire ou de la mise \u00E0 jour d'un JAR\n                             non modulaire
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Calcule et enregistre les hachages des modules \n                             mis en correspondance d'apr\u00E8s le mod\u00E8le donn\u00E9 et d\u00E9pendant\n                             directement ou indirectement d'un fichier JAR modulaire\n                             en cours de cr\u00E9ation ou d'un fichier JAR non modulaire en cours de mise \u00E0 jour
 main.help.opt.create.update.modulepath=\      --modulepath           Emplacement d'une d\u00E9pendance de module pour la g\u00E9n\u00E9ration
 \                             du hachage
 main.help.opt.create.update.index=\ Modificateurs d'op\u00E9ration valides uniquement en modes create, update et generate-index :\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ Autres options :\n
 main.help.opt.other.help=\  -?, --help[:compat]        Affiche l'aide ou \u00E9ventuellement la compatibilit\u00E9
 main.help.opt.other.version=\      --version              Imprime la version de programme
-main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des r\u00E9pertoires donn\u00E9s ou dans la racine de l'archive JAR\n elle-m\u00EAme. Les op\u00E9rations suivantes sont valides uniquement lors de la cr\u00E9ation d'un fichier JAR modulaire\n ou de la mise \u00E0 jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-dependencies' et '--modulepath'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont \u00E9galement obligatoires ou facultatifs\n pour toute option courte correspondante.
+main.help.postopt=\ Une archive est un fichier JAR modulaire si un descripteur de module, 'module-info.class', se\n trouve dans la racine des r\u00E9pertoires donn\u00E9s ou dans la racine de l'archive JAR\n elle-m\u00EAme. Les op\u00E9rations suivantes sont valides uniquement lors de la cr\u00E9ation d'un fichier JAR modulaire\n ou de la mise \u00E0 jour d'un fichier JAR non modulaire existant : '--module-version',\n '--hash-modules' et '--modulepath'.\n\n Les arguments obligatoires ou facultatifs pour les options longues sont \u00E9galement obligatoires ou facultatifs\n pour toute option courte correspondante.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_it.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=lunghezza non valida durante l''elaborazione: {0}
 error.create.tempfile=Impossibile creare il file temporaneo.
 error.hash.dep={0} dipendenze del modulo di hashing. Impossibile trovare il modulo {1} nel percorso del modulo
-error.module.options.without.info=Una delle opzioni --module-version o --hash-dependencies non contiene module-info.class
+error.module.options.without.info=Una delle opzioni --module-version o --hash-modules non contiene module-info.class
 error.unexpected.module-info=Descrittore di modulo {0} imprevisto
 error.module.descriptor.not.found=Descrittore di modulo non trovato
+error.versioned.info.without.root=module-info.class trovato nella sezione con controllo delle versioni senza module-info.class nella radice
+error.versioned.info.name.notequal=module-info.class nella sezione con controllo delle versioni contiene un nome errato
+error.versioned.info.requires.public=module-info.class nella sezione con controllo delle versioni contiene requisiti aggiuntivi pubblici
+error.versioned.info.requires.added=module-info.class nella sezione con controllo delle versioni contiene requisiti aggiuntivi
+error.versioned.info.requires.dropped=Mancano requisiti in module-info.class nella sezione con controllo delle versioni
+error.versioned.info.exports.notequal=module-info.class nella sezione con controllo delle versioni contiene esportazioni differenti
+error.versioned.info.provides.notequal=module-info.class nella sezione con controllo delle versioni contiene elementi differenti
+error.invalid.versioned.module.attribute=Attributo descrittore del modulo {0} non valido.
 error.missing.provider=Provider di servizi non trovato: {0}
 out.added.manifest=aggiunto manifest
-out.added.module-info=module-info.class aggiunto
+out.added.module-info=aggiunto module-info: {0}
 out.update.manifest=aggiornato manifest
-out.update.module-info=module-info.class aggiornato
+out.update.module-info=aggiornato module-info: {0}
 out.ignore.entry=la voce {0} sar\u00E0 ignorata
 out.adding=aggiunta in corso di: {0}
 out.deflated=(compresso {0}%)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Include le informazioni sul file manifest dal file\n                             manifest specificato
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          Non crea un file manifest per le voci
 main.help.opt.create.update.module-version=\      --module-version=VERSION    Versione del modulo utilizzata durante la creazione di un file\n                             jar modulare o l'aggiornamento di un file jar non modulare
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Calcola e registra gli hash delle dipendenze\n                             del modulo corrispondenti in base al pattern specificato durante\n                             la creazione di un file jar modulare o l'aggiornamento di\n                             un file jar non modulare
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Calcola e registra gli hash dei moduli \n                             corrispondenti in base al pattern specificato e dipendenti\n                             in modo diretto o indiretto dalla creazione di un file jar modulare\n                             o dall'aggiornamento di un file jar non modulare
 main.help.opt.create.update.modulepath=\      --modulepath           Posizione della dipendenza del modulo per la generazione
 \                             dell'hash
 main.help.opt.create.update.index=\ Modificatori di funzionamento validi solo nella modalit\u00E0 di creazione, aggiornamento e di generazione dell'indice:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ Altre opzioni:\n
 main.help.opt.other.help=\  -?, --help[:compat]        Fornisce questa Guida o facoltativamente la Guida sulla compatibilit\u00E0
 main.help.opt.other.version=\      --version              Stampa la versione del programma
-main.help.postopt=\ Un archivio \u00E8 un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-dependencies' e '--modulepath'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n  o facoltativi anche per le opzioni brevi corrispondenti.
+main.help.postopt=\ Un archivio \u00E8 un file jar modulare se un descrittore di modulo, 'module-info.class', si trova\n nella directory radice delle directory specificate o nella radice dell'archivio jar\n stesso. Le operazioni seguenti sono valide solo durante la creazione di un jar modulare\n o l'aggiornamento di un file jar non modulare esistente: '--module-version',\n '--hash-modules' e '--modulepath'.\n\n Gli argomenti obbligatori o facoltativi per le opzioni lunghe sono obbligatori\n  o facoltativi anche per le opzioni brevi corrispondenti.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ja.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length={0}\u306E\u51E6\u7406\u4E2D\u306B\u4E0D\u6B63\u306A\u9577\u3055\u304C\u3042\u308A\u307E\u3057\u305F
 error.create.tempfile=\u4E00\u6642\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
 error.hash.dep=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u3067\u30E2\u30B8\u30E5\u30FC\u30EB{1}\u304C\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093
-error.module.options.without.info=--module-version\u307E\u305F\u306F--hash-dependencies\u306E\u3044\u305A\u308C\u304B\u3067module-info.class\u304C\u3042\u308A\u307E\u305B\u3093
+error.module.options.without.info=--module-version\u307E\u305F\u306F--hash-modules\u306E\u3044\u305A\u308C\u304B\u3067module-info.class\u304C\u3042\u308A\u307E\u305B\u3093
 error.unexpected.module-info=\u4E88\u671F\u3057\u306A\u3044\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}
 error.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
+error.versioned.info.without.root=\u30EB\u30FC\u30C8\u306Bmodule-info.class\u306E\u306A\u3044module-info.class\u304C\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F
+error.versioned.info.name.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u6B63\u3057\u304F\u306A\u3044\u540D\u524D\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.versioned.info.requires.public=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u8FFD\u52A0\u306Erequires public\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.versioned.info.requires.added=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u8FFD\u52A0\u306Erequires\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.versioned.info.requires.dropped=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u6B20\u843D\u3057\u3066\u3044\u308Brequires\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.versioned.info.exports.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u7570\u306A\u308Bexports\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.versioned.info.provides.notequal=\u30D0\u30FC\u30B8\u30E7\u30CB\u30F3\u30B0\u30FB\u30BB\u30AF\u30B7\u30E7\u30F3\u306Emodule-info.class\u306B\u7570\u306A\u308Bprovides\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059
+error.invalid.versioned.module.attribute=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u5C5E\u6027{0}\u304C\u7121\u52B9\u3067\u3059
 error.missing.provider=\u30B5\u30FC\u30D3\u30B9\u30FB\u30D7\u30ED\u30D0\u30A4\u30C0\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
 out.added.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
-out.added.module-info=module-info.class\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F
+out.added.module-info=module-info\u304C\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F: {0}
 out.update.manifest=\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F
-out.update.module-info=module-info.class\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F
+out.update.module-info=module-info\u304C\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F: {0}
 out.ignore.entry=\u30A8\u30F3\u30C8\u30EA{0}\u3092\u7121\u8996\u3057\u307E\u3059
 out.adding={0}\u3092\u8FFD\u52A0\u4E2D\u3067\u3059
 out.deflated=({0}%\u53CE\u7E2E\u3055\u308C\u307E\u3057\u305F)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m\u3001--manifest=FILE        \u6307\u5B9A\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u60C5\u5831\u3092\n                             \u53D6\u308A\u8FBC\u307F\u307E\u3059
 main.help.opt.create.update.no-manifest=\  -M\u3001--no-manifest          \u30A8\u30F3\u30C8\u30EA\u306E\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u4F5C\u6210\u3057\u307E\u305B\u3093
 main.help.opt.create.update.module-version=\      --module-version=VERSION    \u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306E\n                             \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  \u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\n                             \u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\u3001\u6307\u5B9A\u306E\u30D1\u30BF\u30FC\u30F3\u3067\n                             \u4E00\u81F4\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u3092\n                             \u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN \u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n                             \u6307\u5B9A\u306E\u30D1\u30BF\u30FC\u30F3\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\n                             \u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30CF\u30C3\u30B7\u30E5\u3092\n                             \u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059
 main.help.opt.create.update.modulepath=\      --modulepath           \u751F\u6210\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u4F9D\u5B58\u6027\u306E\u5834\u6240
 \                             \u30CF\u30C3\u30B7\u30E5
 main.help.opt.create.update.index=\ \u4F5C\u6210\u3001\u66F4\u65B0\u304A\u3088\u3073\u7D22\u5F15\u751F\u6210\u30E2\u30FC\u30C9\u3067\u306E\u307F\u6709\u52B9\u306A\u64CD\u4F5C\u4FEE\u98FE\u5B50:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ \u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3:\n
 main.help.opt.other.help=\  -?, --help[:compat]        \u3053\u308C(\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u4E92\u63DB\u6027)\u3092help\u306B\u6307\u5B9A\u3057\u307E\u3059
 main.help.opt.other.version=\      --version              \u30D7\u30ED\u30B0\u30E9\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u51FA\u529B\u3057\u307E\u3059
-main.help.postopt=\ \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF'module-info.class'\u304C\u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EB\u30FC\u30C8\u307E\u305F\u306F\n jar\u30A2\u30FC\u30AB\u30A4\u30D6\u81EA\u4F53\u306E\u30EB\u30FC\u30C8\u306B\u3042\u308B\u5834\u5408\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u306F\u30E2\u30B8\u30E5\u30E9jar\u3067\u3059\u3002\n \u6B21\u306E\u64CD\u4F5C\u306F\u3001\u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u306E\u307F\u6709\u52B9\u3067\u3059:  '--module-version'\u3001\n '--hash-dependencies'\u304A\u3088\u3073'--modulepath'\u3002\n\n \u30ED\u30F3\u30B0\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3078\u306E\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u30B7\u30E7\u30FC\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\n \u306B\u5BFE\u3057\u3066\u3082\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306A\u308A\u307E\u3059\u3002
+main.help.postopt=\ \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF'module-info.class'\u304C\u6307\u5B9A\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u30EB\u30FC\u30C8\u307E\u305F\u306F\n jar\u30A2\u30FC\u30AB\u30A4\u30D6\u81EA\u4F53\u306E\u30EB\u30FC\u30C8\u306B\u3042\u308B\u5834\u5408\u3001\u30A2\u30FC\u30AB\u30A4\u30D6\u306F\u30E2\u30B8\u30E5\u30E9jar\u3067\u3059\u3002\n \u6B21\u306E\u64CD\u4F5C\u306F\u3001\u30E2\u30B8\u30E5\u30E9jar\u306E\u4F5C\u6210\u6642\u307E\u305F\u306F\u65E2\u5B58\u306E\u975E\u30E2\u30B8\u30E5\u30E9jar\u306E\u66F4\u65B0\u6642\u306B\n \u306E\u307F\u6709\u52B9\u3067\u3059:  '--module-version'\u3001\n '--hash-modules'\u304A\u3088\u3073'--modulepath'\u3002\n\n \u30ED\u30F3\u30B0\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3078\u306E\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u306F\u3001\u5BFE\u5FDC\u3059\u308B\u30B7\u30E7\u30FC\u30C8\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\n \u306B\u5BFE\u3057\u3066\u3082\u5FC5\u9808\u307E\u305F\u306F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306A\u308A\u307E\u3059\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_ko.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=\uCC98\uB9AC \uC911 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAE38\uC774\uAC00 \uBC1C\uACAC\uB428: {0}
 error.create.tempfile=\uC784\uC2DC \uD30C\uC77C\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
 error.hash.dep=\uBAA8\uB4C8 {0} \uC885\uC18D\uC131\uC744 \uD574\uC2DC\uD558\uB294 \uC911 \uBAA8\uB4C8 \uACBD\uB85C\uC5D0\uC11C {1} \uBAA8\uB4C8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
-error.module.options.without.info=module-info.class \uC5C6\uC774 --module-version \uB610\uB294 --hash-dependencies \uC911 \uD558\uB098
+error.module.options.without.info=module-info.class \uC5C6\uC774 --module-version \uB610\uB294 --hash-modules \uC911 \uD558\uB098
 error.unexpected.module-info=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBAA8\uB4C8 \uAE30\uC220\uC790 {0}
 error.module.descriptor.not.found=\uBAA8\uB4C8 \uAE30\uC220\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C
+error.versioned.info.without.root=\uB8E8\uD2B8\uC5D0\uC11C module-info.class \uC5C6\uC774 \uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC5D0\uC11C module-info.class\uAC00 \uBC1C\uACAC\uB428
+error.versioned.info.name.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uC798\uBABB\uB41C \uC774\uB984\uC774 \uD3EC\uD568\uB428
+error.versioned.info.requires.public=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uCD94\uAC00 \uD544\uC218 \uACF5\uC6A9 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.versioned.info.requires.added=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uCD94\uAC00 \uD544\uC218 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.versioned.info.requires.dropped=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uB204\uB77D\uB41C \uD544\uC218 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.versioned.info.exports.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uB2E4\uB978 \uC775\uC2A4\uD3EC\uD2B8 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.versioned.info.provides.notequal=\uBC84\uC804 \uC9C0\uC815\uB41C \uC139\uC158\uC758 module-info.class\uC5D0 \uB2E4\uB978 \uC81C\uACF5 \uD56D\uBAA9\uC774 \uD3EC\uD568\uB428
+error.invalid.versioned.module.attribute=\uBD80\uC801\uD569\uD55C \uBAA8\uB4C8 \uAE30\uC220\uC790 \uC18D\uC131 {0}
 error.missing.provider=\uC11C\uBE44\uC2A4 \uC81C\uACF5\uC790\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}
 out.added.manifest=Manifest\uB97C \uCD94\uAC00\uD568
-out.added.module-info=module-info.class\uB97C \uCD94\uAC00\uD568
+out.added.module-info=\uCD94\uAC00\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
 out.update.manifest=Manifest\uB97C \uC5C5\uB370\uC774\uD2B8\uD568
-out.update.module-info=module-info.class\uB97C \uC5C5\uB370\uC774\uD2B8\uD568
+out.update.module-info=\uC5C5\uB370\uC774\uD2B8\uB41C \uBAA8\uB4C8 \uC815\uBCF4: {0}
 out.ignore.entry={0} \uD56D\uBAA9\uC744 \uBB34\uC2DC\uD558\uB294 \uC911
 out.adding=\uCD94\uAC00\uD558\uB294 \uC911: {0}
 out.deflated=({0}%\uB97C \uAC10\uC18C\uD568)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \uC9C0\uC815\uB41C Manifest \uD30C\uC77C\uC758 Manifest \uC815\uBCF4\uB97C\n                             \uD3EC\uD568\uD569\uB2C8\uB2E4.
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          \uD56D\uBAA9\uC5D0 \uB300\uD574 Manifest \uD30C\uC77C\uC744 \uC0DD\uC131\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
 main.help.opt.create.update.module-version=\      --module-version=VERSION    \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uBE44\uBAA8\uB4C8 jar\uB97C\n                             \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C \uBAA8\uB4C8 \uBC84\uC804\uC785\uB2C8\uB2E4.
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uBE44\uBAA8\uB4C8 jar\uB97C\n                             \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C \uC8FC\uC5B4\uC9C4 \uD328\uD134\uACFC \uC77C\uCE58\uD558\uB294\n                             \uBAA8\uB4C8 \uC885\uC18D\uC131\uC758 \uD574\uC2DC\uB97C \uCEF4\uD4E8\uD2B8\uD558\uACE0\n                             \uAE30\uB85D\uD569\uB2C8\uB2E4.
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN \uC0DD\uC131 \uC911\uC778 \uBAA8\uB4C8\uD615 jar \uB610\uB294 \uC5C5\uB370\uC774\uD2B8 \uC911\uC778 \uBE44\uBAA8\uB4C8 jar\uC5D0 \n                             \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC758\uC874\uD558\uACE0 \uC8FC\uC5B4\uC9C4 \uD328\uD134\uACFC \uC77C\uCE58\uD558\uB294\n                             \uBAA8\uB4C8\uC758 \uD574\uC2DC\uB97C \uCEF4\uD4E8\uD2B8\uD558\uACE0\n                             \uAE30\uB85D\uD569\uB2C8\uB2E4.
 main.help.opt.create.update.modulepath=\      --modulepath           \uD574\uC2DC\uB97C \uC0DD\uC131\uD558\uAE30 \uC704\uD55C \uBAA8\uB4C8 \uC885\uC18D\uC131\uC758
 \                             \uC704\uCE58\uC785\uB2C8\uB2E4.
 main.help.opt.create.update.index=\ \uC0DD\uC131, \uC5C5\uB370\uC774\uD2B8 \uBC0F generate-index \uBAA8\uB4DC\uC5D0\uC11C\uB9CC \uC801\uD569\uD55C \uC791\uC5C5 \uC218\uC815\uC790:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ \uAE30\uD0C0 \uC635\uC158:\n
 main.help.opt.other.help=\  -?, --help[:compat]        \uC774 \uB3C4\uC6C0\uB9D0(\uB610\uB294 \uC120\uD0DD\uC801\uC73C\uB85C \uD638\uD658\uC131)\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
 main.help.opt.other.version=\      --version              \uD504\uB85C\uADF8\uB7A8 \uBC84\uC804\uC744 \uC778\uC1C4\uD569\uB2C8\uB2E4.
-main.help.postopt=\ \uC544\uCE74\uC774\uBE0C\uB294 \uBAA8\uB4C8 \uAE30\uC220\uC790 'module-info.class'\uAC00 \uC8FC\uC5B4\uC9C4 \uB514\uB809\uD1A0\uB9AC\uC758\n \uB8E8\uD2B8 \uB610\uB294 jar \uC544\uCE74\uC774\uBE0C \uC790\uCCB4\uC758 \uB8E8\uD2B8\uC5D0 \uC704\uCE58\uD55C \uACBD\uC6B0 \uBAA8\uB4C8\uD615 jar\uC785\uB2C8\uB2E4.\n \uB2E4\uC74C \uC791\uC5C5\uC740 \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C\uB9CC \uC801\uD569\uD569\uB2C8\uB2E4. '--module-version',\n '--hash-dependencies', '--modulepath'.\n\n long \uC635\uC158\uC758 \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801 \uC778\uC218\uB294 \uD574\uB2F9\uD558\uB294 short \uC635\uC158\uC5D0 \uB300\uD574\uC11C\uB3C4\n \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801\uC785\uB2C8\uB2E4.
+main.help.postopt=\ \uC544\uCE74\uC774\uBE0C\uB294 \uBAA8\uB4C8 \uAE30\uC220\uC790 'module-info.class'\uAC00 \uC8FC\uC5B4\uC9C4 \uB514\uB809\uD1A0\uB9AC\uC758\n \uB8E8\uD2B8 \uB610\uB294 jar \uC544\uCE74\uC774\uBE0C \uC790\uCCB4\uC758 \uB8E8\uD2B8\uC5D0 \uC704\uCE58\uD55C \uACBD\uC6B0 \uBAA8\uB4C8\uD615 jar\uC785\uB2C8\uB2E4.\n \uB2E4\uC74C \uC791\uC5C5\uC740 \uBAA8\uB4C8\uD615 jar\uB97C \uC0DD\uC131\uD558\uAC70\uB098 \uAE30\uC874 \uBE44\uBAA8\uB4C8 jar\uB97C\n \uC5C5\uB370\uC774\uD2B8\uD560 \uB54C\uB9CC \uC801\uD569\uD569\uB2C8\uB2E4. '--module-version',\n '--hash-modules' \uBC0F '--modulepath'.\n\n long \uC635\uC158\uC758 \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801 \uC778\uC218\uB294 \uD574\uB2F9\uD558\uB294 short \uC635\uC158\uC5D0 \uB300\uD574\uC11C\uB3C4\n \uD544\uC218 \uB610\uB294 \uC120\uD0DD\uC801\uC785\uB2C8\uB2E4.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=largura incorreta durante o processamento: {0}
 error.create.tempfile=N\u00E3o foi poss\u00EDvel criar um arquivo tempor\u00E1rio
 error.hash.dep=M\u00F3dulo de hashing com {0} depend\u00EAncias. N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00F3dulo {1} no caminho do m\u00F3dulo
-error.module.options.without.info=Um dentre --module-version ou --hash-dependencies est\u00E1 sem module-info.class
+error.module.options.without.info=Um dentre --module-version ou --hash-modules est\u00E1 sem module-info.class
 error.unexpected.module-info=Descritor de m\u00F3dulo inesperado {0}
 error.module.descriptor.not.found=Descritor de m\u00F3dulo n\u00E3o encontrado
+error.versioned.info.without.root=module-info.class encontrado na se\u00E7\u00E3o com controle de vers\u00E3o sem module-info.class na raiz
+error.versioned.info.name.notequal=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m nome incorreto
+error.versioned.info.requires.public=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m uma depend\u00EAncia requires public adicional
+error.versioned.info.requires.added=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m depend\u00EAncias require adicionais
+error.versioned.info.requires.dropped=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m depend\u00EAncias require ausentes
+error.versioned.info.exports.notequal=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m cl\u00E1usulas exports diferentes
+error.versioned.info.provides.notequal=module-info.class na se\u00E7\u00E3o com controle de vers\u00E3o cont\u00E9m cl\u00E1usulas provides diferentes
+error.invalid.versioned.module.attribute=Atributo {0} de descritor de m\u00F3dulo inv\u00E1lido
 error.missing.provider=Prestador de servi\u00E7os  n\u00E3o encontrado: {0}
 out.added.manifest=manifesto adicionado
-out.added.module-info=module-info.class adicionado
+out.added.module-info=module-info: {0} adicionado
 out.update.manifest=manifesto atualizado
-out.update.module-info=module-info.class atualizado
+out.update.module-info=module-info: {0} atualizado
 out.ignore.entry=ignorando entrada {0}
 out.adding=adicionando: {0}
 out.deflated=(compactado {0}%)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inclui as informa\u00E7\u00F5es de manifesto provenientes do arquivo de\n                             manifesto em quest\u00E3o
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          N\u00E3o cria um arquivo de manifesto para as entradas
 main.help.opt.create.update.module-version=\      --module-version=VERSION    A vers\u00E3o do m\u00F3dulo, ao criar um arquivo jar\n                             modular, ou atualizar um arquivo jar n\u00E3o modular
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Calcula e registra os hashes das depend\u00EAncias do\n                             m\u00F3dulo correlacionadas pelo padr\u00E3o fornecido, ao\n                             criar um arquivo jar modular ou atualizar um arquivo jar n\u00E3o\n                             modular
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Calcula e registra os hashes dos m\u00F3dulos\n                             correlacionado pelo padr\u00E3o fornecido e do qual depende\n                             direta ou indiretamente em um arquivo jar modular que est\u00E1 sendo\n                             criado ou em um arquivo jar n\u00E3o modular que est\u00E1 sendo atualizado
 main.help.opt.create.update.modulepath=\      --modulepath           Localiza\u00E7\u00E3o da depend\u00EAncia de m\u00F3dulo para gerar
 \                             o hash
 main.help.opt.create.update.index=\ Modificadores de opera\u00E7\u00E3o v\u00E1lidos somente no modo de cria\u00E7\u00E3o, atualiza\u00E7\u00E3o e gera\u00E7\u00E3o de \u00EDndice:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ Outras op\u00E7\u00F5es:\n
 main.help.opt.other.help=\  -?, --help[:compat]        Fornece esta ajuda ou, opcionalmente, a ajuda de compatibilidade
 main.help.opt.other.version=\      --version              Imprime a vers\u00E3o do programa
-main.help.postopt=\ Um arquivo compactado \u00E9 um arquivo jar modular se um descritor de m\u00F3dulo, 'module-info.class', estiver\n localizado na raiz dos diret\u00F3rios fornecidos, ou na raiz do arquivo compactado jar\n propriamente dito. As seguintes opera\u00E7\u00F5es s\u00F3 s\u00E3o v\u00E1lidas ao criar um arquivo jar modular,\n ou atualizar um arquivo jar n\u00E3o modular existente: '--module-version',\n '--hash-dependencies', e '--modulepath'.\n\n Argumentos obrigat\u00F3rios ou opcionais para op\u00E7\u00F5es longas tamb\u00E9m s\u00E3o obrigat\u00F3rios ou opcionais\n para quaisquer op\u00E7\u00F5es curtas correspondentes.
+main.help.postopt=\ Um arquivo compactado \u00E9 um arquivo jar modular se um descritor de m\u00F3dulo, 'module-info.class', estiver\n localizado na raiz dos diret\u00F3rios fornecidos, ou na raiz do arquivo compactado jar\n propriamente dito. As seguintes opera\u00E7\u00F5es s\u00F3 s\u00E3o v\u00E1lidas ao criar um arquivo jar modular\n ou atualizar um arquivo jar n\u00E3o modular existente: '--module-version',\n '--hash-modules' e '--modulepath'.\n\n Argumentos obrigat\u00F3rios ou opcionais para op\u00E7\u00F5es longas tamb\u00E9m s\u00E3o obrigat\u00F3rios ou opcionais\n para quaisquer op\u00E7\u00F5es curtas correspondentes.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_sv.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=ogiltig l\u00E4ngd vid bearbetning: {0}
 error.create.tempfile=Kunde inte skapa en tillf\u00E4llig fil
 error.hash.dep={0}-beroenden f\u00F6r hashningsmodulen, kan inte hitta modulen {1} p\u00E5 moduls\u00F6kv\u00E4gen
-error.module.options.without.info=--module-version eller --hash-dependencies utan module-info.class
+error.module.options.without.info=--module-version eller --hash-modules utan module-info.class
 error.unexpected.module-info=Ov\u00E4ntad moduldeskriptor, {0}
 error.module.descriptor.not.found=Moduldeskriptorn hittades inte
+error.versioned.info.without.root=module-info.class hittades i versionshanterad sektion utan module-info.class i roten
+error.versioned.info.name.notequal=module-info.class i en versionshanterad sektion inneh\u00E5ller ett felaktigt namn
+error.versioned.info.requires.public=module-info.class i en versionshanterad sektion inneh\u00E5ller fler allm\u00E4nna obligatoriska
+error.versioned.info.requires.added=module-info.class i en versionshanterad sektion inneh\u00E5ller fler obligatoriska
+error.versioned.info.requires.dropped=module-info.class i en versionshanterad sektion inneh\u00E5ller saknade obligatoriska
+error.versioned.info.exports.notequal=module-info.class i en versionshanterad sektion inneh\u00E5ller olika exporter
+error.versioned.info.provides.notequal=module-info.class i en versionshanterad sektion inneh\u00E5ller olika tillhandah\u00E5llna
+error.invalid.versioned.module.attribute=Ogiltigt attribut f\u00F6r moduldeskriptor, {0}
 error.missing.provider=Tj\u00E4nsteleverant\u00F6ren hittades inte: {0}
 out.added.manifest=tillagt manifestfil
-out.added.module-info=lade till module-info.class
+out.added.module-info=lade till module-info: {0}
 out.update.manifest=uppdaterat manifest
-out.update.module-info=uppdaterade module-info.class
+out.update.module-info=uppdaterade module-info: {0}
 out.ignore.entry=ignorerar posten {0}
 out.adding=l\u00E4gger till: {0}
 out.deflated=({0}% packat)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        Inkludera manifestinformationen fr\u00E5n den angivna\n                             manifestfilen
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          Skapa inte en manifestfil f\u00F6r posterna
 main.help.opt.create.update.module-version=\      --module-version=VERSION    Modulversionen vid skapande av ett modul\u00E4rt\n                             jar-arkiv eller vid uppdatering av ett icke-modul\u00E4rt jar-arkiv
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  Ber\u00E4kna och registrera hashningarna f\u00F6r\n                             modulberoenden som matchar det angivna m\u00F6nstret vid skapande\n                             att ett modul\u00E4rt jar-arkiv eller vid uppdatering av ett\n                             icke-modul\u00E4rt jar-arkiv
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN Ber\u00E4kna och registrera hashningarna f\u00F6r moduler som\n                             matchar det angivna m\u00F6nstret och som \u00E4r direkt eller\n                             indirekt beroende av att ett modul\u00E4rt jar-arkiv skapas\n                             eller att ett icke-modul\u00E4rt jar-arkiv uppdateras
 main.help.opt.create.update.modulepath=\      --modulepath           Plats f\u00F6r modulberoende f\u00F6r att generera
 \                             hashningen
 main.help.opt.create.update.index=\ \u00C5tg\u00E4rdsmodifierare som endast \u00E4r giltiga i l\u00E4gena create, update och generate-index:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ \u00D6vriga alternativ:\n
 main.help.opt.other.help=\  -?, --help[:compat]        Visa den h\u00E4r hj\u00E4lpen eller kompatibilitetshj\u00E4lpen (valfritt)
 main.help.opt.other.version=\      --version              Skriv ut programversion
-main.help.postopt=\ Ett arkiv \u00E4r ett modul\u00E4rt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n F\u00F6ljande \u00E5tg\u00E4rder \u00E4r endast giltiga vid skapande av ett modul\u00E4rt jar-arkiv och\n vid uppdatering av ett befintligt icke-modul\u00E4rt jar-arkiv: '--module-version',\n '--hash-dependencies' och '--modulepath'.\n\n Obligatoriska och valfria alternativ f\u00F6r l\u00E5nga alternativ \u00E4r \u00E4ven obligatoriska\n respektive valfria f\u00F6r alla motsvarande korta alternativ.
+main.help.postopt=\ Ett arkiv \u00E4r ett modul\u00E4rt jar-arkiv om en moduldeskriptor, 'module-info.class',\n finns i roten av de angivna katalogerna eller det angivna jar-arkivet.\n F\u00F6ljande \u00E5tg\u00E4rder \u00E4r endast giltiga vid skapande av ett modul\u00E4rt jar-arkiv och\n vid uppdatering av ett befintligt icke-modul\u00E4rt jar-arkiv: '--module-version',\n '--hash-modules' och '--modulepath'.\n\n Obligatoriska och valfria alternativ f\u00F6r l\u00E5nga alternativ \u00E4r \u00E4ven obligatoriska\n respektive valfria f\u00F6r alla motsvarande korta alternativ.
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_CN.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=\u5904\u7406\u65F6\u9047\u5230\u4E0D\u6B63\u786E\u7684\u957F\u5EA6: {0}
 error.create.tempfile=\u65E0\u6CD5\u521B\u5EFA\u4E34\u65F6\u6587\u4EF6
 error.hash.dep=\u6B63\u5728\u5BF9\u6A21\u5757 {0} \u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u6267\u884C\u6563\u5217\u5904\u7406, \u5728\u6A21\u5757\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u6A21\u5757 {1}
-error.module.options.without.info=--module-version \u6216 --hash-dependencies \u4E4B\u4E00\u6CA1\u6709 module-info.class
+error.module.options.without.info=--module-version \u6216 --hash-modules \u4E4B\u4E00\u6CA1\u6709 module-info.class
 error.unexpected.module-info=\u610F\u5916\u7684\u6A21\u5757\u63CF\u8FF0\u7B26 {0}
 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
+error.versioned.info.without.root=\u5728\u7248\u672C\u5316\u8282\u4E2D\u627E\u5230\u4E86 module-info.class, \u4F46\u6839\u4E2D\u6CA1\u6709 module-info.class
+error.versioned.info.name.notequal=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u786E\u7684\u540D\u79F0
+error.versioned.info.requires.public=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 requires public
+error.versioned.info.requires.added=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u989D\u5916\u7684 requires
+error.versioned.info.requires.dropped=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u7F3A\u5C11\u7684 requires
+error.versioned.info.exports.notequal=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 exports
+error.versioned.info.provides.notequal=\u7248\u672C\u5316\u8282\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684 provides
+error.invalid.versioned.module.attribute=\u65E0\u6548\u7684\u6A21\u5757\u63CF\u8FF0\u7B26\u5C5E\u6027 {0}
 error.missing.provider=\u672A\u627E\u5230\u670D\u52A1\u63D0\u4F9B\u65B9: {0}
 out.added.manifest=\u5DF2\u6DFB\u52A0\u6E05\u5355
-out.added.module-info=\u5DF2\u6DFB\u52A0 module-info.class
+out.added.module-info=\u5DF2\u6DFB\u52A0 module-info: {0}
 out.update.manifest=\u5DF2\u66F4\u65B0\u6E05\u5355
-out.update.module-info=\u5DF2\u66F4\u65B0 module-info.class
+out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
 out.ignore.entry=\u6B63\u5728\u5FFD\u7565\u6761\u76EE{0}
 out.adding=\u6B63\u5728\u6DFB\u52A0: {0}
 out.deflated=(\u538B\u7F29\u4E86 {0}%)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \u5305\u542B\u6307\u5B9A\u6E05\u5355\u6587\u4EF6\u4E2D\u7684\n                             \u6E05\u5355\u4FE1\u606F
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          \u4E0D\u4E3A\u6761\u76EE\u521B\u5EFA\u6E05\u5355\u6587\u4EF6
 main.help.opt.create.update.module-version=\      --module-version=VERSION    \u521B\u5EFA\u6A21\u5757\u5316 jar \u6216\u66F4\u65B0\n                             \u975E\u6A21\u5757\u5316 jar \u65F6\u7684\u6A21\u5757\u7248\u672C
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  \u521B\u5EFA\u6A21\u5757\u5316 jar \u6216\u66F4\u65B0\n                             \u975E\u6A21\u5757\u5316 jar \u65F6\u8BA1\u7B97\u548C\u8BB0\u5F55\n                             \u6309\u6307\u5B9A\u6A21\u5F0F\u5339\u914D\u7684\u6A21\u5757\u88AB\u4F9D\u8D56\n                             \u5BF9\u8C61\u7684\u6563\u5217
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN \u8BA1\u7B97\u548C\u8BB0\u5F55\u6A21\u5757\u7684\u6563\u5217, \n                             \u8FD9\u4E9B\u6A21\u5757\u6309\u6307\u5B9A\u6A21\u5F0F\u5339\u914D\u5E76\u76F4\u63A5\u6216\n                             \u95F4\u63A5\u4F9D\u8D56\u4E8E\u6240\u521B\u5EFA\u7684\u6A21\u5757\u5316 jar \u6216\n                             \u6240\u66F4\u65B0\u7684\u975E\u6A21\u5757\u5316 jar
 main.help.opt.create.update.modulepath=\      --modulepath           \u6A21\u5757\u88AB\u4F9D\u8D56\u5BF9\u8C61\u7684\u4F4D\u7F6E, \u7528\u4E8E\u751F\u6210
 \                             \u6563\u5217
 main.help.opt.create.update.index=\ \u53EA\u5728\u521B\u5EFA, \u66F4\u65B0\u548C\u751F\u6210\u7D22\u5F15\u6A21\u5F0F\u4E0B\u6709\u6548\u7684\u64CD\u4F5C\u4FEE\u9970\u7B26:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ \u5176\u4ED6\u9009\u9879:\n
 main.help.opt.other.help=\  -?, --help[:compat]        \u63D0\u4F9B\u6B64\u5E2E\u52A9, \u4E5F\u53EF\u4EE5\u9009\u62E9\u6027\u5730\u63D0\u4F9B\u517C\u5BB9\u6027\u5E2E\u52A9
 main.help.opt.other.version=\      --version              \u8F93\u51FA\u7A0B\u5E8F\u7248\u672C
-main.help.postopt=\ \u5982\u679C\u6A21\u5757\u63CF\u8FF0\u7B26 'module-info.class' \u4F4D\u4E8E\u6307\u5B9A\u76EE\u5F55\u7684\n \u6839\u76EE\u5F55\u4E2D, \u6216\u8005\u4F4D\u4E8E jar \u6863\u6848\u672C\u8EAB\u7684\u6839\u76EE\u5F55\u4E2D, \u5219\n \u8BE5\u6863\u6848\u662F\u4E00\u4E2A\u6A21\u5757\u5316 jar\u3002\u4EE5\u4E0B\u64CD\u4F5C\u53EA\u5728\u521B\u5EFA\u6A21\u5757\u5316 jar\n \u6216\u66F4\u65B0\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u65F6\u6709\u6548: '--module-version',\n '--hash-dependencies' \u548C '--modulepath'\u3002\n\n \u5982\u679C\u4E3A\u957F\u9009\u9879\u63D0\u4F9B\u4E86\u5FC5\u9700\u53C2\u6570\u6216\u53EF\u9009\u53C2\u6570, \u5219\u5B83\u4EEC\u5BF9\u4E8E\n \u4EFB\u4F55\u5BF9\u5E94\u7684\u77ED\u9009\u9879\u4E5F\u662F\u5FC5\u9700\u6216\u53EF\u9009\u7684\u3002
+main.help.postopt=\ \u5982\u679C\u6A21\u5757\u63CF\u8FF0\u7B26 'module-info.class' \u4F4D\u4E8E\u6307\u5B9A\u76EE\u5F55\u7684\n \u6839\u76EE\u5F55\u4E2D, \u6216\u8005\u4F4D\u4E8E jar \u6863\u6848\u672C\u8EAB\u7684\u6839\u76EE\u5F55\u4E2D, \u5219\n \u8BE5\u6863\u6848\u662F\u4E00\u4E2A\u6A21\u5757\u5316 jar\u3002\u4EE5\u4E0B\u64CD\u4F5C\u53EA\u5728\u521B\u5EFA\u6A21\u5757\u5316 jar\n \u6216\u66F4\u65B0\u73B0\u6709\u7684\u975E\u6A21\u5757\u5316 jar \u65F6\u6709\u6548: '--module-version',\n --hash-modules' \u548C '--modulepath'\u3002\n\n \u5982\u679C\u4E3A\u957F\u9009\u9879\u63D0\u4F9B\u4E86\u5FC5\u9700\u53C2\u6570\u6216\u53EF\u9009\u53C2\u6570, \u5219\u5B83\u4EEC\u5BF9\u4E8E\n \u4EFB\u4F55\u5BF9\u5E94\u7684\u77ED\u9009\u9879\u4E5F\u662F\u5FC5\u9700\u6216\u53EF\u9009\u7684\u3002
--- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_zh_TW.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -39,14 +39,22 @@
 error.incorrect.length=\u8655\u7406 {0} \u6642\u9577\u5EA6\u4E0D\u6B63\u78BA
 error.create.tempfile=\u7121\u6CD5\u5EFA\u7ACB\u66AB\u5B58\u6A94\u6848
 error.hash.dep=\u96DC\u6E4A\u6A21\u7D44 {0} \u76F8\u4F9D\u6027\uFF0C\u5728\u6A21\u7D44\u8DEF\u5F91\u4E0A\u627E\u4E0D\u5230\u6A21\u7D44 {1}
-error.module.options.without.info=--module-version \u6216 --hash-dependencies \u5176\u4E2D\u4E00\u500B\u6C92\u6709 module-info.class
+error.module.options.without.info=--module-version \u6216 --hash-modules \u5176\u4E2D\u4E00\u500B\u6C92\u6709 module-info.class
 error.unexpected.module-info=\u672A\u9810\u671F\u7684\u6A21\u7D44\u63CF\u8FF0\u5340 {0}
 error.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u7D44\u63CF\u8FF0\u5340
+error.versioned.info.without.root=versioned \u6BB5\u843D\u4E2D\u767C\u73FE module-info.class\uFF0C\u4F46\u662F\u6839\u4E2D\u6C92\u6709 module-info.class
+error.versioned.info.name.notequal=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u6B63\u78BA\u7684\u540D\u7A31
+error.versioned.info.requires.public=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684\u516C\u958B\u9700\u6C42\u9805\u76EE
+error.versioned.info.requires.added=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u984D\u5916\u7684\u9700\u6C42\u9805\u76EE
+error.versioned.info.requires.dropped=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u907A\u6F0F\u7684\u9700\u6C42\u9805\u76EE
+error.versioned.info.exports.notequal=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684\u532F\u51FA\u9805\u76EE
+error.versioned.info.provides.notequal=versioned \u6BB5\u843D\u4E2D\u7684 module-info.class \u5305\u542B\u4E0D\u540C\u7684\u63D0\u4F9B\u9805\u76EE
+error.invalid.versioned.module.attribute=\u6A21\u7D44\u63CF\u8FF0\u5340\u5C6C\u6027 {0} \u7121\u6548
 error.missing.provider=\u627E\u4E0D\u5230\u670D\u52D9\u63D0\u4F9B\u8005: {0}
 out.added.manifest=\u5DF2\u65B0\u589E\u8CC7\u8A0A\u6E05\u55AE
-out.added.module-info=\u5DF2\u65B0\u589E module-info.class
+out.added.module-info=\u5DF2\u65B0\u589E module-info: {0}
 out.update.manifest=\u5DF2\u66F4\u65B0\u8CC7\u8A0A\u6E05\u55AE
-out.update.module-info=\u5DF2\u66F4\u65B0 module-info.class
+out.update.module-info=\u5DF2\u66F4\u65B0 module-info: {0}
 out.ignore.entry=\u5FFD\u7565\u9805\u76EE {0}
 out.adding=\u65B0\u589E: {0}
 out.deflated=(\u58D3\u7E2E {0}%)
@@ -77,7 +85,7 @@
 main.help.opt.create.update.manifest=\  -m, --manifest=FILE        \u5305\u542B\u6307\u5B9A\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848\u4E2D\u7684\u8CC7\u8A0A\u6E05\u55AE\n                             \u8CC7\u8A0A
 main.help.opt.create.update.no-manifest=\  -M, --no-manifest          \u4E0D\u70BA\u9805\u76EE\u5EFA\u7ACB\u8CC7\u8A0A\u6E05\u55AE\u6A94\u6848
 main.help.opt.create.update.module-version=\      --module-version=VERSION    \u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\u975E\u6A21\u7D44\u5316 jar \u6642\n                             \u4F7F\u7528\u7684\u6A21\u7D44\u7248\u672C
-main.help.opt.create.update.hash-dependencies=\      --hash-dependencies=PATTERN  \u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n                             \u975E\u6A21\u7D44\u5316 jar \u6642\uFF0C\u904B\u7B97\u53CA\u8A18\u9304\n                             \u8207\u6307\u5B9A\u6A23\u5F0F\u76F8\u7B26\u7684\u6A21\u7D44\u76F8\u4F9D\u6027\n                             \u96DC\u6E4A
+main.help.opt.create.update.hash-modules=\      --hash-modules=PATTERN \u904B\u7B97\u53CA\u8A18\u9304\u8207\u6307\u5B9A\u6A23\u5F0F\n                             \u76F8\u7B26\u7684\u6A21\u7D44\u96DC\u6E4A\uFF0C\u9019\u76F4\u63A5\u6216\u9593\u63A5\u5730\n                             \u76F8\u4F9D\u65BC\u6B63\u5728\u5EFA\u7ACB\u7684\u6A21\u7D44\u5316 jar \u6216\u6B63\u5728\n                             \u66F4\u65B0\u7684\u975E\u6A21\u7D44\u5316 jar
 main.help.opt.create.update.modulepath=\      --modulepath           \u6A21\u7D44\u76F8\u4F9D\u6027\u7684\u4F4D\u7F6E\uFF0C\u7528\u65BC\u7522\u751F
 \                             \u96DC\u6E4A
 main.help.opt.create.update.index=\ \u53EA\u80FD\u5728\u5EFA\u7ACB\u3001\u66F4\u65B0\u53CA\u7522\u751F\u7D22\u5F15\u6A21\u5F0F\u4E0B\u4F7F\u7528\u7684\u4F5C\u696D\u4FEE\u98FE\u689D\u4EF6:\n
@@ -85,4 +93,4 @@
 main.help.opt.other=\ \u5176\u4ED6\u9078\u9805:\n
 main.help.opt.other.help=\  -?, --help[:compat]        \u63D0\u4F9B\u6B64\u8AAA\u660E\u6216\u9078\u64C7\u6027\u986F\u793A\u76F8\u5BB9\u6027\u8AAA\u660E
 main.help.opt.other.version=\      --version              \u5217\u5370\u7A0B\u5F0F\u7248\u672C
-main.help.postopt=\ \u5982\u679C\u6A21\u7D44\u63CF\u8FF0\u5340 ('module-info.class') \u4F4D\u65BC\u6307\u5B9A\u76EE\u9304\u7684\u6839\n \u6216 jar \u5B58\u6A94\u672C\u8EAB\u7684\u6839\uFF0C\u5247\u5B58\u6A94\u6703\u662F\n \u6A21\u7D44\u5316\u7684 jar\u3002\u4E0B\u5217\u4F5C\u696D\u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n \u73FE\u6709\u975E\u6A21\u7D44\u5316 jar \u6642\u9032\u884C: '--module-version'\u3001\n '--hash-dependencies' \u548C '--modulepath'\u3002\n\n \u9577\u9078\u9805\u7684\u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u4E5F\u6703\u662F\u4EFB\u4F55\u5C0D\u61C9\u77ED\u9078\u9805\u7684\n \u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u3002
+main.help.postopt=\ \u5982\u679C\u6A21\u7D44\u63CF\u8FF0\u5340 ('module-info.class') \u4F4D\u65BC\u6307\u5B9A\u76EE\u9304\u7684\u6839\n \u6216 jar \u5B58\u6A94\u672C\u8EAB\u7684\u6839\uFF0C\u5247\u5B58\u6A94\u6703\u662F\n \u6A21\u7D44\u5316\u7684 jar\u3002\u4E0B\u5217\u4F5C\u696D\u53EA\u80FD\u5728\u5EFA\u7ACB\u6A21\u7D44\u5316 jar \u6216\u66F4\u65B0\n \u73FE\u6709\u975E\u6A21\u7D44\u5316 jar \u6642\u9032\u884C: '--module-version'\u3001\n '--hash-modules' \u548C '--modulepath'\u3002\n\n \u9577\u9078\u9805\u7684\u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u4E5F\u6703\u662F\u4EFB\u4F55\u5C0D\u61C9\u77ED\u9078\u9805\u7684\n \u5F37\u5236\u6027\u6216\u9078\u64C7\u6027\u5F15\u6578\u3002
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImagePluginConfiguration.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImagePluginConfiguration.java	Fri Jul 08 12:17:10 2016 -0700
@@ -93,8 +93,7 @@
 
         List<Plugin> orderedPlugins = new ArrayList<>();
         plugins.entrySet().stream().forEach((entry) -> {
-            // Sort according to plugin constraints
-            orderedPlugins.addAll(PluginOrderingGraph.sort(entry.getValue()));
+            orderedPlugins.addAll(entry.getValue());
         });
         Plugin lastSorter = null;
         for (Plugin plugin : orderedPlugins) {
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/PluginOrderingGraph.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +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.tools.jlink.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import jdk.tools.jlink.plugin.Plugin;
-import jdk.tools.jlink.plugin.PluginException;
-
-public class PluginOrderingGraph {
-
-    static class Node {
-
-        Plugin plugin;
-        Set<Node> nexts = new HashSet<>();
-        Set<Node> previous = new HashSet<>();
-
-        @Override
-        public String toString() {
-            return plugin.getName();
-        }
-    }
-
-    public static List<Plugin> sort(List<Plugin> plugs) {
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.addAll(plugs);
-
-        // for each plugin creates its graph.
-        Map<Plugin, Node> graphs = buildGraphs(plugins);
-
-        // At this points all individual graphs are connected
-        // Check for cycles.
-        for (Node n : graphs.values()) {
-            checkCycle(n);
-        }
-
-        List<Plugin> orderedPlugins = new ArrayList<>();
-        // Retrieve the current roots, add them to the result, remove them from
-        while (!plugins.isEmpty()) {
-            // Build the current set of graphs from the list of input plugins
-            Map<Plugin, Node> currentGraphs = buildGraphs(plugins);
-            // Retrieve the root nodes (no previous)
-            List<Node> roots = getRoots(currentGraphs);
-            for (Node n : roots) {
-                // add them to the ordered list.
-                orderedPlugins.add(n.plugin);
-                // remove them from the input list.
-                plugins.remove(n.plugin);
-            }
-        }
-        return orderedPlugins;
-    }
-
-    // Create a grapth according to list of plugins.
-    private static Map<Plugin, Node> buildGraphs(List<Plugin> plugins) {
-        Map<String, Node> nodeStore = new HashMap<>();
-        for (Plugin p : plugins) {
-            Node newNode = new Node();
-            newNode.plugin = p;
-            nodeStore.put(p.getName(), newNode);
-        }
-        // for each plugin creates its graph.
-        Map<Plugin, Node> graphs = new LinkedHashMap<>();
-        for (Plugin p : plugins) {
-            Node node = nodeStore.get(p.getName());
-            for (String after : p.isAfter()) {
-                Node previous = nodeStore.get(after);
-                if (previous == null) {
-                    continue;
-                }
-                node.previous.add(previous);
-                previous.nexts.add(node);
-            }
-            for (String before : p.isBefore()) {
-                Node next = nodeStore.get(before);
-                if (next == null) {
-                    continue;
-                }
-                node.nexts.add(next);
-                next.previous.add(node);
-            }
-            graphs.put(p, node);
-
-        }
-        return graphs;
-    }
-
-    private static List<Node> getRoots(Map<Plugin, Node> graphs) {
-        List<Node> ret = new ArrayList<>();
-        for (Node n : graphs.values()) {
-            if (n.previous.isEmpty()) {
-                ret.add(n);
-            }
-        }
-        return ret;
-    }
-
-    private static void checkCycle(Node root) {
-        for (Node next : root.nexts) {
-            Set<Node> path = new LinkedHashSet<>();
-            path.add(root);
-            checkCycle(next, root, path);
-        }
-    }
-
-    private static void checkCycle(Node current, Node root, Set<Node> path) {
-        path.add(current);
-        if (current == root) {
-            StringBuilder builder = new StringBuilder();
-            for (Node p : path) {
-                builder.append(p.plugin.getName()).append(">");
-            }
-            builder.append(root);
-            throw new PluginException("Cycle detected for " + builder.toString()
-                    + ". Please fix Plugin ordering (before, after constraints).");
-        }
-
-        for (Node n : current.nexts) {
-            checkCycle(n, root, path);
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ClassForNamePlugin.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,188 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.tools.jlink.internal.plugins;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import jdk.tools.jlink.plugin.ModulePool;
+import jdk.tools.jlink.plugin.Plugin.Category;
+import jdk.internal.org.objectweb.asm.ClassReader;
+import static jdk.internal.org.objectweb.asm.ClassReader.*;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.Opcodes;
+import jdk.internal.org.objectweb.asm.Type;
+import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
+import jdk.internal.org.objectweb.asm.tree.ClassNode;
+import jdk.internal.org.objectweb.asm.tree.InsnList;
+import jdk.internal.org.objectweb.asm.tree.LabelNode;
+import jdk.internal.org.objectweb.asm.tree.LdcInsnNode;
+import jdk.internal.org.objectweb.asm.tree.LineNumberNode;
+import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
+import jdk.internal.org.objectweb.asm.tree.MethodNode;
+import jdk.tools.jlink.plugin.ModuleEntry;
+import jdk.tools.jlink.plugin.Plugin;
+
+public final class ClassForNamePlugin implements Plugin {
+    public static final String NAME = "class-for-name";
+
+    private static String binaryClassName(String path) {
+        return path.substring(path.indexOf('/', 1) + 1,
+                              path.length() - ".class".length());
+    }
+
+    private static int getAccess(ModuleEntry resource) {
+        ClassReader cr = new ClassReader(resource.getBytes());
+
+        return cr.getAccess();
+    }
+
+    private static String getPackage(String binaryName) {
+        int index = binaryName.lastIndexOf("/");
+
+        return index == -1 ? "" : binaryName.substring(0, index);
+    }
+
+    private ModuleEntry transform(ModuleEntry resource, Map<String, ModuleEntry> classes) {
+        byte[] inBytes = resource.getBytes();
+        ClassReader cr = new ClassReader(inBytes);
+        ClassNode cn = new ClassNode();
+        cr.accept(cn, EXPAND_FRAMES);
+        List<MethodNode> ms = cn.methods;
+        boolean modified = false;
+        LdcInsnNode ldc = null;
+
+        String thisPackage = getPackage(binaryClassName(resource.getPath()));
+
+        for (MethodNode mn : ms) {
+            InsnList il = mn.instructions;
+            Iterator<AbstractInsnNode> it = il.iterator();
+
+            while (it.hasNext()) {
+                AbstractInsnNode insn = it.next();
+
+                if (insn instanceof LdcInsnNode) {
+                    ldc = (LdcInsnNode)insn;
+                } else if (insn instanceof MethodInsnNode && ldc != null) {
+                    MethodInsnNode min = (MethodInsnNode)insn;
+
+                    if (min.getOpcode() == Opcodes.INVOKESTATIC &&
+                        min.name.equals("forName") &&
+                        min.owner.equals("java/lang/Class") &&
+                        min.desc.equals("(Ljava/lang/String;)Ljava/lang/Class;")) {
+                        String ldcClassName = ldc.cst.toString();
+                        String thatClassName = ldcClassName.replaceAll("\\.", "/");
+                        ModuleEntry thatClass = classes.get(thatClassName);
+
+                        if (thatClass != null) {
+                            int thatAccess = getAccess(thatClass);
+                            String thatPackage = getPackage(thatClassName);
+
+                            if ((thatAccess & Opcodes.ACC_PRIVATE) != Opcodes.ACC_PRIVATE &&
+                                ((thatAccess & Opcodes.ACC_PUBLIC) == Opcodes.ACC_PUBLIC ||
+                                  thisPackage.equals(thatPackage))) {
+                                Type type = Type.getObjectType(thatClassName);
+                                il.remove(ldc);
+                                il.set(min, new LdcInsnNode(type));
+                                modified = true;
+                            }
+                        }
+                    }
+
+                    ldc = null;
+                } else if (!(insn instanceof LabelNode) &&
+                           !(insn instanceof LineNumberNode)) {
+                    ldc = null;
+                }
+
+            }
+        }
+
+        if (modified) {
+            ClassWriter cw = new ClassWriter(cr, 0);
+            cn.accept(cw);
+            byte[] outBytes = cw.toByteArray();
+
+            return resource.create(outBytes);
+        }
+
+        return resource;
+    }
+
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
+    @Override
+    public void visit(ModulePool in, ModulePool out) {
+        Objects.requireNonNull(in);
+        Objects.requireNonNull(out);
+        Map<String, ModuleEntry> classes = in.entries()
+            .filter(resource -> resource != null &&
+                    resource.getPath().endsWith(".class") &&
+                    !resource.getPath().endsWith("/module-info.class"))
+            .collect(Collectors.toMap(resource -> binaryClassName(resource.getPath()),
+                                      resource -> resource));
+        in.entries()
+            .filter(resource -> resource != null)
+            .forEach(resource -> {
+                String path = resource.getPath();
+
+                if (path.endsWith(".class") && !path.endsWith("/module-info.class")) {
+                    out.add(transform(resource, classes));
+                } else {
+                    out.add(resource);
+                }
+            });
+    }
+
+    @Override
+    public Category getType() {
+        return Category.TRANSFORMER;
+    }
+
+    @Override
+    public boolean hasArguments() {
+        return false;
+    }
+
+    @Override
+    public String getDescription() {
+        return PluginsResourceBundle.getDescription(NAME);
+    }
+
+    @Override
+    public String getArgumentsDescription() {
+       return PluginsResourceBundle.getArgument(NAME);
+    }
+
+    @Override
+    public void configure(Map<String, String> config) {
+
+    }
+}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/OptimizationPlugin.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +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.tools.jlink.internal.plugins;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UncheckedIOException;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.function.Consumer;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.internal.plugins.asm.AsmPlugin;
-import jdk.internal.org.objectweb.asm.tree.ClassNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.internal.org.objectweb.asm.util.CheckClassAdapter;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.optim.ForNameFolding;
-import jdk.tools.jlink.internal.plugins.optim.ReflectionOptimizer.TypeResolver;
-import jdk.tools.jlink.plugin.PluginException;
-
-/**
- *
- * Optimize Classes following various strategies. Strategies are implementation
- * of <code>ClassOptimizer</code> and <code>MethodOptimizer</code>.
- */
-public final class OptimizationPlugin extends AsmPlugin {
-
-    public static final String NAME = "class-optim";
-    public static final String LOG  = "log";
-    public static final String ALL = "all";
-    public static final String FORNAME_REMOVAL = "forName-folding";
-
-    /**
-     * Default resolver. A resolver that retrieve types that are in an
-     * accessible package, are public or are located in the same package as the
-     * caller.
-     */
-    private static final class DefaultTypeResolver implements TypeResolver {
-
-        private final Set<String> packages;
-        private final AsmPools pools;
-
-        DefaultTypeResolver(AsmPools pools, AsmModulePool modulePool) {
-            Objects.requireNonNull(pools);
-            Objects.requireNonNull(modulePool);
-            this.pools = pools;
-            packages = pools.getGlobalPool().getAccessiblePackages(modulePool.getModuleName());
-        }
-
-        @Override
-        public ClassReader resolve(ClassNode cn, MethodNode mn, String type) {
-            int classIndex = cn.name.lastIndexOf("/");
-            String callerPkg = classIndex == -1 ? ""
-                    : cn.name.substring(0, classIndex);
-            int typeClassIndex = type.lastIndexOf("/");
-            String pkg = typeClassIndex == - 1 ? ""
-                    : type.substring(0, typeClassIndex);
-            ClassReader reader = null;
-            if (packages.contains(pkg) || pkg.equals(callerPkg)) {
-                ClassReader r = pools.getGlobalPool().getClassReader(type);
-                if (r != null) {
-                    // if not private
-                    if ((r.getAccess() & Opcodes.ACC_PRIVATE)
-                            != Opcodes.ACC_PRIVATE) {
-                        // public
-                        if (((r.getAccess() & Opcodes.ACC_PUBLIC)
-                                == Opcodes.ACC_PUBLIC)) {
-                            reader = r;
-                        } else if (pkg.equals(callerPkg)) {
-                            reader = r;
-                        }
-                    }
-                }
-            }
-            return reader;
-        }
-    }
-
-    public interface Optimizer {
-
-        void close() throws IOException;
-    }
-
-    public interface ClassOptimizer extends Optimizer {
-
-        boolean optimize(Consumer<String> logger, AsmPools pools,
-                AsmModulePool modulePool,
-                ClassNode cn) throws Exception;
-    }
-
-    public interface MethodOptimizer extends Optimizer {
-
-        boolean optimize(Consumer<String> logger, AsmPools pools,
-                AsmModulePool modulePool,
-                ClassNode cn, MethodNode m, TypeResolver resolver) throws Exception;
-    }
-
-    private List<Optimizer> optimizers = new ArrayList<>();
-
-    private OutputStream stream;
-    private int numMethods;
-
-    private void log(String content) {
-        if (stream != null) {
-            try {
-                content = content + "\n";
-                stream.write(content.getBytes(StandardCharsets.UTF_8));
-            } catch (IOException ex) {
-                System.err.println(ex);
-            }
-        }
-    }
-
-    private void close() throws IOException {
-        log("Num analyzed methods " + numMethods);
-
-        for (Optimizer optimizer : optimizers) {
-            try {
-                optimizer.close();
-            } catch (IOException ex) {
-                System.err.println("Error closing optimizer " + ex);
-            }
-        }
-        if (stream != null) {
-            stream.close();
-        }
-    }
-
-    @Override
-    public String getName() {
-        return NAME;
-    }
-
-    @Override
-    public void visit(AsmPools pools) {
-        try {
-            for (AsmModulePool p : pools.getModulePools()) {
-                DefaultTypeResolver resolver = new DefaultTypeResolver(pools, p);
-                p.visitClassReaders((reader) -> {
-                    ClassWriter w = null;
-                    try {
-                        w = optimize(pools, p, reader, resolver);
-                    } catch (IOException ex) {
-                        throw new PluginException("Problem optimizing "
-                                + reader.getClassName(), ex);
-                    }
-                    return w;
-                });
-            }
-        } finally {
-            try {
-                close();
-            } catch (IOException ex) {
-                throw new UncheckedIOException(ex);
-            }
-        }
-    }
-
-    private ClassWriter optimize(AsmPools pools, AsmModulePool modulePool,
-            ClassReader reader, TypeResolver resolver)
-            throws IOException {
-        ClassNode cn = new ClassNode();
-        ClassWriter writer = null;
-        if ((reader.getAccess() & Opcodes.ACC_INTERFACE) == 0) {
-            reader.accept(cn, ClassReader.EXPAND_FRAMES);
-            boolean optimized = false;
-            for (Optimizer optimizer : optimizers) {
-                if (optimizer instanceof ClassOptimizer) {
-                    try {
-                        boolean optim = ((ClassOptimizer) optimizer).
-                                optimize(this::log, pools, modulePool, cn);
-                        if (optim) {
-                            optimized = true;
-                        }
-                    } catch (Throwable ex) {
-                        throw new PluginException("Exception optimizing "
-                                + reader.getClassName(), ex);
-                    }
-                } else {
-                    MethodOptimizer moptimizer = (MethodOptimizer) optimizer;
-                    for (MethodNode m : cn.methods) {
-                        if ((m.access & Opcodes.ACC_ABSTRACT) == 0
-                                && (m.access & Opcodes.ACC_NATIVE) == 0) {
-                            numMethods += 1;
-                            try {
-                                boolean optim = moptimizer.
-                                        optimize(this::log, pools, modulePool, cn,
-                                                m, resolver);
-                                if (optim) {
-                                    optimized = true;
-                                }
-                            } catch (Throwable ex) {
-                                throw new PluginException("Exception optimizing "
-                                        + reader.getClassName() + "." + m.name, ex);
-                            }
-
-                        }
-                    }
-                }
-            }
-
-            if (optimized) {
-                writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
-                try {
-                    // add a validation layer in between to check for class vallidity
-                    CheckClassAdapter ca = new CheckClassAdapter(writer);
-                    cn.accept(ca);
-                } catch (Exception ex) {
-                    throw new PluginException("Exception optimizing class " + cn.name, ex);
-                }
-            }
-        }
-        return writer;
-    }
-
-    @Override
-    public String getDescription() {
-        return PluginsResourceBundle.getDescription(NAME);
-    }
-
-    @Override
-    public boolean hasArguments() {
-        return true;
-    }
-
-    @Override
-    public String getArgumentsDescription() {
-       return PluginsResourceBundle.getArgument(NAME);
-    }
-
-    @Override
-    public void configure(Map<String, String> config) {
-        String strategies = config.get(NAME);
-        String[] arr = strategies.split(",");
-        for (String s : arr) {
-            if (s.equals(ALL)) {
-                optimizers.clear();
-                optimizers.add(new ForNameFolding());
-                break;
-            } else if (s.equals(FORNAME_REMOVAL)) {
-                optimizers.add(new ForNameFolding());
-            } else {
-                throw new IllegalArgumentException("Unknown optimization: " + s);
-            }
-        }
-        String f = config.get(LOG);
-        if (f != null) {
-            try {
-                stream = new FileOutputStream(f);
-            } catch (IOException ex) {
-                throw new UncheckedIOException(ex);
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmGlobalPool.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +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.tools.jlink.internal.plugins.asm;
-
-import java.util.Set;
-
-/**
- * A pool containing all class and resource files.
- */
-public interface AsmGlobalPool extends AsmPool {
-
-    /**
-     * Associate a package to a module, useful when adding new classes in new
-     * packages. WARNING: In order to properly handle new package and/or new
-     * module, module-info class must be added and/or updated.
-     *
-     * @param pkg The new package, following java binary syntax (/-separated
-     * path name).
-     * @param module An existing or new module.
-     * @throws jdk.tools.jlink.plugins.PluginException If a mapping already
-     * exist for this package.
-     */
-    public void addPackageModuleMapping(String pkg, String module);
-
-    /**
-     * Return the set of accessible packages for a given module.
-     *
-     * @param module The module from which packages are accessible.
-     * @return Set of packages or null if the module is not found.
-     */
-    public Set<String> getAccessiblePackages(String module);
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmModulePool.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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.tools.jlink.internal.plugins.asm;
-
-import java.lang.module.ModuleDescriptor;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-
-/**
- * A pool for a given module
- */
-public interface AsmModulePool extends AsmPool {
-
-    /**
-     * Associate a package to this module, useful when adding new classes in new
-     * packages. WARNING: In order to properly handle new package and/or new
-     * module, module-info class must be added and/or updated.
-     *
-     * @param pkg The new package, following java binary syntax (/-separated
-     * path name).
-     * @throws jdk.tools.jlink.plugins.PluginException If a mapping already
-     * exist for this package.
-     */
-    public void addPackage(String pkg);
-
-    /**
-     * The module name of this pool.
-     * @return The module name;
-     */
-    public String getModuleName();
-
-    /**
-     * Lookup the class in this pool and the required pools. NB: static module
-     * readability can be different at execution time.
-     *
-     * @param binaryName The class to lookup.
-     * @return The reader or null if not found
-     * @throws jdk.tools.jlink.plugins.PluginException
-     */
-    public ClassReader getClassReaderInDependencies(String binaryName);
-
-    /**
-     * Lookup the class in the exported packages of this module. "public
-     * requires" modules are looked up. NB: static module readability can be
-     * different at execution time.
-     *
-     * @param callerModule Name of calling module.
-     * @param binaryName The class to lookup.
-     * @return The reader or null if not found
-     * @throws jdk.tools.jlink.plugins.PluginException
-     */
-    public ClassReader getExportedClassReader(String callerModule,
-            String binaryName);
-
-    /**
-     * The module descriptor.
-     *
-     * @return The module descriptor;
-     */
-    public ModuleDescriptor getDescriptor();
-
-    /**
-     * Retrieve the internal and exported packages.
-     *
-     * @return
-     */
-    public Set<String> getAllPackages();
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPlugin.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +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.tools.jlink.internal.plugins.asm;
-
-import java.util.Objects;
-import jdk.tools.jlink.plugin.Plugin;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-
-/**
- * Extend this class to develop your own plugin in order to transform jimage
- * resources.
- *
- */
-public abstract class AsmPlugin implements Plugin {
-
-    public AsmPlugin() {
-    }
-
-    @Override
-    public void visit(ModulePool allContent, ModulePool outResources) {
-        Objects.requireNonNull(allContent);
-        Objects.requireNonNull(outResources);
-        ModulePoolImpl resources = new ModulePoolImpl(allContent.getByteOrder());
-        allContent.entries().forEach(md -> {
-            if(md.getType().equals(ModuleEntry.Type.CLASS_OR_RESOURCE)) {
-                resources.add(md);
-            } else {
-                outResources.add(md);
-            }
-        });
-        AsmPools pools = new AsmPools(resources);
-        visit(pools);
-        pools.fillOutputResources(outResources);
-    }
-
-    /**
-     * This is the method to implement in order to
-     * apply Asm transformation to jimage contained classes.
-     * @param pools The pool of Asm classes and other resource files.
-     * @param strings To add a string to the jimage strings table.
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public abstract void visit(AsmPools pools);
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPool.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +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.tools.jlink.internal.plugins.asm;
-
-import java.util.Collection;
-import java.util.List;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-/**
- * A pool of ClassReader and other resource files.
- * This class allows to transform and sort classes and resource files.
- * <p>
- * Classes in the class pool are named following java binary name specification.
- * For example, java.lang.Object class is named java/lang/Object
- * <p>
- * Module information has been stripped out from class and other resource files
- * (.properties, binary files, ...).</p>
- */
-public interface AsmPool {
-
-    /**
-     * A resource that is not a class file.
-     * <p>
-     * The path of a resource is a /-separated path name that identifies the
-     * resource. For example com.foo.bar.Bundle.properties resource name is
-     * com/foo/bar/Bundle.properties </p>
-     * <p>
-     */
-    public class ResourceFile {
-
-        private final String path;
-        private final byte[] content;
-
-        public ResourceFile(String path, byte[] content) {
-            this.path = path;
-            this.content = content;
-        }
-
-        public String getPath() {
-            return path;
-        }
-
-        public byte[] getContent() {
-            return content;
-        }
-    }
-
-    /**
-     * To visit each Class contained in the pool
-     */
-    public interface ClassReaderVisitor {
-
-        /**
-         * Called for each ClassReader located in the pool.
-         *
-         * @param reader A class reader.
-         * @return A writer or null if the class has not been transformed.
-         */
-        public ClassWriter visit(ClassReader reader);
-    }
-
-    /**
-     * To visit each Resource contained in the pool
-     */
-    public interface ResourceFileVisitor {
-
-        /**
-         * Called for each Resource file located in the pool.
-         *
-         * @param reader A resource file.
-         * @return A resource file or null if the resource has not been
-         * transformed.
-         */
-        public ResourceFile visit(ResourceFile reader);
-    }
-
-    /**
-     * Contains the transformed classes. When the jimage file is generated,
-     * transformed classes take precedence on unmodified ones.
-     */
-    public interface WritableClassPool {
-
-        /**
-         * Add a class to the pool, if a class already exists, it is replaced.
-         *
-         * @param writer The class writer.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public void addClass(ClassWriter writer);
-
-        /**
-         * The class will be not added to the jimage file.
-         *
-         * @param className The class name to forget.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public void forgetClass(String className);
-
-        /**
-         * Get a transformed class.
-         *
-         * @param binaryName The java class binary name
-         * @return The ClassReader or null if the class is not found.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public ClassReader getClassReader(String binaryName);
-
-        /**
-         * Get a transformed class.
-         *
-         * @param res A class resource.
-         * @return The ClassReader or null if the class is not found.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public ClassReader getClassReader(ModuleEntry res);
-
-        /**
-         * Returns all the classes contained in the writable pool.
-         *
-         * @return The collection of classes.
-         */
-        public Collection<ModuleEntry> getClasses();
-    }
-
-    /**
-     * Contains the transformed resources. When the jimage file is generated,
-     * transformed resources take precedence on unmodified ones.
-     */
-    public interface WritableResourcePool {
-
-        /**
-         * Add a resource, if the resource exists, it is replaced.
-         *
-         * @param resFile The resource file to add.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public void addResourceFile(ResourceFile resFile);
-
-        /**
-         * The resource will be not added to the jimage file.
-         *
-         * @param resourceName
-         * @throws jdk.tools.jlink.plugin.PluginException If the resource to
-         * forget doesn't exist or is null.
-         */
-        public void forgetResourceFile(String resourceName);
-
-        /**
-         * Get a transformed resource.
-         *
-         * @param name The java resource name
-         * @return The Resource or null if the resource is not found.
-         */
-        public ResourceFile getResourceFile(String name);
-
-        /**
-         * Get a transformed resource.
-         *
-         * @param res The java resource
-         * @return The Resource or null if the resource is not found.
-         */
-        public ResourceFile getResourceFile(ModuleEntry res);
-
-        /**
-         * Returns all the resources contained in the writable pool.
-         *
-         * @return The array of resources.
-         */
-        public Collection<ModuleEntry> getResourceFiles();
-    }
-
-    /**
-     * To order the classes and resources within a jimage file.
-     */
-    public interface Sorter {
-
-        /**
-         * @param resources The resources will be added to the jimage following
-         * the order of this ResourcePool.
-         * @return The resource paths ordered in the way to use for storage in the jimage.
-         * @throws jdk.tools.jlink.plugin.PluginException
-         */
-        public List<String> sort(ModulePool resources);
-    }
-
-    /**
-     * The writable pool used to store transformed resources.
-     *
-     * @return The writable pool.
-     */
-    public WritableClassPool getTransformedClasses();
-
-    /**
-     * The writable pool used to store transformed resource files.
-     *
-     * @return The writable pool.
-     */
-    public WritableResourcePool getTransformedResourceFiles();
-
-    /**
-     * Set a sorter instance to sort all files. If no sorter is set, then input
-     * Resources will be added in the order they have been received followed by
-     * newly added resources.
-     *
-     * @param sorter
-     */
-    public void setSorter(Sorter sorter);
-
-    /**
-     * Returns the classes contained in the pool.
-     *
-     * @return The classes.
-     */
-    public Collection<ModuleEntry> getClasses();
-
-    /**
-     * Returns the resources contained in the pool. Resources are all the file
-     * that are not classes (eg: properties file, binary files, ...)
-     *
-     * @return The array of resource files.
-     */
-    public Collection<ModuleEntry> getResourceFiles();
-
-    /**
-     * Retrieves a resource based on the binary name. This name doesn't contain
-     * the module name.
-     * <b>NB:</b> When dealing with resources that have the same name in various
-     * modules (eg: META-INFO/*), you should use the <code>ResourcePool</code>
-     * referenced from this <code>AsmClassPool</code>.
-     *
-     * @param binaryName Name of a Java resource or null if the resource doesn't
-     * exist.
-     * @return
-     */
-    public ResourceFile getResourceFile(String binaryName);
-
-    /**
-     * Retrieves a resource for the passed resource.
-     *
-     * @param res The resource
-     * @return The resource file or null if it doesn't exist.
-     */
-    public ResourceFile getResourceFile(ModuleEntry res);
-
-    /**
-     * Retrieve a ClassReader from the pool.
-     *
-     * @param binaryName Class binary name
-     * @return A reader or null if the class is unknown
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public ClassReader getClassReader(String binaryName);
-
-    /**
-     * Retrieve a ClassReader from the pool.
-     *
-     * @param res A resource.
-     * @return A reader or null if the class is unknown
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public ClassReader getClassReader(ModuleEntry res);
-
-    /**
-     * To visit the set of ClassReaders.
-     *
-     * @param visitor The visitor.
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public void visitClassReaders(ClassReaderVisitor visitor);
-
-    /**
-     * To visit the set of ClassReaders.
-     *
-     * @param visitor The visitor.
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public void visitResourceFiles(ResourceFileVisitor visitor);
-
-    /**
-     * Returns the pool of all the resources (transformed and unmodified).
-     * The input resources are replaced by the transformed ones.
-     * If a sorter has been set, it is used to sort the returned resources.
-     *
-     * @param output The pool used to fill the jimage.
-     * @throws jdk.tools.jlink.plugin.PluginException
-     */
-    public void fillOutputResources(ModulePool output);
-
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPoolImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,698 +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.tools.jlink.internal.plugins.asm;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.UncheckedIOException;
-import java.lang.module.ModuleDescriptor;
-import java.lang.module.ModuleDescriptor.Requires;
-import java.lang.module.ModuleDescriptor.Requires.Modifier;
-import java.lang.module.ModuleDescriptor.Exports;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.tools.jlink.internal.ImageFileCreator;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.PluginException;
-import jdk.tools.jlink.plugin.ModulePool;
-
-/**
- * A pool of ClassReader and other resource files. This class allows to
- * transform and sort classes and resource files.
- * <p>
- * Classes in the class pool are named following java binary name specification.
- * For example, java.lang.Object class is named java/lang/Object
- * <p>
- * Module information has been stripped out from class and other resource files
- * (.properties, binary files, ...).</p>
- */
-final class AsmPoolImpl implements AsmModulePool {
-
-    /**
-     * Contains the transformed classes. When the jimage file is generated,
-     * transformed classes take precedence on unmodified ones.
-     */
-    public final class WritableClassPoolImpl implements WritableClassPool {
-
-        private WritableClassPoolImpl() {
-        }
-
-        /**
-         * Add a class to the pool, if a class already exists, it is replaced.
-         *
-         * @param writer The class writer.
-         * @throws java.io.IOException
-         */
-        @Override
-        public void addClass(ClassWriter writer) {
-            Objects.requireNonNull(writer);
-            // Retrieve the className
-            ClassReader reader = newClassReader(writer.toByteArray());
-            String className = reader.getClassName();
-            String path;
-            if (className.endsWith("module-info")) {
-                // remove the module name contained in the class name
-                className = className.substring(className.indexOf("/") + 1);
-                path = "/" + moduleName + "/" + className;
-            } else {
-                path = toClassNamePath(className);
-            }
-
-            byte[] content = writer.toByteArray();
-            ModuleEntry res = ModuleEntry.create(path, content);
-            transformedClasses.put(className, res);
-        }
-
-        /**
-         * The class will be not added to the jimage file.
-         *
-         * @param className The class name to forget.
-         */
-        @Override
-        public void forgetClass(String className) {
-            Objects.requireNonNull(className);
-            // do we have a resource?
-            ModuleEntry res = transformedClasses.get(className);
-            if (res == null) {
-                res = inputClasses.get(className);
-                if (res == null) {
-                    throw new PluginException("Unknown class " + className);
-                }
-            }
-            String path = toClassNamePath(className);
-            forgetResources.add(path);
-            // Just in case it has been added.
-            transformedClasses.remove(className);
-        }
-
-        /**
-         * Get a transformed class.
-         *
-         * @param binaryName The java class binary name
-         * @return The ClassReader or null if the class is not found.
-         */
-        @Override
-        public ClassReader getClassReader(String binaryName) {
-            Objects.requireNonNull(binaryName);
-            ModuleEntry res = transformedClasses.get(binaryName);
-            ClassReader reader = null;
-            if (res != null) {
-                reader = getClassReader(res);
-            }
-            return reader;
-        }
-
-        /**
-         * Returns all the classes contained in the writable pool.
-         *
-         * @return The array of transformed classes.
-         */
-        @Override
-        public Collection<ModuleEntry> getClasses() {
-            List<ModuleEntry> classes = new ArrayList<>();
-            for (Entry<String, ModuleEntry> entry : transformedClasses.entrySet()) {
-                classes.add(entry.getValue());
-            }
-            return classes;
-        }
-
-        @Override
-        public ClassReader getClassReader(ModuleEntry res) {
-            return newClassReader(res.getBytes());
-        }
-    }
-
-    /**
-     * Contains the transformed resources. When the jimage file is generated,
-     * transformed resources take precedence on unmodified ones.
-     */
-    public final class WritableResourcePoolImpl implements WritableResourcePool {
-
-        private WritableResourcePoolImpl() {
-        }
-
-        /**
-         * Add a resource, if the resource exists, it is replaced.
-         *
-         * @param resFile The resource file to add.
-         */
-        @Override
-        public void addResourceFile(ResourceFile resFile) {
-            Objects.requireNonNull(resFile);
-            String path = toResourceNamePath(resFile.getPath());
-            ModuleEntry res = ModuleEntry.create(path, resFile.getContent());
-            transformedResources.put(resFile.getPath(), res);
-        }
-
-        /**
-         * The resource will be not added to the jimage file.
-         *
-         * @param resourceName
-         * @throws java.io.IOException
-         */
-        @Override
-        public void forgetResourceFile(String resourceName) {
-            Objects.requireNonNull(resourceName);
-            String path = toResourceNamePath(resourceName);
-            // do we have a resource?
-            ModuleEntry res = transformedResources.get(resourceName);
-            if (res == null) {
-                res = inputResources.get(resourceName);
-                if (res == null) {
-                    throw new PluginException("Unknown resource " + resourceName);
-                }
-            }
-            forgetResources.add(path);
-            // Just in case it has been added.
-            transformedResources.remove(resourceName);
-        }
-
-        /**
-         * Get a transformed resource.
-         *
-         * @param name The java resource name
-         * @return The Resource or null if the resource is not found.
-         */
-        @Override
-        public ResourceFile getResourceFile(String name) {
-            Objects.requireNonNull(name);
-            ModuleEntry res = transformedResources.get(name);
-            ResourceFile resFile = null;
-            if (res != null) {
-                resFile = getResourceFile(res);
-            }
-            return resFile;
-        }
-
-        /**
-         * Returns all the resources contained in the writable pool.
-         *
-         * @return The array of transformed classes.
-         */
-        @Override
-        public Collection<ModuleEntry> getResourceFiles() {
-            List<ModuleEntry> resources = new ArrayList<>();
-            for (Entry<String, ModuleEntry> entry : transformedResources.entrySet()) {
-                resources.add(entry.getValue());
-            }
-            return resources;
-        }
-
-        @Override
-        public ResourceFile getResourceFile(ModuleEntry res) {
-            return new ResourceFile(toJavaBinaryResourceName(res.getPath()),
-                    res.getBytes());
-        }
-    }
-
-    private final ModulePool jimageResources;
-    private final Map<String, ModuleEntry> inputClasses;
-    private final Map<String, ModuleEntry> inputResources;
-    private final Map<String, String> inputClassPackageMapping;
-    private final Map<String, String> inputOtherPackageMapping;
-
-    private final WritableClassPool transClassesPool
-            = new WritableClassPoolImpl();
-    private final WritableResourcePool transResourcesPool
-            = new WritableResourcePoolImpl();
-
-    private Sorter sorter;
-
-    private final Map<String, ModuleEntry> transformedClasses
-            =            new LinkedHashMap<>();
-    private final Map<String, ModuleEntry> transformedResources
-            =            new LinkedHashMap<>();
-    private final List<String> forgetResources = new ArrayList<>();
-    private final Map<String, String> newPackageMapping = new HashMap<>();
-
-    private final String moduleName;
-
-    private final ModuleDescriptor descriptor;
-    private final AsmPools pools;
-
-    /**
-     * A new Asm pool.
-     *
-     * @param inputResources The raw resources to build the pool from.
-     * @param moduleName The name of a module.
-     * @param pools The resource pools.
-     * @param descriptor The module descriptor.
-     */
-    AsmPoolImpl(ModulePool inputResources, String moduleName,
-            AsmPools pools,
-            ModuleDescriptor descriptor) {
-        Objects.requireNonNull(inputResources);
-        Objects.requireNonNull(moduleName);
-        Objects.requireNonNull(pools);
-        Objects.requireNonNull(descriptor);
-        this.jimageResources = inputResources;
-        this.moduleName = moduleName;
-        this.pools = pools;
-        this.descriptor = descriptor;
-        Map<String, ModuleEntry> classes = new LinkedHashMap<>();
-        Map<String, ModuleEntry> resources = new LinkedHashMap<>();
-        Map<String, String> packageClassToModule = new HashMap<>();
-        Map<String, String> packageOtherToModule = new HashMap<>();
-        inputResources.entries().forEach(res -> {
-            if (res.getPath().endsWith(".class")) {
-                classes.put(toJavaBinaryClassName(res.getPath()), res);
-            } else {
-                resources.put(toJavaBinaryResourceName(res.getPath()), res);
-            }
-            String[] split = ImageFileCreator.splitPath(res.getPath());
-            if (ImageFileCreator.isClassPackage(res.getPath())) {
-                packageClassToModule.put(split[1], res.getModule());
-            } else {
-                // Keep a map of other resources
-                // Same resource names such as META-INF/* should be handled with full path name.
-                if (!split[1].isEmpty()) {
-                    packageOtherToModule.put(split[1], res.getModule());
-                }
-            }
-        });
-        this.inputClasses = Collections.unmodifiableMap(classes);
-        this.inputResources = Collections.unmodifiableMap(resources);
-
-        this.inputClassPackageMapping = Collections.unmodifiableMap(packageClassToModule);
-        this.inputOtherPackageMapping = Collections.unmodifiableMap(packageOtherToModule);
-    }
-
-    @Override
-    public String getModuleName() {
-        return moduleName;
-    }
-
-    /**
-     * The writable pool used to store transformed resources.
-     *
-     * @return The writable pool.
-     */
-    @Override
-    public WritableClassPool getTransformedClasses() {
-        return transClassesPool;
-    }
-
-    /**
-     * The writable pool used to store transformed resource files.
-     *
-     * @return The writable pool.
-     */
-    @Override
-    public WritableResourcePool getTransformedResourceFiles() {
-        return transResourcesPool;
-    }
-
-    /**
-     * Set a sorter instance to sort all files. If no sorter is set, then input
-     * Resources will be added in the order they have been received followed by
-     * newly added resources.
-     *
-     * @param sorter
-     */
-    @Override
-    public void setSorter(Sorter sorter) {
-        this.sorter = sorter;
-    }
-
-    /**
-     * Returns the classes contained in the pool.
-     *
-     * @return The array of classes.
-     */
-    @Override
-    public Collection<ModuleEntry> getClasses() {
-        return inputClasses.values();
-    }
-
-    /**
-     * Returns the resources contained in the pool. Resources are all the file
-     * that are not classes (eg: properties file, binary files, ...)
-     *
-     * @return The array of classes.
-     */
-    @Override
-    public Collection<ModuleEntry> getResourceFiles() {
-        return inputResources.values();
-    }
-
-    /**
-     * Retrieves a resource based on the binary name. This name doesn't contain
-     * the module name.
-     * <b>NB:</b> When dealing with resources that have the same name in various
-     * modules (eg: META-INFO/*), you should use the <code>ResourcePool</code>
-     * referenced from this <code>AsmClassPool</code>.
-     *
-     * @param binaryName Name of a Java resource or null if the resource doesn't
-     * exist.
-     * @return
-     */
-    @Override
-    public ResourceFile getResourceFile(String binaryName) {
-        Objects.requireNonNull(binaryName);
-        ModuleEntry res = inputResources.get(binaryName);
-        ResourceFile resFile = null;
-        if (res != null) {
-            resFile = getResourceFile(res);
-        }
-        return resFile;
-    }
-
-    /**
-     * Retrieve a ClassReader from the pool.
-     *
-     * @param binaryName Class binary name
-     * @return A reader or null if the class is unknown
-     */
-    @Override
-    public ClassReader getClassReader(String binaryName) {
-        Objects.requireNonNull(binaryName);
-        ModuleEntry res = inputClasses.get(binaryName);
-        ClassReader reader = null;
-        if (res != null) {
-            reader = getClassReader(res);
-        }
-        return reader;
-    }
-
-    @Override
-    public ResourceFile getResourceFile(ModuleEntry res) {
-        return new ResourceFile(toJavaBinaryResourceName(res.getPath()),
-                res.getBytes());
-    }
-
-    @Override
-    public ClassReader getClassReader(ModuleEntry res) {
-        return newClassReader(res.getBytes());
-    }
-
-    /**
-     * Lookup the class in this pool and the required pools. NB: static module
-     * readability can be different at execution time.
-     *
-     * @param binaryName The class to lookup.
-     * @return The reader or null if not found
-     */
-    @Override
-    public ClassReader getClassReaderInDependencies(String binaryName) {
-        Objects.requireNonNull(binaryName);
-        ClassReader reader = getClassReader(binaryName);
-        if (reader == null) {
-            for (Requires requires : descriptor.requires()) {
-                AsmModulePool pool = pools.getModulePool(requires.name());
-                reader = pool.getExportedClassReader(moduleName, binaryName);
-                if (reader != null) {
-                    break;
-                }
-            }
-        }
-        return reader;
-    }
-
-    /**
-     * Lookup the class in the exported packages of this module. "public
-     * requires" modules are looked up. NB: static module readability can be
-     * different at execution time.
-     *
-     * @param callerModule Name of calling module.
-     * @param binaryName The class to lookup.
-     * @return The reader or null if not found
-     */
-    @Override
-    public ClassReader getExportedClassReader(String callerModule, String binaryName) {
-        Objects.requireNonNull(callerModule);
-        Objects.requireNonNull(binaryName);
-        boolean exported = false;
-        ClassReader clazz = null;
-        for (Exports e : descriptor.exports()) {
-            String pkg = e.source();
-            Set<String> targets = e.targets();
-            System.out.println("PKG " + pkg);
-            if (targets.isEmpty() || targets.contains(callerModule)) {
-                if (binaryName.startsWith(pkg)) {
-                    String className = binaryName.substring(pkg.length());
-                    System.out.println("CLASS " + className);
-                    exported = !className.contains(".");
-                }
-                if (exported) {
-                    break;
-                }
-            }
-        }
-        // public requires (re-export)
-        if (!exported) {
-            for (Requires requires : descriptor.requires()) {
-                if (requires.modifiers().contains(Modifier.PUBLIC)) {
-                    AsmModulePool pool = pools.getModulePool(requires.name());
-                    clazz = pool.getExportedClassReader(moduleName, binaryName);
-                    if (clazz != null) {
-                        break;
-                    }
-                }
-            }
-        } else {
-            clazz = getClassReader(binaryName);
-        }
-        return clazz;
-
-    }
-
-    @Override
-    public ModuleDescriptor getDescriptor() {
-        return descriptor;
-    }
-
-    /**
-     * To visit the set of ClassReaders.
-     *
-     * @param visitor The visitor.
-     */
-    @Override
-    public void visitClassReaders(ClassReaderVisitor visitor) {
-        Objects.requireNonNull(visitor);
-        for (ModuleEntry res : getClasses()) {
-            ClassReader reader = newClassReader(res.getBytes());
-            ClassWriter writer = visitor.visit(reader);
-            if (writer != null) {
-
-                getTransformedClasses().addClass(writer);
-            }
-        }
-    }
-
-    /**
-     * To visit the set of ClassReaders.
-     *
-     * @param visitor The visitor.
-     */
-    @Override
-    public void visitResourceFiles(ResourceFileVisitor visitor) {
-        Objects.requireNonNull(visitor);
-        for (ModuleEntry resource : getResourceFiles()) {
-            ResourceFile resFile
-                    = new ResourceFile(toJavaBinaryResourceName(resource.getPath()),
-                            resource.getBytes());
-            ResourceFile res = visitor.visit(resFile);
-            if (res != null) {
-                getTransformedResourceFiles().addResourceFile(res);
-            }
-        }
-    }
-
-    /**
-     * Returns the pool of all the resources (transformed and unmodified). The
-     * input resources are replaced by the transformed ones. If a sorter has
-     * been set, it is used to sort the returned resources.     *
-     */
-    @Override
-    public void fillOutputResources(ModulePool outputResources) {
-        List<String> added = new ArrayList<>();
-        // If the sorter is null, use the input order.
-        // New resources are added at the end
-        // First input classes that have not been removed
-        ModulePool output = new ModulePoolImpl(outputResources.getByteOrder(),
-                ((ModulePoolImpl)outputResources).getStringTable());
-        jimageResources.entries().forEach(inResource -> {
-            if (!forgetResources.contains(inResource.getPath())) {
-                ModuleEntry resource = inResource;
-                // Do we have a transformed class with the same name?
-                ModuleEntry res = transformedResources.
-                        get(toJavaBinaryResourceName(inResource.getPath()));
-                if (res != null) {
-                    resource = res;
-                } else {
-                    res = transformedClasses.
-                            get(toJavaBinaryClassName(inResource.getPath()));
-                    if (res != null) {
-                        resource = res;
-                    }
-                }
-                output.add(resource);
-                added.add(resource.getPath());
-            }
-        });
-        // Then new resources
-        for (Map.Entry<String, ModuleEntry> entry : transformedResources.entrySet()) {
-            ModuleEntry resource = entry.getValue();
-            if (!forgetResources.contains(resource.getPath())) {
-                if (!added.contains(resource.getPath())) {
-                    output.add(resource);
-                }
-            }
-        }
-        // And new classes
-        for (Map.Entry<String, ModuleEntry> entry : transformedClasses.entrySet()) {
-            ModuleEntry resource = entry.getValue();
-            if (!forgetResources.contains(resource.getPath())) {
-                if (!added.contains(resource.getPath())) {
-                    output.add(resource);
-                }
-            }
-        }
-
-        AsmPools.sort(outputResources, output, sorter);
-    }
-
-    /**
-     * Associate a package to this module, useful when adding new classes in new
-     * packages. WARNING: In order to properly handle new package and/or new
-     * module, module-info class must be added and/or updated.
-     *
-     * @param pkg The new package, following java binary syntax (/-separated
-     * path name).
-     * @throws PluginException If a mapping already exist for this package.
-     */
-    @Override
-    public void addPackage(String pkg) {
-        Objects.requireNonNull(pkg);
-        Objects.requireNonNull(moduleName);
-        pkg = pkg.replaceAll("/", ".");
-        String mod = newPackageMapping.get(pkg);
-        if (mod != null) {
-            throw new PluginException(mod + " module already contains package " + pkg);
-        }
-        newPackageMapping.put(pkg, moduleName);
-    }
-
-    @Override
-    public Set<String> getAllPackages() {
-        ModuleDescriptor desc = getDescriptor();
-        Set<String> packages = new HashSet<>();
-        for (String p : desc.conceals()) {
-            packages.add(p.replaceAll("\\.", "/"));
-        }
-        for (String p : newPackageMapping.keySet()) {
-            packages.add(p.replaceAll("\\.", "/"));
-        }
-        for (Exports ex : desc.exports()) {
-            packages.add(ex.source().replaceAll("\\.", "/"));
-        }
-        return packages;
-    }
-
-    private static ClassReader newClassReader(byte[] bytes) {
-        try {
-            ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
-            ClassReader reader = new ClassReader(stream);
-            return reader;
-        } catch (IOException ex) {
-            throw new UncheckedIOException(ex);
-        }
-    }
-
-    private static String toJavaBinaryClassName(String path) {
-        if (path.endsWith("module-info.class")) {
-            path = removeClassExtension(path);
-        } else {
-            path = removeModuleName(path);
-            path = removeClassExtension(path);
-        }
-        return path;
-    }
-
-    private static String toJavaBinaryResourceName(String path) {
-        if (!path.endsWith("module-info.class")) {
-            path = removeModuleName(path);
-        }
-        return path;
-    }
-
-    private static String removeClassExtension(String path) {
-        return path.substring(0, path.length() - ".class".length());
-    }
-
-    private static String removeModuleName(String path) {
-        path = path.substring(1);
-        return path.substring(path.indexOf("/") + 1, path.length());
-    }
-
-    private String toClassNamePath(String className) {
-        return toResourceNamePath(className) + ".class";
-    }
-
-    /**
-     * Entry point to manage resource<->module association.
-     */
-    private String toResourceNamePath(String resourceName) {
-        if (!resourceName.startsWith("/")) {
-            resourceName = "/" + resourceName;
-        }
-        String pkg = toPackage(resourceName);
-        String module = inputClassPackageMapping.get(pkg);
-        if (module == null) {
-            module = newPackageMapping.get(pkg);
-            if (module == null) {
-                module = inputOtherPackageMapping.get(pkg);
-                if (module == null) {
-                    throw new PluginException("No module for package" + pkg);
-                }
-            }
-        }
-        return "/" + module + resourceName;
-    }
-
-    private static String toPackage(String path) {
-        if (path.startsWith("/")) {
-            path = path.substring(1);
-        }
-        int i = path.lastIndexOf("/");
-        if (i == -1) {
-            // Default package...
-            return "";
-        }
-        return path.substring(0, i).replaceAll("/", ".");
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/asm/AsmPools.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,497 +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.tools.jlink.internal.plugins.asm;
-
-import java.lang.module.ModuleDescriptor;
-import java.lang.module.ModuleDescriptor.Exports;
-import java.lang.module.ModuleDescriptor.Requires;
-import static java.lang.module.ModuleDescriptor.Requires.Modifier.PUBLIC;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.Sorter;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.PluginException;
-import jdk.tools.jlink.plugin.ModulePool;
-
-/**
- * A container for pools of ClassReader and other resource files. A pool of all
- * the resources or a pool for a given module can be retrieved
- */
-public final class AsmPools {
-
-    /**
-     * Sort the order in which the modules will be stored in the jimage file.
-     */
-    public interface ModuleSorter {
-
-        /**
-         * Sort the list of modules.
-         *
-         * @param modules The list of module names. The module will be stored in
-         * the jimage following this order.
-         * @return A list of module names that expresses the order in which the
-         * modules are stored in the jimage.
-         */
-        public List<String> sort(List<String> modules);
-    }
-
-    private class AsmGlobalPoolImpl implements AsmGlobalPool {
-
-        private Sorter sorter = null;
-
-        private class GlobalWritableClassPool implements WritableClassPool {
-
-            @Override
-            public void addClass(ClassWriter writer) {
-                visitFirstNonFailingPool((AsmModulePool pool) -> {
-                    pool.getTransformedClasses().addClass(writer);
-                });
-            }
-
-            @Override
-            public void forgetClass(String className) {
-                visitFirstNonFailingPool((AsmModulePool pool) -> {
-                    pool.getTransformedClasses().forgetClass(className);
-                });
-            }
-
-            @Override
-            public ClassReader getClassReader(String binaryName) {
-                return visitPools((AsmModulePool pool) -> {
-                    return pool.getTransformedClasses().getClassReader(binaryName);
-                });
-            }
-
-            @Override
-            public Collection<ModuleEntry> getClasses() {
-                List<ModuleEntry> all = new ArrayList<>();
-                visitAllPools((AsmModulePool pool) -> {
-                    for (ModuleEntry rf : pool.getTransformedClasses().getClasses()) {
-                        all.add(rf);
-                    }
-                });
-                return all;
-            }
-
-            @Override
-            public ClassReader getClassReader(ModuleEntry res) {
-                return visitPools((AsmModulePool pool) -> {
-                    return pool.getTransformedClasses().getClassReader(res);
-                });
-            }
-
-        }
-
-        private class GlobalWritableResourcePool implements WritableResourcePool {
-
-            @Override
-            public void addResourceFile(ResourceFile resFile) {
-                visitFirstNonFailingPool((AsmModulePool pool) -> {
-                    pool.getTransformedResourceFiles().addResourceFile(resFile);
-                });
-            }
-
-            @Override
-            public void forgetResourceFile(String resourceName) {
-                visitFirstNonFailingPool((AsmModulePool pool) -> {
-                    pool.getTransformedResourceFiles().forgetResourceFile(resourceName);
-                });
-            }
-
-            @Override
-            public ResourceFile getResourceFile(String name) {
-                return visitPools((AsmModulePool pool) -> {
-                    return pool.getTransformedResourceFiles().getResourceFile(name);
-                });
-            }
-
-            @Override
-            public Collection<ModuleEntry> getResourceFiles() {
-                List<ModuleEntry> all = new ArrayList<>();
-                visitAllPools((AsmModulePool pool) -> {
-                    for (ModuleEntry rf : pool.getTransformedResourceFiles().getResourceFiles()) {
-                        all.add(rf);
-                    }
-                });
-                return all;
-            }
-
-            @Override
-            public ResourceFile getResourceFile(ModuleEntry res) {
-                return visitPools((AsmModulePool pool) -> {
-                    return pool.getTransformedResourceFiles().getResourceFile(res);
-                });
-            }
-
-        }
-
-        @Override
-        public AsmPool.WritableClassPool getTransformedClasses() {
-            return new GlobalWritableClassPool();
-        }
-
-        @Override
-        public AsmPool.WritableResourcePool getTransformedResourceFiles() {
-            return new GlobalWritableResourcePool();
-        }
-
-        @Override
-        public void setSorter(AsmPool.Sorter sorter) {
-            this.sorter = sorter;
-        }
-
-        @Override
-        public Collection<ModuleEntry> getClasses() {
-            List<ModuleEntry> all = new ArrayList<>();
-            visitAllPools((AsmModulePool pool) -> {
-                for (ModuleEntry rf : pool.getClasses()) {
-                    all.add(rf);
-                }
-            });
-            return all;
-        }
-
-        @Override
-        public Collection<ModuleEntry> getResourceFiles() {
-            List<ModuleEntry> all = new ArrayList<>();
-            visitAllPools((AsmModulePool pool) -> {
-                for (ModuleEntry rf : pool.getResourceFiles()) {
-                    all.add(rf);
-                }
-            });
-            return all;
-        }
-
-        @Override
-        public AsmPool.ResourceFile getResourceFile(String binaryName) {
-            return visitPools((AsmModulePool pool) -> {
-                return pool.getResourceFile(binaryName);
-            });
-        }
-
-        @Override
-        public ClassReader getClassReader(String binaryName) {
-            return visitPoolsEx((AsmModulePool pool) -> {
-                return pool.getClassReader(binaryName);
-            });
-        }
-
-        @Override
-        public ResourceFile getResourceFile(ModuleEntry res) {
-            return visitPools((AsmModulePool pool) -> {
-                return pool.getResourceFile(res);
-            });
-        }
-
-        @Override
-        public ClassReader getClassReader(ModuleEntry res) {
-            return visitPoolsEx((AsmModulePool pool) -> {
-                return pool.getClassReader(res);
-            });
-        }
-
-        @Override
-        public void visitClassReaders(AsmPool.ClassReaderVisitor visitor) {
-            visitAllPoolsEx((AsmModulePool pool) -> {
-                pool.visitClassReaders(visitor);
-            });
-        }
-
-        @Override
-        public void visitResourceFiles(AsmPool.ResourceFileVisitor visitor) {
-            visitAllPoolsEx((AsmModulePool pool) -> {
-                pool.visitResourceFiles(visitor);
-            });
-        }
-
-        @Override
-        public void fillOutputResources(ModulePool outputResources) {
-            AsmPools.this.fillOutputResources(outputResources);
-        }
-
-        @Override
-        public void addPackageModuleMapping(String pkg, String module) {
-            AsmModulePool p = pools.get(module);
-            if (p == null) {
-                throw new PluginException("Unknown module " + module);
-            }
-            p.addPackage(pkg);
-        }
-
-        @Override
-        public Set<String> getAccessiblePackages(String module) {
-            AsmModulePool p = pools.get(module);
-            if (p == null) {
-                return null;
-            }
-            ModuleDescriptor desc = p.getDescriptor();
-            Set<String> packages = new HashSet<>();
-            packages.addAll(p.getAllPackages());
-
-            // Retrieve direct dependencies and indirect ones (public)
-            Set<String> modules = new HashSet<>();
-            for (Requires req : desc.requires()) {
-                modules.add(req.name());
-                addAllRequirePublicModules(req.name(), modules);
-            }
-            // Add exported packages of readable modules
-            for (String readable : modules) {
-                AsmModulePool mp = pools.get(readable);
-                if (mp != null) {
-                    for (Exports e : mp.getDescriptor().exports()) {
-                        // exported to all or to the targeted module
-                        if (e.targets().isEmpty() || e.targets().contains(module)) {
-                            packages.add(e.source().replaceAll("\\.", "/"));
-                        }
-                    }
-
-                }
-            }
-            return packages;
-        }
-
-        private void addAllRequirePublicModules(String module, Set<String> modules) {
-            AsmModulePool p = pools.get(module);
-            if (p != null) {
-                for (Requires req : p.getDescriptor().requires()) {
-                    if (req.modifiers().contains(PUBLIC)) {
-                        modules.add(req.name());
-                        addAllRequirePublicModules(req.name(), modules);
-                    }
-                }
-            }
-        }
-
-    }
-
-    private interface VoidPoolVisitor {
-
-        void visit(AsmModulePool pool);
-    }
-
-    private interface VoidPoolVisitorEx {
-
-        void visit(AsmModulePool pool);
-    }
-
-    private interface RetPoolVisitor<P> {
-
-        P visit(AsmModulePool pool);
-    }
-
-    private final Map<String, AsmModulePool> pools = new LinkedHashMap<>();
-    private final AsmModulePool[] poolsArray;
-    private final AsmGlobalPoolImpl global;
-
-    private ModuleSorter moduleSorter;
-
-    /**
-     * A new Asm pools.
-     *
-     * @param inputResources The raw resources to build the pool from.
-     */
-    public AsmPools(ModulePool inputResources) {
-        Objects.requireNonNull(inputResources);
-        Map<String, ModulePool> resPools = new LinkedHashMap<>();
-        Map<String, ModuleDescriptor> descriptors = new HashMap<>();
-        inputResources.entries().forEach(res -> {
-            ModulePool p = resPools.get(res.getModule());
-            if (p == null) {
-                p = new ModulePoolImpl(inputResources.getByteOrder(),
-                        ((ModulePoolImpl)inputResources).getStringTable());
-                resPools.put(res.getModule(), p);
-            }
-            if (res.getPath().endsWith("module-info.class")) {
-                ByteBuffer bb = ByteBuffer.wrap(res.getBytes());
-                ModuleDescriptor descriptor = ModuleDescriptor.read(bb);
-                descriptors.put(res.getModule(), descriptor);
-            }
-            p.add(res);
-        });
-        poolsArray = new AsmModulePool[resPools.size()];
-        int i = 0;
-
-        for (Entry<String, ModulePool> entry : resPools.entrySet()) {
-            ModuleDescriptor descriptor = descriptors.get(entry.getKey());
-            if (descriptor == null) {
-                throw new PluginException("module-info.class not found for " + entry.getKey() + " module");
-            }
-            AsmModulePool p = new AsmPoolImpl(entry.getValue(),
-                    entry.getKey(), this, descriptor);
-            pools.put(entry.getKey(), p);
-            poolsArray[i] = p;
-            i += 1;
-        }
-        global = new AsmGlobalPoolImpl();
-    }
-
-    /**
-     * The pool containing all classes and other resources.
-     *
-     * @return The global pool
-     */
-    public AsmGlobalPool getGlobalPool() {
-        return global;
-    }
-
-    /**
-     * A pool for a given module
-     *
-     * @param name The module name
-     * @return The pool that contains content of the passed module or null if
-     * the module doesn't exist.
-     */
-    public AsmModulePool getModulePool(String name) {
-        Objects.requireNonNull(name);
-        return pools.get(name);
-    }
-
-    /**
-     * The array of module pools.
-     * @return The module pool array.
-     */
-    public AsmModulePool[] getModulePools() {
-        return poolsArray.clone();
-    }
-
-    /**
-     * Set a module sorter. Sorter is used when computing the output resources.
-     *
-     * @param moduleSorter The module sorter
-     */
-    public void setModuleSorter(ModuleSorter moduleSorter) {
-        Objects.requireNonNull(moduleSorter);
-        this.moduleSorter = moduleSorter;
-    }
-
-    /**
-     * Returns the pool of all the resources (transformed and unmodified). The
-     * input resources are replaced by the transformed ones. If a sorter has
-     * been set, it is used to sort in modules.
-     *
-     * @param outputResources The pool used to fill the jimage.
-     */
-    public void fillOutputResources(ModulePool outputResources) {
-        // First sort modules
-        List<String> modules = new ArrayList<>();
-        for (String k : pools.keySet()) {
-            modules.add(k);
-        }
-        if (moduleSorter != null) {
-            modules = moduleSorter.sort(modules);
-        }
-        ModulePool output = new ModulePoolImpl(outputResources.getByteOrder(),
-                ((ModulePoolImpl)outputResources).getStringTable());
-        for (String mn : modules) {
-            AsmPool pool = pools.get(mn);
-            pool.fillOutputResources(output);
-        }
-        sort(outputResources, output, global.sorter);
-    }
-
-    static void sort(ModulePool outputResources,
-            ModulePool transientOutput, Sorter sorter) {
-        if (sorter != null) {
-            List<String> order = sorter.sort(transientOutput);
-            for (String s : order) {
-                outputResources.add(transientOutput.findEntry(s).get());
-            }
-        } else {
-            transientOutput.entries().forEach(res-> {
-                outputResources.add(res);
-            });
-        }
-    }
-
-    private void visitFirstNonFailingPool(VoidPoolVisitorEx pv) {
-        boolean found = false;
-        for (Entry<String, AsmModulePool> entry : pools.entrySet()) {
-            try {
-                pv.visit(entry.getValue());
-                found = true;
-                break;
-            } catch (Exception ex) {
-                // XXX OK, try  another one.
-            }
-        }
-        if (!found) {
-            throw new PluginException("No module found");
-        }
-    }
-
-    private void visitAllPools(VoidPoolVisitor pv) {
-        for (Entry<String, AsmModulePool> entry : pools.entrySet()) {
-            pv.visit(entry.getValue());
-        }
-    }
-
-    private void visitAllPoolsEx(VoidPoolVisitorEx pv) {
-        for (Entry<String, AsmModulePool> entry : pools.entrySet()) {
-            pv.visit(entry.getValue());
-        }
-    }
-
-    private <P> P visitPoolsEx(RetPoolVisitor<P> pv) {
-        P p = null;
-        for (Entry<String, AsmModulePool> entry : pools.entrySet()) {
-            try {
-                p = pv.visit(entry.getValue());
-                if (p != null) {
-                    break;
-                }
-            } catch (Exception ex) {
-                // XXX OK, try  another one.
-            }
-        }
-        return p;
-    }
-
-    private <P> P visitPools(RetPoolVisitor<P> pv) {
-        P p = null;
-        for (Entry<String, AsmModulePool> entry : pools.entrySet()) {
-            try {
-                p = pv.visit(entry.getValue());
-                if (p != null) {
-                    break;
-                }
-            } catch (Exception ex) {
-                // XXX OK, try  another one.
-            }
-        }
-        return p;
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ControlFlow.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,516 +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.tools.jlink.internal.plugins.optim;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeSet;
-import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.internal.org.objectweb.asm.tree.analysis.Analyzer;
-import jdk.internal.org.objectweb.asm.tree.analysis.AnalyzerException;
-import jdk.internal.org.objectweb.asm.tree.analysis.BasicInterpreter;
-import jdk.internal.org.objectweb.asm.tree.analysis.BasicValue;
-
-/**
- * Split Java method onto a control flow.
- *
- */
-public final class ControlFlow {
-
-    /**
-     * A block of control
-     */
-    public static final class Block implements Comparable<Block> {
-
-        private final InstructionNode firstInstruction;
-        private final List<InstructionNode> instr = new ArrayList<>();
-        private final List<Block> reachable = new ArrayList<>();
-        private final List<Block> exceptionHandlers = new ArrayList<>();
-        private boolean isExceptionHandler;
-
-        private Block(InstructionNode firstInstruction) {
-            this.firstInstruction = firstInstruction;
-        }
-
-        @Override
-        public boolean equals(Object other) {
-            if (!(other instanceof Block)) {
-                return false;
-            }
-            Block b = (Block) other;
-            return firstInstruction.equals(b.firstInstruction);
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hashCode(this.firstInstruction);
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-            for (InstructionNode in : instr) {
-                builder.append(in).append(" ");
-            }
-            builder.append(" reachables: ");
-            for (Block r : reachable) {
-                builder.append(r.getFirstInstruction()).append(" ");
-            }
-            builder.append(" exception handlers: ");
-            for (Block r : exceptionHandlers) {
-                builder.append(r.getFirstInstruction()).append(" ");
-            }
-
-            return "block[" + getFirstInstruction() + "],ex:"
-                    + isExceptionHandler + ",  " + builder.toString();
-        }
-
-        /**
-         * @return the firstInstruction
-         */
-        public InstructionNode getFirstInstruction() {
-            return firstInstruction;
-        }
-
-        /**
-         * @return the instr
-         */
-        public List<InstructionNode> getInstructions() {
-            return Collections.unmodifiableList(instr);
-        }
-
-        /**
-         * @return the reachable
-         */
-        public List<Block> getReachableBlocks() {
-            return Collections.unmodifiableList(reachable);
-        }
-
-        /**
-         * @return the exceptionHandlers
-         */
-        public List<Block> getExceptionHandlerBlocks() {
-            return Collections.unmodifiableList(exceptionHandlers);
-        }
-
-        @Override
-        public int compareTo(Block t) {
-            return this.firstInstruction.index - t.firstInstruction.index;
-        }
-
-        public boolean isExceptionHandler() {
-            return isExceptionHandler;
-        }
-
-    }
-
-    private class ClosureBuilder {
-
-        private final Block root;
-
-        private ClosureBuilder(Block root) {
-            Objects.requireNonNull(root);
-            this.root = root;
-        }
-
-        private Set<Block> build() {
-            Set<Block> allReachable = new TreeSet<>();
-            addAll(root, allReachable);
-            // filter out the reachable from outside this graph
-            Iterator<Block> it = allReachable.iterator();
-            Set<Block> toExclude = new HashSet<>();
-            while (it.hasNext()) {
-                Block b = it.next();
-                for (Block ref : blocks) {
-                    if (!allReachable.contains(ref) && ref.reachable.contains(b)) {
-                        addAll(b, toExclude);
-                        break;
-                    }
-                }
-            }
-            //System.err.println("TO EXCLUDE:\n " + toExclude);
-            allReachable.removeAll(toExclude);
-            //System.err.println("CLOSURE:\n " + allReachable);
-            return Collections.unmodifiableSet(allReachable);
-        }
-
-        // Compute the set of blocks reachable from the current block
-        private void addAll(Block current, Set<Block> closure) {
-            Objects.requireNonNull(current);
-            closure.add(current);
-            for (Block ex : current.exceptionHandlers) {
-                Objects.requireNonNull(ex);
-                if (!closure.contains(ex)) {
-                    addAll(ex, closure);
-                }
-            }
-            for (Block r : current.reachable) {
-                Objects.requireNonNull(r);
-                if (!closure.contains(r)) {
-                    addAll(r, closure);
-                }
-            }
-
-        }
-    }
-
-    /**
-     * An instruction
-     */
-    public static final class InstructionNode {
-
-        private final int index;
-        private final List<InstructionNode> next = new ArrayList<>();
-        private final AbstractInsnNode instr;
-
-        private InstructionNode(int index, AbstractInsnNode instr) {
-            this.index = index;
-            this.instr = instr;
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (!(obj instanceof InstructionNode)) {
-                return false;
-            }
-            final InstructionNode other = (InstructionNode) obj;
-            return this.getIndex() == other.getIndex();
-        }
-
-        @Override
-        public int hashCode() {
-            return this.getIndex();
-        }
-
-        @Override
-        public String toString() {
-            return getIndex() + "(" + (getInstr().getOpcode() == - 1 ? -1
-                    : Integer.toHexString(getInstr().getOpcode())) + ")";
-        }
-
-        /**
-         * @return the index
-         */
-        public int getIndex() {
-            return index;
-        }
-
-        /**
-         * @return the instr
-         */
-        public AbstractInsnNode getInstr() {
-            return instr;
-        }
-
-    }
-
-    private final Map<Integer, Block> allBlocks;
-    private final List<Block> blocks = new ArrayList<>();
-
-    private ControlFlow(Map<Integer, Block> allBlocks) {
-        this.allBlocks = allBlocks;
-        for (Block b : allBlocks.values()) {
-            blocks.add(b);
-        }
-        Collections.sort(blocks);
-    }
-
-    public List<Block> getBlocks() {
-
-        return Collections.unmodifiableList(blocks);
-    }
-
-    public Block getBlock(int firstInstr) {
-        return allBlocks.get(firstInstr);
-    }
-
-    public static ControlFlow createControlFlow(String owner,
-            MethodNode method) throws Exception {
-
-        BlockBuilder bb = new BlockBuilder(owner, method);
-        return bb.build();
-    }
-
-    /**
-     * Return the set of blocks that are only reachable from this block For
-     * example, if b is an Exception handler, returns all the blocks reachable
-     * only from this handler
-     *
-     * @param b
-     * @return
-     */
-    public Set<Block> getClosure(Block b) {
-        return new ClosureBuilder(b).build();
-    }
-
-    private static final class BlockBuilder {
-
-        private InstructionNode root;
-        private final Map<Integer, InstructionNode> instructions = new HashMap<>();
-        private final Map<Integer, List<Integer>> handlers = new HashMap<>();
-        private final Map<Integer, Block> allBlocks = new HashMap<>();
-
-        private final String owner;
-        private final MethodNode method;
-
-        private BlockBuilder(String owner, MethodNode method) {
-            this.owner = owner;
-            this.method = method;
-        }
-
-        private void analyze() throws AnalyzerException {
-            Analyzer<BasicValue> analyzer = new Analyzer<BasicValue>(new BasicInterpreter()) {
-
-                @Override
-                protected boolean newControlFlowExceptionEdge(int insn,
-                        int successor) {
-                    List<Integer> lst = handlers.get(successor);
-                    if (lst == null) {
-                        lst = new ArrayList<>();
-                        handlers.put(successor, lst);
-                    }
-                    lst.add(insn);
-                    return true;
-                }
-
-                @Override
-                protected void newControlFlowEdge(int from,
-                        int to) {
-                    if (root == null) {
-                        root = new InstructionNode(from, method.instructions.get(from));
-                        instructions.put(from, root);
-                    }
-                    InstructionNode fromNode = instructions.get(from);
-                    if (fromNode == null) {
-                        fromNode = new InstructionNode(from, method.instructions.get(from));
-                        instructions.put(from, fromNode);
-                    }
-                    InstructionNode toNode = instructions.get(to);
-                    if (toNode == null) {
-                        toNode = new InstructionNode(to, method.instructions.get(to));
-                        instructions.put(to, toNode);
-                    }
-                    if (!fromNode.next.contains(toNode)) {
-                        fromNode.next.add(toNode);
-                    }
-
-                }
-            };
-            analyzer.analyze(owner, method);
-        }
-
-        private Block newBlock(InstructionNode firstInstruction) {
-            Objects.requireNonNull(firstInstruction);
-            Block b = new Block(firstInstruction);
-            allBlocks.put(firstInstruction.getIndex(), b);
-            return b;
-        }
-
-        private ControlFlow build() throws AnalyzerException {
-            analyze();
-            buildBlocks();
-            return new ControlFlow(allBlocks);
-        }
-
-        private void buildBlocks() {
-            List<Block> reachableBlocks = new ArrayList<>();
-            createBlocks(root, reachableBlocks);
-            List<Block> handlersBlocks = new ArrayList<>();
-            for (Entry<Integer, List<Integer>> entry : handlers.entrySet()) {
-                InstructionNode node = instructions.get(entry.getKey());
-                createBlocks(node, handlersBlocks);
-            }
-
-            // attach handler to try blocks
-            for (Entry<Integer, List<Integer>> entry : handlers.entrySet()) {
-                Block handlerBlock = allBlocks.get(entry.getKey());
-                handlerBlock.isExceptionHandler = true;
-                int startTry = entry.getValue().get(0);
-                Block tryBlock = allBlocks.get(startTry);
-                if (tryBlock == null) {
-                    // Need to find the block that contains the instruction and
-                    // make a new block
-                    Block split = null;
-                    for (Block b : allBlocks.values()) {
-                        Iterator<InstructionNode> it = b.instr.iterator();
-                        while (it.hasNext()) {
-                            InstructionNode in = it.next();
-                            if (split == null) {
-                                if (in.index == startTry) {
-                                    split = newBlock(in);
-                                    split.instr.add(in);
-                                    it.remove();
-                                }
-                            } else {
-                                split.instr.add(in);
-                                it.remove();
-                            }
-                        }
-                        if (split != null) {
-                            Iterator<Block> reachables = b.reachable.iterator();
-                            while (reachables.hasNext()) {
-                                Block r = reachables.next();
-                                split.reachable.add(r);
-                                reachables.remove();
-                            }
-                            b.reachable.add(split);
-                            break;
-                        }
-                    }
-                    if (split == null) {
-                        throw new RuntimeException("No try block for handler " + handlerBlock);
-                    }
-                    split.exceptionHandlers.add(handlerBlock);
-                } else {
-                    tryBlock.exceptionHandlers.add(handlerBlock);
-                }
-            }
-
-//            System.err.println("ALL BLOCKS FOUND");
-//            Iterator<Entry<Integer, Block>> blockIt0 = allBlocks.entrySet().iterator();
-//            while (blockIt0.hasNext()) {
-//                Block b = blockIt0.next().getValue();
-//                System.err.println(b);
-//            }
-            //compute real exception blocks, if an instruction is in another block, stop.
-            Iterator<Entry<Integer, Block>> blockIt = allBlocks.entrySet().iterator();
-            while (blockIt.hasNext()) {
-                Block b = blockIt.next().getValue();
-                Iterator<InstructionNode> in = b.instr.iterator();
-                boolean found = false;
-                while (in.hasNext()) {
-                    int i = in.next().getIndex();
-                    if (found) {
-                        in.remove();
-                    } else {
-                        if (startsWith(b, i, allBlocks.values())) {
-                            // Move it to reachable
-                            Block r = allBlocks.get(i);
-                            b.reachable.add(r);
-                            found = true;
-                            in.remove();
-                        } else {
-                        }
-                    }
-                }
-            }
-
-//            System.err.println("Reduced blocks");
-//            Iterator<Entry<Integer, Block>> blockIt1 = allBlocks.entrySet().iterator();
-//            while (blockIt1.hasNext()) {
-//                Block b = blockIt1.next().getValue();
-//                System.err.println(b);
-//            }
-        }
-
-        private boolean startsWith(Block block, int index, Collection<Block> reachableBlocks) {
-            for (Block b : reachableBlocks) {
-                if (b != block && !b.instr.isEmpty() && b.instr.get(0).getIndex() == index) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-        private static final class StackItem {
-
-            private final InstructionNode instr;
-            private final Block currentBlock;
-
-            private StackItem(InstructionNode instr, Block currentBlock) {
-                Objects.requireNonNull(instr);
-                Objects.requireNonNull(currentBlock);
-                this.instr = instr;
-                this.currentBlock = currentBlock;
-            }
-        }
-
-        /**
-         * This algorithm can't be recursive, possibly too much instructions in
-         * methods.
-         */
-        private void createBlocks(InstructionNode root, List<Block> blocks) {
-            final Stack<StackItem> stack = new Stack<>();
-            stack.push(new StackItem(root, newBlock(root)));
-            while (!stack.isEmpty()) {
-                final StackItem item = stack.pop();
-                final Block currentBlock = item.currentBlock;
-                final InstructionNode current = item.instr;
-                // loop
-                if (currentBlock.instr.contains(current)) {
-                    currentBlock.reachable.add(currentBlock);
-                    continue;
-                }
-                Block existing = allBlocks.get(current.index);
-                if (existing != null && existing != currentBlock) {
-                    currentBlock.reachable.add(existing);
-                    continue;
-                }
-                int previous = currentBlock.instr.size() > 0
-                        ? currentBlock.instr.get(currentBlock.instr.size() - 1).getIndex() : -1;
-                if (previous == -1 || current.getIndex() == previous + 1) {
-                    currentBlock.instr.add(current);
-                    if (current.next.isEmpty()) {
-                        blocks.add(currentBlock);
-                    } else {
-                        if (current.next.size() > 1) {
-                            blocks.add(currentBlock);
-                            for (InstructionNode n : current.next) {
-                                Block loop = allBlocks.get(n.index);
-                                if (loop == null) {
-                                    Block newBlock = newBlock(n);
-                                    currentBlock.reachable.add(newBlock);
-                                    stack.push(new StackItem(n, newBlock));
-                                } else { // loop
-                                    currentBlock.reachable.add(loop);
-                                }
-                            }
-                        } else {
-                            stack.push(new StackItem(current.next.get(0),
-                                    currentBlock));
-                        }
-                    }
-                } else { // to a new block...
-                    // Do nothing...
-                    blocks.add(currentBlock);
-                    Block newBlock = newBlock(current);
-                    currentBlock.reachable.add(newBlock);
-                    stack.push(new StackItem(current, newBlock));
-                }
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ForNameFolding.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +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.tools.jlink.internal.plugins.optim;
-
-import java.io.IOException;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.function.Consumer;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.internal.org.objectweb.asm.tree.ClassNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.tools.jlink.internal.plugins.OptimizationPlugin.MethodOptimizer;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.optim.ControlFlow.Block;
-import jdk.tools.jlink.internal.plugins.optim.ReflectionOptimizer.Data;
-import jdk.tools.jlink.internal.plugins.optim.ReflectionOptimizer.TypeResolver;
-
-
-/**
- * MethodOptimizer that removes Class.forName when possible.
- * WARNING: This code is experimental.
- * TODO: Need to check that the type is accessible prior to replace with a constant.
- */
-public class ForNameFolding implements MethodOptimizer {
-
-    private int numNotReplaced;
-    private int numReplacement;
-    private int numRemovedHandlers;
-    private int instructionsRemoved;
-
-    private Consumer<String> logger;
-
-    @Override
-    public boolean optimize(Consumer<String> logger, AsmPools pools,
-            AsmModulePool modulePool,
-            ClassNode cn, MethodNode m, TypeResolver resolver) throws Exception {
-        this.logger = logger;
-        Data data = ReflectionOptimizer.replaceWithClassConstant(cn, m, createResolver(resolver));
-        instructionsRemoved += data.removedInstructions();
-        numRemovedHandlers += data.removedHandlers().size();
-        for (Entry<String, Set<Block>> entry : data.removedHandlers().entrySet()) {
-            logRemoval(cn.name + "." + m.name + "removed block for " + entry.getKey()
-                    + " : " + entry.getValue());
-        }
-        return data.removedInstructions() > 0;
-    }
-
-    public TypeResolver createResolver(TypeResolver resolver) {
-        return (ClassNode cn, MethodNode mn, String type) -> {
-            ClassReader reader = resolver.resolve(cn, mn, type);
-            if (reader == null) {
-                logNotReplaced(type);
-            } else {
-                logReplaced(type);
-            }
-            return reader;
-        };
-    }
-
-    private void logReplaced(String type) {
-        numReplacement += 1;
-    }
-
-    private void logNotReplaced(String type) {
-        numNotReplaced += 1;
-        if (logger != null) {
-            logger.accept(type + " not resolved");
-        }
-    }
-
-    private void logRemoval(String content) {
-        numRemovedHandlers += 1;
-        if (logger != null) {
-            logger.accept(content);
-        }
-    }
-
-    @Override
-    public void close() throws IOException {
-        if (logger != null) {
-            logger.accept("Class.forName Folding results:\n " + numReplacement
-                    + " removed reflection. " + numRemovedHandlers
-                    + " removed exception handlers."
-                    + numNotReplaced + " types unknown. "
-                    + instructionsRemoved + " instructions removed\n");
-        }
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/ReflectionOptimizer.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +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.tools.jlink.internal.plugins.optim;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.Type;
-import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
-import jdk.internal.org.objectweb.asm.tree.ClassNode;
-import jdk.internal.org.objectweb.asm.tree.LabelNode;
-import jdk.internal.org.objectweb.asm.tree.LdcInsnNode;
-import jdk.internal.org.objectweb.asm.tree.LineNumberNode;
-import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.internal.org.objectweb.asm.tree.TryCatchBlockNode;
-import jdk.tools.jlink.internal.plugins.optim.ControlFlow.Block;
-
-/**
- * Implement the reflection optimization.
- */
-public class ReflectionOptimizer {
-
-    public static class Data {
-
-        private int removedInstructions;
-        private final Map<String, Set<Block>> removedHandlers = new HashMap<>();
-
-        private Data() {
-        }
-
-        public int removedInstructions() {
-            return removedInstructions;
-        }
-
-        public Map<String, Set<Block>> removedHandlers() {
-            return Collections.unmodifiableMap(removedHandlers);
-        }
-    }
-
-    public interface TypeResolver {
-
-        public ClassReader resolve(ClassNode cn, MethodNode m, String type);
-    }
-
-    public static Data replaceWithClassConstant(ClassNode cn, MethodNode m,
-            TypeResolver cch)
-            throws Exception {
-        Iterator<AbstractInsnNode> it = m.instructions.iterator();
-        LdcInsnNode insNode = null;
-        Map<LdcInsnNode, LdcInsnNode> replacement = new IdentityHashMap<>();
-        Data data = new Data();
-        while (it.hasNext()) {
-            AbstractInsnNode n = it.next();
-            if (n instanceof LdcInsnNode) {
-                LdcInsnNode ldc = (LdcInsnNode) n;
-                if (ldc.cst instanceof String) {
-                    insNode = ldc;
-                }
-            } else {
-                if (n instanceof MethodInsnNode && insNode != null) {
-                    MethodInsnNode met = (MethodInsnNode) n;
-                    if (met.name.equals("forName")
-                            && met.owner.equals("java/lang/Class")
-                            && met.desc.equals("(Ljava/lang/String;)Ljava/lang/Class;")) {
-                        // Can we load the type?
-                        Type type = null;
-                        String binaryName = insNode.cst.toString().replaceAll("\\.", "/");
-                        String unaryClassName = binaryName;
-                        int arrayIndex = binaryName.lastIndexOf("[");
-                        if (arrayIndex >= 0) {
-                            int objIndex = unaryClassName.indexOf("L");
-                            if (objIndex >= 0) {
-                                unaryClassName = unaryClassName.substring(objIndex + 1);
-                                unaryClassName = unaryClassName.substring(0,
-                                        unaryClassName.length() - 1);
-                            } else {
-                                //primitive, this is just fine.
-                                type = Type.getObjectType(binaryName);
-                            }
-                        }
-                        if (type == null) {
-                            if (cch.resolve(cn, m, unaryClassName) != null) {
-                                type = Type.getObjectType(binaryName);
-                            }
-                        }
-                        if (type != null) {
-                            replacement.put(insNode, new LdcInsnNode(type));
-                            it.remove();
-                            data.removedInstructions += 1;
-                        }
-                    } else {
-                        insNode = null;
-                    }
-                    // Virtual node, not taken into account
-                } else if (!(n instanceof LabelNode) && !(n instanceof LineNumberNode)) {
-                    insNode = null;
-                }
-            }
-        }
-        for (Map.Entry<LdcInsnNode, LdcInsnNode> entry : replacement.entrySet()) {
-            m.instructions.set(entry.getKey(), entry.getValue());
-        }
-        if (!replacement.isEmpty()) {
-            String[] types = {"java/lang/ClassNotFoundException"};
-            data.removedInstructions += deleteExceptionHandlers(cch, data, cn, m, types);
-
-        }
-        return data;
-    }
-
-    private static int deleteExceptionHandlers(TypeResolver cch, Data data,
-            ClassNode cn, MethodNode m, String[] exTypes)
-            throws Exception {
-        int instructionsRemoved = 0;
-        for (String ex : exTypes) {
-            ControlFlow f = ControlFlow.createControlFlow(cn.name, m);
-            List<Integer> removed = new ArrayList<>();
-            Set<ControlFlow.Block> blocksToRemove = new TreeSet<>();
-            Iterator<TryCatchBlockNode> it = m.tryCatchBlocks.iterator();
-            List<TryCatchBlockNode> tcbToRemove = new ArrayList<>();
-            while (it.hasNext()) {
-                TryCatchBlockNode bn = it.next();
-                if (bn.type == null
-                        || !bn.type.equals(ex) // An empty block
-                        || tcbToRemove.contains(bn)) {
-                    continue;
-                }
-                // Check that the handler is still required
-                if (!Utils.canThrowCheckedException(cch, cn, m, bn)) {
-                    // try to suppress it.
-                    int block = m.instructions.indexOf(bn.handler);
-                    ControlFlow.Block blockHandler = f.getBlock(block);
-                    if (blockHandler == null) {
-                        if (removed.contains(block)) {
-                            continue;
-                        } else {
-                            throw new Exception(cn.name
-                                    + ", no block for handler " + block);
-                        }
-                    }
-                    tcbToRemove.add(bn);
-                    // Don't delete block if shared (eg: ClassNotFoundException | NoSuchMethodException |
-                    Iterator<TryCatchBlockNode> it2 = m.tryCatchBlocks.iterator();
-                    boolean cont = false;
-                    while (it2.hasNext()) {
-                        TryCatchBlockNode bn2 = it2.next();
-                        if (bn2 != bn) {
-                            if (bn2.start.equals(bn.start)) {
-                                cont = true;
-                            }
-                        }
-                    }
-                    if (cont) {
-                        continue;
-                    }
-                    // An handler is a root, blocks that are only reachable by it
-                    // can be removed.
-                    Set<ControlFlow.Block> blocks = f.getClosure(blockHandler);
-                    StringBuilder sb = new StringBuilder();
-                    for (ControlFlow.Block b : blocks) {
-                        sb.append(b).append("\n");
-                        removed.add(b.getFirstInstruction().getIndex());
-                        // Remove Exception handler if the associated block has been removed
-                        for (TryCatchBlockNode tcb : m.tryCatchBlocks) {
-                            if (tcb != bn) {
-                                // An exception handler removed as a side effect.
-                                if (b.isExceptionHandler()
-                                        && b.getFirstInstruction().getInstr() == tcb.handler) {
-                                    tcbToRemove.add(tcb);
-                                }
-                            }
-                        }
-                    }
-                    blocksToRemove.addAll(blocks);
-
-                    data.removedHandlers.put(ex, blocks);
-
-                }
-            }
-
-            m.tryCatchBlocks.removeAll(tcbToRemove);
-
-            if (!blocksToRemove.isEmpty()) {
-                for (ControlFlow.Block b : blocksToRemove) {
-                    for (ControlFlow.InstructionNode ins : b.getInstructions()) {
-                        if (ins.getInstr().getOpcode() > 0) {
-                            instructionsRemoved += 1;
-                        }
-                    }
-                }
-                Utils.suppressBlocks(m, blocksToRemove);
-            }
-        }
-        return instructionsRemoved;
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/optim/Utils.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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.tools.jlink.internal.plugins.optim;
-
-import java.util.Iterator;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
-import jdk.internal.org.objectweb.asm.tree.ClassNode;
-import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.internal.org.objectweb.asm.tree.TryCatchBlockNode;
-
-/**
- * Optimization utility methods
- */
-public class Utils {
-
-    public static boolean canThrowCheckedException(ReflectionOptimizer.TypeResolver cch,
-            ClassNode classNode, MethodNode m, TryCatchBlockNode bn) throws Exception {
-        int istart = m.instructions.indexOf(bn.start);
-        int iend = m.instructions.indexOf(bn.end);
-        for (int i = istart; i < iend - 1; i++) {
-            AbstractInsnNode instr = m.instructions.get(i);
-            if (instr instanceof MethodInsnNode) {
-                MethodInsnNode meth = (MethodInsnNode) instr;
-                ClassReader reader = cch.resolve(classNode, m, meth.owner);
-                if (reader != null) {
-                    ClassNode cn = new ClassNode();
-                    reader.accept(cn, ClassReader.EXPAND_FRAMES);
-                    for (MethodNode method : cn.methods) {
-                        if (method.name.equals(meth.name)) {
-                            for (String e : method.exceptions) {
-                                if (e.equals(bn.type)) {
-                                    return true;
-                                }
-                            }
-                        }
-                    }
-                } else {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    public static void suppressBlocks(MethodNode m, Set<ControlFlow.Block> toRemove) throws Exception {
-        m.instructions.resetLabels();
-        Iterator<AbstractInsnNode> it = m.instructions.iterator();
-        while (it.hasNext()) {
-            AbstractInsnNode n = it.next();
-            Iterator<TryCatchBlockNode> handlers = m.tryCatchBlocks.iterator();
-            boolean cont = false;
-            // Do not delete instructions that are end of other try block.
-            while (handlers.hasNext()) {
-                TryCatchBlockNode handler = handlers.next();
-                if (handler.end == n) {
-                    cont = true;
-                }
-            }
-            if (cont) {
-                continue;
-            }
-
-            for (ControlFlow.Block b : toRemove) {
-                for (ControlFlow.InstructionNode ins : b.getInstructions()) {
-                    if (ins.getInstr() == n) {
-                        it.remove();
-                    }
-                }
-            }
-        }
-    }
-}
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/Plugin.java	Fri Jul 08 12:17:10 2016 -0700
@@ -107,24 +107,6 @@
     }
 
     /**
-     * The set of plugin names that must be located, within the stack of plugins,
-     * before this plugin.
-     * @return The set of names. By default this set is empty.
-     */
-    public default Set<String> isBefore() {
-        return Collections.emptySet();
-    }
-
-    /**
-     * The set of plugin names that must be located, within the stack of plugins,
-     * after this plugin.
-     * @return The set of names. By default this set is empty.
-     */
-    public default Set<String> isAfter() {
-        return Collections.emptySet();
-    }
-
-    /**
      * The plugin name.
      * @return The name.
      */
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,3 +1,28 @@
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
 main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
 
 main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002
@@ -21,8 +46,6 @@
 
 main.opt.endian=\  --endian <little|big>             \u751F\u6210\u3055\u308C\u305Fjimage (default:native)\u306E\u30D0\u30A4\u30C8\u9806
 
-main.opt.genbom=\  --genbom                          jlink\u60C5\u5831\u3092\u542B\u3080bom\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059
-
 main.opt.saveopts=\  --saveopts <filename>             \u6307\u5B9A\u306E\u30D5\u30A1\u30A4\u30EB\u306Bjlink\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4FDD\u5B58\u3057\u307E\u3059
 
 main.msg.bug=jlink\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3067\u91CD\u8907\u304C\u306A\u3044\u304B\u3092\u3054\u78BA\u8A8D\u306E\u3046\u3048\u3001Java Bug Database (http://bugreport.java.com/bugreport/)\u3067bug\u306E\u767B\u9332\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002\u30EC\u30DD\u30FC\u30C8\u306B\u306F\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u6B21\u306E\u8A3A\u65AD\u5185\u5BB9\u3092\u542B\u3081\u3066\u304F\u3060\u3055\u3044\u3002\u3054\u5354\u529B\u3042\u308A\u304C\u3068\u3046\u3054\u3056\u3044\u307E\u3059\u3002
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,3 +1,28 @@
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
+
 main.usage.summary=\u7528\u6CD5: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\u4F7F\u7528 --help \u53EF\u4EE5\u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
 
 main.usage=\u7528\u6CD5: {0} <options> --modulepath <modulepath> --addmods <mods> --output <path>\n\u53EF\u80FD\u7684\u9009\u9879\u5305\u62EC:
@@ -21,8 +46,6 @@
 
 main.opt.endian=\  --endian <little|big>             \u6240\u751F\u6210 jimage \u7684\u5B57\u8282\u987A\u5E8F (\u9ED8\u8BA4\u503C: native)
 
-main.opt.genbom=\  --genbom                          \u751F\u6210\u5305\u542B jlink \u4FE1\u606F\u7684 bom \u6587\u4EF6
-
 main.opt.saveopts=\  --saveopts <filename>             \u5C06 jlink \u9009\u9879\u4FDD\u5B58\u5728\u6307\u5B9A\u6587\u4EF6\u4E2D
 
 main.msg.bug=jlink \u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u5982\u679C\u5728 Java Bug Database (http://bugreport.java.com/bugreport/) \u4E2D\u6CA1\u6709\u627E\u5230\u8BE5\u9519\u8BEF, \u8BF7\u5728\u8BE5\u6570\u636E\u5E93\u4E2D\u5EFA\u7ACB Bug\u3002\u8BF7\u5728\u62A5\u544A\u4E2D\u9644\u4E0A\u60A8\u7684\u7A0B\u5E8F\u548C\u4EE5\u4E0B\u8BCA\u65AD\u4FE1\u606F\u3002\u8C22\u8C22\u3002
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -31,11 +31,10 @@
 Any number of <key>=<value> pairs can be passed.\n\
 del: is to delete the list of keys in release file.
 
-class-optim.argument=<all|forName-folding>[:log=<log file>]
+class-for-name.argument=
 
-class-optim.description=\
-Class optimization. Warning: This plugin is experimental.\n\
-An optional <log file> can be specified to log applied optimizations.
+class-for-name.description=\
+Class optimization: convert Class.forName calls to constant loads.
 
 compress.argument=<0|1|2>[:filter=<pattern-list>]
 
@@ -47,7 +46,6 @@
 An optional <pattern-list> filter can be specified to list the pattern of\n\
 files to be included.
 
-
 compact-cp.argument=<resource paths>
 
 compact-cp.description=Constant Pool strings sharing.\n\
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_ja.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,6 +1,31 @@
-main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe) <OPTIONS> <jmod-file>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
 
-main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe) <OPTIONS> <jmod-file>
+main.usage.summary=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe|hash) <OPTIONS> <jmod-file>\n\u4F7F\u7528\u53EF\u80FD\u306A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u30EA\u30B9\u30C8\u306B\u3064\u3044\u3066\u306F\u3001--help\u3092\u4F7F\u7528\u3057\u307E\u3059
+
+main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} (create|list|describe|hash) <OPTIONS> <jmod-file>
 
 error.prefix=\u30A8\u30E9\u30FC:
 warn.prefix=\u8B66\u544A:
@@ -8,6 +33,7 @@
 main.opt.mode.create=create    - \u65B0\u898F\u306Ejmod\u30A2\u30FC\u30AB\u30A4\u30D6\u3092\u4F5C\u6210\u3057\u307E\u3059
 main.opt.mode.list=list      - \u3059\u3079\u3066\u306E\u30A8\u30F3\u30C8\u30EA\u306E\u540D\u524D\u3092\u51FA\u529B\u3057\u307E\u3059
 main.opt.mode.describe=describe  - \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u8A73\u7D30\u3092\u51FA\u529B\u3057\u307E\u3059
+main.opt.mode.hash=hash      - \u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30CF\u30C3\u30B7\u30E5\u3092\u8A18\u9332\u3057\u307E\u3059\u3002
 
 main.opt.help=\u3053\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3057\u307E\u3059
 main.opt.version=\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831
@@ -15,9 +41,9 @@
 main.opt.libs=\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u306E\u5834\u6240
 main.opt.cmds=\u30CD\u30A4\u30C6\u30A3\u30D6\u30FB\u30B3\u30DE\u30F3\u30C9\u306E\u5834\u6240
 main.opt.config=\u30E6\u30FC\u30B6\u30FC\u304C\u7DE8\u96C6\u53EF\u80FD\u306A\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240
+main.opt.dry-run=\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u306E\u8A66\u9A13\u7684\u306A\u5B9F\u884C
 main.opt.exclude=PATTERN\u3068\u3057\u3066\u6307\u5B9A\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u9664\u5916\u3057\u307E\u3059
 main.opt.module-version= \u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3
-main.opt.modulepath=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9
 main.opt.main-class=\u30E1\u30A4\u30F3\u30FB\u30AF\u30E9\u30B9
 main.opt.main-class.arg=class-name
 main.opt.os-name=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u540D
@@ -26,18 +52,22 @@
 main.opt.os-arch.arg=os-arch
 main.opt.os-version=\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0\u30FB\u30B7\u30B9\u30C6\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3
 main.opt.os-version.arg=os-version
-main.opt.hash-dependencies=\u30D1\u30BF\u30FC\u30F3\u306B\u4E00\u81F4\u3057\u305F\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u3092\u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059
+main.opt.modulepath=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9
+main.opt.hash-modules=\u6307\u5B9A\u306E\u30D1\u30BF\u30FC\u30F3\u306B\u4E00\u81F4\u3057\u3001\u76F4\u63A5\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\u4F9D\u5B58\u3057\u3066\u3044\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u3067\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30E2\u30B8\u30E5\u30FC\u30EB\u3092\u7D50\u5408\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u3092\u8A08\u7B97\u304A\u3088\u3073\u8A18\u9332\u3057\u307E\u3059\u3002\u30CF\u30C3\u30B7\u30E5\u306F\u3001\u4F5C\u6210\u3055\u308C\u3066\u3044\u308BJMOD\u30D5\u30A1\u30A4\u30EB\u3001jmod hash\u30B3\u30DE\u30F3\u30C9\u3067\u6307\u5B9A\u3057\u305F\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D1\u30B9\u306EJMOD\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30E2\u30B8\u30E5\u30E9JAR\u306B\u8A18\u9332\u3055\u308C\u307E\u3059\u3002
+
 main.opt.cmdfile=\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059
 
-err.missing.mode=create\u3001list\u307E\u305F\u306Fdescribe\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-err.invalid.mode=\u30E2\u30FC\u30C9\u306Fcreate\u3001list\u307E\u305F\u306Fdescribe\u306E\u3044\u305A\u308C\u304B\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0}
+module.hashes.recorded=\u30E2\u30B8\u30E5\u30FC\u30EB{0}\u306E\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u307E\u3059
+
+err.missing.mode=create\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+err.invalid.mode=\u30E2\u30FC\u30C9\u306Fcreate\u3001list\u3001describe\u307E\u305F\u306Fhash\u306E\u3044\u305A\u308C\u304B\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0}
 err.classpath.must.be.specified=--class-path\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 err.jmod.must.be.specified=jmod-file\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 err.invalid.version=\u7121\u52B9\u306A\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3{0}
-err.output.must.be.specified:--output\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-err.mods.must.be.specified:--mods\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-err.modulepath.must.be.specified:\u4F9D\u5B58\u6027\u306E\u30CF\u30C3\u30B7\u30E5\u6642\u306B\u306F--module-path\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
-err.invalid.main-class:\u7121\u52B9\u306A\u30E1\u30A4\u30F3\u30AF\u30E9\u30B9\u540D: {0}
+err.output.must.be.specified=--output\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+err.mods.must.be.specified=--mods\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+err.modulepath.must.be.specified=\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u30CF\u30C3\u30B7\u30E5\u6642\u306B\u306F--module-path\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
+err.invalid.main-class=\u7121\u52B9\u306A\u30E1\u30A4\u30F3\u30AF\u30E9\u30B9\u540D: {0}
 err.path.not.found=\u30D1\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
 err.path.not.valid=\u7121\u52B9\u306A\u30D1\u30B9: {0}
 err.path.not.a.dir=\u30D1\u30B9\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {0}
@@ -48,5 +78,9 @@
 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
 err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2}
+err.invalid.dryrun.option=--dry-run\u306F\u30CF\u30C3\u30B7\u30E5\u30FB\u30E2\u30FC\u30C9\u3068\u4E00\u7DD2\u306B\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059
 err.module.descriptor.not.found=\u30E2\u30B8\u30E5\u30FC\u30EB\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
 warn.invalid.arg=\u7121\u52B9\u306A\u30AF\u30E9\u30B9\u540D\u307E\u305F\u306F\u30D1\u30B9\u540D\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0}
+warn.no.module.hashes=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u306B\u4F9D\u5B58\u3059\u308B\u30CF\u30C3\u30B7\u30E5\u306B\u5BFE\u3057\u3066\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+warn.module.resolution.fail=\u30CF\u30C3\u30B7\u30E5\u304C\u8A18\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}
+
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod_zh_CN.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,6 +1,31 @@
-main.usage.summary=\u7528\u6CD5: {0} (create|list|describe) <OPTIONS> <jmod-file>\n\u4F7F\u7528 --help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
+#
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  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.
+#
 
-main.usage=\u7528\u6CD5: {0} (create|list|describe) <OPTIONS> <jmod-file>
+main.usage.summary=\u7528\u6CD5: {0} (create|list|describe|hash) <\u9009\u9879> <jmod \u6587\u4EF6>\n\u4F7F\u7528 --help \u5217\u51FA\u53EF\u80FD\u7684\u9009\u9879
+
+main.usage=\u7528\u6CD5: {0} (create|list|describe|hash) <\u9009\u9879> <jmod \u6587\u4EF6>
 
 error.prefix=\u9519\u8BEF:
 warn.prefix=\u8B66\u544A:
@@ -8,6 +33,7 @@
 main.opt.mode.create=create    - \u521B\u5EFA\u65B0\u7684 jmod \u6863\u6848
 main.opt.mode.list=list      - \u8F93\u51FA\u6240\u6709\u6761\u76EE\u7684\u540D\u79F0
 main.opt.mode.describe=describe  - \u8F93\u51FA\u6A21\u5757\u8BE6\u7EC6\u4FE1\u606F
+main.opt.mode.hash=hash      - \u8BB0\u5F55\u7ED1\u5B9A\u6A21\u5757\u7684\u6563\u5217\u3002
 
 main.opt.help=\u8F93\u51FA\u6B64\u7528\u6CD5\u6D88\u606F
 main.opt.version=\u7248\u672C\u4FE1\u606F
@@ -15,9 +41,9 @@
 main.opt.libs=\u672C\u673A\u5E93\u7684\u4F4D\u7F6E
 main.opt.cmds=\u672C\u673A\u547D\u4EE4\u7684\u4F4D\u7F6E
 main.opt.config=\u7528\u6237\u53EF\u7F16\u8F91\u914D\u7F6E\u6587\u4EF6\u7684\u4F4D\u7F6E
+main.opt.dry-run=\u6563\u5217\u6A21\u5F0F\u7684\u6A21\u62DF\u8FD0\u884C
 main.opt.exclude=\u6392\u9664\u4EE5\u6A21\u5F0F\u6307\u5B9A\u7684\u6587\u4EF6
 main.opt.module-version= \u6A21\u5757\u7248\u672C
-main.opt.modulepath=\u6A21\u5757\u8DEF\u5F84
 main.opt.main-class=\u4E3B\u7C7B
 main.opt.main-class.arg=class-name
 main.opt.os-name=\u64CD\u4F5C\u7CFB\u7EDF\u540D\u79F0
@@ -26,18 +52,22 @@
 main.opt.os-arch.arg=os-arch
 main.opt.os-version=\u64CD\u4F5C\u7CFB\u7EDF\u7248\u672C
 main.opt.os-version.arg=os-version
-main.opt.hash-dependencies=\u8BA1\u7B97\u548C\u8BB0\u5F55\u6309\u6A21\u5F0F\u5339\u914D\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u7684\u6563\u5217
+main.opt.modulepath=\u6A21\u5757\u8DEF\u5F84
+main.opt.hash-modules=\u8BA1\u7B97\u548C\u8BB0\u5F55\u6563\u5217, \u4EE5\u5C06\u6253\u5305\u6A21\u5757\u7ED1\u5B9A\u5230\u4E0E\u6307\u5B9A\u6A21\u5F0F\u5339\u914D\u5E76\u76F4\u63A5\u6216\u95F4\u63A5\u4F9D\u8D56\u4E8E\u7684\u6A21\u5757\u3002\u6563\u5217\u8BB0\u5F55\u5728\u6240\u521B\u5EFA\u7684 JMOD \u6587\u4EF6\u4E2D, \u6216\u8005\u8BB0\u5F55\u5728 jmod hash \u547D\u4EE4\u6307\u5B9A\u7684\u6A21\u5757\u8DEF\u5F84\u7684 JMOD \u6587\u4EF6\u6216\u6A21\u5757\u5316 JAR \u4E2D\u3002
+
 main.opt.cmdfile=\u4ECE\u6307\u5B9A\u6587\u4EF6\u8BFB\u53D6\u9009\u9879
 
-err.missing.mode=\u5FC5\u987B\u6307\u5B9A\u521B\u5EFA, \u5217\u51FA\u6216\u63CF\u8FF0\u4E4B\u4E00
-err.invalid.mode=\u6A21\u5F0F\u5FC5\u987B\u4E3A\u521B\u5EFA, \u5217\u51FA\u6216\u63CF\u8FF0\u4E4B\u4E00: {0}
+module.hashes.recorded=\u6563\u5217\u8BB0\u5F55\u5728\u6A21\u5757 {0} \u4E2D
+
+err.missing.mode=\u5FC5\u987B\u6307\u5B9A\u521B\u5EFA, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00
+err.invalid.mode=\u6A21\u5F0F\u5FC5\u987B\u4E3A\u521B\u5EFA, \u5217\u51FA, \u63CF\u8FF0\u6216\u6563\u5217\u4E4B\u4E00: {0}
 err.classpath.must.be.specified=\u5FC5\u987B\u6307\u5B9A --class-path
 err.jmod.must.be.specified=\u5FC5\u987B\u6307\u5B9A jmod-file
 err.invalid.version=\u65E0\u6548\u7684\u6A21\u5757\u7248\u672C {0}
-err.output.must.be.specified:\u5FC5\u987B\u6307\u5B9A --output
-err.mods.must.be.specified:\u5FC5\u987B\u6307\u5B9A --mods
-err.modulepath.must.be.specified:\u5BF9\u88AB\u4F9D\u8D56\u5BF9\u8C61\u8FDB\u884C\u6563\u5217\u5904\u7406\u65F6\u5FC5\u987B\u6307\u5B9A --module-path
-err.invalid.main-class:\u65E0\u6548\u7684\u4E3B\u7C7B\u540D\u79F0: {0}
+err.output.must.be.specified=\u5FC5\u987B\u6307\u5B9A --output
+err.mods.must.be.specified=\u5FC5\u987B\u6307\u5B9A --mods
+err.modulepath.must.be.specified=\u5BF9\u6A21\u5757\u8FDB\u884C\u6563\u5217\u5904\u7406\u65F6\u5FC5\u987B\u6307\u5B9A --module-path
+err.invalid.main-class=\u65E0\u6548\u7684\u4E3B\u7C7B\u540D\u79F0: {0}
 err.path.not.found=\u627E\u4E0D\u5230\u8DEF\u5F84: {0}
 err.path.not.valid=\u65E0\u6548\u8DEF\u5F84: {0}
 err.path.not.a.dir=\u8DEF\u5F84\u5FC5\u987B\u4E3A\u76EE\u5F55: {0}
@@ -48,5 +78,9 @@
 err.unknown.option=\u672A\u77E5\u9009\u9879: {0}
 err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C
 err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2}
+err.invalid.dryrun.option=--dry-run \u53EA\u80FD\u7528\u4E8E\u6563\u5217\u6A21\u5F0F
 err.module.descriptor.not.found=\u627E\u4E0D\u5230\u6A21\u5757\u63CF\u8FF0\u7B26
 warn.invalid.arg=\u7C7B\u540D\u65E0\u6548\u6216\u8DEF\u5F84\u540D\u4E0D\u5B58\u5728: {0}
+warn.no.module.hashes=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: \u6CA1\u6709\u4E3A\u4F9D\u8D56\u4E8E {0} \u7684\u6563\u5217\u5904\u7406\u6307\u5B9A\u6A21\u5757
+warn.module.resolution.fail=\u672A\u8BB0\u5F55\u4EFB\u4F55\u6563\u5217: {0}
+
--- a/jdk/src/jdk.jlink/share/classes/module-info.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/module-info.java	Fri Jul 08 12:17:10 2016 -0700
@@ -39,9 +39,9 @@
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.StripNativeCommandsPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.OrderResourcesPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.DefaultCompressPlugin;
-    provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.OptimizationPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.ExcludeVMPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.IncludeLocalesPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.GenerateJLIClassesPlugin;
     provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.ReleaseInfoPlugin;
-}
+    provides jdk.tools.jlink.plugin.Plugin with jdk.tools.jlink.internal.plugins.ClassForNamePlugin;
+ }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,35 +72,121 @@
 public class JavaTimeSupplementary_ar extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimebuddhistlongEras = {
+        final String[] sharedQuarterNames = {
+            "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
+            "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
+            "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "\u0661",
+            "\u0662",
+            "\u0663",
+            "\u0664",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u0635",
+            "\u0645",
+        };
+
+        final String[] sharedDayNames = {
+            "\u0627\u0644\u0623\u062d\u062f",
+            "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
+            "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
+            "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
+            "\u0627\u0644\u062e\u0645\u064a\u0633",
+            "\u0627\u0644\u062c\u0645\u0639\u0629",
+            "\u0627\u0644\u0633\u0628\u062a",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u062d",
+            "\u0646",
+            "\u062b",
+            "\u0631",
+            "\u062e",
+            "\u062c",
+            "\u0633",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u0647\u0640",
+        };
+
+        final String[] sharedMonthNames = {
+            "\u0645\u062d\u0631\u0645",
+            "\u0635\u0641\u0631",
+            "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
+            "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
+            "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
+            "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
+            "\u0631\u062c\u0628",
+            "\u0634\u0639\u0628\u0627\u0646",
+            "\u0631\u0645\u0636\u0627\u0646",
+            "\u0634\u0648\u0627\u0644",
+            "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
+            "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
+            "",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE\u060c d MMMM\u060c y G",
+            "d MMMM\u060c y G",
+            "dd\u200f/MM\u200f/y G",
+            "d\u200f/M\u200f/y GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "BC",
             "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a",
         };
+
+        final String[] sharedJavaTimeShortEras = {
+            "\u0645",
+            "\u0645\u064a\u062c\u064a",
+            "\u062a\u064a\u0634\u0648",
+            "\u0634\u0648\u0648\u0627",
+            "\u0647\u064a\u0633\u064a",
+        };
+
+        final String[] sharedShortEras = {
+            "Before R.O.C.",
+            "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
+        };
+
+        final String[] sharedMonthAbbreviations = {
+            "\u064a\u0646\u0627\u064a\u0631",
+            "\u0641\u0628\u0631\u0627\u064a\u0631",
+            "\u0645\u0627\u0631\u0633",
+            "\u0623\u0628\u0631\u064a\u0644",
+            "\u0645\u0627\u064a\u0648",
+            "\u064a\u0648\u0646\u064a\u0648",
+            "\u064a\u0648\u0644\u064a\u0648",
+            "\u0623\u063a\u0633\u0637\u0633",
+            "\u0633\u0628\u062a\u0645\u0628\u0631",
+            "\u0623\u0643\u062a\u0648\u0628\u0631",
+            "\u0646\u0648\u0641\u0645\u0628\u0631",
+            "\u062f\u064a\u0633\u0645\u0628\u0631",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "\u0661",
-                    "\u0662",
-                    "\u0663",
-                    "\u0664",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a" },
             { "calendarname.gregorian",
@@ -138,11 +224,7 @@
             { "field.zone",
                 "\u0627\u0644\u062a\u0648\u0642\u064a\u062a" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE\u060c d MMMM\u060c y GGGG",
@@ -152,78 +234,17 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u0627\u0644\u0623\u062d\u062f",
-                    "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
-                    "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
-                    "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
-                    "\u0627\u0644\u062e\u0645\u064a\u0633",
-                    "\u0627\u0644\u062c\u0645\u0639\u0629",
-                    "\u0627\u0644\u0633\u0628\u062a",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNames",
-                new String[] {
-                    "\u0627\u0644\u0623\u062d\u062f",
-                    "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
-                    "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
-                    "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
-                    "\u0627\u0644\u062e\u0645\u064a\u0633",
-                    "\u0627\u0644\u062c\u0645\u0639\u0629",
-                    "\u0627\u0644\u0633\u0628\u062a",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u062d",
-                    "\u0646",
-                    "\u062b",
-                    "\u0631",
-                    "\u062e",
-                    "\u062c",
-                    "\u0633",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0647\u0640",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
-                new String[] {
-                    "\u0645\u062d\u0631\u0645",
-                    "\u0635\u0641\u0631",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
-                    "\u0631\u062c\u0628",
-                    "\u0634\u0639\u0628\u0627\u0646",
-                    "\u0631\u0645\u0636\u0627\u0646",
-                    "\u0634\u0648\u0627\u0644",
-                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
-                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNames",
-                new String[] {
-                    "\u0645\u062d\u0631\u0645",
-                    "\u0635\u0641\u0631",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649",
-                    "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629",
-                    "\u0631\u062c\u0628",
-                    "\u0634\u0639\u0628\u0627\u0646",
-                    "\u0631\u0645\u0636\u0627\u0646",
-                    "\u0634\u0648\u0627\u0644",
-                    "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629",
-                    "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNarrows",
                 new String[] {
                     "\u0661",
@@ -242,79 +263,29 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "\u0661",
-                    "\u0662",
-                    "\u0663",
-                    "\u0664",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u0647\u0640",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u0647\u0640",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u0647\u0640",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
                 new String[] {
                     "EEEE\u060c d MMMM\u060c y G",
@@ -324,31 +295,11 @@
                 }
             },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\u0645",
-                    "\u0645\u064a\u062c\u064a",
-                    "\u062a\u064a\u0634\u0648",
-                    "\u0634\u0648\u0648\u0627",
-                    "\u0647\u064a\u0633\u064a",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\u0645",
-                    "\u0645\u064a\u062c\u064a",
-                    "\u062a\u064a\u0634\u0648",
-                    "\u0634\u0648\u0648\u0627",
-                    "\u0647\u064a\u0633\u064a",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.long.Eras",
                 new String[] {
                     "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
@@ -356,13 +307,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE\u060c d MMMM\u060c y G",
-                    "d MMMM\u060c y G",
-                    "dd\u200f/MM\u200f/y G",
-                    "d\u200f/M\u200f/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u0642.\u0645",
@@ -370,11 +315,7 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE\u060c d MMMM\u060c y GGGG",
@@ -384,78 +325,17 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u0627\u0644\u0623\u062d\u062f",
-                    "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
-                    "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
-                    "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
-                    "\u0627\u0644\u062e\u0645\u064a\u0633",
-                    "\u0627\u0644\u062c\u0645\u0639\u0629",
-                    "\u0627\u0644\u0633\u0628\u062a",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNames",
-                new String[] {
-                    "\u0627\u0644\u0623\u062d\u062f",
-                    "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
-                    "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
-                    "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
-                    "\u0627\u0644\u062e\u0645\u064a\u0633",
-                    "\u0627\u0644\u062c\u0645\u0639\u0629",
-                    "\u0627\u0644\u0633\u0628\u062a",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u062d",
-                    "\u0646",
-                    "\u062b",
-                    "\u0631",
-                    "\u062e",
-                    "\u062c",
-                    "\u0633",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "\u064a\u0646\u0627\u064a\u0631",
-                    "\u0641\u0628\u0631\u0627\u064a\u0631",
-                    "\u0645\u0627\u0631\u0633",
-                    "\u0623\u0628\u0631\u064a\u0644",
-                    "\u0645\u0627\u064a\u0648",
-                    "\u064a\u0648\u0646\u064a\u0648",
-                    "\u064a\u0648\u0644\u064a\u0648",
-                    "\u0623\u063a\u0633\u0637\u0633",
-                    "\u0633\u0628\u062a\u0645\u0628\u0631",
-                    "\u0623\u0643\u062a\u0648\u0628\u0631",
-                    "\u0646\u0648\u0641\u0645\u0628\u0631",
-                    "\u062f\u064a\u0633\u0645\u0628\u0631",
-                    "",
-                }
-            },
+                sharedMonthAbbreviations },
             { "roc.MonthNames",
-                new String[] {
-                    "\u064a\u0646\u0627\u064a\u0631",
-                    "\u0641\u0628\u0631\u0627\u064a\u0631",
-                    "\u0645\u0627\u0631\u0633",
-                    "\u0623\u0628\u0631\u064a\u0644",
-                    "\u0645\u0627\u064a\u0648",
-                    "\u064a\u0648\u0646\u064a\u0648",
-                    "\u064a\u0648\u0644\u064a\u0648",
-                    "\u0623\u063a\u0633\u0637\u0633",
-                    "\u0633\u0628\u062a\u0645\u0628\u0631",
-                    "\u0623\u0643\u062a\u0648\u0628\u0631",
-                    "\u0646\u0648\u0641\u0645\u0628\u0631",
-                    "\u062f\u064a\u0633\u0645\u0628\u0631",
-                    "",
-                }
-            },
+                sharedMonthAbbreviations },
             { "roc.MonthNarrows",
                 new String[] {
                     "\u064a",
@@ -474,67 +354,23 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b",
-                    "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "\u0661",
-                    "\u0662",
-                    "\u0663",
-                    "\u0664",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0635",
-                    "\u0645",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_JO.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_JO.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,41 +72,27 @@
 public class JavaTimeSupplementary_ar_JO extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedMonthNames = {
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0634\u0628\u0627\u0637",
+            "\u0622\u0630\u0627\u0631",
+            "\u0646\u064a\u0633\u0627\u0646",
+            "\u0623\u064a\u0627\u0631",
+            "\u062d\u0632\u064a\u0631\u0627\u0646",
+            "\u062a\u0645\u0648\u0632",
+            "\u0622\u0628",
+            "\u0623\u064a\u0644\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "",
+        };
+
         return new Object[][] {
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
                 new String[] {
                     "\u0643",
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_LB.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_LB.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,41 +72,27 @@
 public class JavaTimeSupplementary_ar_LB extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedMonthNames = {
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0634\u0628\u0627\u0637",
+            "\u0622\u0630\u0627\u0631",
+            "\u0646\u064a\u0633\u0627\u0646",
+            "\u0623\u064a\u0627\u0631",
+            "\u062d\u0632\u064a\u0631\u0627\u0646",
+            "\u062a\u0645\u0648\u0632",
+            "\u0622\u0628",
+            "\u0623\u064a\u0644\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "",
+        };
+
         return new Object[][] {
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
                 new String[] {
                     "\u0643",
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_SY.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ar_SY.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,41 +72,27 @@
 public class JavaTimeSupplementary_ar_SY extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedMonthNames = {
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0634\u0628\u0627\u0637",
+            "\u0622\u0630\u0627\u0631",
+            "\u0646\u064a\u0633\u0627\u0646",
+            "\u0623\u064a\u0627\u0631",
+            "\u062d\u0632\u064a\u0631\u0627\u0646",
+            "\u062a\u0645\u0648\u0632",
+            "\u0622\u0628",
+            "\u0623\u064a\u0644\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
+            "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
+            "",
+        };
+
         return new Object[][] {
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0634\u0628\u0627\u0637",
-                    "\u0622\u0630\u0627\u0631",
-                    "\u0646\u064a\u0633\u0627\u0646",
-                    "\u0623\u064a\u0627\u0631",
-                    "\u062d\u0632\u064a\u0631\u0627\u0646",
-                    "\u062a\u0645\u0648\u0632",
-                    "\u0622\u0628",
-                    "\u0623\u064a\u0644\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
-                    "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
                 new String[] {
                     "\u0643",
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_be.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_be.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,91 @@
 public class JavaTimeSupplementary_be extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1-\u0448\u044b \u043a\u0432.",
+            "2-\u0433\u0456 \u043a\u0432.",
+            "3-\u0446\u0456 \u043a\u0432.",
+            "4-\u0442\u044b \u043a\u0432.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u0434\u0430 \u043f\u0430\u045e\u0434\u043d\u044f",
+            "\u043f\u0430\u0441\u043b\u044f \u043f\u0430\u045e\u0434\u043d\u044f",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d.M.y GGGG",
+            "d.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u043d\u0434",
+            "\u043f\u043d",
+            "\u0430\u045e",
+            "\u0441\u0440",
+            "\u0447\u0446",
+            "\u043f\u0442",
+            "\u0441\u0431",
+        };
+
+        final String[] sharedDayNames = {
+            "\u043d\u044f\u0434\u0437\u0435\u043b\u044f",
+            "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a",
+            "\u0430\u045e\u0442\u043e\u0440\u0430\u043a",
+            "\u0441\u0435\u0440\u0430\u0434\u0430",
+            "\u0447\u0430\u0446\u0432\u0435\u0440",
+            "\u043f\u044f\u0442\u043d\u0456\u0446\u0430",
+            "\u0441\u0443\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u043d",
+            "\u043f",
+            "\u0430",
+            "\u0441",
+            "\u0447",
+            "\u043f",
+            "\u0441",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH.mm.ss zzzz",
+            "HH.mm.ss z",
+            "HH.mm.ss",
+            "HH.mm",
+        };
+
+        final String[] sharedAbbreviatedAmPmMarkers = {
+            "\u0440\u0430\u043d\u0456\u0446\u044b",
+            "\u0432\u0435\u0447\u0430\u0440\u0430",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "\u0440\u0430\u043d.",
+            "\u0432\u0435\u0447.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d.M.y G",
+            "d.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432.",
-                    "2-\u0433\u0456 \u043a\u0432.",
-                    "3-\u0446\u0456 \u043a\u0432.",
-                    "4-\u0442\u044b \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0431\u0443\u0434\u044b\u0439\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" },
             { "calendarname.gregorian",
@@ -124,96 +192,25 @@
             { "field.zone",
                 "\u0447\u0430\u0441\u0430\u0432\u044b \u043f\u043e\u044f\u0441" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u0434\u0430 \u043f\u0430\u045e\u0434\u043d\u044f",
-                    "\u043f\u0430\u0441\u043b\u044f \u043f\u0430\u045e\u0434\u043d\u044f",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0434",
-                    "\u043f\u043d",
-                    "\u0430\u045e",
-                    "\u0441\u0440",
-                    "\u0447\u0446",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u043d\u044f\u0434\u0437\u0435\u043b\u044f",
-                    "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a",
-                    "\u0430\u045e\u0442\u043e\u0440\u0430\u043a",
-                    "\u0441\u0435\u0440\u0430\u0434\u0430",
-                    "\u0447\u0430\u0446\u0432\u0435\u0440",
-                    "\u043f\u044f\u0442\u043d\u0456\u0446\u0430",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0430",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432.",
-                    "2-\u0433\u0456 \u043a\u0432.",
-                    "3-\u0446\u0456 \u043a\u0432.",
-                    "4-\u0442\u044b \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0440\u0430\u043d\u0456\u0446\u044b",
-                    "\u0432\u0435\u0447\u0430\u0440\u0430",
-                }
-            },
+                sharedAbbreviatedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0440\u0430\u043d.",
-                    "\u0432\u0435\u0447.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "EEEE, d MMMM y G",
@@ -223,21 +220,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u0434\u0430 \u043d\u0430\u0448\u0430\u0439 \u044d\u0440\u044b",
@@ -245,13 +230,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u0434\u0430 \u043d.\u0435.",
@@ -259,52 +238,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u0434\u0430 \u043f\u0430\u045e\u0434\u043d\u044f",
-                    "\u043f\u0430\u0441\u043b\u044f \u043f\u0430\u045e\u0434\u043d\u044f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0434",
-                    "\u043f\u043d",
-                    "\u0430\u045e",
-                    "\u0441\u0440",
-                    "\u0447\u0446",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u043d\u044f\u0434\u0437\u0435\u043b\u044f",
-                    "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a",
-                    "\u0430\u045e\u0442\u043e\u0440\u0430\u043a",
-                    "\u0441\u0435\u0440\u0430\u0434\u0430",
-                    "\u0447\u0430\u0446\u0432\u0435\u0440",
-                    "\u043f\u044f\u0442\u043d\u0456\u0446\u0430",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0430",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u0441\u0442\u0443",
@@ -357,41 +299,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432.",
-                    "2-\u0433\u0456 \u043a\u0432.",
-                    "3-\u0446\u0456 \u043a\u0432.",
-                    "4-\u0442\u044b \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0440\u0430\u043d\u0456\u0446\u044b",
-                    "\u0432\u0435\u0447\u0430\u0440\u0430",
-                }
-            },
+                sharedAbbreviatedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0440\u0430\u043d.",
-                    "\u0432\u0435\u0447.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_bg.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_bg.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,81 @@
 public class JavaTimeSupplementary_bg extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1. \u0442\u0440\u0438\u043c.",
+            "2. \u0442\u0440\u0438\u043c.",
+            "3. \u0442\u0440\u0438\u043c.",
+            "4. \u0442\u0440\u0438\u043c.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+            "2. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+            "3. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+            "4. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u043f\u0440.\u043e\u0431.",
+            "\u0441\u043b.\u043e\u0431.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y '\u0433'. GGGG",
+            "d MMMM y '\u0433'. GGGG",
+            "d.MM.y '\u0433'. GGGG",
+            "d.MM.yy GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u043d\u0434",
+            "\u043f\u043d",
+            "\u0432\u0442",
+            "\u0441\u0440",
+            "\u0447\u0442",
+            "\u043f\u0442",
+            "\u0441\u0431",
+        };
+
+        final String[] sharedDayNames = {
+            "\u043d\u0435\u0434\u0435\u043b\u044f",
+            "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
+            "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
+            "\u0441\u0440\u044f\u0434\u0430",
+            "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a",
+            "\u043f\u0435\u0442\u044a\u043a",
+            "\u0441\u044a\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u043d",
+            "\u043f",
+            "\u0432",
+            "\u0441",
+            "\u0447",
+            "\u043f",
+            "\u0441",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y '\u0433'. G",
+            "d MMMM y '\u0433'. G",
+            "d.MM.y '\u0433'. G",
+            "d.MM.yy G",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c.",
-                    "2. \u0442\u0440\u0438\u043c.",
-                    "3. \u0442\u0440\u0438\u043c.",
-                    "4. \u0442\u0440\u0438\u043c.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "2. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "3. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "4. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0431\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
             { "calendarname.gregorian",
@@ -124,52 +182,15 @@
             { "field.zone",
                 "\u0447\u0430\u0441\u043e\u0432\u0430 \u0437\u043e\u043d\u0430" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. GGGG",
-                    "d MMMM y '\u0433'. GGGG",
-                    "d.MM.y '\u0433'. GGGG",
-                    "d.MM.yy GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0434",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u043b\u044f",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u044f\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a",
-                    "\u043f\u0435\u0442\u044a\u043a",
-                    "\u0441\u044a\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0432",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "\u043c\u0443\u0445\u0430\u0440\u0430\u043c",
@@ -188,73 +209,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c.",
-                    "2. \u0442\u0440\u0438\u043c.",
-                    "3. \u0442\u0440\u0438\u043c.",
-                    "4. \u0442\u0440\u0438\u043c.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "2. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "3. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "4. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d.MM.y '\u0433'. G",
-                    "d.MM.yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d.MM.y '\u0433'. G",
-                    "d.MM.yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d.MM.y '\u0433'. G",
-                    "d.MM.yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u043f\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430",
@@ -262,13 +231,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d.MM.y '\u0433'. G",
-                    "d.MM.yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u043f\u0440.\u043d.\u0435.",
@@ -276,52 +239,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. GGGG",
-                    "d MMMM y '\u0433'. GGGG",
-                    "d.MM.y '\u0433'. GGGG",
-                    "d.MM.yy GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0434",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u043b\u044f",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u044f\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a",
-                    "\u043f\u0435\u0442\u044a\u043a",
-                    "\u0441\u044a\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0432",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u044f\u043d\u0443",
@@ -374,41 +300,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c.",
-                    "2. \u0442\u0440\u0438\u043c.",
-                    "3. \u0442\u0440\u0438\u043c.",
-                    "4. \u0442\u0440\u0438\u043c.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "2. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "3. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                    "4. \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440.\u043e\u0431.",
-                    "\u0441\u043b.\u043e\u0431.",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ca.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ca.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_ca extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1T",
+            "2T",
+            "3T",
+            "4T",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1r trimestre",
+            "2n trimestre",
+            "3r trimestre",
+            "4t trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a. m.",
+            "p. m.",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dg.",
+            "dl.",
+            "dt.",
+            "dc.",
+            "dj.",
+            "dv.",
+            "ds.",
+        };
+
+        final String[] sharedDayNames = {
+            "diumenge",
+            "dilluns",
+            "dimarts",
+            "dimecres",
+            "dijous",
+            "divendres",
+            "dissabte",
+        };
+
+        final String[] sharedDayNarrows = {
+            "dg",
+            "dl",
+            "dt",
+            "dc",
+            "dj",
+            "dv",
+            "ds",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "BC",
+            "eB",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM 'de' y G",
+            "d MMMM 'de' y G",
+            "d/M/y G",
+            "d/M/yy GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1r trimestre",
-                    "2n trimestre",
-                    "3r trimestre",
-                    "4t trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "calendari budista" },
             { "calendarname.gregorian",
@@ -124,11 +180,7 @@
             { "field.zone",
                 "fus horari" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE d MMMM 'de' y GGGG",
@@ -138,82 +190,21 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dg.",
-                    "dl.",
-                    "dt.",
-                    "dc.",
-                    "dj.",
-                    "dv.",
-                    "ds.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "diumenge",
-                    "dilluns",
-                    "dimarts",
-                    "dimecres",
-                    "dijous",
-                    "divendres",
-                    "dissabte",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "dg",
-                    "dl",
-                    "dt",
-                    "dc",
-                    "dj",
-                    "dv",
-                    "ds",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1r trimestre",
-                    "2n trimestre",
-                    "3r trimestre",
-                    "4t trimestre",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "EEEE, dd MMMM y G",
@@ -223,33 +214,13 @@
                 }
             },
             { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "eB",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                new String[] {
-                    "BC",
-                    "eB",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM 'de' y G",
-                    "d MMMM 'de' y G",
-                    "d/M/y G",
-                    "d/M/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM 'de' y G",
-                    "d MMMM 'de' y G",
-                    "d/M/y G",
-                    "d/M/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "abans de Crist",
@@ -271,11 +242,7 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE d MMMM 'de' y GGGG",
@@ -285,38 +252,11 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dg.",
-                    "dl.",
-                    "dt.",
-                    "dc.",
-                    "dj.",
-                    "dv.",
-                    "ds.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "diumenge",
-                    "dilluns",
-                    "dimarts",
-                    "dimecres",
-                    "dijous",
-                    "divendres",
-                    "dissabte",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "dg",
-                    "dl",
-                    "dt",
-                    "dc",
-                    "dj",
-                    "dv",
-                    "ds",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "gen.",
@@ -369,41 +309,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1r trimestre",
-                    "2n trimestre",
-                    "3r trimestre",
-                    "4t trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_cs.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_cs.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,15 +72,84 @@
 public class JavaTimeSupplementary_cs extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1. \u010dtvrtlet\u00ed",
+            "2. \u010dtvrtlet\u00ed",
+            "3. \u010dtvrtlet\u00ed",
+            "4. \u010dtvrtlet\u00ed",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "dop.",
+            "odp.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "d. M. y GGGG",
+            "dd.MM.yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "ne",
+            "po",
+            "\u00fat",
+            "st",
+            "\u010dt",
+            "p\u00e1",
+            "so",
+        };
+
+        final String[] sharedDayNames = {
+            "ned\u011ble",
+            "pond\u011bl\u00ed",
+            "\u00fater\u00fd",
+            "st\u0159eda",
+            "\u010dtvrtek",
+            "p\u00e1tek",
+            "sobota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "N",
+            "P",
+            "\u00da",
+            "S",
+            "\u010c",
+            "P",
+            "S",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d. MMMM y G",
+            "d. MMMM y G",
+            "d. M. y G",
+            "dd.MM.yy GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "P\u0159ed R. O. C.",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "1. \u010dtvrtlet\u00ed",
-                    "2. \u010dtvrtlet\u00ed",
-                    "3. \u010dtvrtlet\u00ed",
-                    "4. \u010dtvrtlet\u00ed",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Buddhistick\u00fd kalend\u00e1\u0159" },
             { "calendarname.gregorian",
@@ -116,134 +185,27 @@
             { "field.zone",
                 "\u010dasov\u00e9 p\u00e1smo" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. M. y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "ne",
-                    "po",
-                    "\u00fat",
-                    "st",
-                    "\u010dt",
-                    "p\u00e1",
-                    "so",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "ned\u011ble",
-                    "pond\u011bl\u00ed",
-                    "\u00fater\u00fd",
-                    "st\u0159eda",
-                    "\u010dtvrtek",
-                    "p\u00e1tek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "\u00da",
-                    "S",
-                    "\u010c",
-                    "P",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. \u010dtvrtlet\u00ed",
-                    "2. \u010dtvrtlet\u00ed",
-                    "3. \u010dtvrtlet\u00ed",
-                    "4. \u010dtvrtlet\u00ed",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. M. y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -251,13 +213,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. M. y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d. MMMM y G",
@@ -273,13 +229,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. M. y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "p\u0159.Kr.",
@@ -287,58 +237,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. M. y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "ne",
-                    "po",
-                    "\u00fat",
-                    "st",
-                    "\u010dt",
-                    "p\u00e1",
-                    "so",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "ned\u011ble",
-                    "pond\u011bl\u00ed",
-                    "\u00fater\u00fd",
-                    "st\u0159eda",
-                    "\u010dtvrtek",
-                    "p\u00e1tek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "\u00da",
-                    "S",
-                    "\u010c",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "P\u0159ed R. O. C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "led",
@@ -373,77 +282,22 @@
                     "",
                 }
             },
-            { "roc.MonthNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                    "5",
-                    "6",
-                    "7",
-                    "8",
-                    "9",
-                    "10",
-                    "11",
-                    "12",
-                    "",
-                }
-            },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. \u010dtvrtlet\u00ed",
-                    "2. \u010dtvrtlet\u00ed",
-                    "3. \u010dtvrtlet\u00ed",
-                    "4. \u010dtvrtlet\u00ed",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "P\u0159ed R. O. C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "odp.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "P\u0159ed R. O. C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "P\u0159ed R. O. C.",
-                    "",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_da.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_da.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,91 @@
 public class JavaTimeSupplementary_da extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "1. kvt.",
+            "2. kvt.",
+            "3. kvt.",
+            "4. kvt.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. kvartal",
+            "2. kvartal",
+            "3. kvartal",
+            "4. kvartal",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "d. MMM y GGGG",
+            "d/M/y",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "s\u00f8n.",
+            "man.",
+            "tir.",
+            "ons.",
+            "tor.",
+            "fre.",
+            "l\u00f8r.",
+        };
+
+        final String[] sharedDayNames = {
+            "s\u00f8ndag",
+            "mandag",
+            "tirsdag",
+            "onsdag",
+            "torsdag",
+            "fredag",
+            "l\u00f8rdag",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "T",
+            "O",
+            "T",
+            "F",
+            "L",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH.mm.ss zzzz",
+            "HH.mm.ss z",
+            "HH.mm.ss",
+            "HH.mm",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d. MMMM y G",
+            "d. MMMM y G",
+            "d. MMM y G",
+            "d/M/y",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "f.Kr.",
             "e.Kr.",
         };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1. kvt.",
-                    "2. kvt.",
-                    "3. kvt.",
-                    "4. kvt.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "buddhistisk kalender" },
             { "calendarname.gregorian",
@@ -136,122 +200,23 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d/M/y",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "s\u00f8n.",
-                    "man.",
-                    "tir.",
-                    "ons.",
-                    "tor.",
-                    "fre.",
-                    "l\u00f8r.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "s\u00f8ndag",
-                    "mandag",
-                    "tirsdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f8rdag",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1. kvt.",
-                    "2. kvt.",
-                    "3. kvt.",
-                    "4. kvt.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -259,86 +224,25 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d/M/y",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "s\u00f8n.",
-                    "man.",
-                    "tir.",
-                    "ons.",
-                    "tor.",
-                    "fre.",
-                    "l\u00f8r.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "s\u00f8ndag",
-                    "mandag",
-                    "tirsdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f8rdag",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -391,53 +295,19 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1. kvt.",
-                    "2. kvt.",
-                    "3. kvt.",
-                    "4. kvt.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_de.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_de.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,19 +72,87 @@
 public class JavaTimeSupplementary_de extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterNames = {
+            "1. Quartal",
+            "2. Quartal",
+            "3. Quartal",
+            "4. Quartal",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "vorm.",
+            "nachm.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "dd.MM.y GGGG",
+            "dd.MM.yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "So.",
+            "Mo.",
+            "Di.",
+            "Mi.",
+            "Do.",
+            "Fr.",
+            "Sa.",
+        };
+
+        final String[] sharedDayNames = {
+            "Sonntag",
+            "Montag",
+            "Dienstag",
+            "Mittwoch",
+            "Donnerstag",
+            "Freitag",
+            "Samstag",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "D",
+            "M",
+            "D",
+            "F",
+            "S",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "vm.",
+            "nm.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d. MMMM y G",
+            "d. MMMM y G",
+            "dd.MM.y G",
+            "dd.MM.yy GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "v. Chr.",
             "n. Chr.",
         };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "1. Quartal",
-                    "2. Quartal",
-                    "3. Quartal",
-                    "4. Quartal",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Buddhistischer Kalender" },
             { "calendarname.gregorian",
@@ -120,134 +188,25 @@
             { "field.zone",
                 "Zeitzone" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "vorm.",
-                    "nachm.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "So.",
-                    "Mo.",
-                    "Di.",
-                    "Mi.",
-                    "Do.",
-                    "Fr.",
-                    "Sa.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Sonntag",
-                    "Montag",
-                    "Dienstag",
-                    "Mittwoch",
-                    "Donnerstag",
-                    "Freitag",
-                    "Samstag",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "D",
-                    "M",
-                    "D",
-                    "F",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. Quartal",
-                    "2. Quartal",
-                    "3. Quartal",
-                    "4. Quartal",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "vorm.",
-                    "nachm.",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "vm.",
-                    "nm.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -255,86 +214,27 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "vorm.",
-                    "nachm.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "So.",
-                    "Mo.",
-                    "Di.",
-                    "Mi.",
-                    "Do.",
-                    "Fr.",
-                    "Sa.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Sonntag",
-                    "Montag",
-                    "Dienstag",
-                    "Mittwoch",
-                    "Donnerstag",
-                    "Freitag",
-                    "Samstag",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "D",
-                    "M",
-                    "D",
-                    "F",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Jan.",
@@ -387,59 +287,19 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. Quartal",
-                    "2. Quartal",
-                    "3. Quartal",
-                    "4. Quartal",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "vorm.",
-                    "nachm.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "vm.",
-                    "nm.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_de_AT.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_de_AT.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_el.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_el.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,91 @@
 public class JavaTimeSupplementary_el extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "\u03a41",
+            "\u03a42",
+            "\u03a43",
+            "\u03a44",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+            "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+            "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+            "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u03c0.\u03bc.",
+            "\u03bc.\u03bc.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "d/M/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u039a\u03c5\u03c1",
+            "\u0394\u03b5\u03c5",
+            "\u03a4\u03c1\u03af",
+            "\u03a4\u03b5\u03c4",
+            "\u03a0\u03ad\u03bc",
+            "\u03a0\u03b1\u03c1",
+            "\u03a3\u03ac\u03b2",
+        };
+
+        final String[] sharedDayNames = {
+            "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
+            "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
+            "\u03a4\u03c1\u03af\u03c4\u03b7",
+            "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
+            "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
+            "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
+            "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u039a",
+            "\u0394",
+            "\u03a4",
+            "\u03a4",
+            "\u03a0",
+            "\u03a0",
+            "\u03a3",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "\u03c0\u03bc",
+            "\u03bc\u03bc",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "d/M/y GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "\u03a0\u03c1\u03b9\u03bd R.O.C.",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u03a41",
-                    "\u03a42",
-                    "\u03a43",
-                    "\u03a44",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" },
             { "calendarname.gregorian",
@@ -124,110 +192,27 @@
             { "field.zone",
                 "\u03b6\u03ce\u03bd\u03b7 \u03ce\u03c1\u03b1\u03c2" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u03c0.\u03bc.",
-                    "\u03bc.\u03bc.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/M/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u039a\u03c5\u03c1",
-                    "\u0394\u03b5\u03c5",
-                    "\u03a4\u03c1\u03af",
-                    "\u03a4\u03b5\u03c4",
-                    "\u03a0\u03ad\u03bc",
-                    "\u03a0\u03b1\u03c1",
-                    "\u03a3\u03ac\u03b2",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
-                    "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
-                    "\u03a4\u03c1\u03af\u03c4\u03b7",
-                    "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
-                    "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
-                    "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
-                    "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u039a",
-                    "\u0394",
-                    "\u03a4",
-                    "\u03a4",
-                    "\u03a0",
-                    "\u03a0",
-                    "\u03a3",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u03a41",
-                    "\u03a42",
-                    "\u03a43",
-                    "\u03a44",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u03c0.\u03bc.",
-                    "\u03bc.\u03bc.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u03c0\u03bc",
-                    "\u03bc\u03bc",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -235,13 +220,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d MMMM, y G",
@@ -257,13 +236,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u03c0.\u03a7.",
@@ -271,58 +244,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u03c0.\u03bc.",
-                    "\u03bc.\u03bc.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/M/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u039a\u03c5\u03c1",
-                    "\u0394\u03b5\u03c5",
-                    "\u03a4\u03c1\u03af",
-                    "\u03a4\u03b5\u03c4",
-                    "\u03a0\u03ad\u03bc",
-                    "\u03a0\u03b1\u03c1",
-                    "\u03a3\u03ac\u03b2",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
-                    "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
-                    "\u03a4\u03c1\u03af\u03c4\u03b7",
-                    "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
-                    "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
-                    "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
-                    "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u039a",
-                    "\u0394",
-                    "\u03a4",
-                    "\u03a4",
-                    "\u03a0",
-                    "\u03a0",
-                    "\u03a3",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u0399\u03b1\u03bd",
@@ -375,59 +307,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u03a41",
-                    "\u03a42",
-                    "\u03a43",
-                    "\u03a44",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                    "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u03c0.\u03bc.",
-                    "\u03bc.\u03bc.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u03c0\u03bc",
-                    "\u03bc\u03bc",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u03a0\u03c1\u03b9\u03bd R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_AU.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_AU.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,123 +72,100 @@
 public class JavaTimeSupplementary_en_AU extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "am",
+            "pm",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd/MM/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Sun.",
+            "Mon.",
+            "Tue.",
+            "Wed.",
+            "Thu.",
+            "Fri.",
+            "Sat.",
+        };
+
+        final String[] sharedDayNarrows = {
+            "Su.",
+            "M.",
+            "Tu.",
+            "W.",
+            "Th.",
+            "F.",
+            "Sa.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd/MM/y GGGGG",
+        };
+
+        final String[] sharedMonthNarrows = {
+            "Jan.",
+            "Feb.",
+            "Mar.",
+            "Apr.",
+            "May",
+            "Jun.",
+            "Jul.",
+            "Aug.",
+            "Sep.",
+            "Oct.",
+            "Nov.",
+            "Dec.",
+            "",
+        };
+
         return new Object[][] {
             { "field.dayperiod",
                 "am/pm" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Sun.",
-                    "Mon.",
-                    "Tue.",
-                    "Wed.",
-                    "Thu.",
-                    "Fri.",
-                    "Sat.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNarrows",
-                new String[] {
-                    "Su.",
-                    "M.",
-                    "Tu.",
-                    "W.",
-                    "Th.",
-                    "F.",
-                    "Sa.",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.japanese.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Sun.",
-                    "Mon.",
-                    "Tue.",
-                    "Wed.",
-                    "Thu.",
-                    "Fri.",
-                    "Sat.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNarrows",
-                new String[] {
-                    "Su.",
-                    "M.",
-                    "Tu.",
-                    "W.",
-                    "Th.",
-                    "F.",
-                    "Sa.",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "Jan.",
-                    "Feb.",
-                    "Mar.",
-                    "Apr.",
-                    "May",
-                    "Jun.",
-                    "Jul.",
-                    "Aug.",
-                    "Sep.",
-                    "Oct.",
-                    "Nov.",
-                    "Dec.",
-                    "",
-                }
-            },
+                sharedMonthNarrows },
             { "roc.MonthNarrows",
-                new String[] {
-                    "Jan.",
-                    "Feb.",
-                    "Mar.",
-                    "Apr.",
-                    "May",
-                    "Jun.",
-                    "Jul.",
-                    "Aug.",
-                    "Sep.",
-                    "Oct.",
-                    "Nov.",
-                    "Dec.",
-                    "",
-                }
-            },
+                sharedMonthNarrows },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_CA.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_CA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,55 +72,33 @@
 public class JavaTimeSupplementary_en_CA extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "EEEE, MMMM d, y GGGG",
+            "MMMM d, y GGGG",
+            "MMM d, y GGGG",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, MMMM d, y G",
+            "MMMM d, y G",
+            "MMM d, y G",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y GGGG",
-                    "MMMM d, y GGGG",
-                    "MMM d, y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y G",
-                    "MMMM d, y G",
-                    "MMM d, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, MMMM d, y GGGG",
-                    "MMMM d, y GGGG",
-                    "MMM d, y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_GB.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_GB.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,61 +72,59 @@
 public class JavaTimeSupplementary_en_GB extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "am",
+            "pm",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd/MM/y G",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd/MM/y GGGGG",
+        };
+
         return new Object[][] {
             { "field.dayperiod",
                 "am/pm" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
-            { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.japanese.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "am",
-                    "pm",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_IE.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_IE.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,45 +72,43 @@
 public class JavaTimeSupplementary_en_IE extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "G y MMMM d",
+            "G y MMM d",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE d MMMM y G",
@@ -120,35 +118,13 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_IN.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_IN.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,27 @@
 public class JavaTimeSupplementary_en_IN extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "GGGG y MMMM d",
+            "dd-MMM-y GGGG",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "G y MMMM d",
+            "dd-MMM-y G",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "GGGG y MMMM d",
-                    "dd-MMM-y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "dd-MMM-y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "dd-MMM-y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE d MMMM y G",
@@ -106,21 +102,9 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "G y MMMM d",
-                    "dd-MMM-y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "GGGG y MMMM d",
-                    "dd-MMM-y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_MT.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_MT.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,39 +72,36 @@
 public class JavaTimeSupplementary_en_MT extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "dd MMMM y GGGG",
+            "dd MMM y GGGG",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "dd MMMM y G",
+            "dd MMM y G",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, MMMM d, y G",
@@ -114,29 +111,11 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_NZ.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_NZ.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,27 @@
 public class JavaTimeSupplementary_en_NZ extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "d/MM/y GGGG",
+            "d/MM/y G",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "d/MM/y G",
+            "d/MM/y GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, MMMM d, y G",
@@ -106,21 +102,9 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/y G",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_SG.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_SG.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,27 @@
 public class JavaTimeSupplementary_en_SG extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "d/M/yy G",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "d/M/yy GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/M/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, MMMM d, y G",
@@ -106,21 +102,9 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/M/yy G",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_ZA.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_en_ZA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,55 +72,33 @@
 public class JavaTimeSupplementary_en_ZA extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "EEEE, dd MMMM y GGGG",
+            "dd MMMM y GGGG",
+            "dd MMM y GGGG",
+            "G y/MM/dd",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, dd MMMM y G",
+            "dd MMMM y G",
+            "dd MMM y G",
+            "GGGGG y/MM/dd",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "G y/MM/dd",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "GGGGG y/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "G y/MM/dd",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,86 @@
 public class JavaTimeSupplementary_es extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "T1",
+            "T2",
+            "T3",
+            "T4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1.er trimestre",
+            "2.\u00ba trimestre",
+            "3.er trimestre",
+            "4.\u00ba trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a. m.",
+            "p. m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d 'de' MMMM 'de' y GGGG",
+            "d 'de' MMMM 'de' y GGGG",
+            "d/M/y GGGG",
+            "d/M/yy GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dom.",
+            "lun.",
+            "mar.",
+            "mi\u00e9.",
+            "jue.",
+            "vie.",
+            "s\u00e1b.",
+        };
+
+        final String[] sharedDayNames = {
+            "domingo",
+            "lunes",
+            "martes",
+            "mi\u00e9rcoles",
+            "jueves",
+            "viernes",
+            "s\u00e1bado",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "X",
+            "J",
+            "V",
+            "S",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss (zzzz)",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d 'de' MMMM 'de' y G",
+            "d 'de' MMMM 'de' y G",
+            "d/M/y G",
+            "d/M/yy G",
+        };
+
+        final String[] sharedEras = {
+            "antes de R.O.C.",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1.er trimestre",
-                    "2.\u00ba trimestre",
-                    "3.er trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "calendario budista" },
             { "calendarname.gregorian",
@@ -124,134 +187,27 @@
             { "field.zone",
                 "zona horaria" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "d/M/y GGGG",
-                    "d/M/yy GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dom.",
-                    "lun.",
-                    "mar.",
-                    "mi\u00e9.",
-                    "jue.",
-                    "vie.",
-                    "s\u00e1b.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "domingo",
-                    "lunes",
-                    "martes",
-                    "mi\u00e9rcoles",
-                    "jueves",
-                    "viernes",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "X",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1.er trimestre",
-                    "2.\u00ba trimestre",
-                    "3.er trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss (zzzz)",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "d/M/y G",
-                    "d/M/yy G",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -259,13 +215,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "d/M/y G",
-                    "d/M/yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -281,13 +231,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "d/M/y G",
-                    "d/M/yy G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "antes de Cristo",
@@ -295,58 +239,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "d/M/y GGGG",
-                    "d/M/yy GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dom.",
-                    "lun.",
-                    "mar.",
-                    "mi\u00e9.",
-                    "jue.",
-                    "vie.",
-                    "s\u00e1b.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "domingo",
-                    "lunes",
-                    "martes",
-                    "mi\u00e9rcoles",
-                    "jueves",
-                    "viernes",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "X",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "antes de R.O.C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "ene.",
@@ -399,59 +302,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1.er trimestre",
-                    "2.\u00ba trimestre",
-                    "3.er trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss (zzzz)",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "antes de R.O.C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a. m.",
-                    "p. m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "antes de R.O.C.",
-                    "",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "antes de R.O.C.",
-                    "",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_AR.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es_AR extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
+        return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
+                new String[] {
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
+                }
+            },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_BO.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es_BO extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
+        return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
+                new String[] {
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
+                }
+            },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_CL.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_CL.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,47 +72,74 @@
 public class JavaTimeSupplementary_es_CL extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1.\u00b0 trimestre",
+            "2.\u00b0 trimestre",
+            "3.\u00b0 trimestre",
+            "4.\u00ba trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "dd-MM-y GGGG",
+            "dd-MM-y G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "dd-MM-y G",
+            "dd-MM-y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "1.\u00b0 trimestre",
-                    "2.\u00b0 trimestre",
-                    "3.\u00b0 trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "dd-MM-y GGGG",
-                    "dd-MM-y G",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1.\u00b0 trimestre",
-                    "2.\u00b0 trimestre",
-                    "3.\u00b0 trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd-MM-y G",
-                    "dd-MM-y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd-MM-y G",
-                    "dd-MM-y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -122,29 +149,38 @@
                 }
             },
             { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthNarrows",
                 new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd-MM-y G",
-                    "dd-MM-y GGGGG",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "dd-MM-y GGGG",
-                    "dd-MM-y G",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.QuarterNames",
-                new String[] {
-                    "1.\u00b0 trimestre",
-                    "2.\u00b0 trimestre",
-                    "3.\u00b0 trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_CO.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_CO.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,50 +72,61 @@
 public class JavaTimeSupplementary_es_CO extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "d/MM/y GGGG",
+            "d/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "d/MM/y G",
+            "d/MM/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayNarrows",
-                new String[] {
-                    "d",
-                    "l",
-                    "m",
-                    "m",
-                    "j",
-                    "v",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -125,40 +136,36 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthNarrows",
                 new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/yy G",
-                }
-            },
-            { "roc.DayNarrows",
-                new String[] {
-                    "d",
-                    "l",
+                    "e",
+                    "f",
                     "m",
+                    "a",
                     "m",
                     "j",
-                    "v",
+                    "j",
+                    "a",
                     "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_CR.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es_CR extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
+        return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
+                new String[] {
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
+                }
+            },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_DO.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_DO.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,15 +72,54 @@
 public class JavaTimeSupplementary_es_DO extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "dd/MM/y GGGG",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "dd/MM/y G",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
+            { "field.dayperiod",
+                "a.m./p.m." },
             { "field.era",
                 "Era" },
             { "field.minute",
@@ -95,78 +134,76 @@
                 "D\u00eda de la semana" },
             { "field.year",
                 "A\u00f1o" },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "dd/MM/y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
+                sharedQuarterAbbreviations },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
                 }
             },
-            { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd/MM/y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
-            { "java.time.islamic.DatePatterns",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd/MM/y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
-            { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "dd/MM/y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
-            { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "dd/MM/y GGGG",
-                    "G y-MM-dd",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_EC.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es_EC extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
+        return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
+                new String[] {
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
+                }
+            },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_GT.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_GT.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,63 @@
 public class JavaTimeSupplementary_es_GT extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "d/MM/y GGGG",
+            "d/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "d/MM/y G",
+            "d/MM/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -106,21 +138,53 @@
                 }
             },
             { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d/MM/y G",
-                    "d/MM/yy GGGGG",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
                 }
             },
-            { "roc.DatePatterns",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d/MM/y GGGG",
-                    "d/MM/yy G",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_HN.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_HN.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,63 @@
 public class JavaTimeSupplementary_es_HN extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE dd 'de' MMMM 'de' y GGGG",
+            "dd 'de' MMMM 'de' y GGGG",
+            "GGGG y MMM d",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE dd 'de' MMMM 'de' y G",
+            "dd 'de' MMMM 'de' y G",
+            "G y MMM d",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE dd 'de' MMMM 'de' y GGGG",
-                    "dd 'de' MMMM 'de' y GGGG",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE dd 'de' MMMM 'de' y G",
-                    "dd 'de' MMMM 'de' y G",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE dd 'de' MMMM 'de' y G",
-                    "dd 'de' MMMM 'de' y G",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE dd 'de' MMMM 'de' y G",
@@ -106,21 +138,53 @@
                 }
             },
             { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "EEEE dd 'de' MMMM 'de' y G",
-                    "dd 'de' MMMM 'de' y G",
-                    "G y MMM d",
-                    "GGGGG y-MM-dd",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
                 }
             },
-            { "roc.DatePatterns",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "EEEE dd 'de' MMMM 'de' y GGGG",
-                    "dd 'de' MMMM 'de' y GGGG",
-                    "GGGG y MMM d",
-                    "G y-MM-dd",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_MX.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_MX.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,96 +72,102 @@
 public class JavaTimeSupplementary_es_MX extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1er. trim.",
+            "2\u00ba. trim.",
+            "3er. trim.",
+            "4\u00ba trim.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1er. trimestre",
+            "2\u00ba. trimestre",
+            "3er. trimestre",
+            "4\u00ba trimestre",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1T",
+            "2T",
+            "3T",
+            "4T",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "d MMM, y GGGG",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "M",
+            "J",
+            "V",
+            "S",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "d MMM, y G",
+            "GGGGG y-MM-dd",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1er. trim.",
-                    "2\u00ba. trim.",
-                    "3er. trim.",
-                    "4\u00ba trim.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2\u00ba. trimestre",
-                    "3er. trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.gregorian",
                 "Calendario gregoriano" },
             { "calendarname.gregory",
                 "Calendario gregoriano" },
             { "calendarname.roc",
                 "calendario minguo" },
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d MMM, y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1er. trim.",
-                    "2\u00ba. trim.",
-                    "3er. trim.",
-                    "4\u00ba trim.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2\u00ba. trimestre",
-                    "3er. trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d MMM, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d MMM, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -171,32 +177,13 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "d MMM, y G",
-                    "GGGGG y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "d MMM, y GGGG",
-                    "G y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "ene",
@@ -214,30 +201,35 @@
                     "",
                 }
             },
-            { "roc.QuarterAbbreviations",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "1er. trim.",
-                    "2\u00ba. trim.",
-                    "3er. trim.",
-                    "4\u00ba trim.",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
+            { "roc.QuarterAbbreviations",
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2\u00ba. trimestre",
-                    "3er. trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1T",
-                    "2T",
-                    "3T",
-                    "4T",
-                }
-            },
+                sharedQuarterNarrows },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PA.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,63 +72,76 @@
 public class JavaTimeSupplementary_es_PA extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1er. trimestre",
+            "2do. trimestre",
+            "3er. trimestre",
+            "4.\u00ba trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "MM/dd/y GGGG",
+            "MM/dd/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "MM/dd/y G",
+            "MM/dd/yy GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1er. trimestre",
-                    "2do. trimestre",
-                    "3er. trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2do. trimestre",
-                    "3er. trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "MM/dd/y GGGG",
-                    "MM/dd/yy G",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2do. trimestre",
-                    "3er. trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -138,37 +151,55 @@
                 }
             },
             { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
                 }
             },
-            { "roc.DatePatterns",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "MM/dd/y GGGG",
-                    "MM/dd/yy G",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.QuarterNames",
-                new String[] {
-                    "1er. trimestre",
-                    "2do. trimestre",
-                    "3er. trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PE.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PE.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,31 +72,63 @@
 public class JavaTimeSupplementary_es_PE extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "d/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "d/MM/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -106,21 +138,13 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "ene.",
@@ -155,6 +179,29 @@
                     "",
                 }
             },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PR.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PR.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,39 +72,63 @@
 public class JavaTimeSupplementary_es_PR extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "MM/dd/y GGGG",
+            "MM/dd/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "MM/dd/y G",
+            "MM/dd/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "MM/dd/y GGGG",
-                    "MM/dd/yy G",
-                }
-            },
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -114,29 +138,53 @@
                 }
             },
             { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "MM/dd/y G",
-                    "MM/dd/yy GGGGG",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
                 }
             },
-            { "roc.DatePatterns",
+            { "roc.MonthNarrows",
                 new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "MM/dd/y GGGG",
-                    "MM/dd/yy G",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_PY.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_es_PY extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
+        return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_US.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_US.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,75 @@
 public class JavaTimeSupplementary_es_US extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedAbbreviatedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAbbreviatedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "a.C.",
@@ -100,25 +148,51 @@
                 }
             },
             { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthAbbreviations",
                 new String[] {
-                    "AM",
-                    "PM",
+                    "ene.",
+                    "feb.",
+                    "mar.",
+                    "abr.",
+                    "may.",
+                    "jun.",
+                    "jul.",
+                    "ago.",
+                    "sep.",
+                    "oct.",
+                    "nov.",
+                    "dic.",
+                    "",
+                }
+            },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAbbreviatedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_UY.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_UY.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,7 +72,71 @@
 public class JavaTimeSupplementary_es_UY extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
         return new Object[][] {
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "ene.",
@@ -107,6 +171,29 @@
                     "",
                 }
             },
+            { "roc.MonthNarrows",
+                new String[] {
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
+                }
+            },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_VE.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_es_VE.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,55 +72,109 @@
 public class JavaTimeSupplementary_es_VE extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1er trimestre",
+            "2do trimestre",
+            "3er trimestre",
+            "4to trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "d",
+            "l",
+            "m",
+            "m",
+            "j",
+            "v",
+            "s",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "dd/MM/yy GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1er trimestre",
-                    "2do trimestre",
-                    "3er trimestre",
-                    "4to trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
+                sharedQuarterNames },
+            { "field.dayperiod",
+                "a.m./p.m." },
+            { "field.zone",
+                "Zona horaria" },
+            { "islamic.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "islamic.DayNarrows",
+                sharedDayNarrows },
+            { "islamic.QuarterNames",
+                sharedQuarterNames },
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "islamic.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "islamic.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+            { "roc.DayNarrows",
+                sharedDayNarrows },
+            { "roc.MonthNarrows",
                 new String[] {
-                    "1er trimestre",
-                    "2do trimestre",
-                    "3er trimestre",
-                    "4to trimestre",
-                }
-            },
-            { "islamic.QuarterNames",
-                new String[] {
-                    "1er trimestre",
-                    "2do trimestre",
-                    "3er trimestre",
-                    "4to trimestre",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
+                    "e",
+                    "f",
+                    "m",
+                    "a",
+                    "m",
+                    "j",
+                    "j",
+                    "a",
+                    "s",
+                    "o",
+                    "n",
+                    "d",
+                    "",
                 }
             },
             { "roc.QuarterNames",
-                new String[] {
-                    "1er trimestre",
-                    "2do trimestre",
-                    "3er trimestre",
-                    "4to trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
+            { "roc.abbreviated.AmPmMarkers",
+                sharedAmPmMarkers },
+            { "roc.narrow.AmPmMarkers",
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_et.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_et.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,71 @@
 public class JavaTimeSupplementary_et extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. kvartal",
+            "2. kvartal",
+            "3. kvartal",
+            "4. kvartal",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "dd.MM.y GGGG",
+            "dd.MM.y G",
+        };
+
+        final String[] sharedDayNarrows = {
+            "P",
+            "E",
+            "T",
+            "K",
+            "N",
+            "R",
+            "L",
+        };
+
+        final String[] sharedDayNames = {
+            "p\u00fchap\u00e4ev",
+            "esmasp\u00e4ev",
+            "teisip\u00e4ev",
+            "kolmap\u00e4ev",
+            "neljap\u00e4ev",
+            "reede",
+            "laup\u00e4ev",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm.ss zzzz",
+            "H:mm.ss z",
+            "H:mm.ss",
+            "H:mm",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d. MMMM y G",
+            "d. MMMM y G",
+            "dd.MM.y G",
+            "dd.MM.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "budistlik kalender" },
             { "calendarname.gregorian",
@@ -130,108 +178,27 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "P",
-                    "E",
-                    "T",
-                    "K",
-                    "N",
-                    "R",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.DayNames",
-                new String[] {
-                    "p\u00fchap\u00e4ev",
-                    "esmasp\u00e4ev",
-                    "teisip\u00e4ev",
-                    "kolmap\u00e4ev",
-                    "neljap\u00e4ev",
-                    "reede",
-                    "laup\u00e4ev",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "P",
-                    "E",
-                    "T",
-                    "K",
-                    "N",
-                    "R",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm.ss zzzz",
-                    "H:mm.ss z",
-                    "H:mm.ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "enne Kristust",
@@ -239,66 +206,21 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "e.m.a.",
                     "m.a.j.",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "P",
-                    "E",
-                    "T",
-                    "K",
-                    "N",
-                    "R",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.DayNames",
-                new String[] {
-                    "p\u00fchap\u00e4ev",
-                    "esmasp\u00e4ev",
-                    "teisip\u00e4ev",
-                    "kolmap\u00e4ev",
-                    "neljap\u00e4ev",
-                    "reede",
-                    "laup\u00e4ev",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "P",
-                    "E",
-                    "T",
-                    "K",
-                    "N",
-                    "R",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jaan",
@@ -351,35 +273,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm.ss zzzz",
-                    "H:mm.ss z",
-                    "H:mm.ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fi.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fi.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,102 @@
 public class JavaTimeSupplementary_fi extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1. nelj.",
+            "2. nelj.",
+            "3. nelj.",
+            "4. nelj.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. nelj\u00e4nnes",
+            "2. nelj\u00e4nnes",
+            "3. nelj\u00e4nnes",
+            "4. nelj\u00e4nnes",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "ap.",
+            "ip.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "d.M.y GGGG",
+            "d.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "su",
+            "ma",
+            "ti",
+            "ke",
+            "to",
+            "pe",
+            "la",
+        };
+
+        final String[] sharedDayNames = {
+            "sunnuntaina",
+            "maanantaina",
+            "tiistaina",
+            "keskiviikkona",
+            "torstaina",
+            "perjantaina",
+            "lauantaina",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "T",
+            "K",
+            "T",
+            "P",
+            "L",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H.mm.ss zzzz",
+            "H.mm.ss z",
+            "H.mm.ss",
+            "H.mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "cccc d. MMMM y G",
+            "d. MMMM y G",
+            "d.M.y G",
+            "d.M.y GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
+        final String[] sharedMonthNames = {
+            "tammikuuta",
+            "helmikuuta",
+            "maaliskuuta",
+            "huhtikuuta",
+            "toukokuuta",
+            "kes\u00e4kuuta",
+            "hein\u00e4kuuta",
+            "elokuuta",
+            "syyskuuta",
+            "lokakuuta",
+            "marraskuuta",
+            "joulukuuta",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1. nelj.",
-                    "2. nelj.",
-                    "3. nelj.",
-                    "4. nelj.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. nelj\u00e4nnes",
-                    "2. nelj\u00e4nnes",
-                    "3. nelj\u00e4nnes",
-                    "4. nelj\u00e4nnes",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "buddhalainen kalenteri" },
             { "calendarname.gregorian",
@@ -126,52 +205,15 @@
             { "field.zone",
                 "aikavy\u00f6hyke" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "su",
-                    "ma",
-                    "ti",
-                    "ke",
-                    "to",
-                    "pe",
-                    "la",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "sunnuntaina",
-                    "maanantaina",
-                    "tiistaina",
-                    "keskiviikkona",
-                    "torstaina",
-                    "perjantaina",
-                    "lauantaina",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "K",
-                    "T",
-                    "P",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "muharram",
@@ -190,49 +232,15 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1. nelj.",
-                    "2. nelj.",
-                    "3. nelj.",
-                    "4. nelj.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. nelj\u00e4nnes",
-                    "2. nelj\u00e4nnes",
-                    "3. nelj\u00e4nnes",
-                    "4. nelj\u00e4nnes",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H.mm.ss zzzz",
-                    "H.mm.ss z",
-                    "H.mm.ss",
-                    "H.mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.DatePatterns",
                 new String[] {
                     "cccc d. MMMM y",
@@ -242,19 +250,7 @@
                 }
             },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -262,21 +258,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "ennen Kristuksen syntym\u00e4\u00e4",
@@ -284,13 +268,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "cccc d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "eKr.",
@@ -298,92 +276,21 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "su",
-                    "ma",
-                    "ti",
-                    "ke",
-                    "to",
-                    "pe",
-                    "la",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "sunnuntaina",
-                    "maanantaina",
-                    "tiistaina",
-                    "keskiviikkona",
-                    "torstaina",
-                    "perjantaina",
-                    "lauantaina",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "K",
-                    "T",
-                    "P",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "tammikuuta",
-                    "helmikuuta",
-                    "maaliskuuta",
-                    "huhtikuuta",
-                    "toukokuuta",
-                    "kes\u00e4kuuta",
-                    "hein\u00e4kuuta",
-                    "elokuuta",
-                    "syyskuuta",
-                    "lokakuuta",
-                    "marraskuuta",
-                    "joulukuuta",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "tammikuuta",
-                    "helmikuuta",
-                    "maaliskuuta",
-                    "huhtikuuta",
-                    "toukokuuta",
-                    "kes\u00e4kuuta",
-                    "hein\u00e4kuuta",
-                    "elokuuta",
-                    "syyskuuta",
-                    "lokakuuta",
-                    "marraskuuta",
-                    "joulukuuta",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
                 new String[] {
                     "T",
@@ -402,59 +309,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1. nelj.",
-                    "2. nelj.",
-                    "3. nelj.",
-                    "4. nelj.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. nelj\u00e4nnes",
-                    "2. nelj\u00e4nnes",
-                    "3. nelj\u00e4nnes",
-                    "4. nelj\u00e4nnes",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H.mm.ss zzzz",
-                    "H.mm.ss z",
-                    "H.mm.ss",
-                    "H.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "ap.",
-                    "ip.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,84 @@
 public class JavaTimeSupplementary_fr extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimebuddhistlongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "T1",
+            "T2",
+            "T3",
+            "T4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1er trimestre",
+            "2e trimestre",
+            "3e trimestre",
+            "4e trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd/MM/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dim.",
+            "lun.",
+            "mar.",
+            "mer.",
+            "jeu.",
+            "ven.",
+            "sam.",
+        };
+
+        final String[] sharedDayNames = {
+            "dimanche",
+            "lundi",
+            "mardi",
+            "mercredi",
+            "jeudi",
+            "vendredi",
+            "samedi",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "M",
+            "J",
+            "V",
+            "S",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd/MM/y GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "BC",
             "\u00e8re bouddhiste",
         };
+
+        final String[] sharedEras = {
+            "avant RdC",
+            "RdC",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1er trimestre",
-                    "2e trimestre",
-                    "3e trimestre",
-                    "4e trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "calendrier bouddhiste" },
             { "calendarname.gregorian",
@@ -128,58 +185,15 @@
             { "field.zone",
                 "fuseau horaire" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dim.",
-                    "lun.",
-                    "mar.",
-                    "mer.",
-                    "jeu.",
-                    "ven.",
-                    "sam.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "dimanche",
-                    "lundi",
-                    "mardi",
-                    "mercredi",
-                    "jeudi",
-                    "vendredi",
-                    "samedi",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "mouh.",
@@ -215,89 +229,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1er trimestre",
-                    "2e trimestre",
-                    "3e trimestre",
-                    "4e trimestre",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "avant J\u00e9sus-Christ",
@@ -305,72 +251,23 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "BC",
                     "ap. J.-C.",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dim.",
-                    "lun.",
-                    "mar.",
-                    "mer.",
-                    "jeu.",
-                    "ven.",
-                    "sam.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "dimanche",
-                    "lundi",
-                    "mardi",
-                    "mercredi",
-                    "jeudi",
-                    "vendredi",
-                    "samedi",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "avant RdC",
-                    "RdC",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "janv.",
@@ -423,53 +320,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1er trimestre",
-                    "2e trimestre",
-                    "3e trimestre",
-                    "4e trimestre",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.long.Eras",
-                new String[] {
-                    "avant RdC",
-                    "RdC",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "avant RdC",
-                    "RdC",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "avant RdC",
-                    "RdC",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_BE.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_BE.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,6 +72,20 @@
 public class JavaTimeSupplementary_fr_BE extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedTimePatterns = {
+            "H 'h' mm 'min' ss 's' zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "d/MM/yy GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
                 new String[] {
@@ -82,37 +96,13 @@
                 }
             },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H 'h' mm 'min' ss 's' zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
                 new String[] {
                     "G y MMMM d, EEEE",
@@ -130,13 +120,7 @@
                 }
             },
             { "roc.TimePatterns",
-                new String[] {
-                    "H 'h' mm 'min' ss 's' zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_CA.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_CA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,6 +72,18 @@
 public class JavaTimeSupplementary_fr_CA extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "yy-MM-dd GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
                 new String[] {
@@ -82,19 +94,9 @@
                 }
             },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "yy-MM-dd GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
                 new String[] {
                     "EEEE d MMMM y G",
@@ -104,13 +106,7 @@
                 }
             },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "yy-MM-dd GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
                 new String[] {
                     "G y MMMM d, EEEE",
@@ -128,11 +124,7 @@
                 }
             },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_CH.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_fr_CH.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,6 +72,20 @@
 public class JavaTimeSupplementary_fr_CH extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedTimePatterns = {
+            "HH.mm:ss 'h' zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd.MM.yy GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
                 new String[] {
@@ -82,37 +96,13 @@
                 }
             },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm:ss 'h' zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
                 new String[] {
                     "EEEE, d MMMM y G",
@@ -130,13 +120,7 @@
                 }
             },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm:ss 'h' zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ga.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ga.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_ga extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "R1",
+            "R2",
+            "R3",
+            "R4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1\u00fa r\u00e1ithe",
+            "2\u00fa r\u00e1ithe",
+            "3\u00fa r\u00e1ithe",
+            "4\u00fa r\u00e1ithe",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd/MM/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Domh",
+            "Luan",
+            "M\u00e1irt",
+            "C\u00e9ad",
+            "D\u00e9ar",
+            "Aoine",
+            "Sath",
+        };
+
+        final String[] sharedDayNames = {
+            "D\u00e9 Domhnaigh",
+            "D\u00e9 Luain",
+            "D\u00e9 M\u00e1irt",
+            "D\u00e9 C\u00e9adaoin",
+            "D\u00e9ardaoin",
+            "D\u00e9 hAoine",
+            "D\u00e9 Sathairn",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "C",
+            "D",
+            "A",
+            "S",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd/MM/y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "R1",
-                    "R2",
-                    "R3",
-                    "R4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1\u00fa r\u00e1ithe",
-                    "2\u00fa r\u00e1ithe",
-                    "3\u00fa r\u00e1ithe",
-                    "4\u00fa r\u00e1ithe",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "F\u00e9ilire B\u00fada\u00edoch" },
             { "calendarname.gregorian",
@@ -122,120 +178,29 @@
             { "field.zone",
                 "Crios Ama" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Domh",
-                    "Luan",
-                    "M\u00e1irt",
-                    "C\u00e9ad",
-                    "D\u00e9ar",
-                    "Aoine",
-                    "Sath",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "D\u00e9 Domhnaigh",
-                    "D\u00e9 Luain",
-                    "D\u00e9 M\u00e1irt",
-                    "D\u00e9 C\u00e9adaoin",
-                    "D\u00e9ardaoin",
-                    "D\u00e9 hAoine",
-                    "D\u00e9 Sathairn",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "C",
-                    "D",
-                    "A",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "R1",
-                    "R2",
-                    "R3",
-                    "R4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1\u00fa r\u00e1ithe",
-                    "2\u00fa r\u00e1ithe",
-                    "3\u00fa r\u00e1ithe",
-                    "4\u00fa r\u00e1ithe",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "Roimh Chr\u00edost",
@@ -243,13 +208,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "RC",
@@ -257,52 +216,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Domh",
-                    "Luan",
-                    "M\u00e1irt",
-                    "C\u00e9ad",
-                    "D\u00e9ar",
-                    "Aoine",
-                    "Sath",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "D\u00e9 Domhnaigh",
-                    "D\u00e9 Luain",
-                    "D\u00e9 M\u00e1irt",
-                    "D\u00e9 C\u00e9adaoin",
-                    "D\u00e9ardaoin",
-                    "D\u00e9 hAoine",
-                    "D\u00e9 Sathairn",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "C",
-                    "D",
-                    "A",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Ean",
@@ -355,41 +277,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "R1",
-                    "R2",
-                    "R3",
-                    "R4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1\u00fa r\u00e1ithe",
-                    "2\u00fa r\u00e1ithe",
-                    "3\u00fa r\u00e1ithe",
-                    "4\u00fa r\u00e1ithe",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hi_IN.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hi_IN.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,91 @@
 public class JavaTimeSupplementary_hi_IN extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "\u0924\u093f1",
+            "\u0924\u093f2",
+            "\u0924\u093f3",
+            "\u0924\u093f4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\u092a\u0939\u0932\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+            "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+            "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+            "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
+            "\u0905\u092a\u0930\u093e\u0939\u094d\u0928",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG EEEE, d MMMM y",
+            "GGGG d MMMM y",
+            "GGGG d MMM y",
+            "GGGG d/M/y",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u0930\u0935\u093f",
+            "\u0938\u094b\u092e",
+            "\u092e\u0902\u0917\u0932",
+            "\u092c\u0941\u0927",
+            "\u0917\u0941\u0930\u0941",
+            "\u0936\u0941\u0915\u094d\u0930",
+            "\u0936\u0928\u093f",
+        };
+
+        final String[] sharedDayNames = {
+            "\u0930\u0935\u093f\u0935\u093e\u0930",
+            "\u0938\u094b\u092e\u0935\u093e\u0930",
+            "\u092e\u0902\u0917\u0932\u0935\u093e\u0930",
+            "\u092c\u0941\u0927\u0935\u093e\u0930",
+            "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
+            "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
+            "\u0936\u0928\u093f\u0935\u093e\u0930",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u0930",
+            "\u0938\u094b",
+            "\u092e\u0902",
+            "\u092c\u0941",
+            "\u0917\u0941",
+            "\u0936\u0941",
+            "\u0936",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedAbbreviatedAmPmMarkers = {
+            "\u092a\u0942\u0930\u094d\u0935",
+            "\u0905\u092a\u0930",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "\u092a\u0942",
+            "\u0905",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G EEEE, d MMMM y",
+            "G d MMMM y",
+            "G d MMM y",
+            "G d/M/y",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u0924\u093f1",
-                    "\u0924\u093f2",
-                    "\u0924\u093f3",
-                    "\u0924\u093f4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\u092a\u0939\u0932\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917" },
             { "calendarname.gregorian",
@@ -124,52 +192,15 @@
             { "field.zone",
                 "\u0938\u092e\u092f \u0915\u094d\u0937\u0947\u0924\u094d\u0930" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
-                    "\u0905\u092a\u0930\u093e\u0939\u094d\u0928",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG EEEE, d MMMM y",
-                    "GGGG d MMMM y",
-                    "GGGG d MMM y",
-                    "GGGG d/M/y",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u0930\u0935\u093f",
-                    "\u0938\u094b\u092e",
-                    "\u092e\u0902\u0917\u0932",
-                    "\u092c\u0941\u0927",
-                    "\u0917\u0941\u0930\u0941",
-                    "\u0936\u0941\u0915\u094d\u0930",
-                    "\u0936\u0928\u093f",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u0930\u0935\u093f\u0935\u093e\u0930",
-                    "\u0938\u094b\u092e\u0935\u093e\u0930",
-                    "\u092e\u0902\u0917\u0932\u0935\u093e\u0930",
-                    "\u092c\u0941\u0927\u0935\u093e\u0930",
-                    "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
-                    "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
-                    "\u0936\u0928\u093f\u0935\u093e\u0930",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u0930",
-                    "\u0938\u094b",
-                    "\u092e\u0902",
-                    "\u092c\u0941",
-                    "\u0917\u0941",
-                    "\u0936\u0941",
-                    "\u0936",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "\u092e\u0941\u0939\u0930\u094d\u0930\u092e",
@@ -188,73 +219,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u0924\u093f1",
-                    "\u0924\u093f2",
-                    "\u0924\u093f3",
-                    "\u0924\u093f4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u092a\u0939\u0932\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942\u0930\u094d\u0935",
-                    "\u0905\u092a\u0930",
-                }
-            },
+                sharedAbbreviatedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942",
-                    "\u0905",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G EEEE, d MMMM y",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "G d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G EEEE, d MMMM y",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "G d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "G EEEE, d MMMM y",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "G d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "\u0908\u0938\u0935\u0940 \u0938\u0928",
@@ -280,13 +259,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G EEEE, d MMMM y",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "G d/M/y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935",
@@ -294,52 +267,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
-                    "\u0905\u092a\u0930\u093e\u0939\u094d\u0928",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG EEEE, d MMMM y",
-                    "GGGG d MMMM y",
-                    "GGGG d MMM y",
-                    "GGGG d/M/y",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u0930\u0935\u093f",
-                    "\u0938\u094b\u092e",
-                    "\u092e\u0902\u0917\u0932",
-                    "\u092c\u0941\u0927",
-                    "\u0917\u0941\u0930\u0941",
-                    "\u0936\u0941\u0915\u094d\u0930",
-                    "\u0936\u0928\u093f",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u0930\u0935\u093f\u0935\u093e\u0930",
-                    "\u0938\u094b\u092e\u0935\u093e\u0930",
-                    "\u092e\u0902\u0917\u0932\u0935\u093e\u0930",
-                    "\u092c\u0941\u0927\u0935\u093e\u0930",
-                    "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
-                    "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
-                    "\u0936\u0928\u093f\u0935\u093e\u0930",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u0930",
-                    "\u0938\u094b",
-                    "\u092e\u0902",
-                    "\u092c\u0941",
-                    "\u0917\u0941",
-                    "\u0936\u0941",
-                    "\u0936",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u091c\u0928\u0970",
@@ -392,41 +328,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u0924\u093f1",
-                    "\u0924\u093f2",
-                    "\u0924\u093f3",
-                    "\u0924\u093f4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u092a\u0939\u0932\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                    "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942\u0930\u094d\u0935",
-                    "\u0905\u092a\u0930",
-                }
-            },
+                sharedAbbreviatedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u092a\u0942",
-                    "\u0905",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hr.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hr.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,88 @@
 public class JavaTimeSupplementary_hr extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1kv",
+            "2kv",
+            "3kv",
+            "4kv",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. kvartal",
+            "2. kvartal",
+            "3. kvartal",
+            "4. kvartal",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "ned",
+            "pon",
+            "uto",
+            "sri",
+            "\u010det",
+            "pet",
+            "sub",
+        };
+
+        final String[] sharedDayNames = {
+            "nedjelja",
+            "ponedjeljak",
+            "utorak",
+            "srijeda",
+            "\u010detvrtak",
+            "petak",
+            "subota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "N",
+            "P",
+            "U",
+            "S",
+            "\u010c",
+            "P",
+            "S",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d. MMMM y. G",
+            "d. MMMM y. G",
+            "d. MMM y. G",
+            "dd.MM.y. GGGGG",
+        };
+
+        final String[] sharedJavaTimeDatePatterns2 = {
+            "EEEE, d. MMMM y. G",
+            "d. MMMM y. G",
+            "d. M. y. G",
+            "d.M.y. GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "prije R.O.C.",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1kv",
-                    "2kv",
-                    "3kv",
-                    "4kv",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "budisti\u010dki kalendar" },
             { "calendarname.gregorian",
@@ -132,11 +189,7 @@
             { "field.zone",
                 "vremenska zona" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE, d. MMMM y. GGGG",
@@ -146,114 +199,21 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "ned",
-                    "pon",
-                    "uto",
-                    "sri",
-                    "\u010det",
-                    "pet",
-                    "sub",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "nedjelja",
-                    "ponedjeljak",
-                    "utorak",
-                    "srijeda",
-                    "\u010detvrtak",
-                    "petak",
-                    "subota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "U",
-                    "S",
-                    "\u010c",
-                    "P",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1kv",
-                    "2kv",
-                    "3kv",
-                    "4kv",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. MMM y. G",
-                    "dd.MM.y. GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -261,21 +221,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. M. y. G",
-                    "d.M.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns2 },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. M. y. G",
-                    "d.M.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns2 },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "poslije Krista",
@@ -301,25 +249,13 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y. G",
-                    "d. MMMM y. G",
-                    "d. MMM y. G",
-                    "dd.MM.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "Prije Krista",
                     "Poslije Krista",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE, d. MMMM y. GGGG",
@@ -329,44 +265,13 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "ned",
-                    "pon",
-                    "uto",
-                    "sri",
-                    "\u010det",
-                    "pet",
-                    "sub",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "nedjelja",
-                    "ponedjeljak",
-                    "utorak",
-                    "srijeda",
-                    "\u010detvrtak",
-                    "petak",
-                    "subota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "U",
-                    "S",
-                    "\u010c",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "prije R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "sij",
@@ -419,61 +324,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1kv",
-                    "2kv",
-                    "3kv",
-                    "4kv",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.long.Eras",
-                new String[] {
-                    "prije R.O.C.",
-                    "R.O.C.",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "prije R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "prije R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hu.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_hu.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,35 +72,105 @@
 public class JavaTimeSupplementary_hu extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimebuddhistlongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "N1",
+            "N2",
+            "N3",
+            "N4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "I. negyed\u00e9v",
+            "II. negyed\u00e9v",
+            "III. negyed\u00e9v",
+            "IV. negyed\u00e9v",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "de.",
+            "du.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y. MMMM d., EEEE",
+            "GGGG y. MMMM d.",
+            "GGGG y. MMM d.",
+            "G y. M. d.",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "V",
+            "H",
+            "K",
+            "Sze",
+            "Cs",
+            "P",
+            "Szo",
+        };
+
+        final String[] sharedDayNames = {
+            "vas\u00e1rnap",
+            "h\u00e9tf\u0151",
+            "kedd",
+            "szerda",
+            "cs\u00fct\u00f6rt\u00f6k",
+            "p\u00e9ntek",
+            "szombat",
+        };
+
+        final String[] sharedDayNarrows = {
+            "V",
+            "H",
+            "K",
+            "Sz",
+            "Cs",
+            "P",
+            "Sz",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "MF",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y. MMMM d., EEEE",
+            "G y. MMMM d.",
+            "G y. MMM d.",
+            "GGGGG y. M. d.",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "BC",
             "BK",
         };
+
+        final String[] sharedShortEras = {
+            "R.O.C. el\u0151tt",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "N1",
-                    "N2",
-                    "N3",
-                    "N4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "I. negyed\u00e9v",
-                    "II. negyed\u00e9v",
-                    "III. negyed\u00e9v",
-                    "IV. negyed\u00e9v",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "Buddhista napt\u00e1r" },
             { "calendarname.gregorian",
@@ -136,58 +206,17 @@
             { "field.zone",
                 "id\u0151z\u00f3na" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y. MMMM d., EEEE",
-                    "GGGG y. MMMM d.",
-                    "GGGG y. MMM d.",
-                    "G y. M. d.",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "V",
-                    "H",
-                    "K",
-                    "Sze",
-                    "Cs",
-                    "P",
-                    "Szo",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "vas\u00e1rnap",
-                    "h\u00e9tf\u0151",
-                    "kedd",
-                    "szerda",
-                    "cs\u00fct\u00f6rt\u00f6k",
-                    "p\u00e9ntek",
-                    "szombat",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "V",
-                    "H",
-                    "K",
-                    "Sz",
-                    "Cs",
-                    "P",
-                    "Sz",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "MF",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "Moh.",
@@ -223,87 +252,31 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "N1",
-                    "N2",
-                    "N3",
-                    "N4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "I. negyed\u00e9v",
-                    "II. negyed\u00e9v",
-                    "III. negyed\u00e9v",
-                    "IV. negyed\u00e9v",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "MF",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "MF",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "MF",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y. MMMM d., EEEE",
-                    "G y. MMMM d.",
-                    "G y. MMM d.",
-                    "GGGGG y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y. MMMM d., EEEE",
-                    "G y. MMMM d.",
-                    "G y. MMM d.",
-                    "GGGGG y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "G y. MMMM d., EEEE",
@@ -319,13 +292,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y. MMMM d., EEEE",
-                    "G y. MMMM d.",
-                    "G y. MMM d.",
-                    "GGGGG y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "i.e.",
@@ -333,58 +300,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y. MMMM d., EEEE",
-                    "GGGG y. MMMM d.",
-                    "GGGG y. MMM d.",
-                    "G y. M. d.",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "V",
-                    "H",
-                    "K",
-                    "Sze",
-                    "Cs",
-                    "P",
-                    "Szo",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "vas\u00e1rnap",
-                    "h\u00e9tf\u0151",
-                    "kedd",
-                    "szerda",
-                    "cs\u00fct\u00f6rt\u00f6k",
-                    "p\u00e9ntek",
-                    "szombat",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "V",
-                    "H",
-                    "K",
-                    "Sz",
-                    "Cs",
-                    "P",
-                    "Sz",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "R.O.C. el\u0151tt",
-                    "",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -437,67 +363,23 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "N1",
-                    "N2",
-                    "N3",
-                    "N4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "I. negyed\u00e9v",
-                    "II. negyed\u00e9v",
-                    "III. negyed\u00e9v",
-                    "IV. negyed\u00e9v",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "R.O.C. el\u0151tt",
-                    "",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "de.",
-                    "du.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "R.O.C. el\u0151tt",
-                    "",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "R.O.C. el\u0151tt",
-                    "",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_in.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_in.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,94 @@
 public class JavaTimeSupplementary_in extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "Kuartal ke-1",
+            "Kuartal ke-2",
+            "Kuartal ke-3",
+            "Kuartal ke-4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, dd MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "d/M/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Min",
+            "Sen",
+            "Sel",
+            "Rab",
+            "Kam",
+            "Jum",
+            "Sab",
+        };
+
+        final String[] sharedDayNames = {
+            "Minggu",
+            "Senin",
+            "Selasa",
+            "Rabu",
+            "Kamis",
+            "Jumat",
+            "Sabtu",
+        };
+
+        final String[] sharedDayNarrows = {
+            "M",
+            "S",
+            "S",
+            "R",
+            "K",
+            "J",
+            "S",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH.mm.ss zzzz",
+            "HH.mm.ss z",
+            "HH.mm.ss",
+            "HH.mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, dd MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "d/M/y GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "M",
+            "Meiji",
+            "Taish\u014d",
+            "Sh\u014dwa",
+            "Heisei",
+        };
+
+        final String[] sharedEras = {
+            "Sebelum R.O.C.",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "Kuartal ke-1",
-                    "Kuartal ke-2",
-                    "Kuartal ke-3",
-                    "Kuartal ke-4",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Kalender Buddha" },
             { "calendarname.gregorian",
@@ -122,58 +193,15 @@
             { "field.zone",
                 "Zona Waktu" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/M/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Min",
-                    "Sen",
-                    "Sel",
-                    "Rab",
-                    "Kam",
-                    "Jum",
-                    "Sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Minggu",
-                    "Senin",
-                    "Selasa",
-                    "Rabu",
-                    "Kamis",
-                    "Jumat",
-                    "Sabtu",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "M",
-                    "S",
-                    "S",
-                    "R",
-                    "K",
-                    "J",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "Muh.",
@@ -209,75 +237,15 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "Kuartal ke-1",
-                    "Kuartal ke-2",
-                    "Kuartal ke-3",
-                    "Kuartal ke-4",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -285,39 +253,13 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "M",
-                    "Meiji",
-                    "Taish\u014d",
-                    "Sh\u014dwa",
-                    "Heisei",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "M",
-                    "Meiji",
-                    "Taish\u014d",
-                    "Sh\u014dwa",
-                    "Heisei",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.long.Eras",
                 new String[] {
                     "Sebelum Masehi",
@@ -325,72 +267,23 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/M/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "BCE",
                     "CE",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/M/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Min",
-                    "Sen",
-                    "Sel",
-                    "Rab",
-                    "Kam",
-                    "Jum",
-                    "Sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Minggu",
-                    "Senin",
-                    "Selasa",
-                    "Rabu",
-                    "Kamis",
-                    "Jumat",
-                    "Sabtu",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "M",
-                    "S",
-                    "S",
-                    "R",
-                    "K",
-                    "J",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Sebelum R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Jan",
@@ -443,53 +336,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "Kuartal ke-1",
-                    "Kuartal ke-2",
-                    "Kuartal ke-3",
-                    "Kuartal ke-4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.long.Eras",
-                new String[] {
-                    "Sebelum R.O.C.",
-                    "R.O.C.",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Sebelum R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Sebelum R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_is.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_is.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_is extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "F1",
+            "F2",
+            "F3",
+            "F4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. fj\u00f3r\u00f0ungur",
+            "2. fj\u00f3r\u00f0ungur",
+            "3. fj\u00f3r\u00f0ungur",
+            "4. fj\u00f3r\u00f0ungur",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "f.h.",
+            "e.h.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "d.M.y GGGG",
+            "d.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "sun.",
+            "m\u00e1n.",
+            "\u00feri.",
+            "mi\u00f0.",
+            "fim.",
+            "f\u00f6s.",
+            "lau.",
+        };
+
+        final String[] sharedDayNames = {
+            "sunnudagur",
+            "m\u00e1nudagur",
+            "\u00feri\u00f0judagur",
+            "mi\u00f0vikudagur",
+            "fimmtudagur",
+            "f\u00f6studagur",
+            "laugardagur",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "\u00de",
+            "M",
+            "F",
+            "F",
+            "L",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "f.",
+            "e.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d. MMMM y G",
+            "d. MMMM y G",
+            "d.M.y G",
+            "d.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "F1",
-                    "F2",
-                    "F3",
-                    "F4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. fj\u00f3r\u00f0ungur",
-                    "2. fj\u00f3r\u00f0ungur",
-                    "3. fj\u00f3r\u00f0ungur",
-                    "4. fj\u00f3r\u00f0ungur",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "B\u00fadd\u00edskt dagatal" },
             { "calendarname.gregorian",
@@ -124,120 +180,29 @@
             { "field.zone",
                 "t\u00edmabelti" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "f.h.",
-                    "e.h.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "sun.",
-                    "m\u00e1n.",
-                    "\u00feri.",
-                    "mi\u00f0.",
-                    "fim.",
-                    "f\u00f6s.",
-                    "lau.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "sunnudagur",
-                    "m\u00e1nudagur",
-                    "\u00feri\u00f0judagur",
-                    "mi\u00f0vikudagur",
-                    "fimmtudagur",
-                    "f\u00f6studagur",
-                    "laugardagur",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "\u00de",
-                    "M",
-                    "F",
-                    "F",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "F1",
-                    "F2",
-                    "F3",
-                    "F4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. fj\u00f3r\u00f0ungur",
-                    "2. fj\u00f3r\u00f0ungur",
-                    "3. fj\u00f3r\u00f0ungur",
-                    "4. fj\u00f3r\u00f0ungur",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "f.h.",
-                    "e.h.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "f.",
-                    "e.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "fyrir Krist",
@@ -245,13 +210,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y G",
-                    "d. MMMM y G",
-                    "d.M.y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "f.Kr.",
@@ -259,52 +218,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "f.h.",
-                    "e.h.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d.M.y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "sun.",
-                    "m\u00e1n.",
-                    "\u00feri.",
-                    "mi\u00f0.",
-                    "fim.",
-                    "f\u00f6s.",
-                    "lau.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "sunnudagur",
-                    "m\u00e1nudagur",
-                    "\u00feri\u00f0judagur",
-                    "mi\u00f0vikudagur",
-                    "fimmtudagur",
-                    "f\u00f6studagur",
-                    "laugardagur",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "\u00de",
-                    "M",
-                    "F",
-                    "F",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -357,41 +279,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "F1",
-                    "F2",
-                    "F3",
-                    "F4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. fj\u00f3r\u00f0ungur",
-                    "2. fj\u00f3r\u00f0ungur",
-                    "3. fj\u00f3r\u00f0ungur",
-                    "4. fj\u00f3r\u00f0ungur",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "f.h.",
-                    "e.h.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "f.",
-                    "e.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_it.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_it.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,84 @@
 public class JavaTimeSupplementary_it extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "T1",
+            "T2",
+            "T3",
+            "T4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1\u00ba trimestre",
+            "2\u00ba trimestre",
+            "3\u00ba trimestre",
+            "4\u00ba trimestre",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "dd MMMM y GGGG",
+            "dd MMM y GGGG",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dom",
+            "lun",
+            "mar",
+            "mer",
+            "gio",
+            "ven",
+            "sab",
+        };
+
+        final String[] sharedDayNames = {
+            "domenica",
+            "luned\u00ec",
+            "marted\u00ec",
+            "mercoled\u00ec",
+            "gioved\u00ec",
+            "venerd\u00ec",
+            "sabato",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "M",
+            "G",
+            "V",
+            "S",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "m.",
+            "p.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "dd MMMM y G",
+            "dd MMM y G",
+            "dd/MM/yy GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "BC",
+            "EB",
+        };
+
+        final String[] sharedEras = {
+            "Prima di R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Calendario buddista" },
             { "calendarname.gregorian",
@@ -132,144 +193,29 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dom",
-                    "lun",
-                    "mar",
-                    "mer",
-                    "gio",
-                    "ven",
-                    "sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "domenica",
-                    "luned\u00ec",
-                    "marted\u00ec",
-                    "mercoled\u00ec",
-                    "gioved\u00ec",
-                    "venerd\u00ec",
-                    "sabato",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "G",
-                    "V",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "m.",
-                    "p.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "EB",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                new String[] {
-                    "BC",
-                    "EB",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "a.C.",
@@ -277,72 +223,23 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "dd MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "BC",
                     "dopo Cristo",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "dd MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dom",
-                    "lun",
-                    "mar",
-                    "mer",
-                    "gio",
-                    "ven",
-                    "sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "domenica",
-                    "luned\u00ec",
-                    "marted\u00ec",
-                    "mercoled\u00ec",
-                    "gioved\u00ec",
-                    "venerd\u00ec",
-                    "sabato",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "G",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Prima di R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "gen",
@@ -395,53 +292,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.long.Eras",
-                new String[] {
-                    "Prima di R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "m.",
-                    "p.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Prima di R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Prima di R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_it_CH.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_it_CH.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,55 +72,33 @@
 public class JavaTimeSupplementary_it_CH extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd.MM.yy G",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd.MM.yy GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_iw.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_iw.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,72 @@
 public class JavaTimeSupplementary_iw extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "\u05e8\u05d1\u05e2\u05d5\u05df 1",
+            "\u05e8\u05d1\u05e2\u05d5\u05df 2",
+            "\u05e8\u05d1\u05e2\u05d5\u05df 3",
+            "\u05e8\u05d1\u05e2\u05d5\u05df 4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
+            "\u05d0\u05d7\u05d4\u05f4\u05e6",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u05d9\u05d5\u05dd \u05d0\u05f3",
+            "\u05d9\u05d5\u05dd \u05d1\u05f3",
+            "\u05d9\u05d5\u05dd \u05d2\u05f3",
+            "\u05d9\u05d5\u05dd \u05d3\u05f3",
+            "\u05d9\u05d5\u05dd \u05d4\u05f3",
+            "\u05d9\u05d5\u05dd \u05d5\u05f3",
+            "\u05e9\u05d1\u05ea",
+        };
+
+        final String[] sharedDayNames = {
+            "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
+            "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
+            "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
+            "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
+            "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
+            "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
+            "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u05d0\u05f3",
+            "\u05d1\u05f3",
+            "\u05d2\u05f3",
+            "\u05d3\u05f3",
+            "\u05d4\u05f3",
+            "\u05d5\u05f3",
+            "\u05e9\u05f3",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d \u05d1MMMM y G",
+            "d \u05d1MMMM y G",
+            "d \u05d1MMM y G",
+            "d.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" },
             { "calendarname.gregorian",
@@ -124,11 +173,7 @@
             { "field.zone",
                 "\u05d0\u05d6\u05d5\u05e8" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
-                    "\u05d0\u05d7\u05d4\u05f4\u05e6",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE, d \u05d1MMMM y GGGG",
@@ -138,44 +183,13 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u05d9\u05d5\u05dd \u05d0\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d1\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d2\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d3\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d4\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d5\u05f3",
-                    "\u05e9\u05d1\u05ea",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
-                    "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
-                    "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u05d0\u05f3",
-                    "\u05d1\u05f3",
-                    "\u05d2\u05f3",
-                    "\u05d3\u05f3",
-                    "\u05d4\u05f3",
-                    "\u05d5\u05f3",
-                    "\u05e9\u05f3",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "\u05de\u05d5\u05d7\u05e8\u05dd",
@@ -211,69 +225,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
-                    "\u05d0\u05d7\u05d4\u05f4\u05e6",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d \u05d1MMMM y G",
-                    "d \u05d1MMMM y G",
-                    "d \u05d1MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
                 new String[] {
                     "EEEE, d \u05d1MMMM y G",
@@ -283,13 +249,7 @@
                 }
             },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d \u05d1MMMM y G",
-                    "d \u05d1MMMM y G",
-                    "d \u05d1MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
@@ -297,13 +257,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d \u05d1MMMM y G",
-                    "d \u05d1MMMM y G",
-                    "d \u05d1MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u05dc\u05e1\u05d4\"\u05e0",
@@ -311,11 +265,7 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
-                    "\u05d0\u05d7\u05d4\u05f4\u05e6",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE, d \u05d1MMMM y GGGG",
@@ -325,38 +275,11 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u05d9\u05d5\u05dd \u05d0\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d1\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d2\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d3\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d4\u05f3",
-                    "\u05d9\u05d5\u05dd \u05d5\u05f3",
-                    "\u05e9\u05d1\u05ea",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
-                    "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
-                    "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
-                    "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u05d0\u05f3",
-                    "\u05d1\u05f3",
-                    "\u05d2\u05f3",
-                    "\u05d3\u05f3",
-                    "\u05d4\u05f3",
-                    "\u05d5\u05f3",
-                    "\u05e9\u05f3",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u05d9\u05e0\u05d5\u05f3",
@@ -391,59 +314,16 @@
                     "",
                 }
             },
-            { "roc.MonthNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                    "5",
-                    "6",
-                    "7",
-                    "8",
-                    "9",
-                    "10",
-                    "11",
-                    "12",
-                    "",
-                }
-            },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 1",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 2",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 3",
-                    "\u05e8\u05d1\u05e2\u05d5\u05df 4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
-                    "\u05d0\u05d7\u05d4\u05f4\u05e6",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
-                    "\u05d0\u05d7\u05d4\u05f4\u05e6",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ja.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ja.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,19 +72,119 @@
 public class JavaTimeSupplementary_ja extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterNames = {
+            "\u7b2c1\u56db\u534a\u671f",
+            "\u7b2c2\u56db\u534a\u671f",
+            "\u7b2c3\u56db\u534a\u671f",
+            "\u7b2c4\u56db\u534a\u671f",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u5348\u524d",
+            "\u5348\u5f8c",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGGy\u5e74M\u6708d\u65e5EEEE",
+            "GGGGy\u5e74M\u6708d\u65e5",
+            "GGGGy/MM/dd",
+            "GGGGy/MM/dd",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u65e5",
+            "\u6708",
+            "\u706b",
+            "\u6c34",
+            "\u6728",
+            "\u91d1",
+            "\u571f",
+        };
+
+        final String[] sharedDayNames = {
+            "\u65e5\u66dc\u65e5",
+            "\u6708\u66dc\u65e5",
+            "\u706b\u66dc\u65e5",
+            "\u6c34\u66dc\u65e5",
+            "\u6728\u66dc\u65e5",
+            "\u91d1\u66dc\u65e5",
+            "\u571f\u66dc\u65e5",
+        };
+
+        final String[] sharedMonthNames = {
+            "\u30e0\u30cf\u30c3\u30e9\u30e0",
+            "\u30b5\u30d5\u30a2\u30eb",
+            "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+            "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc",
+            "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
+            "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc",
+            "\u30e9\u30b8\u30e3\u30d6",
+            "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3",
+            "\u30e9\u30de\u30c0\u30fc\u30f3",
+            "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb",
+            "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0",
+            "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3",
+            "",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H\u6642mm\u5206ss\u79d2 zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "Gy\u5e74M\u6708d\u65e5EEEE",
+            "Gy\u5e74M\u6708d\u65e5",
+            "Gy/MM/dd",
+            "Gy/MM/dd",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "\u897f\u66a6",
+            "\u660e\u6cbb",
+            "\u5927\u6b63",
+            "\u662d\u548c",
+            "\u5e73\u6210",
+        };
+
+        final String[] sharedJavaTimeShortEras = {
             "\u7d00\u5143\u524d",
             "\u897f\u66a6",
         };
+
+        final String[] sharedEras = {
+            "\u6c11\u56fd\u524d",
+            "\u6c11\u56fd",
+        };
+
+        final String[] sharedMonthAbbreviations = {
+            "1\u6708",
+            "2\u6708",
+            "3\u6708",
+            "4\u6708",
+            "5\u6708",
+            "6\u6708",
+            "7\u6708",
+            "8\u6708",
+            "9\u6708",
+            "10\u6708",
+            "11\u6708",
+            "12\u6708",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "\u7b2c1\u56db\u534a\u671f",
-                    "\u7b2c2\u56db\u534a\u671f",
-                    "\u7b2c3\u56db\u534a\u671f",
-                    "\u7b2c4\u56db\u534a\u671f",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u30bf\u30a4\u4ecf\u6559\u66a6" },
             { "calendarname.gregorian",
@@ -122,154 +222,29 @@
             { "field.zone",
                 "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
-                    "GGGGy\u5e74M\u6708d\u65e5",
-                    "GGGGy/MM/dd",
-                    "GGGGy/MM/dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u65e5",
-                    "\u6708",
-                    "\u706b",
-                    "\u6c34",
-                    "\u6728",
-                    "\u91d1",
-                    "\u571f",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.DayNames",
-                new String[] {
-                    "\u65e5\u66dc\u65e5",
-                    "\u6708\u66dc\u65e5",
-                    "\u706b\u66dc\u65e5",
-                    "\u6c34\u66dc\u65e5",
-                    "\u6728\u66dc\u65e5",
-                    "\u91d1\u66dc\u65e5",
-                    "\u571f\u66dc\u65e5",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u65e5",
-                    "\u6708",
-                    "\u706b",
-                    "\u6c34",
-                    "\u6728",
-                    "\u91d1",
-                    "\u571f",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
-                new String[] {
-                    "\u30e0\u30cf\u30c3\u30e9\u30e0",
-                    "\u30b5\u30d5\u30a2\u30eb",
-                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
-                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc",
-                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
-                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc",
-                    "\u30e9\u30b8\u30e3\u30d6",
-                    "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3",
-                    "\u30e9\u30de\u30c0\u30fc\u30f3",
-                    "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb",
-                    "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0",
-                    "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNames",
-                new String[] {
-                    "\u30e0\u30cf\u30c3\u30e9\u30e0",
-                    "\u30b5\u30d5\u30a2\u30eb",
-                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
-                    "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc",
-                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb",
-                    "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc",
-                    "\u30e9\u30b8\u30e3\u30d6",
-                    "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3",
-                    "\u30e9\u30de\u30c0\u30fc\u30f3",
-                    "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb",
-                    "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0",
-                    "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u7b2c1\u56db\u534a\u671f",
-                    "\u7b2c2\u56db\u534a\u671f",
-                    "\u7b2c3\u56db\u534a\u671f",
-                    "\u7b2c4\u56db\u534a\u671f",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H\u6642mm\u5206ss\u79d2 zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
@@ -291,13 +266,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/MM/dd",
-                    "Gy/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "Gy'\u5e74'M'\u6708'd'\u65e5'",
@@ -307,193 +276,47 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\u897f\u66a6",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\u897f\u66a6",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "Gy\u5e74M\u6708d\u65e5EEEE",
-                    "Gy\u5e74M\u6708d\u65e5",
-                    "Gy/MM/dd",
-                    "Gy/MM/dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
-                    "GGGGy\u5e74M\u6708d\u65e5",
-                    "GGGGy/MM/dd",
-                    "GGGGy/MM/dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u65e5",
-                    "\u6708",
-                    "\u706b",
-                    "\u6c34",
-                    "\u6728",
-                    "\u91d1",
-                    "\u571f",
-                }
-            },
+                sharedDayNarrows },
             { "roc.DayNames",
-                new String[] {
-                    "\u65e5\u66dc\u65e5",
-                    "\u6708\u66dc\u65e5",
-                    "\u706b\u66dc\u65e5",
-                    "\u6c34\u66dc\u65e5",
-                    "\u6728\u66dc\u65e5",
-                    "\u91d1\u66dc\u65e5",
-                    "\u571f\u66dc\u65e5",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u65e5",
-                    "\u6708",
-                    "\u706b",
-                    "\u6c34",
-                    "\u6728",
-                    "\u91d1",
-                    "\u571f",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "1\u6708",
-                    "2\u6708",
-                    "3\u6708",
-                    "4\u6708",
-                    "5\u6708",
-                    "6\u6708",
-                    "7\u6708",
-                    "8\u6708",
-                    "9\u6708",
-                    "10\u6708",
-                    "11\u6708",
-                    "12\u6708",
-                    "",
-                }
-            },
+                sharedMonthAbbreviations },
             { "roc.MonthNames",
-                new String[] {
-                    "1\u6708",
-                    "2\u6708",
-                    "3\u6708",
-                    "4\u6708",
-                    "5\u6708",
-                    "6\u6708",
-                    "7\u6708",
-                    "8\u6708",
-                    "9\u6708",
-                    "10\u6708",
-                    "11\u6708",
-                    "12\u6708",
-                    "",
-                }
-            },
-            { "roc.MonthNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                    "5",
-                    "6",
-                    "7",
-                    "8",
-                    "9",
-                    "10",
-                    "11",
-                    "12",
-                    "",
-                }
-            },
+                sharedMonthAbbreviations },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u7b2c1\u56db\u534a\u671f",
-                    "\u7b2c2\u56db\u534a\u671f",
-                    "\u7b2c3\u56db\u534a\u671f",
-                    "\u7b2c4\u56db\u534a\u671f",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H\u6642mm\u5206ss\u79d2 zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u5348\u524d",
-                    "\u5348\u5f8c",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ko.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ko.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,110 @@
 public class JavaTimeSupplementary_ko extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimebuddhistlongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "1\ubd84\uae30",
+            "2\ubd84\uae30",
+            "3\ubd84\uae30",
+            "4\ubd84\uae30",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\uc81c 1/4\ubd84\uae30",
+            "\uc81c 2/4\ubd84\uae30",
+            "\uc81c 3/4\ubd84\uae30",
+            "\uc81c 4/4\ubd84\uae30",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\uc624\uc804",
+            "\uc624\ud6c4",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
+            "GGGG y\ub144 M\uc6d4 d\uc77c",
+            "GGGG y. M. d.",
+            "GGGG y. M. d.",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\uc77c",
+            "\uc6d4",
+            "\ud654",
+            "\uc218",
+            "\ubaa9",
+            "\uae08",
+            "\ud1a0",
+        };
+
+        final String[] sharedDayNames = {
+            "\uc77c\uc694\uc77c",
+            "\uc6d4\uc694\uc77c",
+            "\ud654\uc694\uc77c",
+            "\uc218\uc694\uc77c",
+            "\ubaa9\uc694\uc77c",
+            "\uae08\uc694\uc77c",
+            "\ud1a0\uc694\uc77c",
+        };
+
+        final String[] sharedTimePatterns = {
+            "a h\uc2dc m\ubd84 s\ucd08 zzzz",
+            "a h\uc2dc m\ubd84 s\ucd08 z",
+            "a h:mm:ss",
+            "a h:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y\ub144 M\uc6d4 d\uc77c EEEE",
+            "G y\ub144 M\uc6d4 d\uc77c",
+            "G y. M. d.",
+            "G y. M. d.",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "BC",
             "\ubd88\uae30",
         };
-        final String[] javatimelongEras = {
+
+        final String[] sharedJavaTimeShortEras = {
+            "\uc11c\uae30",
+            "\uba54\uc774\uc9c0",
+            "\ub2e4\uc774\uc1fc",
+            "\uc1fc\uc640",
+            "\ud5e4\uc774\uc138\uc774",
+        };
+
+        final String[] sharedJavaTimeShortEras2 = {
             "\uae30\uc6d0\uc804",
             "\uc11c\uae30",
         };
+
+        final String[] sharedEras = {
+            "\uc911\ud654\ubbfc\uad6d\uc804",
+            "\uc911\ud654\ubbfc\uad6d",
+        };
+
+        final String[] sharedMonthNames = {
+            "1\uc6d4",
+            "2\uc6d4",
+            "3\uc6d4",
+            "4\uc6d4",
+            "5\uc6d4",
+            "6\uc6d4",
+            "7\uc6d4",
+            "8\uc6d4",
+            "9\uc6d4",
+            "10\uc6d4",
+            "11\uc6d4",
+            "12\uc6d4",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1\ubd84\uae30",
-                    "2\ubd84\uae30",
-                    "3\ubd84\uae30",
-                    "4\ubd84\uae30",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\uc81c 1/4\ubd84\uae30",
-                    "\uc81c 2/4\ubd84\uae30",
-                    "\uc81c 3/4\ubd84\uae30",
-                    "\uc81c 4/4\ubd84\uae30",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\ubd88\uad50\ub825" },
             { "calendarname.gregorian",
@@ -132,58 +211,15 @@
             { "field.zone",
                 "\uc2dc\uac04\ub300" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\uc624\uc804",
-                    "\uc624\ud6c4",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "GGGG y\ub144 M\uc6d4 d\uc77c",
-                    "GGGG y. M. d.",
-                    "GGGG y. M. d.",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\uc77c",
-                    "\uc6d4",
-                    "\ud654",
-                    "\uc218",
-                    "\ubaa9",
-                    "\uae08",
-                    "\ud1a0",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.DayNames",
-                new String[] {
-                    "\uc77c\uc694\uc77c",
-                    "\uc6d4\uc694\uc77c",
-                    "\ud654\uc694\uc77c",
-                    "\uc218\uc694\uc77c",
-                    "\ubaa9\uc694\uc77c",
-                    "\uae08\uc694\uc77c",
-                    "\ud1a0\uc694\uc77c",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\uc77c",
-                    "\uc6d4",
-                    "\ud654",
-                    "\uc218",
-                    "\ubaa9",
-                    "\uae08",
-                    "\ud1a0",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "\ubb34\ud558\ub78c",
@@ -202,81 +238,25 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1\ubd84\uae30",
-                    "2\ubd84\uae30",
-                    "3\ubd84\uae30",
-                    "4\ubd84\uae30",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\uc81c 1/4\ubd84\uae30",
-                    "\uc81c 2/4\ubd84\uae30",
-                    "\uc81c 3/4\ubd84\uae30",
-                    "\uc81c 4/4\ubd84\uae30",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "a h\uc2dc m\ubd84 s\ucd08 zzzz",
-                    "a h\uc2dc m\ubd84 s\ucd08 z",
-                    "a h:mm:ss",
-                    "a h:mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
                 new String[] {
                     "AM",
                     "PM",
                 }
             },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d.",
-                    "G y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d.",
-                    "G y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "G y\ub144 M\uc6d4 d\uc77c EEEE",
@@ -286,187 +266,45 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\uc11c\uae30",
-                    "\uba54\uc774\uc9c0",
-                    "\ub2e4\uc774\uc1fc",
-                    "\uc1fc\uc640",
-                    "\ud5e4\uc774\uc138\uc774",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\uc11c\uae30",
-                    "\uba54\uc774\uc9c0",
-                    "\ub2e4\uc774\uc1fc",
-                    "\uc1fc\uc640",
-                    "\ud5e4\uc774\uc138\uc774",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "G y\ub144 M\uc6d4 d\uc77c",
-                    "G y. M. d.",
-                    "G y. M. d.",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\uc624\uc804",
-                    "\uc624\ud6c4",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y\ub144 M\uc6d4 d\uc77c EEEE",
-                    "GGGG y\ub144 M\uc6d4 d\uc77c",
-                    "GGGG y. M. d.",
-                    "GGGG y. M. d.",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\uc77c",
-                    "\uc6d4",
-                    "\ud654",
-                    "\uc218",
-                    "\ubaa9",
-                    "\uae08",
-                    "\ud1a0",
-                }
-            },
+                sharedDayNarrows },
             { "roc.DayNames",
-                new String[] {
-                    "\uc77c\uc694\uc77c",
-                    "\uc6d4\uc694\uc77c",
-                    "\ud654\uc694\uc77c",
-                    "\uc218\uc694\uc77c",
-                    "\ubaa9\uc694\uc77c",
-                    "\uae08\uc694\uc77c",
-                    "\ud1a0\uc694\uc77c",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\uc77c",
-                    "\uc6d4",
-                    "\ud654",
-                    "\uc218",
-                    "\ubaa9",
-                    "\uae08",
-                    "\ud1a0",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\uc911\ud654\ubbfc\uad6d\uc804",
-                    "\uc911\ud654\ubbfc\uad6d",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "1\uc6d4",
-                    "2\uc6d4",
-                    "3\uc6d4",
-                    "4\uc6d4",
-                    "5\uc6d4",
-                    "6\uc6d4",
-                    "7\uc6d4",
-                    "8\uc6d4",
-                    "9\uc6d4",
-                    "10\uc6d4",
-                    "11\uc6d4",
-                    "12\uc6d4",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNames",
-                new String[] {
-                    "1\uc6d4",
-                    "2\uc6d4",
-                    "3\uc6d4",
-                    "4\uc6d4",
-                    "5\uc6d4",
-                    "6\uc6d4",
-                    "7\uc6d4",
-                    "8\uc6d4",
-                    "9\uc6d4",
-                    "10\uc6d4",
-                    "11\uc6d4",
-                    "12\uc6d4",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.MonthNarrows",
-                new String[] {
-                    "1\uc6d4",
-                    "2\uc6d4",
-                    "3\uc6d4",
-                    "4\uc6d4",
-                    "5\uc6d4",
-                    "6\uc6d4",
-                    "7\uc6d4",
-                    "8\uc6d4",
-                    "9\uc6d4",
-                    "10\uc6d4",
-                    "11\uc6d4",
-                    "12\uc6d4",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1\ubd84\uae30",
-                    "2\ubd84\uae30",
-                    "3\ubd84\uae30",
-                    "4\ubd84\uae30",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\uc81c 1/4\ubd84\uae30",
-                    "\uc81c 2/4\ubd84\uae30",
-                    "\uc81c 3/4\ubd84\uae30",
-                    "\uc81c 4/4\ubd84\uae30",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "a h\uc2dc m\ubd84 s\ucd08 zzzz",
-                    "a h\uc2dc m\ubd84 s\ucd08 z",
-                    "a h:mm:ss",
-                    "a h:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.long.Eras",
-                new String[] {
-                    "\uc911\ud654\ubbfc\uad6d\uc804",
-                    "\uc911\ud654\ubbfc\uad6d",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\uc911\ud654\ubbfc\uad6d\uc804",
-                    "\uc911\ud654\ubbfc\uad6d",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\uc911\ud654\ubbfc\uad6d\uc804",
-                    "\uc911\ud654\ubbfc\uad6d",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_lt.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_lt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,84 @@
 public class JavaTimeSupplementary_lt extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "I k.",
+            "II k.",
+            "III k.",
+            "IV k.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "I ketvirtis",
+            "II ketvirtis",
+            "III ketvirtis",
+            "IV ketvirtis",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "prie\u0161piet",
+            "popiet",
+        };
+
+        final String[] sharedDatePatterns = {
+            "y MMMM d GGGG, EEEE",
+            "y MMMM d GGGG",
+            "y MMM d GGGG",
+            "y-MM-dd GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "sk",
+            "pr",
+            "an",
+            "tr",
+            "kt",
+            "pn",
+            "\u0161t",
+        };
+
+        final String[] sharedDayNames = {
+            "sekmadienis",
+            "pirmadienis",
+            "antradienis",
+            "tre\u010diadienis",
+            "ketvirtadienis",
+            "penktadienis",
+            "\u0161e\u0161tadienis",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "P",
+            "A",
+            "T",
+            "K",
+            "P",
+            "\u0160",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "pr. p.",
+            "pop.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "y MMMM d G, EEEE",
+            "y MMMM d G",
+            "y MMM d G",
+            "y-MM-dd G",
+        };
+
+        final String[] sharedEras = {
+            "Prie\u0161 R.O.C.",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "I k.",
-                    "II k.",
-                    "III k.",
-                    "IV k.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "I ketvirtis",
-                    "II ketvirtis",
-                    "III ketvirtis",
-                    "IV ketvirtis",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "budist\u0173 kalendorius" },
             { "calendarname.gregorian",
@@ -126,134 +187,25 @@
             { "field.zone",
                 "laiko juosta" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "prie\u0161piet",
-                    "popiet",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "y MMMM d GGGG, EEEE",
-                    "y MMMM d GGGG",
-                    "y MMM d GGGG",
-                    "y-MM-dd GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "sk",
-                    "pr",
-                    "an",
-                    "tr",
-                    "kt",
-                    "pn",
-                    "\u0161t",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "sekmadienis",
-                    "pirmadienis",
-                    "antradienis",
-                    "tre\u010diadienis",
-                    "ketvirtadienis",
-                    "penktadienis",
-                    "\u0161e\u0161tadienis",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "P",
-                    "A",
-                    "T",
-                    "K",
-                    "P",
-                    "\u0160",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "I k.",
-                    "II k.",
-                    "III k.",
-                    "IV k.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "I ketvirtis",
-                    "II ketvirtis",
-                    "III ketvirtis",
-                    "IV ketvirtis",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "prie\u0161piet",
-                    "popiet",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "pr. p.",
-                    "pop.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "y MMMM d G, EEEE",
-                    "y MMMM d G",
-                    "y MMM d G",
-                    "y-MM-dd G",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -261,21 +213,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "y MMMM d G, EEEE",
-                    "y MMMM d G",
-                    "y MMM d G",
-                    "y-MM-dd G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "y MMMM d G, EEEE",
-                    "y MMMM d G",
-                    "y MMM d G",
-                    "y-MM-dd G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "po Kristaus",
@@ -301,13 +241,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "y MMMM d G, EEEE",
-                    "y MMMM d G",
-                    "y MMM d G",
-                    "y-MM-dd G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "pr.Kr.",
@@ -315,58 +249,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "prie\u0161piet",
-                    "popiet",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "y MMMM d GGGG, EEEE",
-                    "y MMMM d GGGG",
-                    "y MMM d GGGG",
-                    "y-MM-dd GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "sk",
-                    "pr",
-                    "an",
-                    "tr",
-                    "kt",
-                    "pn",
-                    "\u0161t",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "sekmadienis",
-                    "pirmadienis",
-                    "antradienis",
-                    "tre\u010diadienis",
-                    "ketvirtadienis",
-                    "penktadienis",
-                    "\u0161e\u0161tadienis",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "P",
-                    "A",
-                    "T",
-                    "K",
-                    "P",
-                    "\u0160",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Prie\u0161 R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "saus.",
@@ -419,59 +312,19 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "I k.",
-                    "II k.",
-                    "III k.",
-                    "IV k.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "I ketvirtis",
-                    "II ketvirtis",
-                    "III ketvirtis",
-                    "IV ketvirtis",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "prie\u0161piet",
-                    "popiet",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Prie\u0161 R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "pr. p.",
-                    "pop.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Prie\u0161 R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Prie\u0161 R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_lv.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_lv.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,88 @@
 public class JavaTimeSupplementary_lv extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1.\u00a0cet.",
+            "2.\u00a0cet.",
+            "3.\u00a0cet.",
+            "4.\u00a0cet.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. ceturksnis",
+            "2. ceturksnis",
+            "3. ceturksnis",
+            "4. ceturksnis",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "priek\u0161pusdien\u0101",
+            "p\u0113cpusdien\u0101",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, y. 'gada' d. MMMM GGGG",
+            "y. 'gada' d. MMMM GGGG",
+            "y. 'gada' d. MMM GGGG",
+            "dd.MM.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Sv",
+            "Pr",
+            "Ot",
+            "Tr",
+            "Ce",
+            "Pk",
+            "Se",
+        };
+
+        final String[] sharedDayNames = {
+            "sv\u0113tdiena",
+            "pirmdiena",
+            "otrdiena",
+            "tre\u0161diena",
+            "ceturtdiena",
+            "piektdiena",
+            "sestdiena",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "P",
+            "O",
+            "T",
+            "C",
+            "P",
+            "S",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "priek\u0161p.",
+            "p\u0113cp.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, y. 'gada' d. MMMM G",
+            "y. 'gada' d. MMMM G",
+            "y. 'gada' d. MMM G",
+            "dd.MM.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1.\u00a0cet.",
-                    "2.\u00a0cet.",
-                    "3.\u00a0cet.",
-                    "4.\u00a0cet.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. ceturksnis",
-                    "2. ceturksnis",
-                    "3. ceturksnis",
-                    "4. ceturksnis",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "budistu kalend\u0101rs" },
             { "calendarname.gregorian",
@@ -132,52 +189,15 @@
             { "field.zone",
                 "laika josla" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "priek\u0161pusdien\u0101",
-                    "p\u0113cpusdien\u0101",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM GGGG",
-                    "y. 'gada' d. MMMM GGGG",
-                    "y. 'gada' d. MMM GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Sv",
-                    "Pr",
-                    "Ot",
-                    "Tr",
-                    "Ce",
-                    "Pk",
-                    "Se",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "sv\u0113tdiena",
-                    "pirmdiena",
-                    "otrdiena",
-                    "tre\u0161diena",
-                    "ceturtdiena",
-                    "piektdiena",
-                    "sestdiena",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "P",
-                    "O",
-                    "T",
-                    "C",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "muharams",
@@ -196,73 +216,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1.\u00a0cet.",
-                    "2.\u00a0cet.",
-                    "3.\u00a0cet.",
-                    "4.\u00a0cet.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. ceturksnis",
-                    "2. ceturksnis",
-                    "3. ceturksnis",
-                    "4. ceturksnis",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "priek\u0161p.",
-                    "p\u0113cp.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "priek\u0161p.",
-                    "p\u0113cp.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMM G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMM G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMM G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "pirms m\u016bsu \u0113ras",
@@ -270,13 +238,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMMM G",
-                    "y. 'gada' d. MMM G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "pm\u0113",
@@ -284,52 +246,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "priek\u0161pusdien\u0101",
-                    "p\u0113cpusdien\u0101",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, y. 'gada' d. MMMM GGGG",
-                    "y. 'gada' d. MMMM GGGG",
-                    "y. 'gada' d. MMM GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Sv",
-                    "Pr",
-                    "Ot",
-                    "Tr",
-                    "Ce",
-                    "Pk",
-                    "Se",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "sv\u0113tdiena",
-                    "pirmdiena",
-                    "otrdiena",
-                    "tre\u0161diena",
-                    "ceturtdiena",
-                    "piektdiena",
-                    "sestdiena",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "P",
-                    "O",
-                    "T",
-                    "C",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "janv.",
@@ -382,49 +307,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1.\u00a0cet.",
-                    "2.\u00a0cet.",
-                    "3.\u00a0cet.",
-                    "4.\u00a0cet.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. ceturksnis",
-                    "2. ceturksnis",
-                    "3. ceturksnis",
-                    "4. ceturksnis",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "priek\u0161p.",
-                    "p\u0113cp.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "priek\u0161p.",
-                    "p\u0113cp.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_mk.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_mk.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_mk extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "\u0458\u0430\u043d-\u043c\u0430\u0440",
+            "\u0430\u043f\u0440-\u0458\u0443\u043d",
+            "\u0458\u0443\u043b-\u0441\u0435\u043f",
+            "\u043e\u043a\u0442-\u0434\u0435\u043a",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+            "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+            "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+            "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
+            "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, dd MMMM y '\u0433'. GGGG",
+            "dd MMMM y '\u0433'. GGGG",
+            "dd.M.y GGGG",
+            "dd.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u043d\u0435\u0434.",
+            "\u043f\u043e\u043d.",
+            "\u0432\u0442.",
+            "\u0441\u0440\u0435.",
+            "\u0447\u0435\u0442.",
+            "\u043f\u0435\u0442.",
+            "\u0441\u0430\u0431.",
+        };
+
+        final String[] sharedDayNames = {
+            "\u043d\u0435\u0434\u0435\u043b\u0430",
+            "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
+            "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
+            "\u0441\u0440\u0435\u0434\u0430",
+            "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a",
+            "\u043f\u0435\u0442\u043e\u043a",
+            "\u0441\u0430\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u043d",
+            "\u043f",
+            "\u0432",
+            "\u0441",
+            "\u0447",
+            "\u043f",
+            "\u0441",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "\u043f\u0440\u0435\u0442.",
+            "\u043f\u043e\u043f\u043b.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, dd MMMM y '\u0433'. G",
+            "dd MMMM y '\u0433'. G",
+            "dd.M.y G",
+            "dd.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u0458\u0430\u043d-\u043c\u0430\u0440",
-                    "\u0430\u043f\u0440-\u0458\u0443\u043d",
-                    "\u0458\u0443\u043b-\u0441\u0435\u043f",
-                    "\u043e\u043a\u0442-\u0434\u0435\u043a",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
             { "calendarname.gregorian",
@@ -124,120 +180,29 @@
             { "field.zone",
                 "\u0432\u0440\u0435\u043c\u0435\u043d\u0441\u043a\u0430 \u0437\u043e\u043d\u0430" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
-                    "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. GGGG",
-                    "dd MMMM y '\u0433'. GGGG",
-                    "dd.M.y GGGG",
-                    "dd.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0435\u0434.",
-                    "\u043f\u043e\u043d.",
-                    "\u0432\u0442.",
-                    "\u0441\u0440\u0435.",
-                    "\u0447\u0435\u0442.",
-                    "\u043f\u0435\u0442.",
-                    "\u0441\u0430\u0431.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u043b\u0430",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a",
-                    "\u043f\u0435\u0442\u043e\u043a",
-                    "\u0441\u0430\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0432",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u0458\u0430\u043d-\u043c\u0430\u0440",
-                    "\u0430\u043f\u0440-\u0458\u0443\u043d",
-                    "\u0458\u0443\u043b-\u0441\u0435\u043f",
-                    "\u043e\u043a\u0442-\u0434\u0435\u043a",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
-                    "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442.",
-                    "\u043f\u043e\u043f\u043b.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. G",
-                    "dd MMMM y '\u0433'. G",
-                    "dd.M.y G",
-                    "dd.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. G",
-                    "dd MMMM y '\u0433'. G",
-                    "dd.M.y G",
-                    "dd.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. G",
-                    "dd MMMM y '\u0433'. G",
-                    "dd.M.y G",
-                    "dd.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u043f\u0440\u0435\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430",
@@ -245,13 +210,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. G",
-                    "dd MMMM y '\u0433'. G",
-                    "dd.M.y G",
-                    "dd.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u043f\u0440.\u043d.\u0435.",
@@ -259,52 +218,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
-                    "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd MMMM y '\u0433'. GGGG",
-                    "dd MMMM y '\u0433'. GGGG",
-                    "dd.M.y GGGG",
-                    "dd.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0435\u0434.",
-                    "\u043f\u043e\u043d.",
-                    "\u0432\u0442.",
-                    "\u0441\u0440\u0435.",
-                    "\u0447\u0435\u0442.",
-                    "\u043f\u0435\u0442.",
-                    "\u0441\u0430\u0431.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u043b\u0430",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a",
-                    "\u043f\u0435\u0442\u043e\u043a",
-                    "\u0441\u0430\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0432",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u0458\u0430\u043d.",
@@ -357,41 +279,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u0458\u0430\u043d-\u043c\u0430\u0440",
-                    "\u0430\u043f\u0440-\u0458\u0443\u043d",
-                    "\u0458\u0443\u043b-\u0441\u0435\u043f",
-                    "\u043e\u043a\u0442-\u0434\u0435\u043a",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
-                    "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435\u0442.",
-                    "\u043f\u043e\u043f\u043b.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ms.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ms.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,86 @@
 public class JavaTimeSupplementary_ms extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "S1",
+            "S2",
+            "S3",
+            "S4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "Suku pertama",
+            "Suku Ke-2",
+            "Suku Ke-3",
+            "Suku Ke-4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "PG",
+            "PTG",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "dd/MM/y GGGG",
+            "d/MM/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Ahd",
+            "Isn",
+            "Sel",
+            "Rab",
+            "Kha",
+            "Jum",
+            "Sab",
+        };
+
+        final String[] sharedDayNames = {
+            "Ahad",
+            "Isnin",
+            "Selasa",
+            "Rabu",
+            "Khamis",
+            "Jumaat",
+            "Sabtu",
+        };
+
+        final String[] sharedDayNarrows = {
+            "A",
+            "I",
+            "S",
+            "R",
+            "K",
+            "J",
+            "S",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a zzzz",
+            "h:mm:ss a z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "dd/MM/y G",
+            "d/MM/y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "S1",
-                    "S2",
-                    "S3",
-                    "S4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "Suku pertama",
-                    "Suku Ke-2",
-                    "Suku Ke-3",
-                    "Suku Ke-4",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Kalendar Buddha" },
             { "calendarname.gregorian",
@@ -122,134 +185,27 @@
             { "field.zone",
                 "Zon Waktu" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "PG",
-                    "PTG",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd/MM/y GGGG",
-                    "d/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Ahd",
-                    "Isn",
-                    "Sel",
-                    "Rab",
-                    "Kha",
-                    "Jum",
-                    "Sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Ahad",
-                    "Isnin",
-                    "Selasa",
-                    "Rabu",
-                    "Khamis",
-                    "Jumaat",
-                    "Sabtu",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "A",
-                    "I",
-                    "S",
-                    "R",
-                    "K",
-                    "J",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "S1",
-                    "S2",
-                    "S3",
-                    "S4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "Suku pertama",
-                    "Suku Ke-2",
-                    "Suku Ke-3",
-                    "Suku Ke-4",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "PG",
-                    "PTG",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -257,21 +213,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "S.M.",
@@ -279,13 +223,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd/MM/y G",
-                    "d/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "BCE",
@@ -293,52 +231,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "PG",
-                    "PTG",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd/MM/y GGGG",
-                    "d/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Ahd",
-                    "Isn",
-                    "Sel",
-                    "Rab",
-                    "Kha",
-                    "Jum",
-                    "Sab",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Ahad",
-                    "Isnin",
-                    "Selasa",
-                    "Rabu",
-                    "Khamis",
-                    "Jumaat",
-                    "Sabtu",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "A",
-                    "I",
-                    "S",
-                    "R",
-                    "K",
-                    "J",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Jan",
@@ -391,41 +292,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "S1",
-                    "S2",
-                    "S3",
-                    "S4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "Suku pertama",
-                    "Suku Ke-2",
-                    "Suku Ke-3",
-                    "Suku Ke-4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a zzzz",
-                    "h:mm:ss a z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "PG",
-                    "PTG",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_mt.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_mt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,69 @@
 public class JavaTimeSupplementary_mt extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1el kwart",
+            "2ni kwart",
+            "3et kwart",
+            "4ba\u2019 kwart",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d 'ta'\u2019 MMMM y GGGG",
+            "d 'ta'\u2019 MMMM y GGGG",
+            "dd MMM y GGGG",
+            "dd/MM/y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u0126ad",
+            "Tne",
+            "Tli",
+            "Erb",
+            "\u0126am",
+            "\u0120im",
+            "Sib",
+        };
+
+        final String[] sharedDayNames = {
+            "Il-\u0126add",
+            "It-Tnejn",
+            "It-Tlieta",
+            "L-Erbg\u0127a",
+            "Il-\u0126amis",
+            "Il-\u0120img\u0127a",
+            "Is-Sibt",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u0126",
+            "T",
+            "T",
+            "E",
+            "\u0126",
+            "\u0120",
+            "S",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d 'ta'\u2019 MMMM y G",
+            "d 'ta'\u2019 MMMM y G",
+            "dd MMM y G",
+            "dd/MM/y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1el kwart",
-                    "2ni kwart",
-                    "3et kwart",
-                    "4ba\u2019 kwart",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Kalendarju Buddist" },
             { "calendarname.gregorian",
@@ -126,94 +172,23 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y GGGG",
-                    "d 'ta'\u2019 MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u0126ad",
-                    "Tne",
-                    "Tli",
-                    "Erb",
-                    "\u0126am",
-                    "\u0120im",
-                    "Sib",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Il-\u0126add",
-                    "It-Tnejn",
-                    "It-Tlieta",
-                    "L-Erbg\u0127a",
-                    "Il-\u0126amis",
-                    "Il-\u0120img\u0127a",
-                    "Is-Sibt",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u0126",
-                    "T",
-                    "T",
-                    "E",
-                    "\u0126",
-                    "\u0120",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1el kwart",
-                    "2ni kwart",
-                    "3et kwart",
-                    "4ba\u2019 kwart",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y G",
-                    "d 'ta'\u2019 MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y G",
-                    "d 'ta'\u2019 MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y G",
-                    "d 'ta'\u2019 MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "Qabel Kristu",
@@ -221,66 +196,21 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y G",
-                    "d 'ta'\u2019 MMMM y G",
-                    "dd MMM y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "QK",
                     "WK",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'ta'\u2019 MMMM y GGGG",
-                    "d 'ta'\u2019 MMMM y GGGG",
-                    "dd MMM y GGGG",
-                    "dd/MM/y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u0126ad",
-                    "Tne",
-                    "Tli",
-                    "Erb",
-                    "\u0126am",
-                    "\u0120im",
-                    "Sib",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Il-\u0126add",
-                    "It-Tnejn",
-                    "It-Tlieta",
-                    "L-Erbg\u0127a",
-                    "Il-\u0126amis",
-                    "Il-\u0120img\u0127a",
-                    "Is-Sibt",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u0126",
-                    "T",
-                    "T",
-                    "E",
-                    "\u0126",
-                    "\u0120",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Jan",
@@ -333,21 +263,9 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1el kwart",
-                    "2ni kwart",
-                    "3et kwart",
-                    "4ba\u2019 kwart",
-                }
-            },
+                sharedQuarterNames },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_nl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_nl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,84 @@
 public class JavaTimeSupplementary_nl extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1e kwartaal",
+            "2e kwartaal",
+            "3e kwartaal",
+            "4e kwartaal",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd-MM-yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "zo",
+            "ma",
+            "di",
+            "wo",
+            "do",
+            "vr",
+            "za",
+        };
+
+        final String[] sharedDayNames = {
+            "zondag",
+            "maandag",
+            "dinsdag",
+            "woensdag",
+            "donderdag",
+            "vrijdag",
+            "zaterdag",
+        };
+
+        final String[] sharedDayNarrows = {
+            "Z",
+            "M",
+            "D",
+            "W",
+            "D",
+            "V",
+            "Z",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "Sa\u02bbna Hizjria",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd-MM-yy GGGGG",
+        };
+
+        final String[] sharedShortEras = {
+            "voor R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1e kwartaal",
-                    "2e kwartaal",
-                    "3e kwartaal",
-                    "4e kwartaal",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Boeddhistische kalender" },
             { "calendarname.gregorian",
@@ -126,58 +187,17 @@
             { "field.zone",
                 "tijdzone" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd-MM-yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "zo",
-                    "ma",
-                    "di",
-                    "wo",
-                    "do",
-                    "vr",
-                    "za",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "zondag",
-                    "maandag",
-                    "dinsdag",
-                    "woensdag",
-                    "donderdag",
-                    "vrijdag",
-                    "zaterdag",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "Z",
-                    "M",
-                    "D",
-                    "W",
-                    "D",
-                    "V",
-                    "Z",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "Sa\u02bbna Hizjria",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "Moeh.",
@@ -213,81 +233,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1e kwartaal",
-                    "2e kwartaal",
-                    "3e kwartaal",
-                    "4e kwartaal",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "Sa\u02bbna Hizjria",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "Sa\u02bbna Hizjria",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "Sa\u02bbna Hizjria",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -295,21 +255,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "na Christus",
@@ -335,13 +283,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd-MM-yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "v. Chr.",
@@ -349,58 +291,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd-MM-yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "zo",
-                    "ma",
-                    "di",
-                    "wo",
-                    "do",
-                    "vr",
-                    "za",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "zondag",
-                    "maandag",
-                    "dinsdag",
-                    "woensdag",
-                    "donderdag",
-                    "vrijdag",
-                    "zaterdag",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "Z",
-                    "M",
-                    "D",
-                    "W",
-                    "D",
-                    "V",
-                    "Z",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "voor R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -453,59 +354,19 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1e kwartaal",
-                    "2e kwartaal",
-                    "3e kwartaal",
-                    "4e kwartaal",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "voor R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "voor R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "voor R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_nl_BE.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_nl_BE.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * COPYRIGHT AND PERMISSION NOTICE
  *
- * Copyright (C) 1991-2015 Unicode, Inc. All rights reserved.
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
  * Distributed under the Terms of Use in
  * http://www.unicode.org/copyright.html.
  *
@@ -72,55 +72,33 @@
 public class JavaTimeSupplementary_nl_BE extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "d/MM/yy G",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "d/MM/yy GGGGG",
+        };
+
         return new Object[][] {
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "d/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "d/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_no.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_no.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,100 @@
 public class JavaTimeSupplementary_no extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. kvartal",
+            "2. kvartal",
+            "3. kvartal",
+            "4. kvartal",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d. MMMM y GGGG",
+            "d. MMMM y GGGG",
+            "d. MMM y GGGG",
+            "d.M. y GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "s\u00f8n.",
+            "man.",
+            "tir.",
+            "ons.",
+            "tor.",
+            "fre.",
+            "l\u00f8r.",
+        };
+
+        final String[] sharedDayNames = {
+            "s\u00f8ndag",
+            "mandag",
+            "tirsdag",
+            "onsdag",
+            "torsdag",
+            "fredag",
+            "l\u00f8rdag",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "T",
+            "O",
+            "T",
+            "F",
+            "L",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH.mm.ss zzzz",
+            "HH.mm.ss z",
+            "HH.mm.ss",
+            "HH.mm",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d. MMMM y G",
+            "d. MMMM y G",
+            "d. MMM y G",
+            "d.M. y G",
+        };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "buddhistisk kalender" },
             { "calendarname.gregorian",
@@ -134,58 +203,15 @@
             { "field.zone",
                 "tidssone" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d.M. y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "s\u00f8n.",
-                    "man.",
-                    "tir.",
-                    "ons.",
-                    "tor.",
-                    "fre.",
-                    "l\u00f8r.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "s\u00f8ndag",
-                    "mandag",
-                    "tirsdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f8rdag",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "muh.",
@@ -221,81 +247,19 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M. y G",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -303,13 +267,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M. y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE d. MMMM y G",
@@ -343,13 +301,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y G",
-                    "d. MMMM y G",
-                    "d. MMM y G",
-                    "d.M. y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "f.Kr.",
@@ -357,58 +309,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d. MMMM y GGGG",
-                    "d. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d.M. y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "s\u00f8n.",
-                    "man.",
-                    "tir.",
-                    "ons.",
-                    "tor.",
-                    "fre.",
-                    "l\u00f8r.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "s\u00f8ndag",
-                    "mandag",
-                    "tirsdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f8rdag",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -461,67 +372,23 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. kvartal",
-                    "2. kvartal",
-                    "3. kvartal",
-                    "4. kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,84 @@
 public class JavaTimeSupplementary_pl extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "I kwarta\u0142",
+            "II kwarta\u0142",
+            "III kwarta\u0142",
+            "IV kwarta\u0142",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "dd.MM.y GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "niedz.",
+            "pon.",
+            "wt.",
+            "\u015br.",
+            "czw.",
+            "pt.",
+            "sob.",
+        };
+
+        final String[] sharedDayNames = {
+            "niedziela",
+            "poniedzia\u0142ek",
+            "wtorek",
+            "\u015broda",
+            "czwartek",
+            "pi\u0105tek",
+            "sobota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "N",
+            "P",
+            "W",
+            "\u015a",
+            "C",
+            "P",
+            "S",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "dd.MM.y G",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "p.n.e.",
             "n.e.",
         };
+
+        final String[] sharedEras = {
+            "Przed ROC",
+            "ROC",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "I kwarta\u0142",
-                    "II kwarta\u0142",
-                    "III kwarta\u0142",
-                    "IV kwarta\u0142",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "kalendarz buddyjski" },
             { "calendarname.gregorian",
@@ -136,46 +193,13 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "niedz.",
-                    "pon.",
-                    "wt.",
-                    "\u015br.",
-                    "czw.",
-                    "pt.",
-                    "sob.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "niedziela",
-                    "poniedzia\u0142ek",
-                    "wtorek",
-                    "\u015broda",
-                    "czwartek",
-                    "pi\u0105tek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "W",
-                    "\u015a",
-                    "C",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "Muh.",
@@ -211,57 +235,13 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "I kwarta\u0142",
-                    "II kwarta\u0142",
-                    "III kwarta\u0142",
-                    "IV kwarta\u0142",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.y G",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -269,86 +249,25 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "niedz.",
-                    "pon.",
-                    "wt.",
-                    "\u015br.",
-                    "czw.",
-                    "pt.",
-                    "sob.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "niedziela",
-                    "poniedzia\u0142ek",
-                    "wtorek",
-                    "\u015broda",
-                    "czwartek",
-                    "pi\u0105tek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "N",
-                    "P",
-                    "W",
-                    "\u015a",
-                    "C",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Przed ROC",
-                    "ROC",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "sty",
@@ -401,53 +320,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "I kwarta\u0142",
-                    "II kwarta\u0142",
-                    "III kwarta\u0142",
-                    "IV kwarta\u0142",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.long.Eras",
-                new String[] {
-                    "Przed ROC",
-                    "ROC",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Przed ROC",
-                    "ROC",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Przed ROC",
-                    "ROC",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pt.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_pt extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "T1",
+            "T2",
+            "T3",
+            "T4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1\u00ba trimestre",
+            "2\u00ba trimestre",
+            "3\u00ba trimestre",
+            "4\u00ba trimestre",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d 'de' MMMM 'de' y GGGG",
+            "d 'de' MMMM 'de' y GGGG",
+            "dd/MM/y GGGG",
+            "dd/MM/yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dom",
+            "seg",
+            "ter",
+            "qua",
+            "qui",
+            "sex",
+            "s\u00e1b",
+        };
+
+        final String[] sharedDayNames = {
+            "domingo",
+            "segunda-feira",
+            "ter\u00e7a-feira",
+            "quarta-feira",
+            "quinta-feira",
+            "sexta-feira",
+            "s\u00e1bado",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "S",
+            "T",
+            "Q",
+            "Q",
+            "S",
+            "S",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d 'de' MMMM 'de' y G",
+            "d 'de' MMMM 'de' y G",
+            "dd/MM/y G",
+            "dd/MM/yy GGGGG",
+        };
+
+        final String[] sharedEras = {
+            "Antes de R.O.C.",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Calend\u00e1rio Budista" },
             { "calendarname.gregorian",
@@ -130,122 +186,21 @@
                 }
             },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/y GGGG",
-                    "dd/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dom",
-                    "seg",
-                    "ter",
-                    "qua",
-                    "qui",
-                    "sex",
-                    "s\u00e1b",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "domingo",
-                    "segunda-feira",
-                    "ter\u00e7a-feira",
-                    "quarta-feira",
-                    "quinta-feira",
-                    "sexta-feira",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "S",
-                    "T",
-                    "Q",
-                    "Q",
-                    "S",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -253,21 +208,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "antes de Cristo",
@@ -275,72 +218,23 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y G",
-                    "d 'de' MMMM 'de' y G",
-                    "dd/MM/y G",
-                    "dd/MM/yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "a.C.",
                     "d.C.",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d 'de' MMMM 'de' y GGGG",
-                    "d 'de' MMMM 'de' y GGGG",
-                    "dd/MM/y GGGG",
-                    "dd/MM/yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dom",
-                    "seg",
-                    "ter",
-                    "qua",
-                    "qui",
-                    "sex",
-                    "s\u00e1b",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "domingo",
-                    "segunda-feira",
-                    "ter\u00e7a-feira",
-                    "quarta-feira",
-                    "quinta-feira",
-                    "sexta-feira",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "S",
-                    "T",
-                    "Q",
-                    "Q",
-                    "S",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Antes de R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan",
@@ -393,53 +287,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "T1",
-                    "T2",
-                    "T3",
-                    "T4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1\u00ba trimestre",
-                    "2\u00ba trimestre",
-                    "3\u00ba trimestre",
-                    "4\u00ba trimestre",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.long.Eras",
-                new String[] {
-                    "Antes de R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Antes de R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Antes de R.O.C.",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pt_PT.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_pt_PT.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,52 @@
 public class JavaTimeSupplementary_pt_PT extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1.\u00ba trimestre",
+            "2.\u00ba trimestre",
+            "3.\u00ba trimestre",
+            "4.\u00ba trimestre",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "da manh\u00e3",
+            "da tarde",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG y MMMM d, EEEE",
+            "GGGG y MMMM d",
+            "GGGG y MMM d",
+            "d/M/y GGGG",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "domingo",
+            "segunda",
+            "ter\u00e7a",
+            "quarta",
+            "quinta",
+            "sexta",
+            "s\u00e1bado",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G y MMMM d, EEEE",
+            "G y MMMM d",
+            "G y MMM d",
+            "d/M/y G",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1.\u00ba trimestre",
-                    "2.\u00ba trimestre",
-                    "3.\u00ba trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "1.\u00ba trimestre",
-                    "2.\u00ba trimestre",
-                    "3.\u00ba trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "Calend\u00e1rio budista" },
             { "calendarname.gregorian",
@@ -100,66 +129,21 @@
             { "calendarname.japanese",
                 "Calend\u00e1rio japon\u00eas" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "da manh\u00e3",
-                    "da tarde",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/M/y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "domingo",
-                    "segunda",
-                    "ter\u00e7a",
-                    "quarta",
-                    "quinta",
-                    "sexta",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1.\u00ba trimestre",
-                    "2.\u00ba trimestre",
-                    "3.\u00ba trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, d 'de' MMMM 'de' y G",
@@ -169,58 +153,19 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G y MMMM d, EEEE",
-                    "G y MMMM d",
-                    "G y MMM d",
-                    "d/M/y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "da manh\u00e3",
-                    "da tarde",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG y MMMM d, EEEE",
-                    "GGGG y MMMM d",
-                    "GGGG y MMM d",
-                    "d/M/y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "domingo",
-                    "segunda",
-                    "ter\u00e7a",
-                    "quarta",
-                    "quinta",
-                    "sexta",
-                    "s\u00e1bado",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1.\u00ba trimestre",
-                    "2.\u00ba trimestre",
-                    "3.\u00ba trimestre",
-                    "4.\u00ba trimestre",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ro.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ro.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,74 @@
 public class JavaTimeSupplementary_ro extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "trim. I",
+            "trim. II",
+            "trim. III",
+            "trim. IV",
+        };
+
+        final String[] sharedQuarterNames = {
+            "trimestrul I",
+            "trimestrul al II-lea",
+            "trimestrul al III-lea",
+            "trimestrul al IV-lea",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "a.m.",
+            "p.m.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "dd.MM.y GGGG",
+            "dd.MM.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "dum.",
+            "lun.",
+            "mar.",
+            "mie.",
+            "joi",
+            "vin.",
+            "s\u00e2m.",
+        };
+
+        final String[] sharedDayNames = {
+            "duminic\u0103",
+            "luni",
+            "mar\u021bi",
+            "miercuri",
+            "joi",
+            "vineri",
+            "s\u00e2mb\u0103t\u0103",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "L",
+            "M",
+            "M",
+            "J",
+            "V",
+            "S",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y G",
+            "d MMMM y G",
+            "dd.MM.y G",
+            "dd.MM.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "trim. I",
-                    "trim. II",
-                    "trim. III",
-                    "trim. IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "trimestrul I",
-                    "trimestrul al II-lea",
-                    "trimestrul al III-lea",
-                    "trimestrul al IV-lea",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "calendar budist" },
             { "calendarname.gregorian",
@@ -124,128 +175,25 @@
             { "field.zone",
                 "Fus orar" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "dum.",
-                    "lun.",
-                    "mar.",
-                    "mie.",
-                    "joi",
-                    "vin.",
-                    "s\u00e2m.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "duminic\u0103",
-                    "luni",
-                    "mar\u021bi",
-                    "miercuri",
-                    "joi",
-                    "vineri",
-                    "s\u00e2mb\u0103t\u0103",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "trim. I",
-                    "trim. II",
-                    "trim. III",
-                    "trim. IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "trimestrul I",
-                    "trimestrul al II-lea",
-                    "trimestrul al III-lea",
-                    "trimestrul al IV-lea",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
                 new String[] {
                     "BC",
@@ -259,21 +207,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u00eenainte de Hristos",
@@ -281,13 +217,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y G",
-                    "d MMMM y G",
-                    "dd.MM.y G",
-                    "dd.MM.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "d.C.",
@@ -295,52 +225,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "dd.MM.y GGGG",
-                    "dd.MM.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "dum.",
-                    "lun.",
-                    "mar.",
-                    "mie.",
-                    "joi",
-                    "vin.",
-                    "s\u00e2m.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "duminic\u0103",
-                    "luni",
-                    "mar\u021bi",
-                    "miercuri",
-                    "joi",
-                    "vineri",
-                    "s\u00e2mb\u0103t\u0103",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "L",
-                    "M",
-                    "M",
-                    "J",
-                    "V",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "ian.",
@@ -393,41 +286,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "trim. I",
-                    "trim. II",
-                    "trim. III",
-                    "trim. IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "trimestrul I",
-                    "trimestrul al II-lea",
-                    "trimestrul al III-lea",
-                    "trimestrul al IV-lea",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a.m.",
-                    "p.m.",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ru.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_ru.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,92 @@
 public class JavaTimeSupplementary_ru extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1-\u0439 \u043a\u0432.",
+            "2-\u0439 \u043a\u0432.",
+            "3-\u0439 \u043a\u0432.",
+            "4-\u0439 \u043a\u0432.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u0414\u041f",
+            "\u041f\u041f",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y '\u0433'. GGGG",
+            "d MMMM y '\u0433'. GGGG",
+            "d MMM y '\u0433'. GGGG",
+            "dd.MM.y GGGG",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u0432\u0441",
+            "\u043f\u043d",
+            "\u0432\u0442",
+            "\u0441\u0440",
+            "\u0447\u0442",
+            "\u043f\u0442",
+            "\u0441\u0431",
+        };
+
+        final String[] sharedDayNames = {
+            "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
+            "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
+            "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
+            "\u0441\u0440\u0435\u0434\u0430",
+            "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
+            "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
+            "\u0441\u0443\u0431\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedMonthNames = {
+            "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
+            "\u0421\u0430\u0444\u0430\u0440",
+            "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+            "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+            "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
+            "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
+            "\u0420\u0430\u0434\u0436\u0430\u0431",
+            "\u0428\u0430\u0430\u0431\u0430\u043d",
+            "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
+            "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
+            "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
+            "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
+            "",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y '\u0433'. G",
+            "d MMMM y '\u0433'. G",
+            "d MMM y '\u0433'. G",
+            "dd.MM.y G",
+        };
+
+        final String[] sharedEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0431\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" },
             { "calendarname.gregorian",
@@ -126,144 +195,31 @@
             { "field.zone",
                 "\u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. GGGG",
-                    "d MMMM y '\u0433'. GGGG",
-                    "d MMM y '\u0433'. GGGG",
-                    "dd.MM.y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u0432\u0441",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.DayNames",
-                new String[] {
-                    "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
-                    "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
-                    "\u0441\u0443\u0431\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u0432\u0441",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthAbbreviations",
-                new String[] {
-                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
-                    "\u0421\u0430\u0444\u0430\u0440",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0420\u0430\u0434\u0436\u0430\u0431",
-                    "\u0428\u0430\u0430\u0431\u0430\u043d",
-                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
-                    "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
-                    "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNames",
-                new String[] {
-                    "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
-                    "\u0421\u0430\u0444\u0430\u0440",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440",
-                    "\u0420\u0430\u0434\u0436\u0430\u0431",
-                    "\u0428\u0430\u0430\u0431\u0430\u043d",
-                    "\u0420\u0430\u043c\u0430\u0434\u0430\u043d",
-                    "\u0428\u0430\u0432\u0432\u0430\u043b\u044c",
-                    "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430",
-                    "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d MMM y '\u0433'. G",
-                    "dd.MM.y G",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -271,21 +227,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d MMM y '\u0433'. G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d MMM y '\u0433'. G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "\u043e\u0442 \u0420\u043e\u0436\u0434\u0435\u0441\u0442\u0432\u0430 \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430",
@@ -311,13 +255,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. G",
-                    "d MMMM y '\u0433'. G",
-                    "d MMM y '\u0433'. G",
-                    "dd.MM.y G",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u0434\u043e \u043d.\u044d.",
@@ -325,58 +263,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0433'. GGGG",
-                    "d MMMM y '\u0433'. GGGG",
-                    "d MMM y '\u0433'. GGGG",
-                    "dd.MM.y GGGG",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u0432\u0441",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayNarrows },
             { "roc.DayNames",
-                new String[] {
-                    "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
-                    "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
-                    "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
-                    "\u0441\u0443\u0431\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u0432\u0441",
-                    "\u043f\u043d",
-                    "\u0432\u0442",
-                    "\u0441\u0440",
-                    "\u0447\u0442",
-                    "\u043f\u0442",
-                    "\u0441\u0431",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u044f\u043d\u0432.",
@@ -429,59 +326,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0414\u041f",
-                    "\u041f\u041f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sk.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sk.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,15 +72,79 @@
 public class JavaTimeSupplementary_sk extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "1. \u0161tvr\u0165rok",
+            "2. \u0161tvr\u0165rok",
+            "3. \u0161tvr\u0165rok",
+            "4. \u0161tvr\u0165rok",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "AM",
+            "PM",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d. M. y GGGG",
+            "d. M. y GGGG",
+            "d. M. y GGGG",
+            "d.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "ne",
+            "po",
+            "ut",
+            "st",
+            "\u0161t",
+            "pi",
+            "so",
+        };
+
+        final String[] sharedDayNames = {
+            "nede\u013ea",
+            "pondelok",
+            "utorok",
+            "streda",
+            "\u0161tvrtok",
+            "piatok",
+            "sobota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "n",
+            "p",
+            "u",
+            "s",
+            "\u0161",
+            "p",
+            "s",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H:mm:ss zzzz",
+            "H:mm:ss z",
+            "H:mm:ss",
+            "H:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d. M. y G",
+            "d. M. y G",
+            "d. M. y G",
+            "d.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "1. \u0161tvr\u0165rok",
-                    "2. \u0161tvr\u0165rok",
-                    "3. \u0161tvr\u0165rok",
-                    "4. \u0161tvr\u0165rok",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "buddhistick\u00fd kalend\u00e1r" },
             { "calendarname.gregorian",
@@ -116,114 +180,29 @@
             { "field.zone",
                 "\u010dasov\u00e9 p\u00e1smo" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y GGGG",
-                    "d. M. y GGGG",
-                    "d. M. y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "ne",
-                    "po",
-                    "ut",
-                    "st",
-                    "\u0161t",
-                    "pi",
-                    "so",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "nede\u013ea",
-                    "pondelok",
-                    "utorok",
-                    "streda",
-                    "\u0161tvrtok",
-                    "piatok",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "u",
-                    "s",
-                    "\u0161",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. \u0161tvr\u0165rok",
-                    "2. \u0161tvr\u0165rok",
-                    "3. \u0161tvr\u0165rok",
-                    "4. \u0161tvr\u0165rok",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y G",
-                    "d. M. y G",
-                    "d. M. y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y G",
-                    "d. M. y G",
-                    "d. M. y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y G",
-                    "d. M. y G",
-                    "d. M. y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "pred Kristom",
@@ -231,66 +210,21 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y G",
-                    "d. M. y G",
-                    "d. M. y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "pred n.l.",
                     "n.l.",
                 }
             },
-            { "roc.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d. M. y GGGG",
-                    "d. M. y GGGG",
-                    "d. M. y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "ne",
-                    "po",
-                    "ut",
-                    "st",
-                    "\u0161t",
-                    "pi",
-                    "so",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "nede\u013ea",
-                    "pondelok",
-                    "utorok",
-                    "streda",
-                    "\u0161tvrtok",
-                    "piatok",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "u",
-                    "s",
-                    "\u0161",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan",
@@ -343,35 +277,11 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. \u0161tvr\u0165rok",
-                    "2. \u0161tvr\u0165rok",
-                    "3. \u0161tvr\u0165rok",
-                    "4. \u0161tvr\u0165rok",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H:mm:ss zzzz",
-                    "H:mm:ss z",
-                    "H:mm:ss",
-                    "H:mm",
-                }
-            },
-            { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "AM",
-                    "PM",
-                }
-            },
+                sharedTimePatterns },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,79 @@
 public class JavaTimeSupplementary_sl extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1. \u010det.",
+            "2. \u010det.",
+            "3. \u010det.",
+            "4. \u010det.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. \u010detrtletje",
+            "2. \u010detrtletje",
+            "3. \u010detrtletje",
+            "4. \u010detrtletje",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "dop.",
+            "pop.",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, dd. MMMM y GGGG",
+            "dd. MMMM y GGGG",
+            "d. MMM y GGGG",
+            "d. MM. yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "ned.",
+            "pon.",
+            "tor.",
+            "sre.",
+            "\u010det.",
+            "pet.",
+            "sob.",
+        };
+
+        final String[] sharedDayNames = {
+            "nedelja",
+            "ponedeljek",
+            "torek",
+            "sreda",
+            "\u010detrtek",
+            "petek",
+            "sobota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "n",
+            "p",
+            "t",
+            "s",
+            "\u010d",
+            "p",
+            "s",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "d",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, dd. MMMM y G",
+            "dd. MMMM y G",
+            "d. MMM y G",
+            "d. MM. yy GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1. \u010det.",
-                    "2. \u010det.",
-                    "3. \u010det.",
-                    "4. \u010det.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. \u010detrtletje",
-                    "2. \u010detrtletje",
-                    "3. \u010detrtletje",
-                    "4. \u010detrtletje",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "budisti\u010dni koledar" },
             { "calendarname.gregorian",
@@ -124,120 +180,29 @@
             { "field.zone",
                 "\u010dasovni pas" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "pop.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y GGGG",
-                    "dd. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d. MM. yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "ned.",
-                    "pon.",
-                    "tor.",
-                    "sre.",
-                    "\u010det.",
-                    "pet.",
-                    "sob.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "nedelja",
-                    "ponedeljek",
-                    "torek",
-                    "sreda",
-                    "\u010detrtek",
-                    "petek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "t",
-                    "s",
-                    "\u010d",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1. \u010det.",
-                    "2. \u010det.",
-                    "3. \u010det.",
-                    "4. \u010det.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. \u010detrtletje",
-                    "2. \u010detrtletje",
-                    "3. \u010detrtletje",
-                    "4. \u010detrtletje",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "pop.",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "d",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y G",
-                    "dd. MMMM y G",
-                    "d. MMM y G",
-                    "d. MM. yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y G",
-                    "dd. MMMM y G",
-                    "d. MMM y G",
-                    "d. MM. yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y G",
-                    "dd. MMMM y G",
-                    "d. MMM y G",
-                    "d. MM. yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "pred Kristusom",
@@ -245,13 +210,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y G",
-                    "dd. MMMM y G",
-                    "d. MMM y G",
-                    "d. MM. yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "pr.n.\u0161.",
@@ -259,52 +218,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "pop.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y GGGG",
-                    "dd. MMMM y GGGG",
-                    "d. MMM y GGGG",
-                    "d. MM. yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "ned.",
-                    "pon.",
-                    "tor.",
-                    "sre.",
-                    "\u010det.",
-                    "pet.",
-                    "sob.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "nedelja",
-                    "ponedeljek",
-                    "torek",
-                    "sreda",
-                    "\u010detrtek",
-                    "petek",
-                    "sobota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "t",
-                    "s",
-                    "\u010d",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -357,41 +279,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1. \u010det.",
-                    "2. \u010det.",
-                    "3. \u010det.",
-                    "4. \u010det.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. \u010detrtletje",
-                    "2. \u010detrtletje",
-                    "3. \u010detrtletje",
-                    "4. \u010detrtletje",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "dop.",
-                    "pop.",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "d",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sq.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sq.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,81 @@
 public class JavaTimeSupplementary_sq extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "tremujori I",
+            "tremujori II",
+            "tremujori III",
+            "tremujori IV",
+        };
+
+        final String[] sharedQuarterNames = {
+            "tremujori i par\u00eb",
+            "tremujori i dyt\u00eb",
+            "tremujori i tret\u00eb",
+            "tremujori i kat\u00ebrt",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "e paradites",
+            "e pasdites",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMM y GGGG",
+            "d MMM y GGGG",
+            "d MMM y GGGG",
+            "d.M.y G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Die",
+            "H\u00ebn",
+            "Mar",
+            "M\u00ebr",
+            "Enj",
+            "Pre",
+            "Sht",
+        };
+
+        final String[] sharedDayNames = {
+            "e diel",
+            "e h\u00ebn\u00eb",
+            "e mart\u00eb",
+            "e m\u00ebrkur\u00eb",
+            "e enjte",
+            "e premte",
+            "e shtun\u00eb",
+        };
+
+        final String[] sharedDayNarrows = {
+            "D",
+            "H",
+            "M",
+            "M",
+            "E",
+            "P",
+            "S",
+        };
+
+        final String[] sharedTimePatterns = {
+            "h:mm:ss a, zzzz",
+            "h:mm:ss a, z",
+            "h:mm:ss a",
+            "h:mm a",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMM y G",
+            "d MMM y G",
+            "d MMM y G",
+            "d.M.y GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "tremujori I",
-                    "tremujori II",
-                    "tremujori III",
-                    "tremujori IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "tremujori i par\u00eb",
-                    "tremujori i dyt\u00eb",
-                    "tremujori i tret\u00eb",
-                    "tremujori i kat\u00ebrt",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "kalendar budist" },
             { "calendarname.gregorian",
@@ -126,120 +184,31 @@
             { "field.zone",
                 "brezi orar" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y GGGG",
-                    "d MMM y GGGG",
-                    "d MMM y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Die",
-                    "H\u00ebn",
-                    "Mar",
-                    "M\u00ebr",
-                    "Enj",
-                    "Pre",
-                    "Sht",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "e diel",
-                    "e h\u00ebn\u00eb",
-                    "e mart\u00eb",
-                    "e m\u00ebrkur\u00eb",
-                    "e enjte",
-                    "e premte",
-                    "e shtun\u00eb",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "D",
-                    "H",
-                    "M",
-                    "M",
-                    "E",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "tremujori I",
-                    "tremujori II",
-                    "tremujori III",
-                    "tremujori IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "tremujori i par\u00eb",
-                    "tremujori i dyt\u00eb",
-                    "tremujori i tret\u00eb",
-                    "tremujori i kat\u00ebrt",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "h:mm:ss a, zzzz",
-                    "h:mm:ss a, z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y G",
-                    "d MMM y G",
-                    "d MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y G",
-                    "d MMM y G",
-                    "d MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y G",
-                    "d MMM y G",
-                    "d MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "para er\u00ebs s\u00eb re",
@@ -247,13 +216,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y G",
-                    "d MMM y G",
-                    "d MMM y G",
-                    "d.M.y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "p.e.r.",
@@ -261,52 +224,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMM y GGGG",
-                    "d MMM y GGGG",
-                    "d MMM y GGGG",
-                    "d.M.y G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Die",
-                    "H\u00ebn",
-                    "Mar",
-                    "M\u00ebr",
-                    "Enj",
-                    "Pre",
-                    "Sht",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "e diel",
-                    "e h\u00ebn\u00eb",
-                    "e mart\u00eb",
-                    "e m\u00ebrkur\u00eb",
-                    "e enjte",
-                    "e premte",
-                    "e shtun\u00eb",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "D",
-                    "H",
-                    "M",
-                    "M",
-                    "E",
-                    "P",
-                    "S",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Jan",
@@ -359,41 +285,15 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "tremujori I",
-                    "tremujori II",
-                    "tremujori III",
-                    "tremujori IV",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "tremujori i par\u00eb",
-                    "tremujori i dyt\u00eb",
-                    "tremujori i tret\u00eb",
-                    "tremujori i kat\u00ebrt",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "h:mm:ss a, zzzz",
-                    "h:mm:ss a, z",
-                    "h:mm:ss a",
-                    "h:mm a",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "e paradites",
-                    "e pasdites",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sr.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sr.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,110 @@
 public class JavaTimeSupplementary_sr extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "\u041a1",
+            "\u041a2",
+            "\u041a3",
+            "\u041a4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\u043f\u0440\u0432\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "\u0434\u0440\u0443\u0433\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "\u0442\u0440\u0435\u045b\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "\u0447\u0435\u0442\u0432\u0440\u0442\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
+            "\u043f\u043e \u043f\u043e\u0434\u043d\u0435",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, dd. MMMM y. GGGG",
+            "dd. MMMM y. GGGG",
+            "dd.MM.y. GGGG",
+            "d.M.y. G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u043d\u0435\u0434",
+            "\u043f\u043e\u043d",
+            "\u0443\u0442\u043e",
+            "\u0441\u0440\u0435",
+            "\u0447\u0435\u0442",
+            "\u043f\u0435\u0442",
+            "\u0441\u0443\u0431",
+        };
+
+        final String[] sharedDayNames = {
+            "\u043d\u0435\u0434\u0435\u0459\u0430",
+            "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
+            "\u0443\u0442\u043e\u0440\u0430\u043a",
+            "\u0441\u0440\u0435\u0434\u0430",
+            "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
+            "\u043f\u0435\u0442\u0430\u043a",
+            "\u0441\u0443\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u043d",
+            "\u043f",
+            "\u0443",
+            "\u0441",
+            "\u0447",
+            "\u043f",
+            "\u0441",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u0410\u0425",
+        };
+
+        final String[] sharedTimePatterns = {
+            "HH.mm.ss zzzz",
+            "HH.mm.ss z",
+            "HH.mm.ss",
+            "HH.mm",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, dd. MMMM y. G",
+            "dd. MMMM y. G",
+            "dd.MM.y. G",
+            "d.M.y. GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "BC",
+            "\u0411\u0415",
+        };
+
+        final String[] sharedShortEras = {
+            "\u041f\u0440\u0435 \u0420\u041a",
+            "\u0420\u041a",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u041a1",
-                    "\u041a2",
-                    "\u041a3",
-                    "\u041a4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0434\u0440\u0443\u0433\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0442\u0440\u0435\u045b\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "\u0431\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
             { "calendarname.gregorian",
@@ -132,58 +211,17 @@
             { "field.zone",
                 "\u0432\u0440\u0435\u043c\u0435\u043d\u0441\u043a\u0430 \u0437\u043e\u043d\u0430" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
-                    "\u043f\u043e \u043f\u043e\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y. GGGG",
-                    "dd. MMMM y. GGGG",
-                    "dd.MM.y. GGGG",
-                    "d.M.y. G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0435\u0434",
-                    "\u043f\u043e\u043d",
-                    "\u0443\u0442\u043e",
-                    "\u0441\u0440\u0435",
-                    "\u0447\u0435\u0442",
-                    "\u043f\u0435\u0442",
-                    "\u0441\u0443\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u0459\u0430",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
-                    "\u0443\u0442\u043e\u0440\u0430\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
-                    "\u043f\u0435\u0442\u0430\u043a",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0443",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0410\u0425",
-                }
-            },
+                sharedEras },
             { "islamic.MonthNames",
                 new String[] {
                     "\u041c\u0443\u0440\u0430\u0445\u0430\u043c",
@@ -202,95 +240,31 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u041a1",
-                    "\u041a2",
-                    "\u041a3",
-                    "\u041a4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0434\u0440\u0443\u0433\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0442\u0440\u0435\u045b\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
-                    "\u043f\u043e \u043f\u043e\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u0410\u0425",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u0410\u0425",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u0410\u0425",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y. G",
-                    "dd. MMMM y. G",
-                    "dd.MM.y. G",
-                    "d.M.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "\u0411\u0415",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                new String[] {
-                    "BC",
-                    "\u0411\u0415",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y. G",
-                    "dd. MMMM y. G",
-                    "dd.MM.y. G",
-                    "d.M.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "EEEE, MMMM d, y G",
@@ -324,13 +298,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y. G",
-                    "dd. MMMM y. G",
-                    "dd.MM.y. G",
-                    "d.M.y. GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u043f. \u043d. \u0435.",
@@ -338,58 +306,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
-                    "\u043f\u043e \u043f\u043e\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, dd. MMMM y. GGGG",
-                    "dd. MMMM y. GGGG",
-                    "dd.MM.y. GGGG",
-                    "d.M.y. G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u043d\u0435\u0434",
-                    "\u043f\u043e\u043d",
-                    "\u0443\u0442\u043e",
-                    "\u0441\u0440\u0435",
-                    "\u0447\u0435\u0442",
-                    "\u043f\u0435\u0442",
-                    "\u0441\u0443\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0435\u0459\u0430",
-                    "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
-                    "\u0443\u0442\u043e\u0440\u0430\u043a",
-                    "\u0441\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
-                    "\u043f\u0435\u0442\u0430\u043a",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u043d",
-                    "\u043f",
-                    "\u0443",
-                    "\u0441",
-                    "\u0447",
-                    "\u043f",
-                    "\u0441",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\u041f\u0440\u0435 \u0420\u041a",
-                    "\u0420\u041a",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u0458\u0430\u043d",
@@ -442,67 +369,23 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u041a1",
-                    "\u041a2",
-                    "\u041a3",
-                    "\u041a4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u043f\u0440\u0432\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0434\u0440\u0443\u0433\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0442\u0440\u0435\u045b\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "\u0447\u0435\u0442\u0432\u0440\u0442\u0438 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.TimePatterns",
-                new String[] {
-                    "HH.mm.ss zzzz",
-                    "HH.mm.ss z",
-                    "HH.mm.ss",
-                    "HH.mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
-                    "\u043f\u043e \u043f\u043e\u0434\u043d\u0435",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "\u041f\u0440\u0435 \u0420\u041a",
-                    "\u0420\u041a",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u041f\u0440\u0435 \u0420\u041a",
-                    "\u0420\u041a",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u041f\u0440\u0435 \u0420\u041a",
-                    "\u0420\u041a",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sr_BA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_sr_BA extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedTimePatterns = {
+            "HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        return new Object[][] {
+            { "islamic.TimePatterns",
+                sharedTimePatterns },
+            { "roc.TimePatterns",
+                sharedTimePatterns },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sr_Latn.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sr_Latn.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,75 @@
 public class JavaTimeSupplementary_sr_Latn extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "prvi kvartal",
+            "drugi kvartal",
+            "tre\u0107i kvartal",
+            "\u010detvrti kvartal",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "pre podne",
+            "po podne",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "ned",
+            "pon",
+            "uto",
+            "sre",
+            "\u010det",
+            "pet",
+            "sub",
+        };
+
+        final String[] sharedDayNames = {
+            "nedelja",
+            "ponedeljak",
+            "utorak",
+            "sreda",
+            "\u010detvrtak",
+            "petak",
+            "subota",
+        };
+
+        final String[] sharedDayNarrows = {
+            "n",
+            "p",
+            "u",
+            "s",
+            "\u010d",
+            "p",
+            "s",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "AH",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "BC",
+            "BE",
+        };
+
+        final String[] sharedShortEras = {
+            "Pre RK",
+            "RK",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "prvi kvartal",
-                    "drugi kvartal",
-                    "tre\u0107i kvartal",
-                    "\u010detvrti kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "budisti\u010dki kalendar" },
             { "calendarname.gregorian",
@@ -124,50 +176,15 @@
             { "field.zone",
                 "vremenska zona" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "pre podne",
-                    "po podne",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "ned",
-                    "pon",
-                    "uto",
-                    "sre",
-                    "\u010det",
-                    "pet",
-                    "sub",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "nedelja",
-                    "ponedeljak",
-                    "utorak",
-                    "sreda",
-                    "\u010detvrtak",
-                    "petak",
-                    "subota",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "u",
-                    "s",
-                    "\u010d",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.MonthNames",
                 new String[] {
                     "Muraham",
@@ -186,57 +203,21 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "prvi kvartal",
-                    "drugi kvartal",
-                    "tre\u0107i kvartal",
-                    "\u010detvrti kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "pre podne",
-                    "po podne",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "nove ere",
@@ -268,50 +249,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "pre podne",
-                    "po podne",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "ned",
-                    "pon",
-                    "uto",
-                    "sre",
-                    "\u010det",
-                    "pet",
-                    "sub",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "nedelja",
-                    "ponedeljak",
-                    "utorak",
-                    "sreda",
-                    "\u010detvrtak",
-                    "petak",
-                    "subota",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "n",
-                    "p",
-                    "u",
-                    "s",
-                    "\u010d",
-                    "p",
-                    "s",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Pre RK",
-                    "RK",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan",
@@ -364,45 +310,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "prvi kvartal",
-                    "drugi kvartal",
-                    "tre\u0107i kvartal",
-                    "\u010detvrti kvartal",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "pre podne",
-                    "po podne",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Pre RK",
-                    "RK",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Pre RK",
-                    "RK",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Pre RK",
-                    "RK",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sv.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_sv.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,91 @@
 public class JavaTimeSupplementary_sv extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "K1",
+            "K2",
+            "K3",
+            "K4",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1:a kvartalet",
+            "2:a kvartalet",
+            "3:e kvartalet",
+            "4:e kvartalet",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "fm",
+            "em",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE d MMMM y GGGG",
+            "d MMMM y GGGG",
+            "d MMM y GGGG",
+            "GGGG y-MM-dd",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "s\u00f6n",
+            "m\u00e5n",
+            "tis",
+            "ons",
+            "tors",
+            "fre",
+            "l\u00f6r",
+        };
+
+        final String[] sharedDayNames = {
+            "s\u00f6ndag",
+            "m\u00e5ndag",
+            "tisdag",
+            "onsdag",
+            "torsdag",
+            "fredag",
+            "l\u00f6rdag",
+        };
+
+        final String[] sharedDayNarrows = {
+            "S",
+            "M",
+            "T",
+            "O",
+            "T",
+            "F",
+            "L",
+        };
+
+        final String[] sharedTimePatterns = {
+            "'kl'. HH:mm:ss zzzz",
+            "HH:mm:ss z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE d MMMM y G",
+            "d MMMM y G",
+            "d MMM y G",
+            "G y-MM-dd",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "f\u00f6re Kristus",
             "efter Kristus",
         };
+
+        final String[] sharedEras = {
+            "f\u00f6re R.K.",
+            "R.K.",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1:a kvartalet",
-                    "2:a kvartalet",
-                    "3:e kvartalet",
-                    "4:e kvartalet",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "buddistisk kalender" },
             { "calendarname.gregorian",
@@ -130,58 +194,15 @@
             { "field.zone",
                 "tidszon" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "GGGG y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "s\u00f6n",
-                    "m\u00e5n",
-                    "tis",
-                    "ons",
-                    "tors",
-                    "fre",
-                    "l\u00f6r",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "s\u00f6ndag",
-                    "m\u00e5ndag",
-                    "tisdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f6rdag",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "muharram",
@@ -200,81 +221,17 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1:a kvartalet",
-                    "2:a kvartalet",
-                    "3:e kvartalet",
-                    "4:e kvartalet",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "'kl'. HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -282,21 +239,9 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.long.Eras",
                 new String[] {
                     "efter Kristus",
@@ -316,70 +261,23 @@
                 }
             },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y G",
-                    "d MMMM y G",
-                    "d MMM y G",
-                    "G y-MM-dd",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE d MMMM y GGGG",
-                    "d MMMM y GGGG",
-                    "d MMM y GGGG",
-                    "GGGG y-MM-dd",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "s\u00f6n",
-                    "m\u00e5n",
-                    "tis",
-                    "ons",
-                    "tors",
-                    "fre",
-                    "l\u00f6r",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "s\u00f6ndag",
-                    "m\u00e5ndag",
-                    "tisdag",
-                    "onsdag",
-                    "torsdag",
-                    "fredag",
-                    "l\u00f6rdag",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "S",
-                    "M",
-                    "T",
-                    "O",
-                    "T",
-                    "F",
-                    "L",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "f\u00f6re R.K.",
-                    "R.K.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "jan.",
@@ -432,59 +330,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "K1",
-                    "K2",
-                    "K3",
-                    "K4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1:a kvartalet",
-                    "2:a kvartalet",
-                    "3:e kvartalet",
-                    "4:e kvartalet",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "'kl'. HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "f\u00f6re R.K.",
-                    "R.K.",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "fm",
-                    "em",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "f\u00f6re R.K.",
-                    "R.K.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "f\u00f6re R.K.",
-                    "R.K.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_th.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_th.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,99 @@
 public class JavaTimeSupplementary_th extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterNames = {
+            "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
+            "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
+            "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
+            "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
+            "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u0e2d\u0e32.",
+            "\u0e08.",
+            "\u0e2d.",
+            "\u0e1e.",
+            "\u0e1e\u0e24.",
+            "\u0e28.",
+            "\u0e2a.",
+        };
+
+        final String[] sharedDayNames = {
+            "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c",
+            "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c",
+            "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23",
+            "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18",
+            "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35",
+            "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c",
+            "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u0e2d\u0e32",
+            "\u0e08",
+            "\u0e2d",
+            "\u0e1e",
+            "\u0e1e\u0e24",
+            "\u0e28",
+            "\u0e2a",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u0e2e.\u0e28.",
+        };
+
+        final String[] sharedTimePatterns = {
+            "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 zzzz",
+            "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 z",
+            "HH:mm:ss",
+            "HH:mm",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "a",
+            "p",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "\u0e04.\u0e28.",
+            "\u0e40\u0e21\u0e08\u0e34",
+            "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
+            "\u0e42\u0e0a\u0e27\u0e30",
+            "\u0e40\u0e2e\u0e40\u0e0b",
+        };
+
+        final String[] sharedShortEras = {
+            "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
+            "\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
+        };
+
+        final String[] sharedMonthNarrows = {
+            "\u0e21.\u0e04.",
+            "\u0e01.\u0e1e.",
+            "\u0e21\u0e35.\u0e04.",
+            "\u0e40\u0e21.\u0e22.",
+            "\u0e1e.\u0e04.",
+            "\u0e21\u0e34.\u0e22.",
+            "\u0e01.\u0e04.",
+            "\u0e2a.\u0e04.",
+            "\u0e01.\u0e22.",
+            "\u0e15.\u0e04.",
+            "\u0e1e.\u0e22.",
+            "\u0e18.\u0e04.",
+            "",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNames",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" },
             { "calendarname.gregorian",
@@ -126,11 +202,7 @@
             { "field.zone",
                 "\u0e40\u0e02\u0e15\u0e40\u0e27\u0e25\u0e32" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                    "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE\u0e17\u0e35\u0e48 d MMMM GGGG y",
@@ -140,44 +212,13 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u0e2d\u0e32.",
-                    "\u0e08.",
-                    "\u0e2d.",
-                    "\u0e1e.",
-                    "\u0e1e\u0e24.",
-                    "\u0e28.",
-                    "\u0e2a.",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23",
-                    "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18",
-                    "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35",
-                    "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u0e2d\u0e32",
-                    "\u0e08",
-                    "\u0e2d",
-                    "\u0e1e",
-                    "\u0e1e\u0e24",
-                    "\u0e28",
-                    "\u0e2a",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u0e2e.\u0e28.",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
                 new String[] {
                     "\u0e21\u0e38\u0e2e\u0e31\u0e23.",
@@ -213,43 +254,13 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 zzzz",
-                    "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                    "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
                 new String[] {
                     "",
@@ -257,23 +268,11 @@
                 }
             },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u0e2e.\u0e28.",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u0e2e.\u0e28.",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "EEEE\u0e17\u0e35\u0e48 d MMMM G y",
@@ -311,23 +310,9 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\u0e04.\u0e28.",
-                    "\u0e40\u0e21\u0e08\u0e34",
-                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
-                    "\u0e42\u0e0a\u0e27\u0e30",
-                    "\u0e40\u0e2e\u0e40\u0e0b",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\u0e04.\u0e28.",
-                    "\u0e40\u0e21\u0e08\u0e34",
-                    "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a",
-                    "\u0e42\u0e0a\u0e27\u0e30",
-                    "\u0e40\u0e2e\u0e40\u0e0b",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.long.Eras",
                 new String[] {
                     "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
@@ -349,11 +334,7 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                    "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y",
@@ -363,61 +344,15 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u0e2d\u0e32.",
-                    "\u0e08.",
-                    "\u0e2d.",
-                    "\u0e1e.",
-                    "\u0e1e\u0e24.",
-                    "\u0e28.",
-                    "\u0e2a.",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23",
-                    "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18",
-                    "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35",
-                    "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c",
-                    "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u0e2d\u0e32",
-                    "\u0e08",
-                    "\u0e2d",
-                    "\u0e1e",
-                    "\u0e1e\u0e24",
-                    "\u0e28",
-                    "\u0e2a",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                    "\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
-                new String[] {
-                    "\u0e21.\u0e04.",
-                    "\u0e01.\u0e1e.",
-                    "\u0e21\u0e35.\u0e04.",
-                    "\u0e40\u0e21.\u0e22.",
-                    "\u0e1e.\u0e04.",
-                    "\u0e21\u0e34.\u0e22.",
-                    "\u0e01.\u0e04.",
-                    "\u0e2a.\u0e04.",
-                    "\u0e01.\u0e22.",
-                    "\u0e15.\u0e04.",
-                    "\u0e1e.\u0e22.",
-                    "\u0e18.\u0e04.",
-                    "",
-                }
-            },
+                sharedMonthNarrows },
             { "roc.MonthNames",
                 new String[] {
                     "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21",
@@ -436,76 +371,23 @@
                 }
             },
             { "roc.MonthNarrows",
-                new String[] {
-                    "\u0e21.\u0e04.",
-                    "\u0e01.\u0e1e.",
-                    "\u0e21\u0e35.\u0e04.",
-                    "\u0e40\u0e21.\u0e22.",
-                    "\u0e1e.\u0e04.",
-                    "\u0e21\u0e34.\u0e22.",
-                    "\u0e01.\u0e04.",
-                    "\u0e2a.\u0e04.",
-                    "\u0e01.\u0e22.",
-                    "\u0e15.\u0e04.",
-                    "\u0e1e.\u0e22.",
-                    "\u0e18.\u0e04.",
-                    "",
-                }
-            },
+                sharedMonthNarrows },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
-                    "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 zzzz",
-                    "H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                    "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                    "\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "a",
-                    "p",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                    "\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                    "\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_tr.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_tr.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,31 +72,114 @@
 public class JavaTimeSupplementary_tr extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "\u00c71",
+            "\u00c72",
+            "\u00c73",
+            "\u00c74",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1. \u00e7eyrek",
+            "2. \u00e7eyrek",
+            "3. \u00e7eyrek",
+            "4. \u00e7eyrek",
+        };
+
+        final String[] sharedQuarterNarrows = {
+            "1.",
+            "2.",
+            "3.",
+            "4.",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u00d6\u00d6",
+            "\u00d6S",
+        };
+
+        final String[] sharedDatePatterns = {
+            "GGGG d MMMM y EEEE",
+            "GGGG d MMMM y",
+            "GGGG d MMM y",
+            "G d.MM.y",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "Paz",
+            "Pzt",
+            "Sal",
+            "\u00c7ar",
+            "Per",
+            "Cum",
+            "Cmt",
+        };
+
+        final String[] sharedDayNames = {
+            "Pazar",
+            "Pazartesi",
+            "Sal\u0131",
+            "\u00c7ar\u015famba",
+            "Per\u015fembe",
+            "Cuma",
+            "Cumartesi",
+        };
+
+        final String[] sharedDayNarrows = {
+            "P",
+            "P",
+            "S",
+            "\u00c7",
+            "P",
+            "C",
+            "C",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "Hicri",
+        };
+
+        final String[] sharedMonthNames = {
+            "Muharrem",
+            "Safer",
+            "Rebi\u00fclevvel",
+            "Rebi\u00fclahir",
+            "Cemaziyelevvel",
+            "Cemaziyelahir",
+            "Recep",
+            "\u015eaban",
+            "Ramazan",
+            "\u015eevval",
+            "Zilkade",
+            "Zilhicce",
+            "",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "\u00f6\u00f6",
+            "\u00f6s",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "G d MMMM y EEEE",
+            "G d MMMM y",
+            "G d MMM y",
+            "GGGGG d.MM.y",
+        };
+
+        final String[] sharedShortEras = {
+            "Before R.O.C.",
+            "Minguo",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "\u00c71",
-                    "\u00c72",
-                    "\u00c73",
-                    "\u00c74",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1. \u00e7eyrek",
-                    "2. \u00e7eyrek",
-                    "3. \u00e7eyrek",
-                    "4. \u00e7eyrek",
-                }
-            },
+                sharedQuarterNames },
             { "QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
+                sharedQuarterNarrows },
             { "calendarname.buddhist",
                 "Budist Takvimi" },
             { "calendarname.gregorian",
@@ -134,168 +217,39 @@
             { "field.zone",
                 "Saat Dilimi" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u00d6\u00d6",
-                    "\u00d6S",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "GGGG d MMMM y EEEE",
-                    "GGGG d MMMM y",
-                    "GGGG d MMM y",
-                    "G d.MM.y",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "Paz",
-                    "Pzt",
-                    "Sal",
-                    "\u00c7ar",
-                    "Per",
-                    "Cum",
-                    "Cmt",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Pazar",
-                    "Pazartesi",
-                    "Sal\u0131",
-                    "\u00c7ar\u015famba",
-                    "Per\u015fembe",
-                    "Cuma",
-                    "Cumartesi",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "P",
-                    "P",
-                    "S",
-                    "\u00c7",
-                    "P",
-                    "C",
-                    "C",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "Hicri",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
-                new String[] {
-                    "Muharrem",
-                    "Safer",
-                    "Rebi\u00fclevvel",
-                    "Rebi\u00fclahir",
-                    "Cemaziyelevvel",
-                    "Cemaziyelahir",
-                    "Recep",
-                    "\u015eaban",
-                    "Ramazan",
-                    "\u015eevval",
-                    "Zilkade",
-                    "Zilhicce",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNames",
-                new String[] {
-                    "Muharrem",
-                    "Safer",
-                    "Rebi\u00fclevvel",
-                    "Rebi\u00fclahir",
-                    "Cemaziyelevvel",
-                    "Cemaziyelahir",
-                    "Recep",
-                    "\u015eaban",
-                    "Ramazan",
-                    "\u015eevval",
-                    "Zilkade",
-                    "Zilhicce",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "\u00c71",
-                    "\u00c72",
-                    "\u00c73",
-                    "\u00c74",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1. \u00e7eyrek",
-                    "2. \u00e7eyrek",
-                    "3. \u00e7eyrek",
-                    "4. \u00e7eyrek",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNarrows },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u00d6\u00d6",
-                    "\u00d6S",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "Hicri",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u00f6\u00f6",
-                    "\u00f6s",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "Hicri",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "Hicri",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "G d MMMM y EEEE",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "GGGGG d.MM.y",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -303,13 +257,7 @@
                 }
             },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "G d MMMM y EEEE",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "GGGGG d.MM.y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "d MMMM y G EEEE",
@@ -325,13 +273,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "G d MMMM y EEEE",
-                    "G d MMMM y",
-                    "G d MMM y",
-                    "GGGGG d.MM.y",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "M\u00d6",
@@ -339,58 +281,17 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u00d6\u00d6",
-                    "\u00d6S",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "GGGG d MMMM y EEEE",
-                    "GGGG d MMMM y",
-                    "GGGG d MMM y",
-                    "G d.MM.y",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "Paz",
-                    "Pzt",
-                    "Sal",
-                    "\u00c7ar",
-                    "Per",
-                    "Cum",
-                    "Cmt",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Pazar",
-                    "Pazartesi",
-                    "Sal\u0131",
-                    "\u00c7ar\u015famba",
-                    "Per\u015fembe",
-                    "Cuma",
-                    "Cumartesi",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "P",
-                    "P",
-                    "S",
-                    "\u00c7",
-                    "P",
-                    "C",
-                    "C",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "Oca",
@@ -443,67 +344,21 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "\u00c71",
-                    "\u00c72",
-                    "\u00c73",
-                    "\u00c74",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1. \u00e7eyrek",
-                    "2. \u00e7eyrek",
-                    "3. \u00e7eyrek",
-                    "4. \u00e7eyrek",
-                }
-            },
+                sharedQuarterNames },
             { "roc.QuarterNarrows",
-                new String[] {
-                    "1.",
-                    "2.",
-                    "3.",
-                    "4.",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNarrows },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u00d6\u00d6",
-                    "\u00d6S",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u00f6\u00f6",
-                    "\u00f6s",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Before R.O.C.",
-                    "Minguo",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_uk.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_uk.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,23 +72,74 @@
 public class JavaTimeSupplementary_uk extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "1-\u0439 \u043a\u0432.",
+            "2-\u0439 \u043a\u0432.",
+            "3-\u0439 \u043a\u0432.",
+            "4-\u0439 \u043a\u0432.",
+        };
+
+        final String[] sharedQuarterNames = {
+            "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+            "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u0434\u043f",
+            "\u043f\u043f",
+        };
+
+        final String[] sharedDatePatterns = {
+            "EEEE, d MMMM y '\u0440'. GGGG",
+            "d MMMM y '\u0440'. GGGG",
+            "d MMM y GGGG",
+            "dd.MM.yy G",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u041d\u0434",
+            "\u041f\u043d",
+            "\u0412\u0442",
+            "\u0421\u0440",
+            "\u0427\u0442",
+            "\u041f\u0442",
+            "\u0421\u0431",
+        };
+
+        final String[] sharedDayNames = {
+            "\u043d\u0435\u0434\u0456\u043b\u044f",
+            "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a",
+            "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a",
+            "\u0441\u0435\u0440\u0435\u0434\u0430",
+            "\u0447\u0435\u0442\u0432\u0435\u0440",
+            "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f",
+            "\u0441\u0443\u0431\u043e\u0442\u0430",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u041d",
+            "\u041f",
+            "\u0412",
+            "\u0421",
+            "\u0427",
+            "\u041f",
+            "\u0421",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, d MMMM y '\u0440'. G",
+            "d MMMM y '\u0440'. G",
+            "d MMM y G",
+            "dd.MM.yy GGGGG",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u0431\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" },
             { "calendarname.gregorian",
@@ -124,52 +175,15 @@
             { "field.zone",
                 "\u0447\u0430\u0441\u043e\u0432\u0438\u0439 \u043f\u043e\u044f\u0441" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. GGGG",
-                    "d MMMM y '\u0440'. GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u041d\u0434",
-                    "\u041f\u043d",
-                    "\u0412\u0442",
-                    "\u0421\u0440",
-                    "\u0427\u0442",
-                    "\u041f\u0442",
-                    "\u0421\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0456\u043b\u044f",
-                    "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a",
-                    "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a",
-                    "\u0441\u0435\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0435\u0440",
-                    "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u041d",
-                    "\u041f",
-                    "\u0412",
-                    "\u0421",
-                    "\u0427",
-                    "\u041f",
-                    "\u0421",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.MonthNames",
                 new String[] {
                     "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c",
@@ -188,73 +202,19 @@
                 }
             },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. G",
-                    "d MMMM y '\u0440'. G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.islamic.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. G",
-                    "d MMMM y '\u0440'. G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.japanese.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. G",
-                    "d MMMM y '\u0440'. G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.long.Eras",
                 new String[] {
                     "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438",
@@ -262,13 +222,7 @@
                 }
             },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. G",
-                    "d MMMM y '\u0440'. G",
-                    "d MMM y G",
-                    "dd.MM.yy GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
                 new String[] {
                     "\u0434\u043e \u043d.\u0435.",
@@ -276,52 +230,15 @@
                 }
             },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
-                new String[] {
-                    "EEEE, d MMMM y '\u0440'. GGGG",
-                    "d MMMM y '\u0440'. GGGG",
-                    "d MMM y GGGG",
-                    "dd.MM.yy G",
-                }
-            },
+                sharedDatePatterns },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u041d\u0434",
-                    "\u041f\u043d",
-                    "\u0412\u0442",
-                    "\u0421\u0440",
-                    "\u0427\u0442",
-                    "\u041f\u0442",
-                    "\u0421\u0431",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u043d\u0435\u0434\u0456\u043b\u044f",
-                    "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a",
-                    "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a",
-                    "\u0441\u0435\u0440\u0435\u0434\u0430",
-                    "\u0447\u0435\u0442\u0432\u0435\u0440",
-                    "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f",
-                    "\u0441\u0443\u0431\u043e\u0442\u0430",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u041d",
-                    "\u041f",
-                    "\u0412",
-                    "\u0421",
-                    "\u0427",
-                    "\u041f",
-                    "\u0421",
-                }
-            },
+                sharedDayNarrows },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "\u0441\u0456\u0447.",
@@ -374,41 +291,13 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1-\u0439 \u043a\u0432.",
-                    "2-\u0439 \u043a\u0432.",
-                    "3-\u0439 \u043a\u0432.",
-                    "4-\u0439 \u043a\u0432.",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                    "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u0434\u043f",
-                    "\u043f\u043f",
-                }
-            },
+                sharedAmPmMarkers },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_vi.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_vi.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,19 +72,80 @@
 public class JavaTimeSupplementary_vi extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterNames = {
+            "Qu\u00fd 1",
+            "Qu\u00fd 2",
+            "Qu\u00fd 3",
+            "Qu\u00fd 4",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "SA",
+            "CH",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "CN",
+            "Th 2",
+            "Th 3",
+            "Th 4",
+            "Th 5",
+            "Th 6",
+            "Th 7",
+        };
+
+        final String[] sharedDayNames = {
+            "Ch\u1ee7 Nh\u1eadt",
+            "Th\u1ee9 Hai",
+            "Th\u1ee9 Ba",
+            "Th\u1ee9 T\u01b0",
+            "Th\u1ee9 N\u0103m",
+            "Th\u1ee9 S\u00e1u",
+            "Th\u1ee9 B\u1ea3y",
+        };
+
+        final String[] sharedDayNarrows = {
+            "CN",
+            "T2",
+            "T3",
+            "T4",
+            "T5",
+            "T6",
+            "T7",
+        };
+
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedNarrowAmPmMarkers = {
+            "s",
+            "c",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
+            "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
+            "dd-MM-y G",
+            "dd/MM/y GGGGG",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "tr. CN",
             "sau CN",
         };
+
+        final String[] sharedEras = {
+            "Tr\u01b0\u1edbc R.O.C",
+            "R.O.C.",
+        };
+
         return new Object[][] {
             { "QuarterNames",
-                new String[] {
-                    "Qu\u00fd 1",
-                    "Qu\u00fd 2",
-                    "Qu\u00fd 3",
-                    "Qu\u00fd 4",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "L\u1ecbch Ph\u1eadt Gi\u00e1o" },
             { "calendarname.gregorian",
@@ -122,11 +183,7 @@
             { "field.zone",
                 "M\u00fai gi\u1edd" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "SA",
-                    "CH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "EEEE, 'ng\u00e0y' dd 'th\u00e1ng' MM 'n\u0103m' y GGGG",
@@ -136,120 +193,21 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "CN",
-                    "Th 2",
-                    "Th 3",
-                    "Th 4",
-                    "Th 5",
-                    "Th 6",
-                    "Th 7",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "Ch\u1ee7 Nh\u1eadt",
-                    "Th\u1ee9 Hai",
-                    "Th\u1ee9 Ba",
-                    "Th\u1ee9 T\u01b0",
-                    "Th\u1ee9 N\u0103m",
-                    "Th\u1ee9 S\u00e1u",
-                    "Th\u1ee9 B\u1ea3y",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "CN",
-                    "T2",
-                    "T3",
-                    "T4",
-                    "T5",
-                    "T6",
-                    "T7",
-                }
-            },
-            { "islamic.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "Qu\u00fd 1",
-                    "Qu\u00fd 2",
-                    "Qu\u00fd 3",
-                    "Qu\u00fd 4",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
-            { "islamic.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "SA",
-                    "CH",
-                }
-            },
-            { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "s",
-                    "c",
-                }
-            },
-            { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
-            { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "AH",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "java.time.buddhist.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
-            { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "BE",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.buddhist.short.Eras",
                 new String[] {
                     "BC",
@@ -273,23 +231,13 @@
                 }
             },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "java.time.roc.DatePatterns",
-                new String[] {
-                    "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G",
-                    "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G",
-                    "dd-MM-y G",
-                    "dd/MM/y GGGGG",
-                }
-            },
+                sharedJavaTimeDatePatterns },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeLongEras },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "SA",
-                    "CH",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG",
@@ -299,44 +247,13 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "CN",
-                    "Th 2",
-                    "Th 3",
-                    "Th 4",
-                    "Th 5",
-                    "Th 6",
-                    "Th 7",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "Ch\u1ee7 Nh\u1eadt",
-                    "Th\u1ee9 Hai",
-                    "Th\u1ee9 Ba",
-                    "Th\u1ee9 T\u01b0",
-                    "Th\u1ee9 N\u0103m",
-                    "Th\u1ee9 S\u00e1u",
-                    "Th\u1ee9 B\u1ea3y",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "CN",
-                    "T2",
-                    "T3",
-                    "T4",
-                    "T5",
-                    "T6",
-                    "T7",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "Tr\u01b0\u1edbc R.O.C",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.MonthAbbreviations",
                 new String[] {
                     "thg 1",
@@ -371,77 +288,20 @@
                     "",
                 }
             },
-            { "roc.MonthNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                    "5",
-                    "6",
-                    "7",
-                    "8",
-                    "9",
-                    "10",
-                    "11",
-                    "12",
-                    "",
-                }
-            },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "Q1",
-                    "Q2",
-                    "Q3",
-                    "Q4",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "Qu\u00fd 1",
-                    "Qu\u00fd 2",
-                    "Qu\u00fd 3",
-                    "Qu\u00fd 4",
-                }
-            },
-            { "roc.TimePatterns",
-                new String[] {
-                    "HH:mm:ss zzzz",
-                    "HH:mm:ss z",
-                    "HH:mm:ss",
-                    "HH:mm",
-                }
-            },
+                sharedQuarterNames },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "SA",
-                    "CH",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "Tr\u01b0\u1edbc R.O.C",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "s",
-                    "c",
-                }
-            },
+                sharedNarrowAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "Tr\u01b0\u1edbc R.O.C",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
             { "roc.short.Eras",
-                new String[] {
-                    "Tr\u01b0\u1edbc R.O.C",
-                    "R.O.C.",
-                }
-            },
+                sharedEras },
         };
     }
 }
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,7 +72,61 @@
 public class JavaTimeSupplementary_zh extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] rocMonthAbbreviations = {
+        final String[] sharedQuarterAbbreviations = {
+            "1\u5b63\u5ea6",
+            "2\u5b63\u5ea6",
+            "3\u5b63\u5ea6",
+            "4\u5b63\u5ea6",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\u7b2c\u4e00\u5b63\u5ea6",
+            "\u7b2c\u4e8c\u5b63\u5ea6",
+            "\u7b2c\u4e09\u5b63\u5ea6",
+            "\u7b2c\u56db\u5b63\u5ea6",
+        };
+
+        final String[] sharedAmPmMarkers = {
+            "\u4e0a\u5348",
+            "\u4e0b\u5348",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u5468\u65e5",
+            "\u5468\u4e00",
+            "\u5468\u4e8c",
+            "\u5468\u4e09",
+            "\u5468\u56db",
+            "\u5468\u4e94",
+            "\u5468\u516d",
+        };
+
+        final String[] sharedDayNames = {
+            "\u661f\u671f\u65e5",
+            "\u661f\u671f\u4e00",
+            "\u661f\u671f\u4e8c",
+            "\u661f\u671f\u4e09",
+            "\u661f\u671f\u56db",
+            "\u661f\u671f\u4e94",
+            "\u661f\u671f\u516d",
+        };
+
+        final String[] sharedDayNarrows = {
+            "\u65e5",
+            "\u4e00",
+            "\u4e8c",
+            "\u4e09",
+            "\u56db",
+            "\u4e94",
+            "\u516d",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u4f0a\u65af\u5170\u5386",
+        };
+
+        final String[] sharedMonthAbbreviations = {
             "1\u6708",
             "2\u6708",
             "3\u6708",
@@ -87,7 +141,8 @@
             "12\u6708",
             "",
         };
-        final String[] rocMonthNames = {
+
+        final String[] sharedMonthNames = {
             "\u4e00\u6708",
             "\u4e8c\u6708",
             "\u4e09\u6708",
@@ -102,31 +157,42 @@
             "\u5341\u4e8c\u6708",
             "",
         };
-        final String[] javatimebuddhistlongEras = {
+
+        final String[] sharedTimePatterns = {
+            "zzzz ah:mm:ss",
+            "z ah:mm:ss",
+            "ah:mm:ss",
+            "ah:mm",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
             "BC",
             "\u4f5b\u5386",
         };
-        final String[] javatimelongEras = {
+
+        final String[] sharedJavaTimeShortEras = {
+            "\u516c\u5143",
+            "\u660e\u6cbb",
+            "\u5927\u6b63",
+            "\u662d\u548c",
+            "\u5e73\u6210",
+        };
+
+        final String[] sharedJavaTimeShortEras2 = {
             "\u516c\u5143\u524d",
             "\u516c\u5143",
         };
+
+        final String[] sharedShortEras = {
+            "\u6c11\u56fd\u524d",
+            "\u6c11\u56fd",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63\u5ea6",
-                    "2\u5b63\u5ea6",
-                    "3\u5b63\u5ea6",
-                    "4\u5b63\u5ea6",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\u7b2c\u4e00\u5b63\u5ea6",
-                    "\u7b2c\u4e8c\u5b63\u5ea6",
-                    "\u7b2c\u4e09\u5b63\u5ea6",
-                    "\u7b2c\u56db\u5b63\u5ea6",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u4f5b\u6559\u65e5\u5386" },
             { "calendarname.gregorian",
@@ -162,11 +228,7 @@
             { "field.zone",
                 "\u65f6\u533a" },
             { "islamic.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
@@ -176,110 +238,33 @@
                 }
             },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u5468\u65e5",
-                    "\u5468\u4e00",
-                    "\u5468\u4e8c",
-                    "\u5468\u4e09",
-                    "\u5468\u56db",
-                    "\u5468\u4e94",
-                    "\u5468\u516d",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.DayNames",
-                new String[] {
-                    "\u661f\u671f\u65e5",
-                    "\u661f\u671f\u4e00",
-                    "\u661f\u671f\u4e8c",
-                    "\u661f\u671f\u4e09",
-                    "\u661f\u671f\u56db",
-                    "\u661f\u671f\u4e94",
-                    "\u661f\u671f\u516d",
-                }
-            },
+                sharedDayNames },
             { "islamic.DayNarrows",
-                new String[] {
-                    "\u65e5",
-                    "\u4e00",
-                    "\u4e8c",
-                    "\u4e09",
-                    "\u56db",
-                    "\u4e94",
-                    "\u516d",
-                }
-            },
+                sharedDayNarrows },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u5170\u5386",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
-                rocMonthAbbreviations },
+                sharedMonthAbbreviations },
             { "islamic.MonthNames",
-                rocMonthNames },
+                sharedMonthNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63\u5ea6",
-                    "2\u5b63\u5ea6",
-                    "3\u5b63\u5ea6",
-                    "4\u5b63\u5ea6",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u7b2c\u4e00\u5b63\u5ea6",
-                    "\u7b2c\u4e8c\u5b63\u5ea6",
-                    "\u7b2c\u4e09\u5b63\u5ea6",
-                    "\u7b2c\u56db\u5b63\u5ea6",
-                }
-            },
-            { "islamic.QuarterNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "zzzz ah:mm:ss",
-                    "z ah:mm:ss",
-                    "ah:mm:ss",
-                    "ah:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u5170\u5386",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u5170\u5386",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u5170\u5386",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5EEEE",
@@ -289,9 +274,9 @@
                 }
             },
             { "java.time.buddhist.long.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                javatimebuddhistlongEras },
+                sharedJavaTimeLongEras },
             { "java.time.islamic.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5EEEE",
@@ -309,25 +294,11 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\u516c\u5143",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\u516c\u5143",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "java.time.roc.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5EEEE",
@@ -337,13 +308,9 @@
                 }
             },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "roc.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5EEEE",
@@ -353,119 +320,33 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u5468\u65e5",
-                    "\u5468\u4e00",
-                    "\u5468\u4e8c",
-                    "\u5468\u4e09",
-                    "\u5468\u56db",
-                    "\u5468\u4e94",
-                    "\u5468\u516d",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.DayNames",
-                new String[] {
-                    "\u661f\u671f\u65e5",
-                    "\u661f\u671f\u4e00",
-                    "\u661f\u671f\u4e8c",
-                    "\u661f\u671f\u4e09",
-                    "\u661f\u671f\u56db",
-                    "\u661f\u671f\u4e94",
-                    "\u661f\u671f\u516d",
-                }
-            },
+                sharedDayNames },
             { "roc.DayNarrows",
-                new String[] {
-                    "\u65e5",
-                    "\u4e00",
-                    "\u4e8c",
-                    "\u4e09",
-                    "\u56db",
-                    "\u4e94",
-                    "\u516d",
-                }
-            },
+                sharedDayNarrows },
             { "roc.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthAbbreviations",
-                rocMonthAbbreviations },
+                sharedMonthAbbreviations },
             { "roc.MonthNames",
-                rocMonthNames },
-            { "roc.MonthNarrows",
-                new String[] {
-                    "1",
-                    "2",
-                    "3",
-                    "4",
-                    "5",
-                    "6",
-                    "7",
-                    "8",
-                    "9",
-                    "10",
-                    "11",
-                    "12",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63\u5ea6",
-                    "2\u5b63\u5ea6",
-                    "3\u5b63\u5ea6",
-                    "4\u5b63\u5ea6",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u7b2c\u4e00\u5b63\u5ea6",
-                    "\u7b2c\u4e8c\u5b63\u5ea6",
-                    "\u7b2c\u4e09\u5b63\u5ea6",
-                    "\u7b2c\u56db\u5b63\u5ea6",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "zzzz ah:mm:ss",
-                    "z ah:mm:ss",
-                    "ah:mm:ss",
-                    "ah:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.abbreviated.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.long.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.AmPmMarkers",
-                new String[] {
-                    "\u4e0a\u5348",
-                    "\u4e0b\u5348",
-                }
-            },
+                sharedAmPmMarkers },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u6c11\u56fd\u524d",
-                    "\u6c11\u56fd",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh_HK.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_zh_HK extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedQuarterAbbreviations = {
+            "Q1",
+            "Q2",
+            "Q3",
+            "Q4",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "Gy\u5e74M\u6708d\u65e5EEEE",
+            "Gy\u5e74M\u6708d\u65e5",
+            "Gy\u5e74M\u6708d\u65e5",
+            "Gy/M/d",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "\u516c\u5143\u524d",
+            "\u516c\u5143",
+        };
+
+        return new Object[][] {
+            { "QuarterAbbreviations",
+                sharedQuarterAbbreviations },
+            { "field.week",
+                "\u661f\u671f" },
+            { "field.weekday",
+                "\u661f\u671f\u5e7e" },
+            { "islamic.QuarterAbbreviations",
+                sharedQuarterAbbreviations },
+            { "java.time.japanese.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.long.Eras",
+                sharedJavaTimeLongEras },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.short.Eras",
+                sharedJavaTimeLongEras },
+            { "roc.DatePatterns",
+                new String[] {
+                    "GGGGy\u5e74M\u6708d\u65e5EEEE",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy\u5e74M\u6708d\u65e5",
+                    "GGGGy/M/d",
+                }
+            },
+            { "roc.QuarterAbbreviations",
+                sharedQuarterAbbreviations },
+        };
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh_SG.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * COPYRIGHT AND PERMISSION NOTICE
+ *
+ * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
+ * Distributed under the Terms of Use in
+ * http://www.unicode.org/copyright.html.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of the Unicode data files and any associated documentation
+ * (the "Data Files") or Unicode software and any associated documentation
+ * (the "Software") to deal in the Data Files or Software
+ * without restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, and/or sell copies of
+ * the Data Files or Software, and to permit persons to whom the Data Files
+ * or Software are furnished to do so, provided that
+ * (a) this copyright and permission notice appear with all copies
+ * of the Data Files or Software,
+ * (b) this copyright and permission notice appear in associated
+ * documentation, and
+ * (c) there is clear notice in each modified Data File or in the Software
+ * as well as in the documentation associated with the Data File(s) or
+ * Software that the data or software has been modified.
+ *
+ * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
+ * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
+ * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale,
+ * use or other dealings in these Data Files or Software without prior
+ * written authorization of the copyright holder.
+ */
+
+//  Note: this file has been generated by a tool.
+
+package sun.text.resources.ext;
+
+import sun.util.resources.OpenListResourceBundle;
+
+public class JavaTimeSupplementary_zh_SG extends OpenListResourceBundle {
+    @Override
+    protected final Object[][] getContents() {
+        final String[] sharedDatePatterns = {
+            "GGGGy\u5e74M\u6708d\u65e5EEEE",
+            "GGGGy\u5e74M\u6708d\u65e5",
+            "GGGGy\u5e74M\u6708d\u65e5",
+            "GGGGd/M/yy",
+        };
+
+        final String[] sharedJavaTimeDatePatterns = {
+            "Gy\u5e74M\u6708d\u65e5EEEE",
+            "Gy\u5e74M\u6708d\u65e5",
+            "Gy\u5e74M\u6708d\u65e5",
+            "Gd/M/yy",
+        };
+
+        return new Object[][] {
+            { "islamic.DatePatterns",
+                sharedDatePatterns },
+            { "java.time.buddhist.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.islamic.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.japanese.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "java.time.roc.DatePatterns",
+                sharedJavaTimeDatePatterns },
+            { "roc.DatePatterns",
+                sharedDatePatterns },
+        };
+    }
+}
--- a/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh_TW.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.localedata/share/classes/sun/text/resources/ext/JavaTimeSupplementary_zh_TW.java	Fri Jul 08 12:17:10 2016 -0700
@@ -72,27 +72,86 @@
 public class JavaTimeSupplementary_zh_TW extends OpenListResourceBundle {
     @Override
     protected final Object[][] getContents() {
-        final String[] javatimelongEras = {
+        final String[] sharedQuarterAbbreviations = {
+            "1\u5b63",
+            "2\u5b63",
+            "3\u5b63",
+            "4\u5b63",
+        };
+
+        final String[] sharedQuarterNames = {
+            "\u7b2c1\u5b63",
+            "\u7b2c2\u5b63",
+            "\u7b2c3\u5b63",
+            "\u7b2c4\u5b63",
+        };
+
+        final String[] sharedDayAbbreviations = {
+            "\u9031\u65e5",
+            "\u9031\u4e00",
+            "\u9031\u4e8c",
+            "\u9031\u4e09",
+            "\u9031\u56db",
+            "\u9031\u4e94",
+            "\u9031\u516d",
+        };
+
+        final String[] sharedEras = {
+            "",
+            "\u4f0a\u65af\u862d\u66c6",
+        };
+
+        final String[] sharedMonthNames = {
+            "\u7a46\u54c8\u862d\u59c6\u6708",
+            "\u8272\u6cd5\u723e\u6708",
+            "\u8cf4\u6bd4\u6708 I",
+            "\u8cf4\u6bd4\u6708 II",
+            "\u4e3b\u99ac\u9054\u6708 I",
+            "\u4e3b\u99ac\u9054\u6708 II",
+            "\u8cf4\u54f2\u535c\u6708",
+            "\u820d\u723e\u90a6\u6708",
+            "\u8cf4\u8cb7\u4e39\u6708",
+            "\u9583\u74e6\u9b6f\u6708",
+            "\u90fd\u723e\u5580\u723e\u5fb7\u6708",
+            "\u90fd\u723e\u9ed1\u54f2\u6708",
+            "",
+        };
+
+        final String[] sharedTimePatterns = {
+            "ah:mm:ss [zzzz]",
+            "ah:mm:ss [z]",
+            "ah:mm:ss",
+            "ah:mm",
+        };
+
+        final String[] sharedJavaTimeLongEras = {
+            "BC",
+            "\u4f5b\u66c6",
+        };
+
+        final String[] sharedJavaTimeShortEras = {
+            "\u897f\u5143",
+            "\u660e\u6cbb",
+            "\u5927\u6b63",
+            "\u662d\u548c",
+            "\u5e73\u6210",
+        };
+
+        final String[] sharedJavaTimeShortEras2 = {
             "\u897f\u5143\u524d",
             "\u897f\u5143",
         };
+
+        final String[] sharedShortEras = {
+            "\u6c11\u570b\u524d",
+            "\u6c11\u570b",
+        };
+
         return new Object[][] {
             { "QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63",
-                    "2\u5b63",
-                    "3\u5b63",
-                    "4\u5b63",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "QuarterNames",
-                new String[] {
-                    "\u7b2c1\u5b63",
-                    "\u7b2c2\u5b63",
-                    "\u7b2c3\u5b63",
-                    "\u7b2c4\u5b63",
-                }
-            },
+                sharedQuarterNames },
             { "calendarname.buddhist",
                 "\u4f5b\u66c6" },
             { "calendarname.gregorian",
@@ -124,98 +183,25 @@
             { "field.zone",
                 "\u6642\u5340" },
             { "islamic.DayAbbreviations",
-                new String[] {
-                    "\u9031\u65e5",
-                    "\u9031\u4e00",
-                    "\u9031\u4e8c",
-                    "\u9031\u4e09",
-                    "\u9031\u56db",
-                    "\u9031\u4e94",
-                    "\u9031\u516d",
-                }
-            },
+                sharedDayAbbreviations },
             { "islamic.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u862d\u66c6",
-                }
-            },
+                sharedEras },
             { "islamic.MonthAbbreviations",
-                new String[] {
-                    "\u7a46\u54c8\u862d\u59c6\u6708",
-                    "\u8272\u6cd5\u723e\u6708",
-                    "\u8cf4\u6bd4\u6708 I",
-                    "\u8cf4\u6bd4\u6708 II",
-                    "\u4e3b\u99ac\u9054\u6708 I",
-                    "\u4e3b\u99ac\u9054\u6708 II",
-                    "\u8cf4\u54f2\u535c\u6708",
-                    "\u820d\u723e\u90a6\u6708",
-                    "\u8cf4\u8cb7\u4e39\u6708",
-                    "\u9583\u74e6\u9b6f\u6708",
-                    "\u90fd\u723e\u5580\u723e\u5fb7\u6708",
-                    "\u90fd\u723e\u9ed1\u54f2\u6708",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.MonthNames",
-                new String[] {
-                    "\u7a46\u54c8\u862d\u59c6\u6708",
-                    "\u8272\u6cd5\u723e\u6708",
-                    "\u8cf4\u6bd4\u6708 I",
-                    "\u8cf4\u6bd4\u6708 II",
-                    "\u4e3b\u99ac\u9054\u6708 I",
-                    "\u4e3b\u99ac\u9054\u6708 II",
-                    "\u8cf4\u54f2\u535c\u6708",
-                    "\u820d\u723e\u90a6\u6708",
-                    "\u8cf4\u8cb7\u4e39\u6708",
-                    "\u9583\u74e6\u9b6f\u6708",
-                    "\u90fd\u723e\u5580\u723e\u5fb7\u6708",
-                    "\u90fd\u723e\u9ed1\u54f2\u6708",
-                    "",
-                }
-            },
+                sharedMonthNames },
             { "islamic.QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63",
-                    "2\u5b63",
-                    "3\u5b63",
-                    "4\u5b63",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "islamic.QuarterNames",
-                new String[] {
-                    "\u7b2c1\u5b63",
-                    "\u7b2c2\u5b63",
-                    "\u7b2c3\u5b63",
-                    "\u7b2c4\u5b63",
-                }
-            },
+                sharedQuarterNames },
             { "islamic.TimePatterns",
-                new String[] {
-                    "ah:mm:ss [zzzz]",
-                    "ah:mm:ss [z]",
-                    "ah:mm:ss",
-                    "ah:mm",
-                }
-            },
+                sharedTimePatterns },
             { "islamic.long.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u862d\u66c6",
-                }
-            },
+                sharedEras },
             { "islamic.narrow.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u862d\u66c6",
-                }
-            },
+                sharedEras },
             { "islamic.short.Eras",
-                new String[] {
-                    "",
-                    "\u4f0a\u65af\u862d\u66c6",
-                }
-            },
+                sharedEras },
             { "java.time.buddhist.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5EEEE",
@@ -225,17 +211,9 @@
                 }
             },
             { "java.time.buddhist.long.Eras",
-                new String[] {
-                    "BC",
-                    "\u4f5b\u66c6",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.buddhist.short.Eras",
-                new String[] {
-                    "BC",
-                    "\u4f5b\u66c6",
-                }
-            },
+                sharedJavaTimeLongEras },
             { "java.time.japanese.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5EEEE",
@@ -245,25 +223,11 @@
                 }
             },
             { "java.time.japanese.long.Eras",
-                new String[] {
-                    "\u897f\u5143",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.japanese.short.Eras",
-                new String[] {
-                    "\u897f\u5143",
-                    "\u660e\u6cbb",
-                    "\u5927\u6b63",
-                    "\u662d\u548c",
-                    "\u5e73\u6210",
-                }
-            },
+                sharedJavaTimeShortEras },
             { "java.time.long.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "java.time.roc.DatePatterns",
                 new String[] {
                     "Gy\u5e74M\u6708d\u65e5 EEEE",
@@ -273,7 +237,7 @@
                 }
             },
             { "java.time.short.Eras",
-                javatimelongEras },
+                sharedJavaTimeShortEras2 },
             { "roc.DatePatterns",
                 new String[] {
                     "GGGGy\u5e74M\u6708d\u65e5 EEEE",
@@ -283,22 +247,9 @@
                 }
             },
             { "roc.DayAbbreviations",
-                new String[] {
-                    "\u9031\u65e5",
-                    "\u9031\u4e00",
-                    "\u9031\u4e8c",
-                    "\u9031\u4e09",
-                    "\u9031\u56db",
-                    "\u9031\u4e94",
-                    "\u9031\u516d",
-                }
-            },
+                sharedDayAbbreviations },
             { "roc.Eras",
-                new String[] {
-                    "\u6c11\u570b\u524d",
-                    "\u6c11\u570b",
-                }
-            },
+                sharedShortEras },
             { "roc.MonthNames",
                 new String[] {
                     "1\u6708",
@@ -317,47 +268,17 @@
                 }
             },
             { "roc.QuarterAbbreviations",
-                new String[] {
-                    "1\u5b63",
-                    "2\u5b63",
-                    "3\u5b63",
-                    "4\u5b63",
-                }
-            },
+                sharedQuarterAbbreviations },
             { "roc.QuarterNames",
-                new String[] {
-                    "\u7b2c1\u5b63",
-                    "\u7b2c2\u5b63",
-                    "\u7b2c3\u5b63",
-                    "\u7b2c4\u5b63",
-                }
-            },
+                sharedQuarterNames },
             { "roc.TimePatterns",
-                new String[] {
-                    "ah:mm:ss [zzzz]",
-                    "ah:mm:ss [z]",
-                    "ah:mm:ss",
-                    "ah:mm",
-                }
-            },
+                sharedTimePatterns },
             { "roc.long.Eras",
-                new String[] {
-                    "\u6c11\u570b\u524d",
-                    "\u6c11\u570b",
-                }
-            },
+                sharedShortEras },
             { "roc.narrow.Eras",
-                new String[] {
-                    "\u6c11\u570b\u524d",
-                    "\u6c11\u570b",
-                }
-            },
+                sharedShortEras },
             { "roc.short.Eras",
-                new String[] {
-                    "\u6c11\u570b\u524d",
-                    "\u6c11\u570b",
-                }
-            },
+                sharedShortEras },
         };
     }
 }
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/resources/javac_ja.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/resources/javac_ja.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -141,6 +141,7 @@
 javac.err.unmatched.meth={0}\u306B\u9069\u5408\u3059\u308B\u30E1\u30BD\u30C3\u30C9\u304C{1}\u306B\u306F\u3042\u308A\u307E\u305B\u3093\u3002
 javac.err.unmatched.constr={0}\u306B\u9069\u5408\u3059\u308B\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C{1}\u306B\u306F\u3042\u308A\u307E\u305B\u3093\u3002
 javac.err.wrong.number.args={0}\u306E\u5F15\u6570\u306E\u6570\u304C\u4E0D\u6B63\u3067\u3059\u3002
+javac.err.wrong.number.args={0}\u306E\u5F15\u6570\u306E\u6570\u304C\u4E0D\u6B63\u3067\u3059\u3002
 javac.err.forward.ref={1}\u3067\u306F{0}\u306B\u524D\u65B9\u53C2\u7167\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
 javac.err.array.dim.missing=\u914D\u5217\u306E\u5927\u304D\u3055\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
 javac.err.new.abstract={0}\u306Fabstract\u30AF\u30E9\u30B9\u3067\u3059\u3002\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3092\u751F\u6210\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002
@@ -256,8 +257,8 @@
 javac.err.initializer.exception=\u521D\u671F\u5316\u5B50\u5185\u3067\u306F\u4F8B\u5916{0}\u3092\u30B9\u30ED\u30FC\u3067\u304D\u307E\u305B\u3093\u3002
 javac.err.cant.read={0}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093
 javac.err.cant.write={0}\u304C\u66F8\u304D\u8FBC\u3081\u307E\u305B\u3093
-javac.err.fatal.error=\u30B3\u30F3\u30D1\u30A4\u30E9\u5185\u90E8\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002http://java.sun.com/cgi-bin/bugreport.cgi\u3067\u30D0\u30B0\u5831\u544A\u3092\u3057\u3066\u304F\u3060\u3055\u3044\u3002
-javac.err.fatal.exception=\u30B3\u30F3\u30D1\u30A4\u30E9\u5185\u90E8\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002http://java.sun.com/cgi-bin/bugreport.cgi\u3067\u30D0\u30B0\u5831\u544A\u3092\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+javac.err.fatal.error=\u30B3\u30F3\u30D1\u30A4\u30E9\u5185\u90E8\u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002http://bugreport.java.com/bugreport/\u3067\u30D0\u30B0\u5831\u544A\u3092\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+javac.err.fatal.exception=\u30B3\u30F3\u30D1\u30A4\u30E9\u5185\u90E8\u3067\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002http://bugreport.java.com/bugreport/\u3067\u30D0\u30B0\u5831\u544A\u3092\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 javac.err.no.inner.classes=\u5185\u90E8\u30AF\u30E9\u30B9\u306E\u30B5\u30DD\u30FC\u30C8\u306F\u4E2D\u6B62\u3055\u308C\u307E\u3057\u305F\u3002
 javac.err.uncaught.exception=\u4F8B\u5916{0}\u306F\u6355\u6349\u3055\u308C\u308B\u304B\u3001\u3042\u308B\u3044\u306F\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306Ethrows\u7BC0\u3067\u5BA3\u8A00\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
 javac.err.constructor.exception=\u4F8B\u5916{0}\u306F\u6355\u6349\u3055\u308C\u308B\u304B\u3001\u307E\u305F\u306F\u3053\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306Ethrows\u7BC0\u3067\u5BA3\u8A00\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
@@ -291,9 +292,9 @@
 benv.loaded_in=[{0}\u3092{1}\u30DF\u30EA\u79D2\u3067\u8AAD\u307F\u8FBC\u307F\u307E\u3057\u305F]
 benv.failed_to_close_class_path=\u30AF\u30E9\u30B9\u30D1\u30B9: {0}\u3092\u9589\u3058\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F
 #
-main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> <source files>\n\n<options>\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\\ -g             \u3059\u3079\u3066\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n\\ -g:none          \u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u3092\u751F\u6210\u3057\u306A\u3044\n\\ -g:''{''lines,vars,source''}''\u3044\u304F\u3064\u304B\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n\\ -O             \u6700\u9069\u5316;\u30C7\u30D0\u30C3\u30B0\u3092\u6291\u5236\u3057\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u5927\u304D\u304F\u3059\u308B\n\\ -nowarn          \u8B66\u544A\u3092\u767A\u751F\u3055\u305B\u306A\u3044\n\\ -verbose         \u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n\\ -deprecation       \u63A8\u5968\u3055\u308C\u306A\u3044API\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B\n\\ -classpath <path>    \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n\\ -sourcepath <path>   \u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n\\ -bootclasspath <path> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -extdirs<dirs>     \u62E1\u5F35\u6A5F\u80FD\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -d <directory>      \u751F\u6210\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -encoding <encoding>  \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u4F7F\u7528\u3059\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B\n\\ -target <release>    \u7279\u5B9A\u306EVM\u30D0\u30FC\u30B8\u30E7\u30F3\u7528\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B
+main.usage=\u4F7F\u7528\u65B9\u6CD5: {0} <options> <source files>\n\n<options>\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\\ -g             \u3059\u3079\u3066\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u3092\u751F\u6210\u3059\u308B\n\\ -g:none          \u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u3092\u751F\u6210\u3057\u306A\u3044\n\\ -g:'{'lines,vars,source'}'\u3044\u304F\u3064\u304B\u306E\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n\\ -O             \u6700\u9069\u5316;\u30C7\u30D0\u30C3\u30B0\u3092\u6291\u5236\u3057\u3001\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u5927\u304D\u304F\u3059\u308B\n\\ -nowarn          \u8B66\u544A\u3092\u767A\u751F\u3055\u305B\u306A\u3044\n\\ -verbose         \u30B3\u30F3\u30D1\u30A4\u30E9\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n\\ -deprecation       \u63A8\u5968\u3055\u308C\u306A\u3044API\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u30BD\u30FC\u30B9\u306E\u4F4D\u7F6E\u3092\u51FA\u529B\u3059\u308B\n\\ -classpath <path>    \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n\\ -sourcepath <path>   \u5165\u529B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n\\ -bootclasspath <path> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -extdirs<dirs>     \u62E1\u5F35\u6A5F\u80FD\u304C\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -d <directory>      \u751F\u6210\u3055\u308C\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u683C\u7D0D\u3059\u308B\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n\\ -encoding <encoding>  \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u4F7F\u7528\u3059\u308B\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B\n\\ -target <release>    \u7279\u5B9A\u306EVM\u30D0\u30FC\u30B8\u30E7\u30F3\u7528\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B
 #
-main.unsupported.usage=\ \ -Xdepend     \u518D\u30B3\u30F3\u30D1\u30A4\u30EB\u306E\u305F\u3081\u306E\u3055\u3089\u306B\u65B0\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u3092\u518D\u5E30\u7684\u306B\u691C\u7D22\u3059\u308B\n\\ -Xstdout     \u30E1\u30C3\u30BB\u30FC\u30B8\u3092System.out\u306B\u9001\u308B\n\\ -Xverbosepath  \u30D1\u30B9\u3068\u6A19\u6E96\u62E1\u5F35\u6A5F\u80FD\u306E\u691C\u7D22\u65B9\u6CD5\u3092\u8A18\u8FF0\u3059\u308B\n\\ -J<runtime flag> \u5F15\u6570\u3092Java\u30A4\u30F3\u30BF\u30FC\u30D7\u30EA\u30BF\u306B\u6E21\u3059\n\n-X\u304A\u3088\u3073-J\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6A19\u6E96\u3067\u306F\u306A\u304F\u3001\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
+main.unsupported.usage=\  -Xdepend     \u518D\u30B3\u30F3\u30D1\u30A4\u30EB\u306E\u305F\u3081\u306E\u3055\u3089\u306B\u65B0\u3057\u3044\u30D5\u30A1\u30A4\u30EB\u3092\u518D\u5E30\u7684\u306B\u691C\u7D22\u3059\u308B\n\\ -Xstdout     \u30E1\u30C3\u30BB\u30FC\u30B8\u3092System.out\u306B\u9001\u308B\n\\ -Xverbosepath  \u30D1\u30B9\u3068\u6A19\u6E96\u62E1\u5F35\u6A5F\u80FD\u306E\u691C\u7D22\u65B9\u6CD5\u3092\u8A18\u8FF0\u3059\u308B\n\\ -J<runtime flag> \u5F15\u6570\u3092Java\u30A4\u30F3\u30BF\u30FC\u30D7\u30EA\u30BF\u306B\u6E21\u3059\n\n-X\u304A\u3088\u3073-J\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u6A19\u6E96\u3067\u306F\u306A\u304F\u3001\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
 #
 main.conflicting.options=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u3068{1}\u306F\u540C\u6642\u306B\u306F\u4F7F\u7528\u3057\u307E\u305B\u3093\u3002
 main.option.already.seen={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
@@ -311,4 +312,4 @@
 main.no.memory=\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u30E1\u30E2\u30EA\u30FC\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002"-J-mx<number>"\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3001\u6700\u5927\u30D2\u30FC\u30D7\u30FB\u30B5\u30A4\u30BA\u3092\u5897\u3084\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 main.stack.overflow=\u30B3\u30F3\u30D1\u30A4\u30E9\u306B\u30B9\u30BF\u30C3\u30AF\u7A7A\u9593\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002"-J-oss<number>"\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3001Java\u30B9\u30BF\u30C3\u30AF\u306B\u5272\u308A\u5F53\u3066\u308B\u30E1\u30E2\u30EA\u30FC\u3092\u5897\u3084\u3057\u3066\u304F\u3060\u3055\u3044\u3002
 main.path.msg=[\u30BD\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9\u306F"{0}"\u3067\u3059]\n[\u30E9\u30A4\u30D6\u30E9\u30EA\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9\u306F "{1}"\u3067\u3059]
-javac.err.invalid.encoding.char=\u3053\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u304C\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u3082\u306E\u3068\u7570\u306A\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002-encoding\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u3066\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B\u304B\u3001\u307E\u305F\u306Fnative2ascii\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u3092\u4F7F\u7528\u3057\u3066\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u3092ASCII\u6587\u5B57\u306E\u307F\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+javac.err.invalid.encoding.char=\u3053\u306E\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u304C\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u3082\u306E\u3068\u7570\u306A\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002-encoding\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u3066\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u5909\u66F4\u3059\u308B\u304B\u3001\u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u306F\u5FC5\u305AASCII\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u306B\u5909\u63DB\u3057\u3066\u304F\u3060\u3055\u3044\u3002
--- a/jdk/src/jdk.rmic/share/classes/sun/tools/javac/resources/javac_zh_CN.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/src/jdk.rmic/share/classes/sun/tools/javac/resources/javac_zh_CN.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -141,6 +141,7 @@
 javac.err.unmatched.meth=\u5728{1}\u4E2D\u627E\u4E0D\u5230\u4E0E{0}\u5339\u914D\u7684\u65B9\u6CD5\u3002
 javac.err.unmatched.constr=\u5728{1}\u4E2D\u627E\u4E0D\u5230\u4E0E{0}\u5339\u914D\u7684\u6784\u9020\u5668\u3002
 javac.err.wrong.number.args={0}\u4E2D\u7684\u53C2\u6570\u6570\u76EE\u9519\u8BEF\u3002
+javac.err.wrong.number.args={0}\u4E2D\u7684\u53C2\u6570\u6570\u76EE\u9519\u8BEF\u3002
 javac.err.forward.ref=\u65E0\u6CD5\u524D\u5411\u5F15\u7528{1}\u4E2D\u7684{0}\u3002
 javac.err.array.dim.missing=\u7F3A\u5C11\u6570\u7EC4\u7EF4\u3002
 javac.err.new.abstract={0}\u662F\u62BD\u8C61\u7C7B\u3002\u65E0\u6CD5\u5B9E\u4F8B\u5316\u3002
@@ -256,8 +257,8 @@
 javac.err.initializer.exception=\u4E0D\u80FD\u5728\u521D\u59CB\u5316\u7A0B\u5E8F\u4E2D\u629B\u51FA\u5F02\u5E38\u9519\u8BEF{0}\u3002
 javac.err.cant.read=\u65E0\u6CD5\u8BFB\u53D6: {0}
 javac.err.cant.write=\u65E0\u6CD5\u5199\u5165: {0}
-javac.err.fatal.error=\u7F16\u8BD1\u5668\u51FA\u9519; \u8BF7\u5EFA\u7ACB Bug \u62A5\u544A (http://java.sun.com/cgi-bin/bugreport.cgi)\u3002
-javac.err.fatal.exception=\u7F16\u8BD1\u5668\u4E2D\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF; \u8BF7\u5EFA\u7ACB Bug \u62A5\u544A (http://java.sun.com/cgi-bin/bugreport.cgi)\u3002
+javac.err.fatal.error=\u7F16\u8BD1\u5668\u51FA\u9519; \u8BF7\u5EFA\u7ACB Bug \u62A5\u544A (http://bugreport.java.com/bugreport/)\u3002
+javac.err.fatal.exception=\u7F16\u8BD1\u5668\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF; \u8BF7\u5EFA\u7ACB Bug \u62A5\u544A (http://bugreport.java.com/bugreport/)\u3002
 javac.err.no.inner.classes=\u5DF2\u7981\u7528\u5BF9\u5185\u90E8\u7C7B\u7684\u652F\u6301\u3002
 javac.err.uncaught.exception=\u5FC5\u987B\u6355\u83B7\u5F02\u5E38\u9519\u8BEF{0}, \u5426\u5219\u5FC5\u987B\u5728\u6B64\u65B9\u6CD5\u7684 throws \u5B50\u53E5\u4E2D\u5BF9\u5176\u8FDB\u884C\u58F0\u660E\u3002
 javac.err.constructor.exception=\u5FC5\u987B\u6355\u83B7\u5F02\u5E38\u9519\u8BEF{0}, \u5426\u5219\u5FC5\u987B\u5728\u6B64\u6784\u9020\u5668\u7684 throws \u5B50\u53E5\u4E2D\u5BF9\u5176\u8FDB\u884C\u58F0\u660E\u3002
@@ -291,9 +292,9 @@
 benv.loaded_in=[\u5DF2\u5728 {1} \u6BEB\u79D2\u5185\u52A0\u8F7D{0}]
 benv.failed_to_close_class_path=\u65E0\u6CD5\u5173\u95ED\u7C7B\u8DEF\u5F84: {0}
 #
-main.usage=\u7528\u6CD5: {0} <options> <source files>\n\n\u5176\u4E2D <options> \u5305\u62EC:\n\ \ -g                     \u751F\u6210\u6240\u6709\u8C03\u8BD5\u4FE1\u606F\n\ \ -g:none                \u4E0D\u751F\u6210\u4EFB\u4F55\u8C03\u8BD5\u4FE1\u606F\n\ \ -g:''{''lines,vars,source''}'' \u53EA\u751F\u6210\u67D0\u4E9B\u8C03\u8BD5\u4FE1\u606F\n\ \ -O                     \u4F18\u5316; \u53EF\u4EE5\u963B\u788D\u8C03\u8BD5\u6216\u6269\u5927\u7C7B\u6587\u4EF6\n\ \ -nowarn                \u4E0D\u751F\u6210\u4EFB\u4F55\u8B66\u544A\n\ \ -verbose               \u8F93\u51FA\u6709\u5173\u7F16\u8BD1\u5668\u6B63\u5728\u6267\u884C\u7684\u64CD\u4F5C\u7684\u6D88\u606F\n\ \ -deprecation           \u8F93\u51FA\u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684 API \u7684\u6E90\u4F4D\u7F6E\n\ \ -classpath <path>     \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ -sourcepath <path>    \u6307\u5B9A\u67E5\u627E\u8F93\u5165\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ -bootclasspath <path>  \u8986\u76D6\u5F15\u5BFC\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ -extdirs <dirs>        \u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E\n\ \ -d <directory>         \u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ -encoding <encoding>   \u6307\u5B9A\u6E90\u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801\n\ \ -target <release>      \u751F\u6210\u7279\u5B9A VM \u7248\u672C\u7684\u7C7B\u6587\u4EF6
+main.usage=\u7528\u6CD5: {0} <options> <source files>\n\n\u5176\u4E2D <options> \u5305\u62EC:\n  -g                     \u751F\u6210\u6240\u6709\u8C03\u8BD5\u4FE1\u606F\n  -g:none                \u4E0D\u751F\u6210\u4EFB\u4F55\u8C03\u8BD5\u4FE1\u606F\n  -g:'{'lines,vars,source'}' \u53EA\u751F\u6210\u67D0\u4E9B\u8C03\u8BD5\u4FE1\u606F\n  -O                     \u4F18\u5316; \u53EF\u4EE5\u963B\u788D\u8C03\u8BD5\u6216\u6269\u5927\u7C7B\u6587\u4EF6\n  -nowarn                \u4E0D\u751F\u6210\u4EFB\u4F55\u8B66\u544A\n  -verbose               \u8F93\u51FA\u6709\u5173\u7F16\u8BD1\u5668\u6B63\u5728\u6267\u884C\u7684\u64CD\u4F5C\u7684\u6D88\u606F\n  -deprecation           \u8F93\u51FA\u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684 API \u7684\u6E90\u4F4D\u7F6E\n  -classpath <path>     \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -sourcepath <path>    \u6307\u5B9A\u67E5\u627E\u8F93\u5165\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -bootclasspath <path>  \u8986\u76D6\u5F15\u5BFC\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -extdirs <dirs>        \u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E\n  -d <directory>         \u6307\u5B9A\u653E\u7F6E\u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -encoding <encoding>   \u6307\u5B9A\u6E90\u6587\u4EF6\u4F7F\u7528\u7684\u5B57\u7B26\u7F16\u7801\n  -target <release>      \u751F\u6210\u7279\u5B9A VM \u7248\u672C\u7684\u7C7B\u6587\u4EF6
 #
-main.unsupported.usage=\ \ -Xdepend         \u9012\u5F52\u641C\u7D22\u6700\u65B0\u6E90\u6587\u4EF6\u4EE5\u8FDB\u884C\u91CD\u65B0\u7F16\u8BD1\n\ \ -Xstdout         \u5C06\u6D88\u606F\u53D1\u9001\u5230 System.out\n\ \ -Xverbosepath    \u8BF4\u660E\u641C\u7D22\u8DEF\u5F84\u548C\u6807\u51C6\u6269\u5C55\u7684\u65B9\u6CD5\n\ \ -J<\u8FD0\u884C\u65F6\u6807\u8BB0> \u5411 java \u89E3\u91CA\u5668\u4F20\u9012\u53C2\u6570\n\n-X \u548C -J \u9009\u9879\u90FD\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002
+main.unsupported.usage=\  -Xdepend         \u9012\u5F52\u641C\u7D22\u6700\u65B0\u6E90\u6587\u4EF6\u4EE5\u8FDB\u884C\u91CD\u65B0\u7F16\u8BD1\n  -Xstdout         \u5C06\u6D88\u606F\u53D1\u9001\u5230 System.out\n  -Xverbosepath    \u8BF4\u660E\u641C\u7D22\u8DEF\u5F84\u548C\u6807\u51C6\u6269\u5C55\u7684\u65B9\u6CD5\n  -J<\u8FD0\u884C\u65F6\u6807\u8BB0> \u5411 java \u89E3\u91CA\u5668\u4F20\u9012\u53C2\u6570\n\n-X \u548C -J \u9009\u9879\u90FD\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002
 #
 main.conflicting.options=\u4E0D\u80FD\u540C\u65F6\u4F7F\u7528\u9009\u9879{0}\u548C{1}\u3002
 main.option.already.seen={0}\u9009\u9879\u53EA\u80FD\u6307\u5B9A\u4E00\u6B21\u3002
@@ -311,4 +312,4 @@
 main.no.memory=\u7F16\u8BD1\u5668\u6240\u7528\u5185\u5B58\u4E0D\u8DB3\u3002\u8BF7\u8003\u8651\u4F7F\u7528 "-J-mx<\u6570\u5B57>" \u547D\u4EE4\u884C\u9009\u9879\u6765\u63D0\u9AD8\u5806\u5927\u5C0F\u7684\u6700\u5927\u503C\u3002
 main.stack.overflow=\u7F16\u8BD1\u5668\u6240\u7528\u5806\u6808\u7A7A\u95F4\u4E0D\u8DB3\u3002\u8BF7\u8003\u8651\u4F7F\u7528 "-J-oss<\u6570\u5B57>" \u547D\u4EE4\u884C\u9009\u9879\u6765\u63D0\u9AD8\u5206\u914D\u7ED9 Java \u5806\u6808\u7684\u5185\u5B58\u5927\u5C0F\u3002
 main.path.msg=[\u6E90\u7C7B\u8DEF\u5F84\u4E3A "{0}"]\n[\u5E93\u7C7B\u8DEF\u5F84\u4E3A "{1}"]
-javac.err.invalid.encoding.char=\u6E90\u6587\u4EF6\u7F16\u7801\u4E0E\u6B64\u5E73\u53F0\u7F16\u7801\u4E0D\u540C\u3002\u8BF7\u4F7F\u7528 -encoding \u9009\u9879\u6765\u8C03\u6574\u6587\u4EF6\u7F16\u7801, \u6216\u5E94\u7528 native2ascii \u5B9E\u7528\u7A0B\u5E8F\u6765\u5C06\u6E90\u6587\u4EF6\u8F6C\u6362\u4E3A ASCII \u7F16\u7801\u3002
+javac.err.invalid.encoding.char=\u6E90\u6587\u4EF6\u7F16\u7801\u4E0E\u6B64\u5E73\u53F0\u7F16\u7801\u4E0D\u540C\u3002\u8BF7\u4F7F\u7528 -encoding \u9009\u9879\u6765\u8C03\u6574\u6587\u4EF6\u7F16\u7801, \u6216\u786E\u4FDD\u6E90\u6587\u4EF6\u8F6C\u6362\u4E3A ASCII \u7F16\u7801\u3002
--- a/jdk/test/ProblemList.txt	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/ProblemList.txt	Fri Jul 08 12:17:10 2016 -0700
@@ -219,8 +219,6 @@
 
 sun/security/tools/keytool/ListKeychainStore.sh                 8156889 macosx-all
 
-sun/security/mscapi/ShortRSAKey1024.sh                          8153948 windows-all
-
 sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java      8026393 generic-all
 
 sun/security/pkcs11/Cipher/ReinitCipher.java                    8077138,8023434 windows-all
@@ -287,8 +285,6 @@
 
 sun/security/tools/keytool/autotest.sh                          8130302 generic-all
 
-sun/security/x509/URICertStore/ExtensionsWithLDAP.java          8134577 generic-all
-
 ############################################################################
 
 # jdk_sound
@@ -353,8 +349,6 @@
 
 java/util/spi/ResourceBundleControlProvider/UserDefaultControlTest.java 8062512 generic-all
 
-java/util/stream/test/org/openjdk/tests/java/util/stream/IntPrimitiveOpsTests.java 8130337 generic-all
-
 java/util/Arrays/ParallelPrefix.java                            8080165,8085982 generic-all
 
 java/util/BitSet/BitSetStreamTest.java                          8079538 generic-all
--- a/jdk/test/TEST.groups	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/TEST.groups	Fri Jul 08 12:17:10 2016 -0700
@@ -27,6 +27,7 @@
 
 tier1 = \
     :jdk_lang \
+    -java/lang/ProcessBuilder/Zombies.java \
     :jdk_util \
     -java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \
     -java/util/concurrent/forkjoin/FJExceptionTableLeak.java \
@@ -37,6 +38,7 @@
     tools/pack200
 
 tier2 = \
+    java/lang/ProcessBuilder/Zombies.java \
     java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java \
     java/util/concurrent/forkjoin/FJExceptionTableLeak.java \
     :jdk_io \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 8158325
+ * @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
+ * @requires (os.family == "mac")
+ * @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
+ */
+import java.awt.EventQueue;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Objects;
+
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.WindowConstants;
+
+public class ScreenMenuMemoryLeakTest {
+
+    private static byte[] sBytes;
+
+    private static WeakReference<JMenuItem> sMenuItem;
+    private static JFrame sFrame;
+    private static JMenu sMenu;
+
+    public static void main(String[] args) throws InvocationTargetException, InterruptedException {
+        EventQueue.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                System.setProperty("apple.laf.useScreenMenuBar", "true");
+                showUI();
+            }
+        });
+
+        EventQueue.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                removeMenuItemFromMenu();
+            }
+        });
+        System.gc();
+        System.runFinalization();
+        JMenuItem menuItem = sMenuItem.get();
+        EventQueue.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                sFrame.dispose();
+            }
+        });
+        if (menuItem != null) {
+            throw new RuntimeException("The menu item should have been GC-ed");
+        }
+    }
+
+    private static void showUI() {
+        sFrame = new JFrame();
+        sFrame.add(new JLabel("Some dummy content"));
+
+        JMenuBar menuBar = new JMenuBar();
+
+        sMenu = new JMenu("Menu");
+        JMenuItem item = new JMenuItem("Item");
+        sMenu.add(item);
+
+        sMenuItem = new WeakReference<>(item);
+
+        menuBar.add(sMenu);
+
+        sFrame.setJMenuBar(menuBar);
+
+        sFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+        sFrame.pack();
+        sFrame.setVisible(true);
+    }
+
+    private static void removeMenuItemFromMenu() {
+        JMenuItem menuItem = sMenuItem.get();
+        Objects.requireNonNull(menuItem, "The menu item should still be available at this point");
+        sMenu.remove(menuItem);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/ReadConfInUTF16Env.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.Security;
+
+public class ReadConfInUTF16Env {
+    public static void main(String argv[]) {
+        String name = Security.getProvider("OracleUcrypto").getName();
+        System.out.println(name);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/oracle/security/ucrypto/ReadConfInUTF16Env.sh	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8160267
+# @requires (os.family == "solaris")
+# @summary Ucrypto config file cannot be read with -Dfile.encoding=UTF-16
+# @build UcryptoTest ReadConfInUTF16Env
+# @run shell ReadConfInUTF16Env.sh
+
+# jtreg does not like -Dfile.encoding=UTF-16 inside a @run main line,
+# testlibrary.ProcessTools.createJavaProcessBuilder() also had troubles
+# executing a subprocess with -Dfile.encoding=UTF-16 option added,
+# therefore a shell test is written.
+
+$TESTJAVA/bin/java $TESTVMOPTS -cp $TESTCLASSES \
+  -Dfile.encoding=UTF-16 \
+  ReadConfInUTF16Env
--- a/jdk/test/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java	Fri Jul 08 12:17:10 2016 -0700
@@ -29,8 +29,8 @@
  * @run main/timeout=300 SupportedDHParamGens 768
  * @run main/timeout=300 SupportedDHParamGens 832
  * @run main/timeout=300 SupportedDHParamGens 1024
- * @run main/timeout=300 SupportedDHParamGens 2048
- * @run main/timeout=450 SupportedDHParamGens 3072
+ * @run main/timeout=600 SupportedDHParamGens 2048
+ * @run main/timeout=700 SupportedDHParamGens 3072
  */
 
 import java.math.BigInteger;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/FileDialog/DeleteInsideFileDialog/DeleteInsideFileDialogTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+  @test
+  @bug 8075516
+  @requires os.family=="windows"
+  @summary Deleting a file from either the open or save java.awt.FileDialog
+           hangs.
+  @run main/manual DeleteInsideFileDialogTest
+*/
+
+import java.awt.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public class DeleteInsideFileDialogTest {
+
+    private static Path dir;
+    private static Path file1;
+    private static Path file2;
+    private static Frame f;
+    private static FileDialog fd;
+
+    public static void main(String[] args) throws Exception {
+
+        String instructions =
+                "1) Delete file deleteMe.tst in the opened File Dialog window" +
+                   " using the right click popup menu\n" +
+                "2) Select thenSelectMe.tst file in the File Dialog and press" +
+                   " Open (if this is not possible the test fails)\n";
+        dir = Files.createTempDirectory("Test");
+        file1 = Files.createFile(Paths.get(dir.toString(), "deleteMe.tst"));
+        file2 = Files.createFile(Paths.get(dir.toString(), "thenSelectMe.tst"));
+        try {
+            f = new Frame("Instructions");
+            f.add(new TextArea(instructions, 6, 60, TextArea.SCROLLBARS_NONE));
+            f.pack();
+            f.setLocation(100, 500);
+            f.setVisible(true);
+
+            fd = new FileDialog((Frame)null);
+            fd.setDirectory(dir.toString());
+            fd.setVisible(true);
+            if (fd.getFile() == null) {
+                throw new RuntimeException("Failed");
+            }
+        } finally {
+            if (fd != null) {
+                fd.dispose();
+            }
+            if (f != null) {
+                f.dispose();
+            }
+            Files.deleteIfExists(file1);
+            Files.deleteIfExists(file2);
+            Files.deleteIfExists(dir);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8022810
+ * @summary Cannot list all the available display modes on Ubuntu linux in case
+ *          of two screen devices
+ * @run main CompareToXrandrTest
+ */
+
+import java.awt.GraphicsEnvironment;
+import java.awt.GraphicsDevice;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+public class CompareToXrandrTest {
+
+    public static void main(String[] args) throws Exception {
+        if (!new File("/usr/bin/xrandr").exists()) {
+            System.out.println("No xrandr tool to compare");
+            return;
+        }
+
+        BufferedReader reader = new BufferedReader(new InputStreamReader(
+                Runtime.getRuntime().exec("/usr/bin/xrandr").getInputStream()));
+        reader.readLine();
+        reader.readLine();
+        Pattern pattern = Pattern.compile("^\\s*(\\d+x\\d+)");
+
+        for (GraphicsDevice d : GraphicsEnvironment
+                            .getLocalGraphicsEnvironment().getScreenDevices()) {
+
+            Set<String> xrandrModes = reader.lines().map(pattern::matcher)
+                    .takeWhile(Matcher::find).map(m -> m.group(1))
+                            .collect(Collectors.toSet());
+
+            Set<String> javaModes = Arrays.stream(d.getDisplayModes())
+                    .map(m -> m.getWidth() + "x" + m.getHeight())
+                            .collect(Collectors.toSet());
+
+            if (!xrandrModes.equals(javaModes)) {
+                throw new RuntimeException("Failed");
+            } else {
+                System.out.println("Device " + d + ": " + javaModes.size() +
+                                                               " modes found.");
+            }
+        }
+    }
+}
--- a/jdk/test/java/awt/InputMethods/DiacriticsTest/DiacriticsTest.html	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/InputMethods/DiacriticsTest/DiacriticsTest.html	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 <!--
-Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
 This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,8 @@
 Test run requires the following keyboard layouts to be installed:
 Linux OS: English (US, alternative international)
 Windows OS: Hungarian
+A keyboard layout having compose function or compose-like key. Programmer
+Dvorak (http://www.kaufmann.no/roland/dvorak/) is suggested to use.
 
 To test JDK-8000423 fix (Linux only!):
 please switch to US alternative international layout and try to type diacritics
@@ -40,6 +42,12 @@
 please switch to Hungarian keyboard layout and try to type diacritics 
 (Ctrl+Alt+2 e; Ctrl+Alt+2 E)
 
+To test JDK-8139189 fix:
+please switch to Programmer Dvorak keyboard layout try to type diacritics
+using compose combinations (Compose+z+d, Compose+z+Shift+d). The Compose key
+in Programmer Dvorak layout is OEM102 the key which is located between
+Left Shift and Z keys on the standard 102-key keyboard.
+
 If you can do that then the test is passed; otherwise failed.
 </body>
 </html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TextArea/AutoScrollOnSelectAndAppend/AutoScrollOnSelectAndAppend.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+  @test
+  @bug 5003402 8151588
+  @summary TextArea must scroll automatically when calling append and select,
+           even when not in focus.
+  @run main AutoScrollOnSelectAndAppend
+ */
+
+import java.awt.Button;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.TextArea;
+import java.awt.event.InputEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+public class AutoScrollOnSelectAndAppend {
+
+    Frame frame;
+    TextArea textArea;
+    Button buttonHoldFocus;
+    Robot robot;
+    int test;
+    int selectScrollPos1;
+    int selectScrollPos2;
+    String selectionText;
+
+    public void composeTextArea() {
+        String filler = "";
+        // Add 10 rows of text for first selection auto scroll test.
+        for (int i = 0; i < 2; i++) {
+            for (int j = 0; j < 5; j++) {
+                filler = filler + i + i + "\n";
+            }
+        }
+        selectScrollPos1 = filler.length();
+        String text = filler + "FirstScroll\n";
+
+        // Add 10 more rows of text for second selection auto scroll test.
+        filler = "";
+        for (int i = 2; i < 4; i++) {
+            for (int j = 0; j < 5; j++) {
+                filler = filler + i + i + "\n";
+            }
+        }
+        text = text + filler;
+        selectScrollPos2 = text.length();
+        text = text + "SecondScroll\n";
+
+        // Add 10 more rows of text for append text auto scroll test.
+        filler = "";
+        for (int i = 4; i < 6; i++) {
+            for (int j = 0; j < 5; j++) {
+                filler = filler + i + i + "\n";
+            }
+        }
+        text = text + filler;
+        textArea.setText(text);
+
+        textArea.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseClicked(MouseEvent e) {
+                if (e.getClickCount() % 2 == 0) {
+                    if (!(textArea.getSelectedText().contains(selectionText))) {
+                        dispose();
+                        throw new RuntimeException("Test No: " + test +
+                            ": TextArea is not auto scrolled to show the" +
+                            " select/append text.");
+                    }
+                }
+            }
+        });
+    }
+
+    public AutoScrollOnSelectAndAppend() {
+        try {
+            robot = new Robot();
+        } catch (Exception ex) {
+            throw new RuntimeException("Robot Creation Failed.");
+        }
+        frame = new Frame();
+        frame.setSize(200, 200);
+        frame.setLayout(new FlowLayout());
+
+        textArea = new TextArea(5, 20);
+        composeTextArea();
+        frame.add(textArea);
+
+        buttonHoldFocus = new Button("HoldFocus");
+        frame.add(buttonHoldFocus);
+
+        frame.setVisible(true);
+        robot.waitForIdle();
+
+        // Move mouse cursor on first row of text area.
+        Point loc = textArea.getLocationOnScreen();
+        robot.mouseMove(loc.x + 8, loc.y + 8);
+        robot.waitForIdle();
+    }
+
+    public void doubleClick() {
+        // Delay to make sure auto scroll is finished.
+        robot.waitForIdle();
+        robot.delay(500);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        robot.delay(100);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        robot.waitForIdle();
+    }
+
+    public void setFocusOnButton() {
+        buttonHoldFocus.requestFocusInWindow();
+        robot.waitForIdle();
+    }
+
+    public void selectAutoScrollTest1() {
+        test = 1;
+        setFocusOnButton();
+        textArea.select(selectScrollPos1, selectScrollPos1);
+        selectionText = "11";
+        doubleClick();
+    }
+
+    public void selectAutoScrollTest2() {
+        test = 2;
+        setFocusOnButton();
+        textArea.select(selectScrollPos2, selectScrollPos2);
+        selectionText = "33";
+        doubleClick();
+    }
+
+    public void appendAutoScrollTest() {
+        test = 3;
+        setFocusOnButton();
+        selectionText = "55";
+        textArea.append("appendScroll");
+        doubleClick();
+    }
+
+    public void dispose() {
+        frame.dispose();
+    }
+
+    public static void main(String[] args) {
+        AutoScrollOnSelectAndAppend test = new AutoScrollOnSelectAndAppend();
+        test.selectAutoScrollTest1();
+        test.selectAutoScrollTest2();
+        test.appendAutoScrollTest();
+        test.dispose();
+    }
+}
--- a/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/TextArea/TextAreaCaretVisibilityTest/bug7129742.java	Fri Jul 08 12:17:10 2016 -0700
@@ -29,7 +29,7 @@
 /* @test
  * @bug 7129742
  * @summary Focus in non-editable TextArea is not shown on Linux.
- * @requires (os.family == "linux" | os.name == "solaris")
+ * @requires (os.family == "linux" | os.family == "solaris")
  * @modules java.desktop/sun.awt
  *          java.desktop/java.awt.peer
  *          java.desktop/sun.awt.X11
--- a/jdk/test/java/awt/WMSpecificTests/Metacity/FullscreenDialogModality.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/WMSpecificTests/Metacity/FullscreenDialogModality.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 8012586
  * @summary verify that modal dialog will appeared above fullscreen window under Metacity WM.
- * @requires (os.name == "linux" | os.name == "solaris")
+ * @requires (os.family == "linux" | os.family == "solaris")
  * @modules java.desktop/sun.awt.X11
  * @library ../../regtesthelpers
  * @build Util
--- a/jdk/test/java/awt/WMSpecificTests/Mutter/MutterMaximizeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/WMSpecificTests/Mutter/MutterMaximizeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -28,7 +28,7 @@
   @bug      7043963
   @summary  Tests  that the screen location of windows is
             updated properly after a maximize.
-  @requires (os.name == "linux" | os.name == "solaris")
+  @requires (os.family == "linux" | os.family == "solaris")
   @modules java.desktop/sun.awt.X11
   @author   Denis Lila
   @library  ../../regtesthelpers
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Window/SetWindowLocationByPlatformTest/SetWindowLocationByPlatformTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8025130
+ * @summary setLocationByPlatform has no effect
+ * @author Dmitry Markov
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main SetWindowLocationByPlatformTest
+ */
+import java.awt.*;
+
+import test.java.awt.regtesthelpers.Util;
+
+public class SetWindowLocationByPlatformTest {
+    public static void main(String[] args) {
+        Robot r = Util.createRobot();
+
+        Frame frame1 = new Frame ("First Frame");
+        frame1.setSize(500, 300);
+        frame1.setLocationByPlatform(true);
+        frame1.setVisible(true);
+        Util.waitForIdle(r);
+
+        Frame frame2 = new Frame ("Second Frame");
+        frame2.setSize(500, 300);
+        frame2.setLocationByPlatform(true);
+        frame2.setVisible(true);
+        Util.waitForIdle(r);
+
+        Point point1 = frame1.getLocationOnScreen();
+        Point point2 = frame2.getLocationOnScreen();
+
+        try {
+            if (point1.equals(point2)) {
+                throw new RuntimeException("Test FAILED: both frames have the same location " + point1);
+            }
+        } finally {
+            frame1.dispose();
+            frame2.dispose();
+        }
+    }
+}
+
--- a/jdk/test/java/awt/event/KeyEvent/KeyChar/KeyCharTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/event/KeyEvent/KeyChar/KeyCharTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -32,7 +32,7 @@
 /*
  * @test
  * @key headful
- * @bug 8022401
+ * @bug 8022401 8160623
  * @summary Wrong key char
  * @author Alexandr Scherbatiy
  * @run main KeyCharTest
--- a/jdk/test/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,10 +23,12 @@
 
 /*
  @test
- @bug 8041928
+ @bug 8041928 8158616
  @summary Confirm that the Alt-Gr Modifier bit is set correctly.
+ @requires (os.family != "windows" & os.family != "mac")
  @run main/manual AltGraphModifierTest
  */
+
 import java.awt.Button;
 import java.awt.Dialog;
 import java.awt.Frame;
@@ -43,10 +45,6 @@
         String[] instructions
                 = {
                     "This test is for verifying Alt-Gr modifier of an event.",
-                    "Windows :-",
-                    "1. Click Pass.",
-                    "2. Alt-Gr modifier is tested under Robot tests.",
-                    " ",
                     "Linux :-",
                     "1. Please check if Alt-Gr key is present on keyboard.",
                     "2. If present, press the Alt-Gr key and perform",
@@ -60,10 +58,6 @@
                     "   TestWindow",
                     "7. Test will exit by itself with appropriate result.",
                     " ",
-                    "Mac :-",
-                    "1. Press Right Option key on the keyboard and mouse click",
-                    "   on the TestWindow",
-                    "3. Test will exit by itself with appropriate result.",
                 };
 
         Sysout.createDialog();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/font/TextLayout/TextLayoutEqualsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4497648
+ * @summary Test equals methods on TextLayout
+ */
+import java.awt.Font;
+import java.awt.font.FontRenderContext;
+import java.awt.font.TextLayout;
+
+public class TextLayoutEqualsTest {
+
+    public static void main(String args[]) {
+
+        Font font = new Font(Font.DIALOG, Font.PLAIN, 12);
+        String text = "hello world";
+        FontRenderContext frc = new FontRenderContext(null, false, false);
+        TextLayout tl1 = new TextLayout(text, font, frc);
+        TextLayout tl2 = new TextLayout(text, font, frc);
+        if (tl1.equals(tl2) ||
+            tl2.equals(tl1) ||
+            tl1.equals((Object)tl2) ||
+            tl2.equals((Object)tl1))
+        {
+             throw new RuntimeException("Equal TextLayouts");
+        }
+        if (!tl1.equals(tl1) ||
+            !tl1.equals((Object)tl1))
+        {
+             throw new RuntimeException("Non-Equal TextLayouts");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/im/8148984/bug8148984.html	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,38 @@
+<!--
+ Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+
+<html>
+<body>
+Verify that Chinese comma can be entered in JTextField with Pinyin input method (IM).
+
+This test is for OS X only. For other platforms please simply press "Pass".
+
+1. Go to "System Preferences -> Keyboard -> Input Sources" and add "Pinyin – Traditional" or "Pinyin – Simplified" IM from Chinese language group.
+2. Set current IM to "Pinyin".
+3. Set focus to the text field of the test and press "comma" character on the keyboard.
+4. Set current IM to the IM used before "Pinyin" was set.
+5. If "," character is displayed in the text area, press "Pass", if "," character is displayed, press "Fail".
+
+<applet  code="bug8148984.class" width=400 height=400></applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/im/8148984/bug8148984.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8148984
+ * @summary Chinese Comma cannot be entered using Pinyin Input Method on OS X
+ * @author Dmitry Markov
+ * @run applet/manual=yesno bug8148984.html
+ */
+
+import javax.swing.*;
+
+public class bug8148984 extends JApplet {
+    @Override
+    public void init() {
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                JPanel panel = new JPanel();
+                panel.add(new JLabel("Text field:"));
+                panel.add(new JTextField(20));
+                add(panel);
+            }
+        });
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/im/8154816/bug8154816.html	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,39 @@
+<!--
+ Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+-->
+
+<html>
+<body>
+Verify that Caps Lock key works properly with Pinyin input method, (i.e. if 
+Caps Lock is pressed, input should be swithced to lowercase latin letters).
+
+This test is for OS X only. For other platforms please simply press "Pass".
+
+1. Go to "System Preferences -> Keyboard -> Input Sources" and add "Pinyin – Traditional" or "Pinyin – Simplified" IM from Chinese language group.
+2. Set current IM to "Pinyin".
+3. Set focus to the text field of the test and press Caps Lock key on the keyboard.
+4. Press "a" character on the keyboard
+5. If "a" character is displayed in the text field, press "Pass", if "A" character is displayed, press "Fail".
+
+<applet  code="bug8154816.class" width=400 height=400></applet>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/im/8154816/bug8154816.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8154816
+ * @summary Caps Lock doesn't work as expected when using Pinyin Simplified input method
+ * @author Dmitry Markov
+ * @run applet/manual=yesno bug8154816.html
+ */
+
+import javax.swing.*;
+
+public class bug8154816 extends JApplet {
+    @Override
+    public void init() {
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                JPanel panel = new JPanel();
+                panel.add(new JLabel("Text field:"));
+                panel.add(new JTextField(20));
+                add(panel);
+            }
+        });
+    }
+}
+
--- a/jdk/test/java/awt/keyboard/AllKeyCode/AllKeyCode.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/keyboard/AllKeyCode/AllKeyCode.java	Fri Jul 08 12:17:10 2016 -0700
@@ -22,15 +22,14 @@
  */
 
 /*
-  @test
-  @bug 8149456 8147834 8150230
-  @requires os.family == "mac"
-  @summary KeyEvents for all keys
-  @run main AllKeyCode
-*/
+ @test
+ @bug 8149456 8147834 8150230 8155740
+ @requires os.family == "mac"
+ @summary Tests key codes for all keys supported in Java for Mac OS X.
+ @run main AllKeyCode
+ */
 
 import java.awt.AWTException;
-import java.awt.GridBagLayout;
 import java.awt.Robot;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
@@ -149,7 +148,8 @@
             KeyEvent.VK_F17,
             KeyEvent.VK_F18,
             KeyEvent.VK_F19,
-            KeyEvent.VK_F20
+            KeyEvent.VK_F20,
+            KeyEvent.VK_ALT_GRAPH
         };
 
         keyPressedIndex = -1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/keyboard/Bug8158478/Test8158478.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+* @test
+* @bug 8158478
+* @requires (os.family == "linux")
+* @summary To Verify X11 Keysym unicode for topt
+* @run main/manual Test8158478
+ */
+import java.awt.Button;
+import java.awt.Frame;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.CountDownLatch;
+
+public class Test8158478 {
+
+    public static void main(String args[]) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        X11KeysymTest test = new X11KeysymTest(latch);
+        Thread T1 = new Thread(test);
+        T1.start();
+
+        // wait for latch to complete
+        latch.await();
+
+        if (test.testResult == false) {
+            throw new RuntimeException("User Clicked Fail! "
+                    + "Wrong Unicode Character");
+        }
+    }
+}
+
+class X11KeysymTest implements Runnable {
+
+    private static GridBagLayout layout;
+    private static Panel mainControlPanel;
+    private static Panel resultButtonPanel;
+    private static TextArea instructionTextArea;
+    private static Button passButton;
+    private static Button failButton;
+    private static Frame mainFrame;
+    private static TextArea testArea;
+    private final CountDownLatch latch;
+    public volatile boolean testResult = false;
+
+    public X11KeysymTest(CountDownLatch latch) {
+        this.latch = latch;
+    }
+
+    @Override
+    public void run() {
+        createUI();
+    }
+
+    public final void createUI() {
+
+        mainFrame = new Frame("X11 Keysym Test");
+        layout = new GridBagLayout();
+        mainControlPanel = new Panel(layout);
+        resultButtonPanel = new Panel(layout);
+
+        GridBagConstraints gbc = new GridBagConstraints();
+        String instructions
+                = "INSTRUCTIONS:"
+                + "\n Have a custom X11 keyboard layout with"
+                + " \"topt\" assigned to some key:  "
+                + "\n Map \"topt\" key to \"Caps_Lock\" by executing"
+                + " following command in Terminal:"
+                + "\n xmodmap -e \"keysym Caps_Lock = topt\"."
+                + "\n Go to TextArea below and press \"CAPSLOCK\" key"
+                + "\n If Symbol: " + "\u252c" + " is displayed then test Pass,"
+                + "\n If Symbol: " + "\u242c" + " is displayed then test Fail,"
+                + "\n Execute the below command to reset the above settigs, "
+                + "\n setxkbmap -layout us";
+
+        instructionTextArea = new TextArea();
+        instructionTextArea.setText(instructions);
+        instructionTextArea.setEnabled(true);
+
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
+        mainControlPanel.add(instructionTextArea, gbc);
+
+        testArea = new TextArea("TextArea");
+        gbc.gridx = 0;
+        gbc.gridy = 1;
+        mainControlPanel.add(testArea, gbc);
+        passButton = new Button("Pass");
+        passButton.setActionCommand("Pass");
+        passButton.addActionListener((ActionEvent e) -> {
+            testResult = true;
+            mainFrame.dispose();
+            latch.countDown();
+
+        });
+        failButton = new Button("Fail");
+        failButton.setActionCommand("Fail");
+        failButton.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                testResult = false;
+                mainFrame.dispose();
+                latch.countDown();
+            }
+        });
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        resultButtonPanel.add(passButton, gbc);
+        gbc.gridx = 1;
+        gbc.gridy = 0;
+        resultButtonPanel.add(failButton, gbc);
+
+        gbc.gridx = 0;
+        gbc.gridy = 2;
+        mainControlPanel.add(resultButtonPanel, gbc);
+
+        mainFrame.add(mainControlPanel);
+        mainFrame.pack();
+        mainFrame.setVisible(true);
+    }
+
+}
+
--- a/jdk/test/java/awt/print/PrinterJob/LandscapeStackOverflow.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/print/PrinterJob/LandscapeStackOverflow.java	Fri Jul 08 12:17:10 2016 -0700
@@ -22,7 +22,7 @@
  */
 /*
  * @test
- * @bug 6842011
+ * @bug 6842011 8158758
  * @summary Test if StackOverflowError occurs during printing landscape with
  *          scale and transform.
  * @run main LandscapeStackOverflow
@@ -47,9 +47,6 @@
         PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
         attributes.add( OrientationRequested.LANDSCAPE );
 
-        boolean print = printjob.printDialog( attributes );
-        if( !print ) return;
-
         try {
             printjob.setPrintable( new Painter() );
             printjob.print( attributes );
--- a/jdk/test/java/awt/print/PrinterJob/Margins.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/print/PrinterJob/Margins.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,15 +23,22 @@
 
 /**
  * @test
- * @bug 6543815
+ * @bug 6543815 6601097
  * @summary Image should be sent to printer, no exceptions thrown.
- *    The 2 printouts should have a rectangle which is the minimum
- *    possible margin.
+ *    The 3 printouts should have a rectangle which is the minimum
+ *    possible margins ie, the margins should be hardware margins
+ *    and not java default 1 inch margins.
  * @run main/manual Margins
  */
 
-import java.awt.*;
-import java.awt.print.*;
+import java.awt.print.PrinterJob;
+import java.awt.print.Printable;
+import java.awt.print.PageFormat;
+import java.awt.print.Paper;
+import java.awt.print.PrinterException;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Color;
 
 public class Margins implements Printable {
 
@@ -59,7 +66,22 @@
            job.print();
         } catch (PrinterException e) {
         }
-   }
+
+        pageFormat = job.defaultPage();
+        paper = pageFormat.getPaper();
+        wid = paper.getWidth();
+        hgt = paper.getHeight();
+
+        paper.setImageableArea(0, -10, -wid, hgt);
+        pageFormat = job.pageDialog(pageFormat);
+        pageFormat.setPaper(paper);
+
+        job.setPrintable(new Margins(), pageFormat);
+        try {
+           job.print();
+        } catch (PrinterException e) {
+        }
+    }
 
    public int print(Graphics g, PageFormat pf, int page)
        throws PrinterException {
@@ -76,12 +98,22 @@
            throw new RuntimeException("Imageable x or y is a negative value.");
        }
 
+
        Paper paper = pf.getPaper();
        double wid = paper.getWidth();
        double hgt = paper.getHeight();
 
+       /* If imageable width/height is -ve, then print was done with 1" margin
+        * ie ix=72 iy=72 iw=451 ih=697 and wid=595
+        * but with fix, we get print with hardware margin ie
+        * ix=12, iy=12, iw=571, ih=817
+        */
+       if ((wid - iw > 72) || (hgt - ih > 72)) {
+           throw new RuntimeException("Imageable width or height is negative value");
+       }
        if ((ix+iw > wid) || (iy+ih > hgt)) {
-           throw new RuntimeException("Printable width or height exceeds paper width or height.");
+           throw new RuntimeException("Printable width or height "
+                   + "exceeds paper width or height.");
        }
 
        Graphics2D g2d = (Graphics2D)g;
--- a/jdk/test/java/awt/print/PrinterJob/PrintDlgSelectionAttribTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/awt/print/PrinterJob/PrintDlgSelectionAttribTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -22,7 +22,7 @@
  */
  /*
  * @test
- * @bug 6529030
+ * @bug 6529030 8159134
  * @summary  Verifies if Java Printing: Selection radiobutton gets enabled.
  * @requires (os.family == "windows")
  * @run main/manual PrintDlgSelectionAttribTest
@@ -83,7 +83,7 @@
         });
         mainThread = Thread.currentThread();
         try {
-            Thread.sleep(30000);
+            Thread.sleep(60000);
         } catch (InterruptedException e) {
             if (!testPassed && testGeneratedInterrupt) {
                 throw new RuntimeException(""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/PrintTestLexmarkIQ.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 6966350
+ * @summary Verifies if Empty pages are printed on Lexmark E352dn PS3
+ *           with "1200 IQ" setting
+ * @run main/manual PrintTestLexmarkIQ
+ */
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.print.PageFormat;
+import java.awt.print.Paper;
+import java.awt.print.Printable;
+import static java.awt.print.Printable.NO_SUCH_PAGE;
+import static java.awt.print.Printable.PAGE_EXISTS;
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
+public class PrintTestLexmarkIQ implements Printable {
+
+    private static Thread mainThread;
+    private static boolean testPassed;
+    private static boolean testGeneratedInterrupt;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            doTest(PrintTestLexmarkIQ::printTest);
+        });
+        mainThread = Thread.currentThread();
+        try {
+            Thread.sleep(90000);
+        } catch (InterruptedException e) {
+            if (!testPassed && testGeneratedInterrupt) {
+                throw new RuntimeException(" Empty pages printed ");
+            }
+        }
+        if (!testGeneratedInterrupt) {
+            throw new RuntimeException("user has not executed the test");
+        }
+    }
+
+    private static void printTest() {
+        PrinterJob pj = PrinterJob.getPrinterJob();
+
+        PageFormat pf = pj.defaultPage();
+        Paper paper = new Paper();
+        double margin = 36; // half inch
+        paper.setImageableArea(margin, margin, paper.getWidth() - margin * 2,
+                paper.getHeight() - margin * 2);
+        pf.setPaper(paper);
+
+        pj.setPrintable(new PrintTestLexmarkIQ(), pf);
+        if (pj.printDialog()) {
+            try {
+                pj.print();
+            } catch (PrinterException e) {
+                System.out.println(e);
+            }
+        }
+    }
+
+    public static synchronized void pass() {
+        testPassed = true;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    public static synchronized void fail() {
+        testPassed = false;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    private static void doTest(Runnable action) {
+        String description
+                = " Install Lexmark E352dn PS3 or Dell 5310n printer.\n"
+                + " A print dialog will be shown.\n"
+                + " Select Normal 1200IQ setting in Properties->PrintQuality in Dell 5310n \n"
+                + " or for Lexmark E352dn printer, select Normal 1200IQ setting in\n "
+                + " Properties -> Advanced -> Graphic -> Print Quality.\n"
+                + " Press Print. Verify the print output.\n "
+                + " If empty page is printed, press Fail else press Pass.";
+
+        final JDialog dialog = new JDialog();
+        dialog.setTitle("1200IQTest");
+        JTextArea textArea = new JTextArea(description);
+        textArea.setEditable(false);
+        final JButton testButton = new JButton("Start Test");
+        final JButton passButton = new JButton("PASS");
+        passButton.setEnabled(false);
+        passButton.addActionListener((e) -> {
+            dialog.dispose();
+            pass();
+        });
+        final JButton failButton = new JButton("FAIL");
+        failButton.setEnabled(false);
+        failButton.addActionListener((e) -> {
+            dialog.dispose();
+            fail();
+        });
+        testButton.addActionListener((e) -> {
+            testButton.setEnabled(false);
+            action.run();
+            passButton.setEnabled(true);
+            failButton.setEnabled(true);
+        });
+        JPanel mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(textArea, BorderLayout.CENTER);
+        JPanel buttonPanel = new JPanel(new FlowLayout());
+        buttonPanel.add(testButton);
+        buttonPanel.add(passButton);
+        buttonPanel.add(failButton);
+        mainPanel.add(buttonPanel, BorderLayout.SOUTH);
+        dialog.add(mainPanel);
+        dialog.pack();
+        dialog.setVisible(true);
+    }
+
+    public int print(Graphics g, PageFormat pf, int pi)
+            throws PrinterException {
+        if (pi != 0) {
+            return NO_SUCH_PAGE;
+        }
+        Graphics2D g2 = (Graphics2D) g;
+        g2.setFont(new Font("Serif", Font.PLAIN, 36));
+        g2.setPaint(Color.black);
+        g2.drawString("Java Source and Support", 100, 100);
+        Rectangle2D outline = new Rectangle2D.Double(pf.getImageableX(), pf
+                .getImageableY(), pf.getImageableWidth(), pf
+                .getImageableHeight());
+        g2.draw(outline);
+        return PAGE_EXISTS;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/TestPgfmtSetMPA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 6789262
+ * @summary  Verifies if getPageFormat returns correct mediaprintable value
+ * @run main TestPgfmtSetMPA
+ */
+import java.awt.print.PageFormat;
+import java.awt.print.PrinterJob;
+import javax.print.attribute.HashPrintRequestAttributeSet;
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.standard.MediaPrintableArea;
+
+public class TestPgfmtSetMPA {
+
+    public static void main(String args[]) {
+        PrinterJob job;
+
+        job = PrinterJob.getPrinterJob();
+
+        PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
+
+        // Here you could see the PageFormat with an empty PrintRequestAttributeSet
+        PageFormat pf2 = job.getPageFormat(pras);
+        System.out.println((pf2.getImageableX() / 72f) + " "
+                + (pf2.getImageableY() / 72f) + " "
+                + (pf2.getImageableWidth() / 72f) + " "
+                + (pf2.getImageableHeight() / 72f)
+        );
+
+        // Set left margin to 2.0
+        pras.add(new MediaPrintableArea(2.0f,
+                (float)(pf2.getImageableY() / 72f),
+                (float) ((pf2.getImageableWidth() / 72f) - 1.0f),
+                (float) (pf2.getImageableHeight() / 72f),
+                MediaPrintableArea.INCH));
+
+        pf2 = job.getPageFormat(pras);
+        System.out.println((pf2.getImageableX() / 72f) + " "
+                + (pf2.getImageableY() / 72f) + " "
+                + (pf2.getImageableWidth() / 72f) + " "
+                + (pf2.getImageableHeight() / 72f)
+        );
+
+        // check if returned left margin of imageable area is 2.0 as set earlier
+        if (pf2.getImageableX() / 72f != 2.0f) {
+            throw new RuntimeException("getPageFormat doesn't apply specified "
+                    + "MediaPrintableArea attribute");
+        }
+    }
+}
--- a/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 8071474
  * @summary Better failure atomicity for default read object.
+ * @modules jdk.compiler
  * @library /lib/testlibrary
  * @build jdk.testlibrary.FileUtils
  * @compile FailureAtomicity.java SerialRef.java
--- a/jdk/test/java/lang/ProcessBuilder/Zombies.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/lang/ProcessBuilder/Zombies.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,9 @@
             ! new File("/bin/ps").canExecute())
             return;
         System.out.println("Looks like a Unix system.");
+        long mypid = ProcessHandle.current().getPid();
+        System.out.printf("mypid: %d%n", mypid);
+
         final Runtime rt = Runtime.getRuntime();
 
         try {
@@ -59,7 +62,10 @@
             throw new Error("expected IOException not thrown");
         } catch (IOException expected) {/* OK */}
 
-        rt.exec(TrueCommand).waitFor();
+        Process p = rt.exec(TrueCommand);
+        ProcessHandle pp = p.toHandle().parent().orElse(null);
+        System.out.printf("pid: %d, parent: %s%n", p.getPid(), pp);
+        p.waitFor();
 
         // Count all the zombies that are children of this Java process
         final String[] zombieCounter = {
@@ -68,6 +74,13 @@
         };
 
         int zombies = rt.exec(zombieCounter).waitFor();
-        if (zombies != 0) throw new Error(zombies + " zombies!");
+        if (zombies != 0) {
+            // Log remaining processes
+            ProcessBuilder pb = new ProcessBuilder("/bin/ps", "-ef");
+            pb.inheritIO();
+            Process p2 = pb.start();
+            p2.waitFor();
+            throw new Error(zombies + " zombies!");
+        }
     }
 }
--- a/jdk/test/java/lang/SecurityManager/CheckSecurityProvider.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/lang/SecurityManager/CheckSecurityProvider.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,11 +28,14 @@
  * @run main/othervm CheckSecurityProvider
  */
 
+import java.lang.reflect.Layer;
 import java.security.Provider;
 import java.security.Security;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 /*
  * The main benefit of this test is to catch merge errors or other types
@@ -42,6 +45,8 @@
  */
 public class CheckSecurityProvider {
     public static void main(String[] args) throws Exception {
+        Layer layer = Layer.boot();
+
         System.setSecurityManager(new SecurityManager());
 
         String os = System.getProperty("os.name");
@@ -55,43 +60,60 @@
 
         // NOTE: the ordering must match what's defined inside java.security
         if (os.equals("SunOS")) {
-            expected.add("com.oracle.security.ucrypto.UcryptoProvider");
-            expected.add("sun.security.pkcs11.SunPKCS11");
+            layer.findModule("jdk.crypto.ucrypto")
+                .ifPresent(m -> expected.add("com.oracle.security.ucrypto.UcryptoProvider"));
+            layer.findModule("jdk.crypto.pkcs11")
+                .ifPresent(m -> expected.add("sun.security.pkcs11.SunPKCS11"));
         }
         expected.add("sun.security.provider.Sun");
         expected.add("sun.security.rsa.SunRsaSign");
-        expected.add("sun.security.ec.SunEC");
+        layer.findModule("jdk.crypto.ec")
+            .ifPresent(m -> expected.add("sun.security.ec.SunEC"));
         expected.add("com.sun.net.ssl.internal.ssl.Provider");
         expected.add("com.sun.crypto.provider.SunJCE");
-        expected.add("sun.security.jgss.SunProvider");
-        expected.add("com.sun.security.sasl.Provider");
-        expected.add("org.jcp.xml.dsig.internal.dom.XMLDSigRI");
-        expected.add("sun.security.smartcardio.SunPCSC");
-        expected.add("sun.security.provider.certpath.ldap.JdkLDAP");
-        expected.add("com.sun.security.sasl.gsskerb.JdkSASL");
+        layer.findModule("jdk.security.jgss")
+            .ifPresent(m -> expected.add("sun.security.jgss.SunProvider"));
+        layer.findModule("java.security.sasl")
+            .ifPresent(m -> expected.add("com.sun.security.sasl.Provider"));
+        layer.findModule("java.xml.crypto")
+            .ifPresent(m -> expected.add("org.jcp.xml.dsig.internal.dom.XMLDSigRI"));
+        layer.findModule("java.smartcardio")
+            .ifPresent(m -> expected.add("sun.security.smartcardio.SunPCSC"));
+        layer.findModule("java.naming")
+            .ifPresent(m -> expected.add("sun.security.provider.certpath.ldap.JdkLDAP"));
+        layer.findModule("jdk.security.jgss")
+            .ifPresent(m -> expected.add("com.sun.security.sasl.gsskerb.JdkSASL"));
         if (os.startsWith("Windows")) {
-            expected.add("sun.security.mscapi.SunMSCAPI");
+            layer.findModule("jdk.crypto.mscapi")
+                .ifPresent(m -> expected.add("sun.security.mscapi.SunMSCAPI"));
         }
         if (os.contains("OS X")) {
             expected.add("apple.security.AppleProvider");
         }
         if (!os.equals("SunOS")) {
-            expected.add("sun.security.pkcs11.SunPKCS11");
+            layer.findModule("jdk.crypto.pkcs11")
+                .ifPresent(m -> expected.add("sun.security.pkcs11.SunPKCS11"));
         }
 
+        List<String> actual = Stream.of(Security.getProviders())
+            .map(p -> p.getClass().getName())
+            .collect(Collectors.toList());
+
+        System.out.println("Expected providers:");
+        expected.stream().forEach(System.out::println);
+        System.out.println("Actual providers:");
+        actual.stream().forEach(System.out::println);
+
+        if (expected.size() != actual.size()) {
+            throw new Exception("Unexpected provider count. "
+                + "Expected: " + expected.size() + ". Actual: " + actual.size());
+        }
         Iterator<String> iter = expected.iterator();
-        for (Provider p: Security.getProviders()) {
-            if (!iter.hasNext()) {
-                throw new Exception("Less expected");
+        for (String p: actual) {
+            String nextExpected = iter.next();
+            if (!nextExpected.equals(p)) {
+                throw new Exception("Expected " + nextExpected + ", actual " + p);
             }
-            String n1 = iter.next();
-            String n2 = p.getClass().getName();
-            if (!n1.equals(n2)) {
-                throw new Exception("Expected " + n1 + ", actual " + n2);
-            }
-        }
-        if (iter.hasNext()) {
-            throw new Exception("More expected");
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/AnnotationVerifier.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Create class file using ASM, slightly modified the ASMifier output
+ */
+
+import sun.reflect.annotation.AnnotationType;
+import java.lang.annotation.AnnotationFormatError;
+import org.testng.annotations.*;
+
+/*
+ * @test
+ * @bug 8158510
+ * @summary Verify valid annotation
+ * @modules java.base/jdk.internal.org.objectweb.asm
+ * @modules java.base/sun.reflect.annotation
+ * @clean AnnotationWithVoidReturn.class AnnotationWithParameter.class
+ * @compile -XDignore.symbol.file ClassFileGenerator.java
+ * @run main ClassFileGenerator
+ * @run testng AnnotationVerifier
+ */
+
+public class AnnotationVerifier {
+
+    @AnnotationWithParameter
+    @AnnotationWithVoidReturn
+    static class BadAnnotation {
+    }
+
+    @Test
+    @ExpectedExceptions(IllegalArgumentException.class)
+    public void annotationValidationIAE() {
+        AnnotationType.getInstance(AnnotationWithParameter.class);
+    }
+
+    @Test(expectedExceptions = AnnotationFormatError.class)
+    public void annotationValidationAFE() {
+        BadAnnotation.class.getAnnotation(AnnotationWithVoidReturn.class);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/ClassFileGenerator.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Create class file using ASM, slightly modified the ASMifier output
+ */
+
+
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import jdk.internal.org.objectweb.asm.*;
+
+
+public class ClassFileGenerator {
+
+    public static void main(String... args) throws Exception {
+        classFileWriter("AnnotationWithVoidReturn.class", AnnoationWithVoidReturnDump.dump());
+        classFileWriter("AnnotationWithParameter.class", AnnoationWithParameterDump.dump());
+    }
+
+    private static void classFileWriter(String name, byte[] contents) throws IOException {
+        try (FileOutputStream fos = new FileOutputStream(new File(System.getProperty("test.classes"),
+                name))) {
+            fos.write(contents);
+        }
+    }
+
+    /*
+    Following code create equivalent classfile,
+    which is not allowed by javac.
+
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface AnnotationWithVoidReturn {
+    void m() default 1;
+    }
+    */
+
+    private static class AnnoationWithVoidReturnDump implements Opcodes {
+        public static byte[] dump() throws Exception {
+            ClassWriter cw = new ClassWriter(0);
+            MethodVisitor mv;
+            AnnotationVisitor av0;
+
+            cw.visit(52, ACC_PUBLIC + ACC_ANNOTATION + ACC_ABSTRACT + +ACC_INTERFACE,
+                    "AnnotationWithVoidReturn", null,
+                    "java/lang/Object", new String[]{"java/lang/annotation/Annotation"});
+
+            {
+                av0 = cw.visitAnnotation("Ljava/lang/annotation/Retention;", true);
+                av0.visitEnum("value", "Ljava/lang/annotation/RetentionPolicy;",
+                        "RUNTIME");
+                av0.visitEnd();
+            }
+            {
+                mv = cw.visitMethod(ACC_PUBLIC + ACC_ABSTRACT, "m", "()V", null, null);
+                mv.visitEnd();
+            }
+            {
+                av0 = mv.visitAnnotationDefault();
+                av0.visit(null, new Integer(1));
+                av0.visitEnd();
+            }
+            cw.visitEnd();
+
+            return cw.toByteArray();
+
+        }
+    }
+
+    /*
+    Following code create equivalent classfile,
+    which is not allowed by javac.
+
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface AnnotationWithParameter {
+       int m(int x);
+    }
+    */
+
+    private static class AnnoationWithParameterDump implements Opcodes {
+        public static byte[] dump() throws Exception {
+
+            ClassWriter cw = new ClassWriter(0);
+            MethodVisitor mv;
+            AnnotationVisitor av0;
+
+            cw.visit(52, ACC_PUBLIC + ACC_ANNOTATION + ACC_ABSTRACT + ACC_INTERFACE,
+                    "AnnotationWithParameter", null,
+                    "java/lang/Object", new String[]{"java/lang/annotation/Annotation"});
+
+            {
+                av0 = cw.visitAnnotation("Ljava/lang/annotation/Retention;", true);
+                av0.visitEnum("value", "Ljava/lang/annotation/RetentionPolicy;",
+                        "RUNTIME");
+                av0.visitEnd();
+            }
+            {
+                mv = cw.visitMethod(ACC_PUBLIC + ACC_ABSTRACT,
+                        "badValue",
+                        "(I)I", // Bad method with a parameter
+                        null, null);
+                mv.visitEnd();
+            }
+            {
+                av0 = mv.visitAnnotationDefault();
+                av0.visit(null, new Integer(-1));
+                av0.visitEnd();
+            }
+            cw.visitEnd();
+
+            return cw.toByteArray();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/typeAnnotations/MissingAnnotation.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE_USE)
+public @interface MissingAnnotation { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/annotation/typeAnnotations/NoNpeOnMissingAnnotation.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8152174
+ * @summary Verify that a missing class file for a type use annotation doesn't cause a NPE when attempting to read the annotation.
+ * @compile NoNpeOnMissingAnnotation.java MissingAnnotation.java
+ * @run main NoNpeOnMissingAnnotation
+ * @clean MissingAnnotation
+ * @run main NoNpeOnMissingAnnotation
+ */
+
+import java.lang.annotation.*;
+
+public class NoNpeOnMissingAnnotation {
+    public static void main(String... args) throws Exception {
+        System.out.println(NoNpeOnMissingAnnotation.class.
+                           getDeclaredMethod("foo").
+                           getAnnotatedReturnType());
+    }
+
+    @MissingAnnotation Object foo() { return null; }
+}
--- a/jdk/test/java/lang/invoke/DropArgumentsTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/lang/invoke/DropArgumentsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -24,6 +24,7 @@
  */
 
 /* @test
+ * @bug  8158169
  * @summary unit tests for java.lang.invoke.MethodHandles
  * @run testng test.java.lang.invoke.DropArgumentsTest
  */
@@ -32,6 +33,7 @@
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.MethodType;
+import java.util.Collections;
 import java.util.List;
 import static java.lang.invoke.MethodHandles.*;
 import static java.lang.invoke.MethodType.*;
@@ -78,6 +80,7 @@
             {cat, -1, bigType.parameterList(), 0},
             {cat, 0, bigType.parameterList(), -1},
             {cat, 3, bigType.parameterList(), 0},
+            {cat, 0, bigType.parameterList(), 6},
             {cat, 0, bigType.parameterList(), 2}
         };
     }
@@ -96,4 +99,30 @@
         MethodType bigTypewithVoid = cat.type().insertParameterTypes(0, void.class, String.class, int.class);
         MethodHandle handle2 = MethodHandles.dropArgumentsToMatch(cat, 0, bigTypewithVoid.parameterList(), 1);
     }
+
+    public static class MethodSet {
+
+        static void mVoid() {
+
+        }
+
+        static void mVoid(int t) {
+
+        }
+    }
+
+    @Test
+    public void dropArgumentsToMatchPosSkipRange() throws Throwable {
+        // newTypes.size() == 1, pos == 1   &&   target.paramSize() == 0, skip == 0
+        MethodHandle mh1 = MethodHandles.lookup().findStatic(MethodSet.class, "mVoid",
+                                                             MethodType.methodType(void.class));
+        MethodHandle handle1 = dropArgumentsToMatch(mh1, 0, Collections.singletonList(int.class), 1);
+        assertEquals(1, handle1.type().parameterList().size());
+
+        // newTypes.size() == 1, pos == 0   &&   target.paramSize() == 1, skip == 1
+        MethodHandle mh2 = MethodHandles.lookup().findStatic(MethodSet.class, "mVoid",
+                                                             MethodType.methodType(void.class, int.class));
+        MethodHandle handle2 = dropArgumentsToMatch(mh2, 1, Collections.singletonList(int.class), 0);
+        assertEquals(2, handle2.type().parameterList().size());
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/invoke/LoopCombinatorLongSignatureTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  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.
+ */
+
+/* @test
+ * @bug 8160717
+ * @run main/othervm -ea -esa -Djava.lang.invoke.MethodHandle.COMPILE_THRESHOLD=-1 test.java.lang.invoke.LoopCombinatorLongSignatureTest
+ * @run main/othervm -ea -esa test.java.lang.invoke.LoopCombinatorLongSignatureTest
+ */
+
+package test.java.lang.invoke;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.util.Arrays;
+
+/**
+ * If a loop with an excessive amount of clauses is created, so that the number of parameters to the resulting loop
+ * handle exceeds the allowed maximum, an IAE must be signalled. The test is run first in LambdaForm interpretation mode
+ * and then in default mode, wherein bytecode generation falls back to LFI mode due to excessively long methods.
+ */
+public class LoopCombinatorLongSignatureTest {
+
+    static final MethodHandle INIT = MethodHandles.constant(int.class, 0);
+    static final MethodHandle STEP = MethodHandles.identity(int.class);
+    static final MethodHandle PRED_F = MethodHandles.constant(boolean.class, false);
+    static final MethodHandle PRED_T = MethodHandles.constant(boolean.class, true);
+    static final MethodHandle FINI = MethodHandles.identity(int.class);
+
+    static final int ARG_LIMIT = 254; // for internal reasons, this is the maximum allowed number of arguments
+
+    public static void main(String[] args) {
+        for (int loopArgs = 0; loopArgs < 2; ++loopArgs) {
+            testLongSignature(loopArgs, false);
+            testLongSignature(loopArgs, true);
+        }
+    }
+
+    static void testLongSignature(int loopArgs, boolean excessive) {
+        int nClauses = ARG_LIMIT - loopArgs + (excessive ? 1 : 0);
+
+        System.out.print((excessive ? "(EXCESSIVE)" : "(LONG     )") + " arguments: " + loopArgs + ", clauses: " + nClauses + " -> ");
+
+        // extend init to denote what arguments the loop should accept
+        Class<?>[] argTypes = new Class<?>[loopArgs];
+        Arrays.fill(argTypes, int.class);
+        MethodHandle init = MethodHandles.dropArguments(INIT, 0, argTypes);
+
+        // build clauses
+        MethodHandle[][] clauses = new MethodHandle[nClauses][];
+        MethodHandle[] clause = {init, STEP, PRED_T, FINI};
+        MethodHandle[] fclause = {init, STEP, PRED_F, FINI};
+        Arrays.fill(clauses, clause);
+        clauses[nClauses - 1] = fclause; // make the last clause terminate the loop
+
+        try {
+            MethodHandle loop = MethodHandles.loop(clauses);
+            if (excessive) {
+                throw new AssertionError("loop construction should have failed");
+            } else {
+                int r;
+                if (loopArgs == 0) {
+                    r = (int) loop.invoke();
+                } else {
+                    Object[] args = new Object[loopArgs];
+                    Arrays.fill(args, 0);
+                    r = (int) loop.invokeWithArguments(args);
+                }
+                System.out.println("SUCCEEDED (OK) -> " + r);
+            }
+        } catch (IllegalArgumentException iae) {
+            if (excessive) {
+                System.out.println("FAILED    (OK)");
+            } else {
+                iae.printStackTrace(System.out);
+                throw new AssertionError("loop construction should not have failed (see above)");
+            }
+        } catch (Throwable t) {
+            t.printStackTrace(System.out);
+            throw new AssertionError("unexpected failure (see above)");
+        }
+    }
+
+}
--- a/jdk/test/java/lang/invoke/MethodHandlesTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/lang/invoke/MethodHandlesTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -2792,7 +2792,7 @@
             System.arraycopy(steps, 0, preSteps, 1, nargs);
             System.arraycopy(finis, 0, preFinis, 0, nargs); // finis are also offset by 1 for pre-checked loops
             // Convert to clause-major form.
-            MethodHandle[][] preClauses = new MethodHandle[nargs+1][4];
+            MethodHandle[][] preClauses = new MethodHandle[nargs + 1][4];
             MethodHandle[][] postClauses = new MethodHandle[nargs][4];
             toClauseMajor(preClauses, preInits, preSteps, prePreds, preFinis);
             toClauseMajor(postClauses, inits, steps, usePreds, finis);
--- a/jdk/test/java/security/SignedObject/Chain.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/java/security/SignedObject/Chain.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 /*
  * @test
  * @bug 8050374
+ * @key intermittent
  * @summary Verify a chain of signed objects
  */
 public class Chain {
Binary file jdk/test/javax/imageio/plugins/jpeg/JpegMultipleEOI.jpg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/imageio/plugins/jpeg/JpegMultipleEOITest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8152672
+ * @summary When jpeg file has more than one set of EOI-SOI markers,
+ *          test verifies whether we calculate EOI markers of all images
+ *          properly skipping EOI markers present in application headers.
+ * @run     main JpegMultipleEOITest
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Iterator;
+import javax.imageio.ImageIO;
+import javax.imageio.ImageReader;
+import javax.imageio.stream.ImageInputStream;
+
+public class JpegMultipleEOITest {
+    public static void main (String[] args) throws IOException {
+        Iterator readers = ImageIO.getImageReadersByFormatName("JPEG");
+        ImageReader reader = null;
+        while(readers.hasNext()) {
+            reader = (ImageReader)readers.next();
+            if(reader.canReadRaster()) {
+                break;
+            }
+        }
+
+        if (reader != null) {
+            String fileName = "JpegMultipleEOI.jpg";
+            String sep = System.getProperty("file.separator");
+            String dir = System.getProperty("test.src", ".");
+            String filePath = dir+sep+fileName;
+            System.out.println("Test file: " + filePath);
+            File imageFile = new File(filePath);
+            ImageInputStream stream = ImageIO.
+                createImageInputStream(imageFile);
+            reader.setInput(stream);
+            int pageNum = 1;
+            try {
+                // read width of image index 1
+                reader.getWidth(pageNum + reader.getMinIndex());
+            } catch (IndexOutOfBoundsException e) {
+                /*
+                 * do nothing, we are supposed to get IndexOutofBoundsException
+                 * as number of image is 1 and we are trying to get width of
+                 * second image. But we should not see IIOException with
+                 * message "Not a JPEG file: starts with 0xff 0xe2"
+                 */
+            }
+        }
+    }
+}
--- a/jdk/test/javax/net/ssl/HttpsURLConnection/Equals.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/net/ssl/HttpsURLConnection/Equals.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,17 +23,14 @@
 
 /**
  * @test
+ * @bug 8055299
  * @library /lib/testlibrary
  * @modules jdk.httpserver
  * @build jdk.testlibrary.SimpleSSLContext
- * @run main Equals
- * @bug 8055299
+ * @run main/othervm -Djavax.net.debug=ssl,handshake,record Equals
  */
-
 import com.sun.net.httpserver.*;
-
 import java.net.*;
-import java.util.*;
 import java.io.*;
 import javax.net.ssl.*;
 import java.util.concurrent.*;
@@ -43,54 +40,59 @@
 
     static SSLContext ctx;
 
-    public static void main (String[] args) throws Exception {
+    public static void main(String[] args) throws Exception {
         HttpsServer s2 = null;
-        ExecutorService executor=null;
+        ExecutorService executor = null;
         try {
-            InetSocketAddress addr = new InetSocketAddress (0);
-            s2 = HttpsServer.create (addr, 0);
-            HttpHandler h = new Handler ();
-            HttpContext c2 = s2.createContext ("/test1", h);
+            InetSocketAddress addr = new InetSocketAddress(0);
+            s2 = HttpsServer.create(addr, 0);
+            HttpHandler h = new Handler();
+            HttpContext c2 = s2.createContext("/test1", h);
             executor = Executors.newCachedThreadPool();
-            s2.setExecutor (executor);
+            s2.setExecutor(executor);
             ctx = new SimpleSSLContext().get();
-            s2.setHttpsConfigurator(new HttpsConfigurator (ctx));
+            s2.setHttpsConfigurator(new HttpsConfigurator(ctx));
             s2.start();
-
             int httpsport = s2.getAddress().getPort();
+            System.out.printf("%nServer address: %s%n", s2.getAddress());
             test(httpsport);
-            System.out.println ("OK");
+            System.out.println("OK");
         } finally {
-            if (s2 != null)
+            if (s2 != null) {
                 s2.stop(2);
-            if (executor != null)
-                executor.shutdown ();
+            }
+            if (executor != null) {
+                executor.shutdown();
+            }
         }
     }
 
     static class Handler implements HttpHandler {
+
         int invocation = 1;
-        public void handle (HttpExchange t)
-            throws IOException
-        {
+
+        public void handle(HttpExchange t)
+                throws IOException {
             InputStream is = t.getRequestBody();
-            while (is.read () != -1) {
+            while (is.read() != -1) {
             }
             is.close();
-            t.sendResponseHeaders (200, 0);
+            t.sendResponseHeaders(200, 0);
             t.close();
         }
     }
 
-    static void test (int port) throws Exception {
-        URL url = new URL ("https://localhost:"+port+"/test1/");
+    static void test(int port) throws Exception {
+        System.out.printf("%nClient using port number: %s%n", port);
+        String spec = String.format("https://localhost:%s/test1/", port);
+        URL url = new URL(spec);
         HttpsURLConnection urlcs = (HttpsURLConnection) url.openConnection();
-        urlcs.setHostnameVerifier (new HostnameVerifier () {
-            public boolean verify (String s, SSLSession s1) {
+        urlcs.setHostnameVerifier(new HostnameVerifier() {
+            public boolean verify(String s, SSLSession s1) {
                 return true;
             }
         });
-        urlcs.setSSLSocketFactory (ctx.getSocketFactory());
+        urlcs.setSSLSocketFactory(ctx.getSocketFactory());
 
         InputStream is = urlcs.getInputStream();
         while (is.read() != -1) {
--- a/jdk/test/javax/net/ssl/TLSv12/ShortRSAKey512.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/net/ssl/TLSv12/ShortRSAKey512.java	Fri Jul 08 12:17:10 2016 -0700
@@ -33,7 +33,6 @@
  *
  *     SunJSSE does not support dynamic system properties, no way to re-use
  *     system properties in samevm/agentvm mode.
- * @key intermittent
  * @run main/othervm ShortRSAKey512 PKIX
  * @run main/othervm ShortRSAKey512 SunX509
  */
--- a/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/net/ssl/templates/SSLSocketSSLEngineTemplate.java	Fri Jul 08 12:17:10 2016 -0700
@@ -31,7 +31,6 @@
  * @bug 7105780
  * @summary Add SSLSocket client/SSLEngine server to templates directory.
  * @run main/othervm SSLSocketSSLEngineTemplate
- * @key intermittent
  */
 
 /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JColorChooser/Test8152419.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+* @test
+* @bug 8152419
+* @summary To Verify JColorChooser tab selection
+* @run main/manual Test8152419
+ */
+
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.concurrent.CountDownLatch;
+import javax.swing.JButton;
+import javax.swing.JColorChooser;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.border.EmptyBorder;
+
+public class Test8152419 {
+
+    public static void main(String args[]) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        JColorChooserTest test = new JColorChooserTest(latch);
+        Thread T1 = new Thread(test);
+        T1.start();
+
+        // wait for latch to complete
+        try {
+            latch.await();
+        } catch (InterruptedException ie) {
+            throw ie;
+        }
+
+        if (test.testResult == false) {
+            throw new RuntimeException("User Clicked Fail!");
+        }
+    }
+}
+
+class JColorChooserTest implements Runnable {
+
+    private static GridBagLayout layout;
+    private static JPanel mainControlPanel;
+    private static JPanel resultButtonPanel;
+    private static JTextArea instructionTextArea;
+    private static JButton passButton;
+    private static JButton failButton;
+    private static JFrame mainFrame;
+    private static JColorChooser colorChooser;
+    private final CountDownLatch latch;
+    public volatile boolean testResult = false;
+
+    public JColorChooserTest(CountDownLatch latch) throws Exception {
+        this.latch = latch;
+    }
+
+    @Override
+    public void run() {
+
+        try {
+            createUI();
+        } catch (Exception ex) {
+            if (mainFrame != null) {
+                mainFrame.dispose();
+            }
+            latch.countDown();
+            throw new RuntimeException("createUI Failed: " + ex.getMessage());
+        }
+
+    }
+
+    public final void createUI() throws Exception {
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                mainFrame = new JFrame("JColorChooser Test");
+                layout = new GridBagLayout();
+                mainControlPanel = new JPanel(layout);
+                resultButtonPanel = new JPanel(layout);
+
+                GridBagConstraints gbc = new GridBagConstraints();
+                String instructions
+                        = "INSTRUCTIONS:"
+                        + "\n Select HSV, HSL, RGB or CMYK tab."
+                        + "\n If able to shift and view JColorChooser tabs"
+                        + "\n then click Pass, else Fail.";
+
+                instructionTextArea = new JTextArea();
+                instructionTextArea.setText(instructions);
+                instructionTextArea.setEnabled(true);
+
+                gbc.gridx = 0;
+                gbc.gridy = 0;
+                gbc.fill = GridBagConstraints.HORIZONTAL;
+                mainControlPanel.add(instructionTextArea, gbc);
+
+                UIManager.put("FormattedTextField.border",
+                        new EmptyBorder(0, 10, 0, 10));
+                colorChooser = new JColorChooser(Color.BLUE);
+                gbc.gridx = 0;
+                gbc.gridy = 1;
+                mainControlPanel.add(colorChooser, gbc);
+
+                passButton = new JButton("Pass");
+                passButton.setActionCommand("Pass");
+                passButton.addActionListener((ActionEvent e) -> {
+                    testResult = true;
+                    mainFrame.dispose();
+                    latch.countDown();
+
+                });
+                failButton = new JButton("Fail");
+                failButton.setActionCommand("Fail");
+                failButton.addActionListener(new ActionListener() {
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        testResult = false;
+                        mainFrame.dispose();
+                        latch.countDown();
+                    }
+                });
+                gbc.gridx = 0;
+                gbc.gridy = 0;
+                resultButtonPanel.add(passButton, gbc);
+                gbc.gridx = 1;
+                gbc.gridy = 0;
+                resultButtonPanel.add(failButton, gbc);
+
+                gbc.gridx = 0;
+                gbc.gridy = 2;
+                mainControlPanel.add(resultButtonPanel, gbc);
+
+                mainFrame.add(mainControlPanel);
+                mainFrame.pack();
+                mainFrame.setVisible(true);
+            }
+        });
+
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/8041909/ActionListenerExceptionTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /* @test
+  * @bug 8041909
+  * @summary Test to check JComboBox does not lose its ability to invoke
+  * registerd ActionListener in case of exception in ActionListener
+  * @run main ActionListenerExceptionTest
+  */
+
+import java.awt.AWTEvent;
+import java.awt.AWTException;
+import java.awt.Dimension;
+import java.awt.EventQueue;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.InputEvent;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JPopupMenu;
+import javax.swing.SwingUtilities;
+
+public class ActionListenerExceptionTest {
+
+    static final int TOTAL_MENU_ITEMS = 3;
+    private volatile int count = 0;
+    private JFrame frame;
+    private JComboBox combo;
+
+    private int menuItemHeight = 0;
+    private int yPos = 0;
+    private Point cbPos = null;
+    private Dimension cbSize = null;
+
+
+    public static void main(String[] args) throws Exception {
+
+        // See EvenQueueProxy class description below.
+        EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
+        queue.push(new EventQueueProxy());
+
+        ActionListenerExceptionTest testObject = new ActionListenerExceptionTest();
+
+        testObject.createGUI();
+
+        testObject.test();
+
+        testObject.disposeGUI();
+
+        if (testObject.getCount() != TOTAL_MENU_ITEMS) {
+            throw new RuntimeException("ActionListener is not invoked expected number of times");
+        }
+    }
+
+    private void createGUI() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame = new JFrame();
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+                combo = new JComboBox(new String[]{"One", "Two", "Three"});
+                combo.addActionListener(new ActionListener() {
+
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        count++;
+                        throw new RuntimeException();
+                    }
+                });
+                combo.setSize(200, 20);
+                frame.add(combo);
+                frame.pack();
+                frame.setLocationRelativeTo(null);
+                frame.setVisible(true);
+
+            }
+        });
+    }
+
+    private void disposeGUI() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame.dispose();
+            }
+        });
+    }
+
+    private void test() throws Exception {
+        Robot testRobot = new Robot();
+        testRobot.delay(200); // delay to make test frame visible on screen
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                cbPos = combo.getLocationOnScreen();
+                cbSize = combo.getSize();
+            }
+        });
+
+        Point center = new Point((cbPos.x + cbSize.width / 2), (cbPos.y + cbSize.height - 5));
+        testRobot.mouseMove(center.x, center.y);
+        testRobot.delay(100);
+
+        testRobot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+        testRobot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+        testRobot.delay(500); // delay to make popup visible
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Object comp = combo.getUI().getAccessibleChild(combo, 0);
+                JComponent scrollPane = (JComponent) ((JPopupMenu) comp).getComponent(0);
+
+                menuItemHeight = scrollPane.getSize().height / TOTAL_MENU_ITEMS;
+                yPos = scrollPane.getLocationOnScreen().y + menuItemHeight / 2;
+            }
+        });
+
+        for (int i = 0; i < TOTAL_MENU_ITEMS; i++) {
+
+            testRobot.mouseMove(center.x, yPos);
+
+            testRobot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
+            testRobot.delay(100);
+            testRobot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
+            testRobot.delay(200);
+
+            yPos += menuItemHeight;
+        }
+
+    }
+
+    private int getCount() {
+        return count;
+    }
+}
+
+// Proxy class to invoke dispatchEvent and catch exceptions
+//
+// This is needed in order to test Exceptions from ActionListener
+// Without this, jtreg reports test failure at first exception from ActionListener and
+// we cannot test whether ActionListener is invoked again
+class EventQueueProxy extends EventQueue {
+
+    protected void dispatchEvent(AWTEvent evt) {
+        try {
+            super.dispatchEvent(evt);
+        } catch (Exception e) {
+            System.out.println("Intentionally consumed Exception from ActionListener");
+            e.printStackTrace();
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JEditorPane/8158734/bug8158734.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 8158734
+   @summary JEditorPane.createEditorKitForContentType throws NPE after 6882559
+   @author Mikhail Cherkasov
+   @run main bug8158734
+*/
+
+import javax.swing.*;
+import javax.swing.text.*;
+import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+
+
+public class bug8158734 {
+
+    public static final String TYPE = "test/test";
+    public static final String TYPE_2 = "test2/test2";
+
+    static boolean myClassloaderWasUsed = false;
+
+    static class MyEditorKit extends EditorKit {
+        @Override
+        public String getContentType() {
+            return null;
+        }
+
+        @Override
+        public ViewFactory getViewFactory() {
+            return null;
+        }
+
+        @Override
+        public Action[] getActions() {
+            return new Action[0];
+        }
+
+        @Override
+        public Caret createCaret() {
+            return null;
+        }
+
+        @Override
+        public Document createDefaultDocument() {
+            return null;
+        }
+
+        @Override
+        public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException {
+        }
+
+        @Override
+        public void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException {
+
+        }
+
+        @Override
+        public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException {
+        }
+
+        @Override
+        public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException {
+        }
+    }
+
+    static class MyClassloader extends ClassLoader {
+        @Override
+        public Class<?> loadClass(String name) throws ClassNotFoundException {
+            myClassloaderWasUsed = true;
+            return super.loadClass(name);
+        }
+    }
+
+    public static void main(String[] args) throws InvocationTargetException, InterruptedException {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                JEditorPane c = new JEditorPane();
+                c.setContentType(TYPE);
+
+                final MyClassloader loader = new MyClassloader();
+                JEditorPane.registerEditorKitForContentType(TYPE_2, MyEditorKit.class.getName(), loader);
+                JEditorPane.registerEditorKitForContentType(TYPE_2, MyEditorKit.class.getName(), null);
+                JEditorPane.createEditorKitForContentType(TYPE_2);
+
+                if (myClassloaderWasUsed) {
+                    throw new RuntimeException("Class loader has not been removed for '" + TYPE_2 + "' type");
+                }
+            }
+        });
+
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+import java.awt.image.BufferedImage;
+import javax.swing.JDesktopPane;
+import javax.swing.JFrame;
+import javax.swing.JInternalFrame;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8160248 8160332
+ * @summary Dragged internal frame leaves artifacts for floating point ui scale
+ * @run main/othervm -Dsun.java2d.uiScale=1.2 JInternalFrameDraggingTest
+ * @run main/othervm -Dsun.java2d.uiScale=1.5 JInternalFrameDraggingTest
+ * @run main/othervm -Dsun.java2d.uiScale=1 JInternalFrameDraggingTest
+ * @run main/othervm -Dsun.java2d.uiScale=2.5 JInternalFrameDraggingTest
+ */
+public class JInternalFrameDraggingTest {
+
+    private static JFrame frame;
+    private static JDesktopPane desktopPane;
+    private static JInternalFrame internalFrame;
+    private static int FRAME_SIZE = 500;
+    private static Color BACKGROUND_COLOR = Color.ORANGE;
+
+    public static void main(String[] args) throws Exception {
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(20);
+        SwingUtilities.invokeAndWait(JInternalFrameDraggingTest::createAndShowGUI);
+        robot.waitForIdle();
+
+        final int translate = FRAME_SIZE / 4;
+        moveFrame(robot, translate, translate / 2, translate / 2);
+        robot.waitForIdle();
+
+        Point p = getDesktopPaneLocation();
+        int size = translate / 2;
+        Rectangle rect = new Rectangle(p.x, p.y, size, size);
+        BufferedImage img = robot.createScreenCapture(rect);
+
+        int testRGB = BACKGROUND_COLOR.getRGB();
+        for (int i = 0; i < size; i++) {
+            int rgbCW = img.getRGB(i, size / 2);
+            int rgbCH = img.getRGB(size / 2, i);
+            if (rgbCW != testRGB || rgbCH != testRGB) {
+                throw new RuntimeException("Background color is wrong!");
+            }
+        }
+    }
+
+    private static void createAndShowGUI() {
+
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setLayout(new BorderLayout());
+
+        desktopPane = new JDesktopPane();
+        desktopPane.setBackground(BACKGROUND_COLOR);
+
+        frame.add(desktopPane, BorderLayout.CENTER);
+        frame.setSize(FRAME_SIZE, FRAME_SIZE);
+        frame.setVisible(true);
+
+        internalFrame = new JInternalFrame("Test");
+        internalFrame.setSize(FRAME_SIZE / 2, FRAME_SIZE / 2);
+        desktopPane.add(internalFrame);
+        internalFrame.setVisible(true);
+        internalFrame.setResizable(true);
+
+        frame.setVisible(true);
+    }
+
+    private static void moveFrame(Robot robot, int w, int h, int N) throws Exception {
+        Point p = getInternalFrameLocation();
+        int xs = p.x + 100;
+        int ys = p.y + 15;
+        robot.mouseMove(xs, ys);
+        try {
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+
+            int dx = w / N;
+            int dy = h / N;
+
+            int y = ys;
+            for (int x = xs; x < xs + w; x += dx, y += dy) {
+                robot.mouseMove(x, y);
+            }
+        } finally {
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        }
+    }
+
+    private static Point getInternalFrameLocation() throws Exception {
+        final Point[] points = new Point[1];
+        SwingUtilities.invokeAndWait(() -> {
+            points[0] = internalFrame.getLocationOnScreen();
+        });
+        return points[0];
+    }
+
+    private static Point getDesktopPaneLocation() throws Exception {
+        final Point[] points = new Point[1];
+        SwingUtilities.invokeAndWait(() -> {
+            points[0] = desktopPane.getLocationOnScreen();
+        });
+        return points[0];
+    }
+}
--- a/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009,2016 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,8 @@
 
 /*
  * @test
- * @bug 6325652
+ * @bug 6325652 8159152
  * @summary Tests keyboard shortcuts
- * @author Sergey Malenkov
  * @library ..
  */
 
--- a/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8152981
+ * @bug 8152981 8159135
  * @summary Double icons with JMenuItem setHorizontalTextPosition on Win 10
  * @requires (os.family == "windows")
  * @run main MenuItemIconTest
@@ -89,7 +89,7 @@
         robot.delay(2000);
         robot.mouseMove(x, y);
         Color c = robot.getPixelColor(x, y);
-        if (c.getRed() == 255) {
+        if (Color.RED.equals(c)) {
             errorMessage = "Test Failed";
         }
         robot.delay(5000);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JMenuItem/8158566/CloseOnMouseClickPropertyTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JComponent;
+import javax.swing.JFrame;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JRadioButtonMenuItem;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+
+/*
+ * @test
+ * @bug 8158566 8160879 8160977
+ * @summary Provide a Swing property which modifies MenuItemUI behaviour
+ */
+public class CloseOnMouseClickPropertyTest {
+
+    private static JFrame frame;
+    private static JMenu menu;
+
+    public static void main(String[] args) throws Exception {
+
+        for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+            UIManager.setLookAndFeel(info.getClassName());
+            test(true);
+
+            setProperty(false);
+            test(false);
+
+            setProperty(true);
+            test(true);
+        }
+    }
+
+    private static void setProperty(boolean closeOnMouseClick) {
+        UIManager.put("CheckBoxMenuItem.closeOnMouseClick", closeOnMouseClick);
+        UIManager.put("RadioButtonMenuItem.closeOnMouseClick", closeOnMouseClick);
+    }
+
+    private static void test(boolean closeOnMouseClick) throws Exception {
+        for (TestType testType : TestType.values()) {
+            test(testType, closeOnMouseClick);
+        }
+    }
+
+    private static void test(TestType testType, boolean closeOnMouseClick)
+            throws Exception {
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+        SwingUtilities.invokeAndWait(() -> createAndShowGUI(testType));
+        robot.waitForIdle();
+
+        Point point = getClickPoint(true);
+        robot.mouseMove(point.x, point.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        robot.waitForIdle();
+
+        point = getClickPoint(false);
+        robot.mouseMove(point.x, point.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+        robot.waitForIdle();
+
+        SwingUtilities.invokeAndWait(() -> {
+            JMenuItem menuItem = menu.getItem(0);
+            boolean isShowing = menuItem.isShowing();
+            frame.dispose();
+
+            if (TestType.MENU_ITEM.equals(testType)) {
+                if (isShowing) {
+                    throw new RuntimeException("Menu Item is not closed!");
+                }
+            } else {
+                if (isShowing ^ !closeOnMouseClick) {
+                    throw new RuntimeException("Property is not taken into account:"
+                            + " closeOnMouseClick");
+                }
+            }
+        });
+    }
+
+    private static void createAndShowGUI(TestType testType) {
+
+        frame = new JFrame();
+        frame.setSize(300, 300);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JMenuBar menuBar = new JMenuBar();
+        menu = new JMenu("Menu");
+        menu.add(getMenuItem(testType));
+        menuBar.add(menu);
+        frame.setJMenuBar(menuBar);
+        frame.setVisible(true);
+    }
+
+    private static JMenuItem getMenuItem(TestType testType) {
+        switch (testType) {
+            case CHECK_BOX_MENU_ITEM:
+                return new JCheckBoxMenuItem("Check Box");
+            case RADIO_BUTTON_MENU_ITEM:
+                return new JRadioButtonMenuItem("Radio Button");
+            default:
+                return new JMenuItem("Menu Item");
+        }
+    }
+
+    private static Point getClickPoint(boolean parent) throws Exception {
+        Point points[] = new Point[1];
+
+        SwingUtilities.invokeAndWait(() -> {
+
+            JComponent comp = parent ? menu : menu.getItem(0);
+
+            Point point = comp.getLocationOnScreen();
+            Rectangle bounds = comp.getBounds();
+            point.x += bounds.getWidth() / 2;
+            point.y += bounds.getHeight() / 2;
+
+            points[0] = point;
+        });
+
+        return points[0];
+    }
+
+    enum TestType {
+
+        MENU_ITEM,
+        CHECK_BOX_MENU_ITEM,
+        RADIO_BUTTON_MENU_ITEM
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTable/LostTextTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 8159068
+ * @summary  Verifies if Jtable rendering is ok.
+ * @run main/manual LostTextTest
+ */
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.FlowLayout;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableModel;
+
+public class LostTextTest {
+
+    static DefaultTableModel model;
+
+    public static void main(String[] args) throws Exception {
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        LostText test = new LostText(latch);
+        Thread T1 = new Thread(test);
+        T1.start();
+
+        // wait for latch to complete
+        boolean ret = false;
+        try {
+            ret = latch.await(30, TimeUnit.SECONDS);
+        } catch (InterruptedException ie) {
+            throw ie;
+        }
+        if (!ret) {
+            test.dispose();
+            throw new RuntimeException(" User has not executed the test");
+        }
+
+        if (test.testResult == false) {
+            throw new RuntimeException("Some text were not rendered properly"
+                    + " during painting of Jtable rows ");
+        }
+    }
+}
+
+class LostText implements Runnable {
+    static JFrame f;
+    static JDialog dialog;
+    static DefaultTableModel model;
+    public boolean testResult = false;
+    private final CountDownLatch latch;
+
+    public LostText(CountDownLatch latch) throws Exception {
+        this.latch = latch;
+    }
+
+    @Override
+    public void run() {
+        try {
+            createUI();
+            lostTextTest();
+        } catch (Exception ex) {
+            if (f != null) {
+                f.dispose();
+            }
+            latch.countDown();
+            throw new RuntimeException("createUI Failed: " + ex.getMessage());
+        }
+
+    }
+
+    public void dispose() {
+        dialog.dispose();
+        f.dispose();
+    }
+
+    private static void lostTextTest() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                f = new JFrame();
+                f.add(getComp());
+                f.setSize(300, 300);
+                f.setLocationRelativeTo(null);
+                f.setVisible(true);
+            }
+
+            private Component getComp() {
+                JTable jTable = new JTable(testSelectionWithFilterTable());
+                return jTable;
+            }
+        });
+    }
+
+    private static TableModel testSelectionWithFilterTable() {
+        model = new DefaultTableModel(0, 1);
+        int last = 10;
+        for (int i = 0; i <= last; i++) {
+            model.addRow(new Object[]{i});
+        }
+        return model;
+    }
+
+    private final void createUI() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+
+                String description
+                        = " INSTRUCTIONS:\n"
+                        + " A JTable will be shown.\n"
+                        + " Try to select different rows via mouse or keyboard.\n "
+                        + " Please verify if text are painted properly.\n"
+                        + " If any moment any part of the rows will not be\n "
+                        + " painted properly and if some text are missing in JTable,\n "
+                        + " then press fail else press pass";
+
+                dialog = new JDialog();
+                dialog.setTitle("textselectionTest");
+                JTextArea textArea = new JTextArea(description);
+                textArea.setEditable(false);
+                final JButton passButton = new JButton("PASS");
+                passButton.addActionListener((e) -> {
+                    testResult = true;
+                    dispose();
+                    latch.countDown();
+                });
+                final JButton failButton = new JButton("FAIL");
+                failButton.addActionListener((e) -> {
+                    testResult = false;
+                    dispose();
+                    latch.countDown();
+                });
+                JPanel mainPanel = new JPanel(new BorderLayout());
+                mainPanel.add(textArea, BorderLayout.CENTER);
+                JPanel buttonPanel = new JPanel(new FlowLayout());
+                buttonPanel.add(passButton);
+                buttonPanel.add(failButton);
+                mainPanel.add(buttonPanel, BorderLayout.SOUTH);
+                dialog.add(mainPanel);
+                dialog.pack();
+                dialog.setVisible(true);
+            }
+        });
+    }
+}
--- a/jdk/test/javax/swing/LookAndFeel/8145547/DemandGTK.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/javax/swing/LookAndFeel/8145547/DemandGTK.java	Fri Jul 08 12:17:10 2016 -0700
@@ -27,7 +27,7 @@
             regardless of jdk.gtk.version flag values.
   @bug 8156121
   @key headful
-  @requires (os.name == "linux" | os.name == "solaris")
+  @requires (os.family == "linux" | os.family == "solaris")
   @run main/othervm -Djdk.gtk.version=2 DemandGTK
   @run main/othervm -Djdk.gtk.version=3 DemandGTK
 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8065861
+ * @summary Test to check pressing Escape key sets 'canceled' property of ProgressMonitor
+ * @run main ProgressMonitorEscapeKeyPress
+ */
+
+import java.awt.AWTException;
+import java.awt.EventQueue;
+import java.awt.Robot;
+import java.awt.event.KeyEvent;
+import javax.swing.JFrame;
+import javax.swing.ProgressMonitor;
+import javax.swing.SwingUtilities;
+
+public class ProgressMonitorEscapeKeyPress {
+
+    static ProgressMonitor monitor;
+    static int counter = 0;
+    static TestThread robotThread;
+    static JFrame frame;
+
+
+    public static void main(String[] args) throws Exception {
+
+        createTestUI();
+
+        monitor = new ProgressMonitor(frame, "Progress", null, 0, 100);
+
+        robotThread = new TestThread();
+        robotThread.start();
+
+        for (counter = 0; counter <= 100; counter += 10) {
+            Thread.sleep(1000);
+
+            EventQueue.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    if (!monitor.isCanceled()) {
+                        monitor.setProgress(counter);
+                        System.out.println("Progress bar is in progress");
+                    }
+                }
+            });
+
+            if (monitor.isCanceled()) {
+                break;
+            }
+        }
+
+        disposeTestUI();
+
+        if (counter >= monitor.getMaximum()) {
+            throw new RuntimeException("Escape key did not cancel the ProgressMonitor");
+        }
+    }
+
+     private static void createTestUI() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+           @Override
+           public void run() {
+                frame = new JFrame("Test");
+                frame.setSize(300, 300);
+                frame.setLocationByPlatform(true);
+                frame.setVisible(true);
+              }});
+     }
+
+
+     private static void disposeTestUI() throws Exception {
+           SwingUtilities.invokeAndWait(() -> {
+               frame.dispose();
+           });
+       }
+}
+
+
+class TestThread extends Thread {
+
+    Robot testRobot;
+
+    TestThread() throws AWTException {
+        super();
+        testRobot = new Robot();
+    }
+
+    @Override
+    public void run() {
+        try {
+            // Sleep for 5 seconds - so that the ProgressMonitor starts
+            Thread.sleep(5000);
+
+            // Press and release Escape key
+            testRobot.keyPress(KeyEvent.VK_ESCAPE);
+            testRobot.delay(20);
+            testRobot.keyRelease(KeyEvent.VK_ESCAPE);
+        } catch (InterruptedException ex) {
+            throw new RuntimeException("Exception in TestThread");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicComboPopup/8154069/Bug8154069.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8154069
+ * @summary Jaws reads wrong values from comboboxes when no element is selected
+ * @run main Bug8154069
+ */
+
+import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleSelection;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.plaf.nimbus.NimbusLookAndFeel;
+
+public class Bug8154069 {
+
+    private static JFrame frame;
+    private static volatile Exception exception = null;
+
+    public static void main(String args[]) throws Exception {
+        try {
+            try {
+                UIManager.setLookAndFeel(new NimbusLookAndFeel());
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+
+            SwingUtilities.invokeAndWait(() -> {
+                frame = new JFrame();
+                String[] petStrings = { "Bird", "Cat" };
+                JComboBox<String> cb = new JComboBox<>(petStrings);
+                cb.setSelectedIndex(1);  // select Cat
+                frame.add(cb);
+                frame.pack();
+                try {
+                    cb.setSelectedIndex(-1);
+                    int i = cb.getSelectedIndex();
+                    if (i != -1) {
+                        throw new RuntimeException("getSelectedIndex is not -1");
+                    }
+                    Object o = cb.getSelectedItem();
+                    if (o != null) {
+                        throw new RuntimeException("getSelectedItem is not null");
+                    }
+                    AccessibleContext ac = cb.getAccessibleContext();
+                    AccessibleSelection as = ac.getAccessibleSelection();
+                    int count = as.getAccessibleSelectionCount();
+                    if (count != 0) {
+                        throw new RuntimeException("getAccessibleSelection count is not 0");
+                    }
+                    Accessible a = as.getAccessibleSelection(0);
+                    if (a != null) {
+                        throw new RuntimeException("getAccessibleSelection(0) is not null");
+                    }
+                } catch (Exception e) {
+                    exception = e;
+                }
+            });
+            if (exception != null) {
+                System.out.println("Test failed: " + exception.getMessage());
+                throw exception;
+            } else {
+                System.out.println("Test passed.");
+            }
+        } finally {
+            SwingUtilities.invokeAndWait(() -> {
+                frame.dispose();
+            });
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/nimbus/8057791/bug8057791.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+   @bug 8057791
+   @summary Selection in JList is drawn with wrong colors in Nimbus L&F
+   @author Anton Litvinov
+   @run main bug8057791
+ */
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+import java.lang.reflect.InvocationTargetException;
+import java.util.HashSet;
+import javax.swing.DefaultListModel;
+import javax.swing.JList;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.plaf.nimbus.NimbusLookAndFeel;
+
+public class bug8057791 {
+    public static void main(String[] args) {
+        try {
+            UIManager.setLookAndFeel(new NimbusLookAndFeel());
+
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    final int listWidth = 50;
+                    final int listHeight = 50;
+                    final int selCellIndex = 0;
+
+                    JList<String> list = new JList<String>();
+                    list.setSize(listWidth, listHeight);
+                    DefaultListModel<String> listModel = new DefaultListModel<String>();
+                    listModel.add(selCellIndex, "E");
+                    list.setModel(listModel);
+                    list.setSelectedIndex(selCellIndex);
+
+                    BufferedImage img = new BufferedImage(listWidth, listHeight,
+                        BufferedImage.TYPE_INT_ARGB);
+                    Graphics g = img.getGraphics();
+                    list.paint(g);
+                    g.dispose();
+
+                    Rectangle cellRect = list.getCellBounds(selCellIndex, selCellIndex);
+                    HashSet<Color> cellColors = new HashSet<Color>();
+                    int uniqueColorIndex = 0;
+                    for (int x = cellRect.x; x < (cellRect.x + cellRect.width); x++) {
+                        for (int y = cellRect.y; y < (cellRect.y + cellRect.height); y++) {
+                            Color cellColor = new Color(img.getRGB(x, y), true);
+                            if (cellColors.add(cellColor)) {
+                                System.err.println(String.format("Cell color #%d: %s",
+                                    uniqueColorIndex++, cellColor));
+                            }
+                        }
+                    }
+
+                    Color selForegroundColor = list.getSelectionForeground();
+                    Color selBackgroundColor = list.getSelectionBackground();
+                    if (!cellColors.contains(new Color(selForegroundColor.getRGB(), true))) {
+                        throw new RuntimeException(String.format(
+                            "Selected cell is drawn without selection foreground color '%s'.",
+                            selForegroundColor));
+                    }
+                    if (!cellColors.contains(new Color(selBackgroundColor.getRGB(), true))) {
+                        throw new RuntimeException(String.format(
+                            "Selected cell is drawn without selection background color '%s'.",
+                            selBackgroundColor));
+                    }
+                }
+            });
+        } catch (UnsupportedLookAndFeelException | InterruptedException | InvocationTargetException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.awt.Font;
+import java.awt.Graphics;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8142966
+ * @summary Wrong cursor position in text components on HiDPI display
+ * @run main/othervm -Dsun.java2d.uiScale=2 SwingFontMetricsTest
+ */
+public class SwingFontMetricsTest {
+
+    private static final String LOWER_CASE_TEXT = "the quick brown fox jumps over the lazy dog";
+    private static final String UPPER_CASE_TEXT = LOWER_CASE_TEXT.toUpperCase();
+    private static final String TEXT = LOWER_CASE_TEXT + UPPER_CASE_TEXT;
+    private static boolean passed = false;
+    private static CountDownLatch latch = new CountDownLatch(1);
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(SwingFontMetricsTest::createAndShowGUI);
+        latch.await(5, TimeUnit.SECONDS);
+
+        if (!passed) {
+            throw new RuntimeException("Test Failed!");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        final JFrame frame = new JFrame();
+        frame.setSize(300, 300);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        JLabel label = new JLabel(TEXT) {
+            @Override
+            public void paint(Graphics g) {
+                super.paint(g);
+                Font font = getFont();
+                int width1 = getFontMetrics(font).stringWidth(TEXT);
+                int width2 = g.getFontMetrics(font).stringWidth(TEXT);
+                passed = (width1 == width2);
+                latch.countDown();
+                frame.dispose();
+            }
+        };
+        frame.add(label);
+        frame.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/awt/shell/BadHiDPIIcon.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8151385
+ * @summary JOptionPane icons are cropped on Windows 10 with HiDPI display
+ * @author Hendrik Schreiber
+ * @requires os.family == "windows"
+ * @modules java.desktop/sun.awt.shell
+ * @run main BadHiDPIIcon
+ */
+import java.awt.Image;
+import java.awt.image.BufferedImage;
+import java.awt.image.MultiResolutionImage;
+import sun.awt.shell.ShellFolder;
+
+public class BadHiDPIIcon {
+
+    public static void main(String[] args) {
+        // the error icon is round and in all four corner transparent
+        // we check that all corners are identical
+        Image icon = (Image) ShellFolder.get("optionPaneIcon Error");
+        final BufferedImage image = getBufferedImage(icon);
+        final int upperLeft = image.getRGB(0, 0);
+        final int upperRight = image.getRGB(image.getWidth() - 1, 0);
+        final int lowerLeft = image.getRGB(0, image.getHeight() - 1);
+        final int lowerRight = image.getRGB(image.getWidth() - 1, image.getHeight() - 1);
+        if (upperLeft != upperRight || upperLeft != lowerLeft || upperLeft != lowerRight) {
+            throw new RuntimeException("optionPaneIcon Error is not a round icon with transparent background.");
+        }
+    }
+
+    private static BufferedImage getBufferedImage(Image image) {
+        if (image instanceof MultiResolutionImage) {
+            MultiResolutionImage mrImage = (MultiResolutionImage) image;
+            return (BufferedImage) mrImage.getResolutionVariant(32, 32);
+        }
+        return (BufferedImage) image;
+    }
+}
--- a/jdk/test/sun/security/jca/PreferredProviderNegativeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/jca/PreferredProviderNegativeTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -62,7 +62,7 @@
             }
         } else {
             if (!cipher.getProvider().getName().equals(arrays[1])) {
-                throw new RuntimeException("Test Faild:The provider could be "
+                throw new RuntimeException("Test Failed:The provider could be "
                         + "set by valid provider.");
             }
         }
@@ -73,13 +73,13 @@
      * Test that the setting of the security property after Cipher.getInstance()
      * does not influence previously loaded instances
      */
-    public static void afterJCESet(String value)
+    public static void afterJCESet(String value, String expected)
             throws NoSuchAlgorithmException, NoSuchPaddingException {
         String[] arrays = value.split(":");
         Cipher cipher = Cipher.getInstance(arrays[0]);
 
         Security.setProperty(SEC_PREF_PROP, value);
-        if (!cipher.getProvider().getName().equals("SunJCE")) {
+        if (!cipher.getProvider().getName().equals(expected)) {
             throw new RuntimeException("Test Failed:The security property can't"
                     + " be updated after JCE load.");
         }
@@ -105,25 +105,28 @@
     public static void main(String[] args)
             throws NoSuchAlgorithmException, NoSuchPaddingException {
 
+        String expected;
+        String value = args[1];
+        // If OS is solaris, expect OracleUcrypto, otherwise SunJCE
+        if (System.getProperty("os.name").toLowerCase().contains("sun")) {
+            expected = "OracleUcrypto";
+        } else {
+            expected = "SunJCE";
+        }
+
         if (args.length >= 2) {
             switch (args[0]) {
                 case "preSet":
                     boolean negativeProvider = Boolean.valueOf(args[2]);
-                    boolean solaris = System.getProperty("os.name")
-                            .toLowerCase().contains("sun");
-                    String value = args[1];
-                    if (args[1].split(":").length < 2) {
-                        if (solaris) {
-                            value += ":OracleUcrypto";
-                        } else {
-                            value += ":SunJCE";
-                        }
+                    if (!args[1].contains(":")) {
+                        value += ":" + expected;
                     }
                     PreferredProviderNegativeTest.preJCESet(
                             value, negativeProvider);
                     break;
                 case "afterSet":
-                    PreferredProviderNegativeTest.afterJCESet(args[1]);
+                    PreferredProviderNegativeTest.afterJCESet(args[1],
+                            expected);
                     break;
                 case "invalidAlg":
                     PreferredProviderNegativeTest.invalidAlg(args[1]);
--- a/jdk/test/sun/security/jca/PreferredProviderTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/jca/PreferredProviderTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -38,6 +38,7 @@
  * @bug 8076359 8133151 8145344 8150512 8155847
  * @summary Test the value for new jdk.security.provider.preferred
  *          security property
+ * @run main/othervm PreferredProviderTest
  */
 public class PreferredProviderTest {
 
@@ -59,12 +60,14 @@
             verifyDigestProvider(os, type, Arrays.asList(
                     new DataTuple("SHA-256", "SUN")));
         } else {
-            //For solaris the preferred algorithm/provider is already set in
-            //java.security file which will be verified.
+            //Solaris has different providers that support the same algorithm
+            //which makes for better testing.
             switch (type) {
                 case "sparcv9":
                     preferredProp = "AES:SunJCE, SHA1:SUN, Group.SHA2:SUN, " +
                             "HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE";
+                    Security.setProperty(
+                            "jdk.security.provider.preferred", preferredProp);
                     verifyPreferredProviderProperty(os, type, preferredProp);
 
                     verifyDigestProvider(os, type, Arrays.asList(
@@ -89,7 +92,8 @@
                             "HmacSHA1:SunJCE, Group.HmacSHA2:SunJCE, " +
                             "RSA:SunRsaSign, SHA1withRSA:SunRsaSign, " +
                             "Group.SHA2RSA:SunRsaSign";
-
+                    Security.setProperty(
+                            "jdk.security.provider.preferred", preferredProp);
                     verifyPreferredProviderProperty(os, type, preferredProp);
 
                     verifyKeyFactoryProvider(os, type, Arrays.asList(
--- a/jdk/test/sun/security/krb5/auto/KDC.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/KDC.java	Fri Jul 08 12:17:10 2016 -0700
@@ -246,7 +246,7 @@
      * @throws java.io.IOException for any socket creation error
      */
     public static KDC create(String realm) throws IOException {
-        return create(realm, "kdc." + realm.toLowerCase(), 0, true);
+        return create(realm, "kdc." + realm.toLowerCase(Locale.US), 0, true);
     }
 
     public static KDC existing(String realm, String kdc, int port) {
--- a/jdk/test/sun/security/krb5/auto/NewSalt.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/NewSalt.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
  * @run main/othervm -Donlyonepreauth NewSalt
  */
 
+import java.util.Locale;
 import sun.security.jgss.GSSUtil;
 import sun.security.krb5.Config;
 
@@ -51,9 +52,9 @@
         }
 
         // Use a different case of name. KDC will return correct salt
-        Context c1 = Context.fromUserPass(OneKDC.USER.toUpperCase(),
+        Context c1 = Context.fromUserPass(OneKDC.USER.toUpperCase(Locale.US),
                 OneKDC.PASS, true);
-        Context c2 = Context.fromUserPass(OneKDC.USER2.toUpperCase(),
+        Context c2 = Context.fromUserPass(OneKDC.USER2.toUpperCase(Locale.US),
                 OneKDC.PASS2, true);
 
         c1.startAsClient(OneKDC.USER2, GSSUtil.GSS_KRB5_MECH_OID);
--- a/jdk/test/sun/security/krb5/auto/OneKDC.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/OneKDC.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.security.Security;
+import java.util.Locale;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.NameCallback;
@@ -52,9 +53,10 @@
     public static final String KTAB = "localkdc.ktab";
     public static final String JAAS_CONF = "localkdc-jaas.conf";
     public static final String REALM = "RABBIT.HOLE";
-    public static String SERVER = "server/host." + REALM.toLowerCase();
-    public static String BACKEND = "backend/host." + REALM.toLowerCase();
-    public static String KDCHOST = "kdc." + REALM.toLowerCase();
+    public static final String REALM_LOWER_CASE = REALM.toLowerCase(Locale.US);
+    public static String SERVER = "server/host." + REALM_LOWER_CASE;
+    public static String BACKEND = "backend/host." + REALM_LOWER_CASE;
+    public static String KDCHOST = "kdc." + REALM_LOWER_CASE;
     /**
      * Creates the KDC and starts it.
      * @param etype Encryption type, null if not specified
--- a/jdk/test/sun/security/krb5/auto/SSL.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/SSL.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,8 @@
         ServicePermission p = (ServicePermission)perm;
         // ServicePermissions required to create GSSName are ignored
         if (!p.getActions().isEmpty()) {
-            permChecks = permChecks + p.getActions().toUpperCase().charAt(0);
+            permChecks = permChecks
+                + p.getActions().toUpperCase(Locale.US).charAt(0);
         }
     }
 
@@ -94,7 +95,7 @@
         System.setSecurityManager(new SSL());
 
         KDC kdc = KDC.create(OneKDC.REALM);
-        server = "host." + OneKDC.REALM.toLowerCase(Locale.US);
+        server = "host." + OneKDC.REALM_LOWER_CASE;
 
         if (args.length > 2) {
             sniHostname = "test." + server;
--- a/jdk/test/sun/security/krb5/auto/SaslBasic.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/SaslBasic.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,6 @@
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.Locale;
 import javax.security.auth.callback.Callback;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.callback.UnsupportedCallbackException;
@@ -46,7 +45,7 @@
     public static void main(String[] args) throws Exception {
 
         boolean bound = args[0].equals("bound");
-        String name = "host." + OneKDC.REALM.toLowerCase(Locale.US);
+        String name = "host." + OneKDC.REALM_LOWER_CASE;
 
         new OneKDC(null).writeJAASConf();
         System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
--- a/jdk/test/sun/security/krb5/auto/SaslGSS.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/SaslGSS.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,6 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.util.HashMap;
-import java.util.Locale;
 import java.util.logging.ConsoleHandler;
 import java.util.logging.Handler;
 import java.util.logging.Level;
@@ -54,7 +53,7 @@
 
     public static void main(String[] args) throws Exception {
 
-        String name = "host." + OneKDC.REALM.toLowerCase(Locale.US);
+        String name = "host." + OneKDC.REALM_LOWER_CASE;
 
         new OneKDC(null).writeJAASConf();
         System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/config/Semicolon.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8160518
+ * @summary Semicolon is not recognized as comment starting character
+ * @modules java.security.jgss/sun.security.krb5
+ * @run main/othervm Semicolon
+ */
+
+import sun.security.krb5.Config;
+
+public class Semicolon {
+    public static void main(String[] args) throws Throwable {
+        System.setProperty("java.security.krb5.conf",
+                System.getProperty("test.src", ".") + "/comments.conf");
+        Config config = Config.getInstance();
+        config.getBooleanObject("section", "value");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/krb5/config/comments.conf	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,12 @@
+[section]
+
+#           comment
+ #          comment
+	 #  comment
+ 	#   comment
+;           comment
+ ;          comment
+	 ;  comment
+ 	;   comment
+
+value = true
--- a/jdk/test/sun/security/mscapi/ShortRSAKeyWithinTLS.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/mscapi/ShortRSAKeyWithinTLS.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,10 @@
  */
 
 import java.io.*;
+import java.net.*;
+import java.util.*;
 import java.security.*;
+import java.security.cert.*;
 import javax.net.*;
 import javax.net.ssl.*;
 
@@ -71,22 +74,34 @@
     void doServerSide() throws Exception {
 
         // load the key store
-        KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
-        ks.load(null, null);
+        serverKS = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
+        serverKS.load(null, null);
         System.out.println("Loaded keystore: Windows-MY");
 
         // check key size
-        checkKeySize(ks);
+        checkKeySize(serverKS);
 
         // initialize the SSLContext
         KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
-        kmf.init(ks, null);
+        kmf.init(serverKS, null);
 
         TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
-        tmf.init(ks);
+        tmf.init(serverKS);
+        TrustManager[] tms = tmf.getTrustManagers();
+        if (tms == null || tms.length == 0) {
+            throw new Exception("unexpected trust manager implementation");
+        } else {
+            if (!(tms[0] instanceof X509TrustManager)) {
+                throw new Exception("unexpected trust manager" +
+                        " implementation: " +
+                        tms[0].getClass().getCanonicalName());
+            }
+        }
+        serverTM = new MyExtendedX509TM((X509TrustManager)tms[0]);
+        tms = new TrustManager[] {serverTM};
 
         SSLContext ctx = SSLContext.getInstance("TLS");
-        ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+        ctx.init(kmf.getKeyManagers(), tms, null);
 
         ServerSocketFactory ssf = ctx.getServerSocketFactory();
         SSLServerSocket sslServerSocket = (SSLServerSocket)
@@ -228,6 +243,8 @@
 
     Thread clientThread = null;
     Thread serverThread = null;
+    KeyStore serverKS;
+    MyExtendedX509TM serverTM;
 
     /*
      * Primary constructor, used to drive remainder of the test.
@@ -348,5 +365,60 @@
             }
         }
     }
+
+
+    class MyExtendedX509TM extends X509ExtendedTrustManager
+            implements X509TrustManager {
+
+        X509TrustManager tm;
+
+        MyExtendedX509TM(X509TrustManager tm) {
+            this.tm = tm;
+        }
+
+        public void checkClientTrusted(X509Certificate chain[], String authType)
+                throws CertificateException {
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate chain[], String authType)
+                throws CertificateException {
+            tm.checkServerTrusted(chain, authType);
+        }
+
+        public X509Certificate[] getAcceptedIssuers() {
+            List<X509Certificate> certs = new ArrayList<>();
+            try {
+                for (X509Certificate c : tm.getAcceptedIssuers()) {
+                    if (serverKS.getCertificateAlias(c).equals(keyAlias))
+                        certs.add(c);
+                }
+            } catch (KeyStoreException kse) {
+                throw new RuntimeException(kse);
+            }
+            return certs.toArray(new X509Certificate[certs.size()]);
+        }
+
+        public void checkClientTrusted(X509Certificate[] chain, String authType,
+                Socket socket) throws CertificateException {
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate[] chain, String authType,
+                Socket socket) throws CertificateException {
+            tm.checkServerTrusted(chain, authType);
+        }
+
+        public void checkClientTrusted(X509Certificate[] chain, String authType,
+            SSLEngine engine) throws CertificateException {
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate[] chain, String authType,
+            SSLEngine engine) throws CertificateException {
+            tm.checkServerTrusted(chain, authType);
+        }
+    }
+
 }
 
--- a/jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,21 @@
  * questions.
  */
 
-/**
- * @see SignUsingNONEwithRSA.sh
+ /*
+ * @test
+ * @bug 6578658
+ * @modules java.base/sun.security.x509
+ *          java.base/sun.security.tools.keytool
+ * @requires os.family == "windows"
+ * @summary Sign using the NONEwithRSA signature algorithm from SunMSCAPI
  */
 
 import java.security.*;
+import java.security.cert.X509Certificate;
+import java.security.interfaces.RSAPrivateCrtKey;
 import java.util.*;
+import sun.security.tools.keytool.CertAndKeyGen;
+import sun.security.x509.X500Name;
 
 public class SignUsingNONEwithRSA {
 
@@ -92,24 +101,42 @@
                 System.out.println("    " + provider.getName());
             }
         }
-        System.out.println("-------------------------------------------------");
+        System.out.println(
+                "Creating a temporary RSA keypair in the Windows-My store");
+        KeyStore ks = KeyStore.getInstance("Windows-MY");
+        ks.load(null, null);
+        CertAndKeyGen ckg = new CertAndKeyGen("RSA", "SHA1withRSA");
+        ckg.generate(1024);
+        RSAPrivateCrtKey k = (RSAPrivateCrtKey) ckg.getPrivateKey();
+        ks.setKeyEntry("6578658", k, null, new X509Certificate[]{
+                    ckg.getSelfCertificate(new X500Name("cn=6578658,c=US"), 1000)
+                });
+        ks.store(null, null);
 
-        KeyPair keys = getKeysFromKeyStore();
-        signAllUsing("SunMSCAPI", keys.getPrivate());
-        System.out.println("-------------------------------------------------");
-
-        verifyAllUsing("SunMSCAPI", keys.getPublic());
-        System.out.println("-------------------------------------------------");
+        System.out.println("---------------------------------------------");
 
-        verifyAllUsing("SunJCE", keys.getPublic());
-        System.out.println("-------------------------------------------------");
+        try {
+            KeyPair keys = getKeysFromKeyStore();
+            signAllUsing("SunMSCAPI", keys.getPrivate());
+            System.out.println("---------------------------------------------");
+
+            verifyAllUsing("SunMSCAPI", keys.getPublic());
+            System.out.println("---------------------------------------------");
+
+            verifyAllUsing("SunJCE", keys.getPublic());
+            System.out.println("---------------------------------------------");
 
-        keys = generateKeys();
-        signAllUsing("SunJCE", keys.getPrivate());
-        System.out.println("-------------------------------------------------");
+            keys = generateKeys();
+            signAllUsing("SunJCE", keys.getPrivate());
+            System.out.println("---------------------------------------------");
 
-        verifyAllUsing("SunMSCAPI", keys.getPublic());
-        System.out.println("-------------------------------------------------");
+            verifyAllUsing("SunMSCAPI", keys.getPublic());
+            System.out.println("---------------------------------------------");
+        } finally {
+            System.out.println(
+                    "Deleting temporary RSA keypair from Windows-My store");
+            ks.deleteEntry("6578658");
+        }
 
     }
 
--- a/jdk/test/sun/security/mscapi/SignUsingNONEwithRSA.sh	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 6578658
-# @requires os.family == "windows"
-# @run shell SignUsingNONEwithRSA.sh
-# @summary Sign using the NONEwithRSA signature algorithm from SunMSCAPI
-# @key intermittent
-
-# set a few environment variables so that the shell-script can run stand-alone
-# in the source directory
-if [ "${TESTSRC}" = "" ] ; then
-   TESTSRC="."
-fi
-
-if [ "${TESTCLASSES}" = "" ] ; then
-   TESTCLASSES="."
-fi
-
-if [ "${TESTJAVA}" = "" ] ; then
-   echo "TESTJAVA not set.  Test cannot execute."
-   echo "FAILED!!!"
-   exit 1
-fi
-
-OS=`uname -s`
-case "$OS" in
-    Windows* | CYGWIN* )
-
-        echo "Creating a temporary RSA keypair in the Windows-My store..."
-        ${TESTJAVA}/bin/keytool ${TESTTOOLVMOPTS} \
-	    -genkeypair \
-	    -storetype Windows-My \
-	    -keyalg RSA \
-	    -alias 6578658 \
-	    -dname "cn=6578658,c=US" \
-	    -noprompt
-
-        echo
-	echo "Running the test..."
-        ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d . ${TESTSRC}\\SignUsingNONEwithRSA.java
-        ${TESTJAVA}/bin/java ${TESTVMOPTS} SignUsingNONEwithRSA
-
-        rc=$?
-
-        echo
-        echo "Removing the temporary RSA keypair from the Windows-My store..."
-        ${TESTJAVA}/bin/keytool ${TESTTOOLVMOPTS} \
-	    -delete \
-	    -storetype Windows-My \
-	    -alias 6578658
-
-	echo done.
-        exit $rc
-        ;;
-
-    * )
-        echo "This test is not intended for '$OS' - passing test"
-        exit 0
-        ;;
-esac
--- a/jdk/test/sun/security/provider/NSASuiteB/TestDSAGenParameterSpec.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/provider/NSASuiteB/TestDSAGenParameterSpec.java	Fri Jul 08 12:17:10 2016 -0700
@@ -35,7 +35,6 @@
 /*
  * @test
  * @bug 8075286
- * @key intermittent
  * @summary Verify that DSAGenParameterSpec can and can only be used to generate
  *          DSA within some certain range of key sizes as described in the class
  *          specification (L, N) as (1024, 160), (2048, 224), (2048, 256) and
--- a/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/tools/keytool/DefaultSignatureAlgorithm.java	Fri Jul 08 12:17:10 2016 -0700
@@ -26,6 +26,17 @@
  * @bug 8138766
  * @summary New default -sigalg for keytool
  * @modules java.base/sun.security.tools.keytool
+ * @run main/othervm DefaultSignatureAlgorithm RSA 1024 SHA256withRSA
+ * @run main/othervm DefaultSignatureAlgorithm RSA 3072 SHA256withRSA
+ * @run main/othervm DefaultSignatureAlgorithm RSA 3073 SHA384withRSA
+ * @run main/othervm DefaultSignatureAlgorithm DSA 1024 SHA256withDSA
+ * @run main/othervm/timeout=700 DefaultSignatureAlgorithm DSA 3072
+ *      SHA256withDSA
+ * @run main/othervm DefaultSignatureAlgorithm EC 192 SHA256withECDSA
+ * @run main/othervm DefaultSignatureAlgorithm EC 384 SHA384withECDSA
+ * @run main/othervm DefaultSignatureAlgorithm EC 571 SHA512withECDSA
+ * @run main/othervm DefaultSignatureAlgorithm EC 571 SHA256withECDSA
+ *      SHA256withECDSA
  */
 
 import sun.security.tools.keytool.Main;
@@ -36,29 +47,17 @@
 
 public class DefaultSignatureAlgorithm {
 
-    private static int counter = 0;
-
     public static void main(String[] args) throws Exception {
-
-        // Calculating large RSA keys are too slow.
-        run("RSA", 1024, null, "SHA256withRSA");
-        run("RSA", 3072, null, "SHA256withRSA");
-        run("RSA", 3073, null, "SHA384withRSA");
-
-        run("DSA", 1024, null, "SHA256withDSA");
-        run("DSA", 3072, null, "SHA256withDSA");
-
-        run("EC", 192, null, "SHA256withECDSA");
-        run("EC", 384, null, "SHA384withECDSA");
-        run("EC", 571, null, "SHA512withECDSA");
-
-        // If you specify one, it will be used.
-        run("EC", 571, "SHA256withECDSA", "SHA256withECDSA");
+        if(args == null || args.length < 3) {
+            throw new RuntimeException("Invalid arguments provided.");
+        }
+        String sigAlg = (args.length == 4) ? args[3] : null;
+        run(args[0], Integer.valueOf(args[1]), args[2], sigAlg);
     }
 
     private static void run(String keyAlg, int keySize,
-                    String sigAlg, String expectedSigAlg) throws Exception {
-        String alias = keyAlg + keySize + (counter++);
+                    String expectedSigAlg, String sigAlg) throws Exception {
+        String alias = keyAlg + keySize + System.currentTimeMillis();
         String cmd = "-keystore ks -storepass changeit" +
                 " -keypass changeit -alias " + alias +
                 " -keyalg " + keyAlg + " -keysize " + keySize +
--- a/jdk/test/sun/security/tools/keytool/PrintSSL.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/tools/keytool/PrintSSL.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,36 +21,74 @@
  * questions.
  */
 
-// Read printssl.sh, this Java program starts an SSL server
+/*
+ * @test
+ * @bug 6480981 8160624
+ * @modules java.base/sun.security.tools.keytool
+ * @summary keytool should be able to import certificates from remote SSL server
+ * @run main/othervm PrintSSL
+ */
 
+import java.io.IOException;
 import java.net.ServerSocket;
+import java.util.concurrent.CountDownLatch;
 import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocket;
 
 public class PrintSSL {
+
     public static void main(String[] args) throws Exception {
-        System.setProperty("javax.net.ssl.keyStorePassword", "passphrase");
-        System.setProperty("javax.net.ssl.keyStore",
-                           System.getProperty("test.src", "./")
-                               + "/../../../../javax/net/ssl/etc/keystore");
-        SSLServerSocketFactory sslssf =
-                (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
-        final ServerSocket server = sslssf.createServerSocket(0);
-        System.out.println(server.getLocalPort());
-        System.out.flush();
-        Thread t = new Thread() {
-            public void run() {
-                try {
-                    Thread.sleep(30000);
-                    server.close();
-                } catch (Exception e) {
-                    ;
-                }
-                throw new RuntimeException("Timeout");
+
+        int port = new Server().start();
+        if(port == -1) {
+            throw new RuntimeException("Unable start ssl server.");
+        }
+        String vmOpt = System.getProperty("TESTTOOLVMOPTS");
+        String cmd = String.format(
+                "-debug %s -printcert -sslserver localhost:%s",
+                ((vmOpt == null) ? "" : vmOpt ), port);
+        sun.security.tools.keytool.Main.main(cmd.split("\\s+"));
+    }
+
+    private static class Server implements Runnable {
+
+        private volatile int serverPort = -1;
+        private final CountDownLatch untilServerReady = new CountDownLatch(1);
+
+        public int start() throws InterruptedException {
+
+            Thread server = new Thread(this);
+            server.setDaemon(true);
+            server.start();
+            untilServerReady.await();
+            return this.getServerPort();
+        }
+
+        @Override
+        public void run() {
+
+            System.setProperty("javax.net.ssl.keyStorePassword", "passphrase");
+            System.setProperty("javax.net.ssl.keyStore",
+                    System.getProperty("test.src", "./")
+                    + "/../../../../javax/net/ssl/etc/keystore");
+            SSLServerSocketFactory sslssf =
+                    (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
+            try (ServerSocket server = sslssf.createServerSocket(0)) {
+                this.serverPort = server.getLocalPort();
+                System.out.printf("%nServer started on: %s%n", getServerPort());
+                untilServerReady.countDown();
+                ((SSLSocket)server.accept()).startHandshake();
+            } catch (Throwable e) {
+                e.printStackTrace(System.out);
+                untilServerReady.countDown();
             }
-        };
-        t.setDaemon(true);
-        t.start();
-        ((SSLSocket)server.accept()).startHandshake();
+
+        }
+
+        public int getServerPort() {
+            return this.serverPort;
+        }
+
     }
+
 }
--- a/jdk/test/sun/security/tools/keytool/printssl.sh	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-#
-# Copyright (c) 2008, 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.
-#
-
-# @test
-# @bug 6480981
-# @summary keytool should be able to import certificates from remote SSL servers
-
-if [ "${TESTSRC}" = "" ] ; then
-  TESTSRC="."
-fi
-if [ "${TESTJAVA}" = "" ] ; then
-  echo "TESTJAVA not set.  Test cannot execute."
-  echo "FAILED!!!"
-  exit 1
-fi
-if [ "${COMPILEJAVA}" = "" ]; then
-  COMPILEJAVA="${TESTJAVA}"
-fi
-
-# set platform-dependent variables
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux | Darwin | AIX )
-    FS="/"
-    ;;
-  CYGWIN* )
-    FS="/"
-    ;;
-  Windows_* )
-    FS="\\"
-    ;;
-  * )
-    echo "Unrecognized operating system!"
-    exit 1;
-    ;;
-esac
-
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}${FS}PrintSSL.java || exit 10
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dtest.src=$TESTSRC PrintSSL | (
-      read PORT
-      if [ "$PORT" = "" ]; then
-          echo "Server not started"
-          exit 2
-      else
-          ${TESTJAVA}${FS}bin${FS}keytool ${TESTTOOLVMOPTS} -printcert -sslserver localhost:$PORT
-      fi
-)
-status=$?
-
-rm PrintSSL*.class
-
-exit $status
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/x509/URICertStore/AIA	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,1 @@
+127.0.0.1 ldap.host.for.aia
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/x509/URICertStore/CRLDP	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,1 @@
+127.0.0.1 ldap.host.for.crldp
\ No newline at end of file
--- a/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,33 +23,34 @@
  * questions.
  */
 
+import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.IOException;
-import java.io.StringBufferInputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.security.cert.CertPath;
 import java.security.cert.CertPathValidator;
 import java.security.cert.CertPathValidatorException;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
 import java.security.cert.PKIXParameters;
 import java.security.cert.TrustAnchor;
 import java.security.cert.X509Certificate;
-import java.text.DateFormat;
-import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Locale;
 import java.util.Set;
+import java.util.function.Consumer;
 
 /*
  * @test
  * @bug 8134708
  * @summary Check if LDAP resources from CRLDP and AIA extensions can be loaded
- * @run main/othervm ExtensionsWithLDAP
+ * @run main/othervm ExtensionsWithLDAP CRLDP ldap.host.for.crldp
+ * @run main/othervm ExtensionsWithLDAP AIA ldap.host.for.aia
  */
 public class ExtensionsWithLDAP {
 
@@ -125,29 +126,18 @@
         + "hnxn9+e0Ah+t8dS5EKfn44w5bI5PCu2bqxs6RCTxNjcY\n"
         + "-----END CERTIFICATE-----";
 
-
-    private static final String LDAP_HOST_CRLDP = "ldap.host.for.crldp";
-    private static final String LDAP_HOST_AIA = "ldap.host.for.aia";
+    public static void main(String[] args) throws Exception {
+        String extension = args[0];
+        String targetHost = args[1];
 
-    // a date within the certificates validity period
-    static final Date validationDate;
-    static {
-        try {
-            validationDate = DateFormat.getDateInstance(
-                    DateFormat.MEDIUM, Locale.US).parse("Sep 02, 2015");
-        } catch (ParseException e) {
-            throw new RuntimeException("Couldn't parse date", e);
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
         // enable CRLDP and AIA extensions
         System.setProperty("com.sun.security.enableCRLDP", "true");
         System.setProperty("com.sun.security.enableAIAcaIssuers", "true");
 
-        // register a local name service
-        String hostsFileName = System.getProperty("test.src", ".") + "/ExtensionsWithLDAPHosts";
-        System.setProperty("jdk.net.hosts.file", hostsFileName);
+        Path hostsFilePath = Paths.get(System.getProperty("test.src", ".")
+                + File.separator + extension);
+        System.setProperty("jdk.net.hosts.file",
+                hostsFilePath.toFile().getAbsolutePath());
 
         X509Certificate trustedCert = loadCertificate(CA_CERT);
         X509Certificate eeCert = loadCertificate(EE_CERT);
@@ -158,31 +148,29 @@
         CertPath cp = (CertPath) CertificateFactory.getInstance("X509")
                 .generateCertPath(Arrays.asList(eeCert));
 
-        PKIXParameters params = new PKIXParameters(trustedCertsSet);
-        params.setDate(validationDate);
-
-        // certpath validator should try to parse CRLDP and AIA extensions,
-        // and load CRLs/certs which they point to
-        // if a local name service catched requests for resolving host names
-        // which extensions contain, then it means that certpath validator
-        // tried to load CRLs/certs which they point to
-        try {
-            CertPathValidator.getInstance("PKIX").validate(cp, params);
+        // CertPath validator should try to parse CRLDP and AIA extensions,
+        // and load CRLs/certs which they point to.
+        // If proxy server catches requests for resolving host names
+        // which extensions contain, then it means that CertPath validator
+        // tried to load CRLs/certs which they point to.
+        List<String> hosts = new ArrayList<>();
+        Consumer<Socket> socketConsumer = (Socket socket) -> {
+            InetSocketAddress remoteAddress
+                    = (InetSocketAddress) socket.getRemoteSocketAddress();
+            hosts.add(remoteAddress.getHostName());
+        };
+        try (SocksProxy proxy = SocksProxy.startProxy(socketConsumer)) {
+            CertPathValidator.getInstance("PKIX").validate(cp,
+                    new PKIXParameters(trustedCertsSet));
             throw new RuntimeException("CertPathValidatorException not thrown");
         } catch (CertPathValidatorException cpve) {
             System.out.println("Expected exception: " + cpve);
         }
 
-        // check if it tried to resolve a host name from CRLDP extension
-        if (!LocalNameService.requestedHosts.contains(LDAP_HOST_CRLDP)) {
+        if (!hosts.contains(targetHost)) {
             throw new RuntimeException(
-                    "A hostname from CRLDP extension not requested");
-        }
-
-        // check if it tried to resolve a host name from AIA extension
-        if (!LocalNameService.requestedHosts.contains(LDAP_HOST_AIA)) {
-            throw new RuntimeException(
-                    "A hostname from AIA extension not requested");
+                    String.format("The %s from %s extension is not requested",
+                            targetHost, extension));
         }
 
         System.out.println("Test passed");
@@ -192,15 +180,9 @@
     public static X509Certificate loadCertificate(String s)
             throws IOException, CertificateException {
 
-        try (StringBufferInputStream is = new StringBufferInputStream(s)) {
+        try (ByteArrayInputStream is = new ByteArrayInputStream(s.getBytes())) {
             return (X509Certificate) CertificateFactory.getInstance("X509")
                     .generateCertificate(is);
         }
     }
-
-    // a local name service which log requested host names
-    public static class LocalNameService {
-
-        static final List<String> requestedHosts = new ArrayList<>();
-                }
-                }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/x509/URICertStore/SocksProxy.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.Objects;
+import java.util.function.Consumer;
+
+import javax.net.ServerSocketFactory;
+
+/*
+ * A simple socks4 proxy for traveling socket.
+ */
+class SocksProxy implements Runnable, AutoCloseable {
+
+    private ServerSocket server;
+    private Consumer<Socket> socketConsumer;
+
+    private SocksProxy(ServerSocket server, Consumer<Socket> socketConsumer) {
+        this.server = server;
+        this.socketConsumer = socketConsumer;
+    }
+
+    static SocksProxy startProxy(Consumer<Socket> socketConsumer)
+            throws IOException {
+        Objects.requireNonNull(socketConsumer, "socketConsumer cannot be null");
+
+        ServerSocket server
+                = ServerSocketFactory.getDefault().createServerSocket(0);
+
+        System.setProperty("socksProxyHost", "127.0.0.1");
+        System.setProperty("socksProxyPort",
+                String.valueOf(server.getLocalPort()));
+        System.setProperty("socksProxyVersion", "4");
+
+        SocksProxy proxy = new SocksProxy(server, socketConsumer);
+        Thread proxyThread = new Thread(proxy, "Proxy");
+        proxyThread.setDaemon(true);
+        proxyThread.start();
+
+        return proxy;
+    }
+
+    @Override
+    public void run() {
+        while (!server.isClosed()) {
+            try(Socket socket = server.accept()) {
+                System.out.println("Server: accepted connection");
+                if (socketConsumer != null) {
+                    socketConsumer.accept(socket);
+                }
+            } catch (IOException e) {
+                if (!server.isClosed()) {
+                    throw new RuntimeException(
+                            "Server: accept connection failed", e);
+                } else {
+                    System.out.println("Server is closed.");
+                }
+            }
+        }
+    }
+
+    @Override
+    public void close() throws Exception {
+        if (!server.isClosed()) {
+            server.close();
+        }
+    }
+
+    int getPort() {
+        return server.getLocalPort();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/text/resources/JavaTimeSupplementaryTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8159943
+ * @modules java.base/sun.util.locale.provider
+ *          java.base/sun.util.resources
+ *          jdk.localedata
+ * @summary Test for checking consistency between CLDR and COMPAT locale data
+ *          for java.time.
+ */
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Objects;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Collectors;
+import sun.util.locale.provider.LocaleProviderAdapter.Type;
+import sun.util.locale.provider.LocaleProviderAdapter;
+
+public class JavaTimeSupplementaryTest {
+    // COMPAT-to-CLDR locale mapping
+    private static final Map<Locale, Locale> LOCALEMAP;
+    static {
+        LOCALEMAP = new HashMap<>();
+        LOCALEMAP.put(new Locale("hi", "IN"), new Locale("hi"));
+        LOCALEMAP.put(new Locale("no", "NO", "NY"), new Locale("nn", "NO"));
+        LOCALEMAP.put(new Locale("no"), new Locale("nb"));
+        LOCALEMAP.put(Locale.TAIWAN, Locale.forLanguageTag("zh-Hant"));
+        LOCALEMAP.put(new Locale("zh", "HK"), Locale.forLanguageTag("zh-Hant-HK"));
+        LOCALEMAP.put(new Locale("zh", "SG"), Locale.forLanguageTag("zh-Hans-SG"));
+        LOCALEMAP.put(new Locale("sr", "BA"), Locale.forLanguageTag("sr-Cyrl-BA"));
+    }
+
+    private static final String[] PREFIXES = {
+        "Quarter",
+        "java.time.",
+        "calendarname.",
+        "field.",
+        "islamic.",
+        "roc.",
+    };
+
+    // All available locales for the COMPAT FormatData resource bundles
+    static final List<Locale> COMPAT_LOCALES
+        = Arrays.asList(LocaleProviderAdapter.forJRE()
+                        .getDateFormatSymbolsProvider().getAvailableLocales());
+
+    static int errors;
+
+    public static void main(String... args) {
+        for (Locale locale : COMPAT_LOCALES) {
+            ResourceBundle compat
+                = LocaleProviderAdapter.forJRE()
+                      .getLocaleResources(locale).getJavaTimeFormatData();
+            if (!compat.getLocale().equals(locale)) {
+                continue;
+            }
+            Locale cldrLocale = toCldrLocale(locale);
+            ResourceBundle cldr
+                = LocaleProviderAdapter.forType(Type.CLDR)
+                      .getLocaleResources(locale).getJavaTimeFormatData();
+            if (!cldr.getLocale().equals(cldrLocale)) {
+                continue;
+            }
+            compareResources(compat, cldr);
+        }
+        if (errors > 0) {
+            throw new RuntimeException(errors + " failure(s)");
+        }
+    }
+
+    private static Locale toCldrLocale(Locale compatLocale) {
+        Locale loc = LOCALEMAP.get(compatLocale);
+        return loc != null ? loc: compatLocale;
+    }
+
+    private static void compareResources(ResourceBundle compat, ResourceBundle cldr) {
+        Set<String> supplementalKeys = getSupplementalKeys(compat);
+        for (String key : supplementalKeys) {
+            Object compatData = compat.getObject(key);
+            String cldrKey = toCldrKey(key);
+            Object cldrData = cldr.containsKey(cldrKey) ? cldr.getObject(cldrKey) : null;
+            if (!Objects.deepEquals(compatData, cldrData)) {
+                // OK if key is for the Buddhist or Japanese calendars which had been
+                // supported before java.time, or if key is "java.time.short.Eras" due
+                // to legacy era names.
+                if (!(key.contains("buddhist") || key.contains("japanese")
+                      || key.equals("java.time.short.Eras"))) {
+                    errors++;
+                    System.out.print("Failure: ");
+                }
+                System.out.println("diff: " + compat.getLocale().toLanguageTag() + "\n"
+                                   + "  COMPAT: " + key + " -> " + toString(compatData) + "\n"
+                                   + "    CLDR: " + cldrKey + " -> " + toString(cldrData));
+            }
+        }
+    }
+
+    private static Set<String> getSupplementalKeys(ResourceBundle rb) {
+        // Collect keys starting with any of PREFIXES
+        Set<String> keys = rb.keySet().stream()
+            .filter(k -> Arrays.stream(PREFIXES).anyMatch(p -> k.startsWith(p)))
+            .collect(Collectors.toCollection(TreeSet::new));
+        return keys;
+    }
+
+    /**
+     * Removes "java.time." prefix where it's unused in CLDR.
+     */
+    private static String toCldrKey(String key) {
+        if (key.contains("short.Eras")) {
+            key = key.replace("short.", "");
+        }
+        if (key.startsWith("java.time.") && key.endsWith(".Eras")) {
+            return key.substring("java.time.".length());
+        }
+        return key;
+    }
+
+    private static String toString(Object data) {
+        if (data instanceof String[]) {
+            return Arrays.toString((String[]) data);
+        }
+        return data.toString();
+    }
+}
--- a/jdk/test/tools/jlink/IntegrationTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/tools/jlink/IntegrationTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -105,60 +105,6 @@
         }
     }
 
-    public static class MyPlugin1 implements Plugin {
-
-        Integer index;
-        Set<String> after;
-        Set<String> before;
-
-        private MyPlugin1(Integer index, Set<String> after, Set<String> before) {
-            this.index = index;
-            this.after = after;
-            this.before = before;
-        }
-
-        @Override
-        public Set<String> isAfter() {
-            return after;
-        }
-
-        @Override
-        public Set<String> isBefore() {
-            return before;
-        }
-
-        @Override
-        public String getName() {
-            return NAME + index;
-        }
-
-        @Override
-        public void visit(ModulePool in, ModulePool out) {
-            System.err.println(NAME + index);
-            ordered.add(index);
-            in.transformAndCopy((file) -> {
-                return file;
-            }, out);
-        }
-
-        @Override
-        public String getDescription() {
-            return null;
-        }
-
-        @Override
-        public String getOption() {
-            return null;
-        }
-        static final String NAME = "myprovider";
-        static final String INDEX = "INDEX";
-
-        @Override
-        public void configure(Map<String, String> config) {
-            throw new UnsupportedOperationException("Shouldn't be called");
-        }
-    }
-
     public static void main(String[] args) throws Exception {
 
         Helper helper = Helper.newHelper();
@@ -168,8 +114,6 @@
         }
         apitest();
         test();
-        testOrder();
-        testCycleOrder();
     }
 
     private static void apitest() throws Exception {
@@ -262,109 +206,4 @@
         }
 
     }
-
-    private static void testOrder() throws Exception {
-        Jlink jlink = new Jlink();
-        Path output = Paths.get("integrationout2");
-        List<Path> modulePaths = new ArrayList<>();
-        File jmods
-                = JImageGenerator.getJModsDir(new File(System.getProperty("test.jdk")));
-        modulePaths.add(jmods.toPath());
-        Set<String> mods = new HashSet<>();
-        mods.add("java.management");
-        Set<String> limits = new HashSet<>();
-        limits.add("java.management");
-        JlinkConfiguration config = new Jlink.JlinkConfiguration(output,
-                modulePaths, mods, limits, null);
-
-        List<Plugin> lst = new ArrayList<>();
-
-        // Order is Plug1>Plug2>Plug3
-        // Plug1
-
-
-        // TRANSFORMER 3, must be after 2.
-        {
-            Set<String> after = new HashSet<>();
-            after.add(MyPlugin1.NAME+"2");
-            lst.add(new MyPlugin1(3, after, Collections.emptySet()));
-        }
-
-        // TRANSFORMER 2, must be after 1.
-        {
-            Set<String> after = new HashSet<>();
-            after.add(MyPlugin1.NAME+"1");
-            lst.add(new MyPlugin1(2, after, Collections.emptySet()));
-        }
-
-        // TRANSFORMER 1
-        {
-            Set<String> before = new HashSet<>();
-            before.add(MyPlugin1.NAME+"2");
-            lst.add(new MyPlugin1(1, Collections.emptySet(), before));
-        }
-
-        // Image builder
-        DefaultImageBuilder builder = new DefaultImageBuilder(output);
-        PluginsConfiguration plugins
-                = new Jlink.PluginsConfiguration(lst, builder, null);
-
-        jlink.build(config, plugins);
-
-        if (ordered.isEmpty()) {
-            throw new AssertionError("Plugins not called");
-        }
-        List<Integer> clone = new ArrayList<>();
-        clone.addAll(ordered);
-        Collections.sort(clone);
-        if (!clone.equals(ordered)) {
-            throw new AssertionError("Ordered is not properly sorted" + ordered);
-        }
-    }
-
-    private static void testCycleOrder() throws Exception {
-        Jlink jlink = new Jlink();
-        Path output = Paths.get("integrationout3");
-        List<Path> modulePaths = new ArrayList<>();
-        File jmods
-                = JImageGenerator.getJModsDir(new File(System.getProperty("test.jdk")));
-        modulePaths.add(jmods.toPath());
-        Set<String> mods = new HashSet<>();
-        mods.add("java.management");
-        Set<String> limits = new HashSet<>();
-        limits.add("java.management");
-        JlinkConfiguration config = new Jlink.JlinkConfiguration(output,
-                modulePaths, mods, limits, null);
-
-        List<Plugin> lst = new ArrayList<>();
-
-        // packager 1
-        {
-            Set<String> before = new HashSet<>();
-            before.add(MyPlugin1.NAME+"2");
-            lst.add(new MyPlugin1(1, Collections.emptySet(), before));
-        }
-
-        // packager 2
-        {
-            Set<String> before = new HashSet<>();
-            before.add(MyPlugin1.NAME+"1");
-            lst.add(new MyPlugin1(2, Collections.emptySet(), before));
-        }
-
-        // Image builder
-        DefaultImageBuilder builder = new DefaultImageBuilder(output);
-        PluginsConfiguration plugins
-                = new Jlink.PluginsConfiguration(lst, builder, null);
-        boolean failed = false;
-        try {
-            jlink.build(config, plugins);
-            failed = true;
-        } catch (Exception ex) {
-            // XXX OK
-        }
-        if (failed) {
-            throw new AssertionError("Should have failed");
-        }
-    }
 }
--- a/jdk/test/tools/jlink/JLinkOptimTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Stream;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
-import jdk.internal.org.objectweb.asm.tree.ClassNode;
-import jdk.internal.org.objectweb.asm.tree.MethodInsnNode;
-import jdk.internal.org.objectweb.asm.tree.MethodNode;
-import jdk.internal.org.objectweb.asm.tree.TryCatchBlockNode;
-import jdk.tools.jlink.internal.PluginRepository;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-import jdk.tools.jlink.internal.plugins.OptimizationPlugin;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPlugin;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.internal.plugins.optim.ControlFlow;
-import jdk.tools.jlink.internal.plugins.optim.ControlFlow.Block;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-import tests.Helper;
-import tests.JImageGenerator;
-
-/*
- * 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
- * @summary Test image creation with class optimization
- * @author Jean-Francois Denise
- * @library ../lib
- * @modules java.base/jdk.internal.jimage
- *          jdk.jdeps/com.sun.tools.classfile
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jmod
- *          jdk.jlink/jdk.tools.jimage
- *          jdk.jlink/jdk.tools.jlink.internal.plugins
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.optim
- *          java.base/jdk.internal.org.objectweb.asm
- *          java.base/jdk.internal.org.objectweb.asm.tree
- *          java.base/jdk.internal.org.objectweb.asm.util
- *          jdk.compiler
- * @build tests.*
- * @run main JLinkOptimTest
- */
-public class JLinkOptimTest {
-
-    private static final String EXPECTED = "expected";
-    private static Helper helper;
-
-    public static class ControlFlowPlugin extends AsmPlugin {
-
-        private boolean called;
-        private int numMethods;
-        private int numBlocks;
-
-        private static final String NAME = "test-optim";
-
-        private ControlFlowPlugin() {
-        }
-
-        @Override
-        public void visit(AsmPools pools) {
-            called = true;
-            for (AsmModulePool p : pools.getModulePools()) {
-
-                p.visitClassReaders((reader) -> {
-                    ClassNode cn = new ClassNode();
-                    if ((reader.getAccess() & Opcodes.ACC_INTERFACE) == 0) {
-                        reader.accept(cn, ClassReader.EXPAND_FRAMES);
-                        for (MethodNode m : cn.methods) {
-                            if ((m.access & Opcodes.ACC_ABSTRACT) == 0
-                                    && (m.access & Opcodes.ACC_NATIVE) == 0) {
-                                numMethods += 1;
-                                try {
-                                    ControlFlow f
-                                            = ControlFlow.createControlFlow(cn.name, m);
-                                    for (Block b : f.getBlocks()) {
-                                        numBlocks += 1;
-                                        f.getClosure(b);
-                                    }
-                                } catch (Throwable ex) {
-                                    //ex.printStackTrace();
-                                    throw new RuntimeException("Exception in "
-                                            + cn.name + "." + m.name, ex);
-                                }
-                            }
-                        }
-                    }
-                    return null;
-                });
-            }
-        }
-
-        @Override
-        public String getName() {
-            return NAME;
-        }
-    }
-
-    private static void testForName() throws Exception {
-        String moduleName = "optimplugin";
-        Path src = Paths.get(System.getProperty("test.src")).resolve(moduleName);
-        Path classes = helper.getJmodClassesDir().resolve(moduleName);
-        JImageGenerator.compile(src, classes);
-
-        FileSystem fs = FileSystems.getFileSystem(URI.create("jrt:/"));
-        Path root = fs.getPath("/modules/java.base");
-        // Access module-info.class to be reused as fake module-info.class
-        List<ModuleEntry> javabaseResources = new ArrayList<>();
-        try (Stream<Path> stream = Files.walk(root)) {
-            for (Iterator<Path> iterator = stream.iterator(); iterator.hasNext();) {
-                Path p = iterator.next();
-                if (Files.isRegularFile(p)) {
-                    try {
-                        javabaseResources.add(ModuleEntry.create(p.toString().
-                                substring("/modules".length()), Files.readAllBytes(p)));
-                    } catch (Exception ex) {
-                        throw new RuntimeException(ex);
-                    }
-                }
-            }
-        }
-
-        //forName folding
-        ModulePoolImpl pool = new ModulePoolImpl();
-        byte[] content = Files.readAllBytes(classes.
-                resolve("optim").resolve("ForNameTestCase.class"));
-        byte[] content2 = Files.readAllBytes(classes.
-                resolve("optim").resolve("AType.class"));
-        byte[] mcontent = Files.readAllBytes(classes.resolve("module-info.class"));
-
-        pool.add(ModuleEntry.create("/optimplugin/optim/ForNameTestCase.class", content));
-        pool.add(ModuleEntry.create("/optimplugin/optim/AType.class", content2));
-        pool.add(ModuleEntry.create("/optimplugin/module-info.class", mcontent));
-
-        for (ModuleEntry r : javabaseResources) {
-            pool.add(r);
-        }
-
-        OptimizationPlugin plugin = new OptimizationPlugin();
-        Map<String, String> optional = new HashMap<>();
-        optional.put(OptimizationPlugin.NAME, OptimizationPlugin.FORNAME_REMOVAL);
-        optional.put(OptimizationPlugin.LOG, "forName.log");
-        plugin.configure(optional);
-        ModulePool out = new ModulePoolImpl();
-        plugin.visit(pool, out);
-
-        ModuleEntry result = out.entries().iterator().next();
-
-        ClassReader optimReader = new ClassReader(result.getBytes());
-        ClassNode optimClass = new ClassNode();
-        optimReader.accept(optimClass, ClassReader.EXPAND_FRAMES);
-
-        if (!optimClass.name.equals("optim/ForNameTestCase")) {
-            throw new Exception("Invalid class " + optimClass.name);
-        }
-        if (optimClass.methods.size() < 2) {
-            throw new Exception("Not enough methods in new class");
-        }
-        for (MethodNode mn : optimClass.methods) {
-            if (!mn.name.contains("forName") && !mn.name.contains("<clinit>")) {
-                continue;
-            }
-            if (mn.name.startsWith("negative")) {
-                checkForName(mn);
-            } else {
-                checkNoForName(mn);
-            }
-        }
-        Map<String, byte[]> newClasses = new HashMap<>();
-        newClasses.put("optim.ForNameTestCase", result.getBytes());
-        newClasses.put("optim.AType", content2);
-        MemClassLoader loader = new MemClassLoader(newClasses);
-        Class<?> loaded = loader.loadClass("optim.ForNameTestCase");
-        if (loaded.getDeclaredMethods().length < 2) {
-            throw new Exception("Not enough methods in new class");
-        }
-        for (Method m : loaded.getDeclaredMethods()) {
-            if (m.getName().contains("Exception")) {
-                try {
-                    m.invoke(null);
-                } catch (Exception ex) {
-                    //ex.getCause().printStackTrace();
-                    if (!ex.getCause().getMessage().equals(EXPECTED)) {
-                        throw new Exception("Unexpected exception " + ex);
-                    }
-                }
-            } else if (!m.getName().startsWith("negative")) {
-                Class<?> clazz = (Class<?>) m.invoke(null);
-                if (clazz != String.class && clazz != loader.findClass("optim.AType")) {
-                    throw new Exception("Invalid class " + clazz);
-                }
-            }
-        }
-    }
-
-    private static void checkNoForName(MethodNode m) throws Exception {
-        Iterator<AbstractInsnNode> it = m.instructions.iterator();
-        while (it.hasNext()) {
-            AbstractInsnNode n = it.next();
-            if (n instanceof MethodInsnNode) {
-                MethodInsnNode met = (MethodInsnNode) n;
-                if (met.name.equals("forName")
-                        && met.owner.equals("java/lang/Class")
-                        && met.desc.equals("(Ljava/lang/String;)Ljava/lang/Class;")) {
-                    throw new Exception("forName not removed in " + m.name);
-                }
-            }
-        }
-        for (TryCatchBlockNode tcb : m.tryCatchBlocks) {
-            if (tcb.type.equals(ClassNotFoundException.class.getName().replaceAll("\\.", "/"))) {
-                throw new Exception("ClassNotFoundException Block not removed for " + m.name);
-            }
-        }
-    }
-
-    private static void checkForName(MethodNode m) throws Exception {
-        Iterator<AbstractInsnNode> it = m.instructions.iterator();
-        boolean found = false;
-        while (it.hasNext()) {
-            AbstractInsnNode n = it.next();
-            if (n instanceof MethodInsnNode) {
-                MethodInsnNode met = (MethodInsnNode) n;
-                if (met.name.equals("forName")
-                        && met.owner.equals("java/lang/Class")
-                        && met.desc.equals("(Ljava/lang/String;)Ljava/lang/Class;")) {
-                    found = true;
-                    break;
-                }
-            }
-        }
-        if (!found) {
-            throw new Exception("forName removed but shouldn't have");
-        }
-        found = false;
-        for (TryCatchBlockNode tcb : m.tryCatchBlocks) {
-            if (tcb.type.equals(ClassNotFoundException.class.getName().replaceAll("\\.", "/"))) {
-                found = true;
-                break;
-            }
-        }
-        if (!found) {
-            throw new Exception("tryCatchBlocks removed but shouldn't have");
-        }
-    }
-
-    static class MemClassLoader extends ClassLoader {
-
-        private final Map<String, byte[]> classes;
-        private final Map<String, Class<?>> cache = new HashMap<>();
-
-        MemClassLoader(Map<String, byte[]> classes) {
-            super(null);
-            this.classes = classes;
-        }
-
-        @Override
-        public Class findClass(String name) throws ClassNotFoundException {
-            Class<?> clazz = cache.get(name);
-            if (clazz == null) {
-                byte[] b = classes.get(name);
-                if (b == null) {
-                    return super.findClass(name);
-                } else {
-                    clazz = defineClass(name, b, 0, b.length);
-                    cache.put(name, clazz);
-                }
-            }
-            return clazz;
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
-        helper = Helper.newHelper();
-        if (helper == null) {
-            System.err.println("Test not run");
-            return;
-        }
-
-        testForName();
-
-        helper.generateDefaultModules();
-        helper.generateDefaultJModule("optim1", "java.se");
-        {
-            String[] userOptions = {"--class-optim=all:log=./class-optim-log.txt"};
-
-            Path imageDir = helper.generateDefaultImage(userOptions, "optim1").assertSuccess();
-            helper.checkImage(imageDir, "optim1", null, null);
-        }
-
-        {
-            String[] userOptions = {"--class-optim=forName-folding:log=./class-optim-log.txt"};
-            Path imageDir = helper.generateDefaultImage(userOptions, "optim1").assertSuccess();
-            helper.checkImage(imageDir, "optim1", null, null);
-        }
-
-        {
-            ControlFlowPlugin plugin = new ControlFlowPlugin();
-            PluginRepository.registerPlugin(plugin);
-            String[] userOptions = {"--test-optim"};
-            Path imageDir = helper.generateDefaultImage(userOptions, "optim1").assertSuccess();
-            helper.checkImage(imageDir, "optim1", null, null);
-            //System.out.println("Num methods analyzed " + provider.numMethods
-            //        + "num blocks " + provider.numBlocks);
-            if (!plugin.called) {
-                throw new Exception("Plugin not called");
-            }
-            if (plugin.numMethods < 1000) {
-                throw new Exception("Not enough method called,  should be "
-                        + "around 10000 but is " + plugin.numMethods);
-            }
-            if (plugin.numBlocks < 100000) {
-                throw new Exception("Not enough blocks,  should be "
-                        + "around 640000 but is " + plugin.numMethods);
-            }
-        }
-    }
-
-}
--- a/jdk/test/tools/jlink/asmplugin/AddForgetResourcesTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,509 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test resource transformation.
- * @author Andrei Eremeev
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- *          jdk.jdeps/com.sun.tools.classfile
- * @build AsmPluginTestBase
- * @run main AddForgetResourcesTest
-*/
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import com.sun.tools.classfile.ClassFile;
-import com.sun.tools.classfile.Method;
-import java.io.UncheckedIOException;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.tools.jlink.internal.plugins.asm.AsmGlobalPool;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ResourceFile;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.WritableClassPool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.WritableResourcePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class AddForgetResourcesTest extends AsmPluginTestBase {
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new AddForgetResourcesTest().test();
-    }
-
-    @Override
-    public void test() throws Exception {
-        TestPlugin[] plugins = new TestPlugin[] {
-                new AddClassesPlugin(),
-                new AddResourcesPlugin(),
-                new ReplaceClassesPlugin(),
-                new ReplaceResourcesPlugin(),
-                new ForgetClassesPlugin(),
-                new ForgetResourcesPlugin(),
-                new AddForgetClassesPlugin(),
-                new AddForgetResourcesPlugin(),
-                new ComboPlugin()
-        };
-        for (TestPlugin p : plugins) {
-            ModulePool out = p.visit(getPool());
-            p.test(getPool(), out);
-        }
-    }
-
-    private static final String SUFFIX = "HELLOWORLD";
-
-    private static class RenameClassVisitor extends ClassVisitor {
-
-        public RenameClassVisitor(ClassWriter cv) {
-            super(Opcodes.ASM5, cv);
-        }
-
-        @Override
-        public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
-            super.visit(version, access, name + SUFFIX, signature, superName, interfaces);
-        }
-    }
-
-    private static class AddMethodClassVisitor extends ClassVisitor {
-
-        public AddMethodClassVisitor(ClassWriter cv) {
-            super(Opcodes.ASM5, cv);
-        }
-
-        @Override
-        public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
-            this.visitMethod(0, SUFFIX, "()V", null, null);
-            super.visit(version, access, name, signature, superName, interfaces);
-        }
-    }
-
-    private class AddClassesPlugin extends TestPlugin {
-
-        private int expected = 0;
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            WritableClassPool transformedClasses = globalPool.getTransformedClasses();
-            expected = globalPool.getClasses().size();
-            for (ModuleEntry res : globalPool.getClasses()) {
-                ClassReader reader = globalPool.getClassReader(res);
-                String className = reader.getClassName();
-                if (!className.endsWith("module-info")) {
-                    ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                    reader.accept(new RenameClassVisitor(writer), ClassReader.EXPAND_FRAMES);
-                    transformedClasses.addClass(writer);
-                    ++expected;
-                }
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) {
-            Collection<ModuleEntry> inClasses = extractClasses(inResources);
-            Collection<ModuleEntry> outClasses = extractClasses(outResources);
-            if (expected != outClasses.size()) {
-                throw new AssertionError("Classes were not added. Expected: " + expected
-                        + ", got: " + outClasses.size());
-            }
-            for (ModuleEntry in : inClasses) {
-                String path = in.getPath();
-                if (!outClasses.contains(in)) {
-                    throw new AssertionError("Class not found: " + path);
-                }
-                if (path.endsWith("module-info.class")) {
-                    continue;
-                }
-                String modifiedPath = path.replace(".class", SUFFIX + ".class");
-                if (!outClasses.contains(ModuleEntry.create(modifiedPath, new byte[0]))) {
-                    throw new AssertionError("Class not found: " + modifiedPath);
-                }
-            }
-        }
-    }
-
-    private class AddResourcesPlugin extends TestPlugin {
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            for (ModuleEntry res : globalPool.getResourceFiles()) {
-                String path = res.getPath();
-                String moduleName = getModule(path);
-                AsmModulePool modulePool = pools.getModulePool(moduleName);
-                WritableResourcePool resourcePool = modulePool.getTransformedResourceFiles();
-                resourcePool.addResourceFile(new ResourceFile(removeModule(res.getPath()) + SUFFIX,
-                        res.getBytes()));
-            }
-        }
-
-        @Override
-        public void test(ModulePool in, ModulePool out) throws Exception {
-            Collection<ModuleEntry> inResources = extractResources(in);
-            Collection<ModuleEntry> outResources = extractResources(out);
-            if (2 * inResources.size() != outResources.size()) {
-                throw new AssertionError("Classes were not added. Expected: " + (2 * inResources.size())
-                        + ", got: " + outResources.size());
-            }
-            for (ModuleEntry r : inResources) {
-                String path = r.getPath();
-                if (!outResources.contains(r)) {
-                    throw new AssertionError("Class not found: " + path);
-                }
-                String modifiedPath = path + SUFFIX;
-                if (!outResources.contains(ModuleEntry.create(modifiedPath, new byte[0]))) {
-                    throw new AssertionError("Class not found: " + modifiedPath);
-                }
-            }
-        }
-    }
-
-    private class ReplaceClassesPlugin extends TestPlugin {
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            WritableClassPool transformedClasses = globalPool.getTransformedClasses();
-            for (ModuleEntry res : globalPool.getClasses()) {
-                ClassReader reader = globalPool.getClassReader(res);
-                ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                reader.accept(new AddMethodClassVisitor(writer), ClassReader.EXPAND_FRAMES);
-                transformedClasses.addClass(writer);
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            Collection<ModuleEntry> inClasses = extractClasses(inResources);
-            Collection<ModuleEntry> outClasses = extractClasses(outResources);
-            if (inClasses.size() != outClasses.size()) {
-                throw new AssertionError("Number of classes. Expected: " + (inClasses.size())
-                        + ", got: " + outClasses.size());
-            }
-            for (ModuleEntry out : outClasses) {
-                String path = out.getPath();
-                if (!inClasses.contains(out)) {
-                    throw new AssertionError("Class not found: " + path);
-                }
-                ClassFile cf = ClassFile.read(new ByteArrayInputStream(out.getBytes()));
-                if (path.endsWith("module-info.class")) {
-                    continue;
-                }
-                boolean failed = true;
-                for (Method m : cf.methods) {
-                    if (m.getName(cf.constant_pool).equals(SUFFIX)) {
-                        failed = false;
-                    }
-                }
-                if (failed) {
-                    throw new AssertionError("Not found method with name " + SUFFIX + " in class " + path);
-                }
-            }
-        }
-    }
-
-    private class ReplaceResourcesPlugin extends TestPlugin {
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            for (ModuleEntry res : globalPool.getResourceFiles()) {
-                String path = res.getPath();
-                AsmModulePool modulePool = pools.getModulePool(getModule(path));
-                modulePool.getTransformedResourceFiles().addResourceFile(new ResourceFile(removeModule(path),
-                        "HUI".getBytes()));
-            }
-        }
-
-        @Override
-        public void test(ModulePool in, ModulePool out) throws Exception {
-            Collection<ModuleEntry> inResources = extractResources(in);
-            Collection<ModuleEntry> outResources = extractResources(out);
-            if (inResources.size() != outResources.size()) {
-                throw new AssertionError("Number of resources. Expected: " + inResources.size()
-                        + ", got: " + outResources.size());
-            }
-            for (ModuleEntry r : outResources) {
-                String path = r.getPath();
-                if (!inResources.contains(r)) {
-                    throw new AssertionError("Resource not found: " + path);
-                }
-                String content = new String(r.getBytes());
-                if (!"HUI".equals(content)) {
-                    throw new AssertionError("Content expected: 'HUI', got: " + content);
-                }
-            }
-        }
-    }
-
-    private class ForgetClassesPlugin extends TestPlugin {
-
-        private int expected = 0;
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            WritableClassPool transformedClasses = globalPool.getTransformedClasses();
-            int i = 0;
-            for (ModuleEntry res : globalPool.getClasses()) {
-                String path = removeModule(res.getPath());
-                String className = path.replace(".class", "");
-                if ((i & 1) == 0 && !className.endsWith("module-info")) {
-                    transformedClasses.forgetClass(className);
-                } else {
-                    ++expected;
-                }
-                i ^= 1;
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            Collection<ModuleEntry> outClasses = extractClasses(outResources);
-            if (expected != outClasses.size()) {
-                throw new AssertionError("Number of classes. Expected: " + expected +
-                        ", got: " + outClasses.size());
-            }
-        }
-    }
-
-    private class ForgetResourcesPlugin extends TestPlugin {
-
-        private int expectedAmount = 0;
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            int i = 0;
-            for (ModuleEntry res : globalPool.getResourceFiles()) {
-                String path = res.getPath();
-                if (!path.contains("META-INF/services")) {
-                    if ((i & 1) == 0) {
-                        AsmModulePool modulePool = pools.getModulePool(getModule(path));
-                        modulePool.getTransformedResourceFiles().forgetResourceFile(removeModule(res.getPath()));
-                    } else {
-                        ++expectedAmount;
-                    }
-                    i ^= 1;
-                } else {
-                    ++expectedAmount;
-                }
-            }
-        }
-
-        @Override
-        public void test(ModulePool in, ModulePool out) throws Exception {
-            Collection<ModuleEntry> outResources = extractResources(out);
-            if (expectedAmount != outResources.size()) {
-                throw new AssertionError("Number of classes. Expected: " + expectedAmount
-                        + ", got: " + outResources.size());
-            }
-        }
-    }
-
-    private class AddForgetClassesPlugin extends TestPlugin {
-
-        private int expected = 0;
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            WritableClassPool transformedClasses = globalPool.getTransformedClasses();
-            int i = 0;
-            for (ModuleEntry res : globalPool.getClasses()) {
-                ClassReader reader = globalPool.getClassReader(res);
-                String className = reader.getClassName();
-                ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                if (!className.endsWith("module-info")) {
-                    reader.accept(new RenameClassVisitor(writer), ClassReader.EXPAND_FRAMES);
-                    transformedClasses.addClass(writer);
-                    ++expected;
-                }
-
-                if ((i & 1) == 0 && !className.endsWith("module-info")) {
-                    transformedClasses.forgetClass(className);
-                } else {
-                    ++expected;
-                }
-                i ^= 1;
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            Collection<ModuleEntry> outClasses = extractClasses(outResources);
-            if (expected != outClasses.size()) {
-                throw new AssertionError("Number of classes. Expected: " + expected
-                        + ", got: " + outClasses.size());
-            }
-        }
-    }
-
-    private class AddForgetResourcesPlugin extends TestPlugin {
-
-        private int expectedAmount = 0;
-
-        @Override
-        public void visit() {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            int i = 0;
-            for (ModuleEntry res : globalPool.getResourceFiles()) {
-                String path = res.getPath();
-                String moduleName = getModule(path);
-                if (!path.contains("META-INF")) {
-                    AsmModulePool modulePool = pools.getModulePool(moduleName);
-                    WritableResourcePool transformedResourceFiles = modulePool.getTransformedResourceFiles();
-                    String newPath = removeModule(path) + SUFFIX;
-                    transformedResourceFiles.addResourceFile(new ResourceFile(newPath, res.getBytes()));
-                    if ((i & 1) == 0) {
-                        transformedResourceFiles.forgetResourceFile(newPath);
-                    } else {
-                        ++expectedAmount;
-                    }
-                    i ^= 1;
-                }
-                ++expectedAmount;
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool out) throws Exception {
-            Collection<ModuleEntry> outResources = extractResources(out);
-            if (expectedAmount != outResources.size()) {
-                throw new AssertionError("Number of classes. Expected: " + expectedAmount
-                        + ", got: " + outResources.size());
-            }
-        }
-    }
-
-    private class ComboPlugin extends TestPlugin {
-
-        private class RenameClassVisitor extends ClassVisitor {
-
-            public RenameClassVisitor(ClassWriter cv) {
-                super(Opcodes.ASM5, cv);
-            }
-
-            @Override
-            public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
-                super.visit(version, access, name + SUFFIX, signature, superName, interfaces);
-            }
-        }
-
-        @Override
-        public void visit() {
-            try {
-                renameClasses();
-                renameResources();
-            } catch (IOException ex) {
-                throw new UncheckedIOException(ex);
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            if (!isVisitCalled()) {
-                throw new AssertionError("Resources not visited");
-            }
-            AsmGlobalPool globalPool = getPools().getGlobalPool();
-            if (globalPool.getTransformedClasses().getClasses().size() != getClasses().size()) {
-                throw new AssertionError("Number of transformed classes not equal to expected");
-            }
-            // Check that only renamed classes and resource files are in the result.
-            outResources.entries().forEach(r -> {
-                String resourceName = r.getPath();
-                if (resourceName.endsWith(".class") && !resourceName.endsWith("module-info.class")) {
-                    if (!resourceName.endsWith(SUFFIX + ".class")) {
-                        throw new AssertionError("Class not renamed " + resourceName);
-                    }
-                } else if (resourceName.contains("META-INF/services/") && MODULES.containsKey(r.getModule())) {
-                    String newClassName = new String(r.getBytes());
-                    if(!newClassName.endsWith(SUFFIX)) {
-                        throw new AssertionError("Resource file not renamed " + resourceName);
-                    }
-                }
-            });
-        }
-
-        private void renameResources() throws IOException {
-            AsmPools pools = getPools();
-            // Rename the resource Files
-            for (Map.Entry<String, List<String>> mod : MODULES.entrySet()) {
-                String moduleName = mod.getKey();
-                AsmModulePool modulePool = pools.getModulePool(moduleName);
-                for (ModuleEntry res : modulePool.getResourceFiles()) {
-                    ResourceFile resFile = modulePool.getResourceFile(res);
-                    if (resFile.getPath().startsWith("META-INF/services/")) {
-                        String newContent = new String(resFile.getContent()) + SUFFIX;
-                        ResourceFile newResourceFile = new ResourceFile(resFile.getPath(),
-                                newContent.getBytes());
-                        modulePool.getTransformedResourceFiles().addResourceFile(newResourceFile);
-                    }
-                }
-            }
-        }
-
-        private void renameClasses() throws IOException {
-            AsmPools pools = getPools();
-            AsmGlobalPool globalPool = pools.getGlobalPool();
-            WritableClassPool transformedClasses = globalPool.getTransformedClasses();
-            for (ModuleEntry res : globalPool.getClasses()) {
-                if (res.getPath().endsWith("module-info.class")) {
-                    continue;
-                }
-                ClassReader reader = globalPool.getClassReader(res);
-                ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                RenameClassVisitor visitor = new RenameClassVisitor(writer);
-                reader.accept(visitor, ClassReader.EXPAND_FRAMES);
-
-                transformedClasses.forgetClass(reader.getClassName());
-                transformedClasses.addClass(writer);
-            }
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/AsmPluginTestBase.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-import java.io.IOException;
-import java.net.URI;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-import jdk.tools.jlink.internal.StringTable;
-
-import jdk.tools.jlink.internal.plugins.asm.AsmPlugin;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public abstract class AsmPluginTestBase {
-
-    protected static final String TEST_MODULE = "jlink.test";
-    protected static final Map<String, List<String>> MODULES;
-
-    private static final Predicate<ModuleEntry> isClass = r -> r.getPath().endsWith(".class");
-    private final List<String> classes;
-    private final List<String> resources;
-    private final ModulePool pool;
-
-    static {
-        Map<String, List<String>> map = new HashMap<>();
-        map.put("jdk.localedata", new ArrayList<>());
-        map.put("java.base", new ArrayList<>());
-        map.put(TEST_MODULE, new ArrayList<>());
-        MODULES = Collections.unmodifiableMap(map);
-    }
-
-    public static boolean isImageBuild() {
-        Path javaHome = Paths.get(System.getProperty("test.jdk"));
-        Path jmods = javaHome.resolve("jmods");
-        return Files.exists(jmods);
-    }
-
-    public AsmPluginTestBase() {
-        try {
-            List<String> classes = new ArrayList<>();
-            List<String> resources = new ArrayList<>();
-
-            pool = new ModulePoolImpl();
-
-            FileSystem fs = FileSystems.getFileSystem(URI.create("jrt:/"));
-            Path root = fs.getPath("/modules");
-
-            List<byte[]> moduleInfos = new ArrayList<>();
-            try (Stream<Path> stream = Files.walk(root)) {
-                for (Iterator<Path> iterator = stream.iterator(); iterator.hasNext(); ) {
-                    Path p = iterator.next();
-                    if (Files.isRegularFile(p)) {
-                        String module = p.toString().substring("/modules/".length());
-                        module = module.substring(0, module.indexOf("/"));
-                        if (MODULES.keySet().contains(module)) {
-                            try {
-                                boolean isModuleInfo = p.endsWith("module-info.class");
-                                if (isModuleInfo) {
-                                    moduleInfos.add(Files.readAllBytes(p));
-                                }
-                                byte[] content = Files.readAllBytes(p);
-                                if (p.toString().endsWith(".class") && !isModuleInfo) {
-                                    classes.add(toClassName(p));
-                                } else if (!isModuleInfo) {
-                                    MODULES.get(module).add(toResourceFile(p));
-                                }
-                                resources.add(toPath(p.toString()));
-                                ModuleEntry res = ModuleEntry.create(toPath(p.toString()), content);
-                                pool.add(res);
-                            } catch (Exception ex) {
-                                throw new RuntimeException(ex);
-                            }
-                        }
-                    }
-                }
-            }
-            // There is more than 10 classes in java.base...
-            if (classes.size() < 10 || pool.getEntryCount() < 10) {
-                throw new AssertionError("Not expected resource or class number");
-            }
-
-            //Add a fake resource file
-            String content = "java.lang.Object";
-            String path = "META-INF/services/com.foo.BarProvider";
-            ModuleEntry resFile = ModuleEntry.create("/" + TEST_MODULE + "/" +
-                    path, content.getBytes());
-            pool.add(resFile);
-            ModuleEntry fakeInfoFile = ModuleEntry.create("/" + TEST_MODULE
-                    + "/module-info.class", moduleInfos.get(0));
-            pool.add(fakeInfoFile);
-            MODULES.get(TEST_MODULE).add(path);
-            for(Map.Entry<String, List<String>> entry : MODULES.entrySet()) {
-                if (entry.getValue().isEmpty()) {
-                    throw new AssertionError("No resource file for " + entry.getKey());
-                }
-            }
-            this.classes = Collections.unmodifiableList(classes);
-            this.resources = Collections.unmodifiableList(resources);
-        } catch (Exception e) {
-            throw new ExceptionInInitializerError(e);
-        }
-    }
-
-    public List<String> getClasses() {
-        return classes;
-    }
-
-    public List<String> getResources() {
-        return resources;
-    }
-
-    public ModulePool getPool() {
-        return pool;
-    }
-
-    public abstract void test() throws Exception;
-
-    public Collection<ModuleEntry> extractClasses(ModulePool pool) {
-        return pool.entries()
-                .filter(isClass)
-                .collect(Collectors.toSet());
-    }
-
-    public Collection<ModuleEntry> extractResources(ModulePool pool) {
-        return pool.entries()
-                .filter(isClass.negate())
-                .collect(Collectors.toSet());
-    }
-
-    public String getModule(String path) {
-        int index = path.indexOf("/", 1);
-        return path.substring(1, index);
-    }
-
-    public String removeModule(String path) {
-        int index = path.indexOf("/", 1);
-        return path.substring(index + 1);
-    }
-
-    private String toPath(String p) {
-        return p.substring("/modules".length());
-    }
-
-    private String toClassName(Path p) {
-        String path = p.toString();
-        path = path.substring("/modules/".length());
-        // remove module
-        if (!path.endsWith("module-info.class")) {
-            path = path.substring(path.indexOf("/") + 1);
-        }
-        path = path.substring(0, path.length() - ".class".length());
-
-        return path;
-    }
-
-    private String toResourceFile(Path p) {
-        String path = p.toString();
-        path = path.substring("/modules/".length());
-        // remove module
-        path = path.substring(path.indexOf("/") + 1);
-
-        return path;
-    }
-
-    public abstract class TestPlugin extends AsmPlugin {
-
-        private AsmPools pools;
-
-        public AsmPools getPools() {
-            return pools;
-        }
-
-        public boolean isVisitCalled() {
-            return pools != null;
-        }
-
-        public ModulePool visit(ModulePool inResources) throws IOException {
-            try {
-                ModulePool outResources = new ModulePoolImpl(inResources.getByteOrder(), new StringTable() {
-                    @Override
-                    public int addString(String str) {
-                        return -1;
-                    }
-
-                    @Override
-                    public String getString(int id) {
-                        return null;
-                    }
-                });
-                visit(inResources, outResources);
-                return outResources;
-            } catch (Exception e) {
-                throw new IOException(e);
-            }
-        }
-
-        @Override
-        public void visit(AsmPools pools) {
-            if (isVisitCalled()) {
-                throw new AssertionError("Visit was called twice");
-            }
-            this.pools = pools;
-            visit();
-        }
-
-        public abstract void visit();
-        public abstract void test(ModulePool inResources, ModulePool outResources) throws Exception;
-
-        @Override
-        public String getName() {
-            return "test-plugin";
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/BasicTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test basic functionality.
- * @author Jean-Francois Denise
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @build AsmPluginTestBase
- * @run main BasicTest
- */
-
-import java.io.IOException;
-import java.io.UncheckedIOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class BasicTest extends AsmPluginTestBase {
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new BasicTest().test();
-    }
-
-    @Override
-    public void test() throws Exception {
-        BasicPlugin basicPlugin = new BasicPlugin(getClasses());
-        ModulePool res = basicPlugin.visit(getPool());
-        basicPlugin.test(getPool(), res);
-    }
-
-    private class BasicPlugin extends TestPlugin {
-
-        private final List<String> classes;
-
-        public BasicPlugin(List<String> classes) {
-            this.classes = classes;
-        }
-
-        @Override
-        public void visit() {
-            for (String m : MODULES.keySet()) {
-                AsmModulePool pool = getPools().getModulePool(m);
-                if (pool == null) {
-                    throw new AssertionError(m + " pool not found");
-                }
-                if(!pool.getModuleName().equals(m)) {
-                    throw new AssertionError("Invalid module name " +
-                            pool.getModuleName() + " should be "+ m);
-                }
-                if (pool.getClasses().size() == 0 && !m.equals(TEST_MODULE)) {
-                    throw new AssertionError("Empty pool " + m);
-                }
-                pool.addPackage("toto");
-                if (!pool.getTransformedClasses().getClasses().isEmpty()) {
-                    throw new AssertionError("Should be empty");
-                }
-                for(String res : MODULES.get(m)) {
-                    AsmPool.ResourceFile resFile = pool.getResourceFile(res);
-                    if(resFile == null) {
-                        throw new AssertionError("No resource file for " + res);
-                    }
-                }
-            }
-            try {
-                testPools();
-                testVisitor();
-            } catch (IOException ex) {
-                throw new UncheckedIOException(ex);
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            if (!isVisitCalled()) {
-                throw new AssertionError("Resources not visited");
-            }
-            if (inResources.getEntryCount() != outResources.getEntryCount()) {
-                throw new AssertionError("Input size " + inResources.getEntryCount() +
-                        " != to " + outResources.getEntryCount());
-            }
-        }
-
-        private void testVisitor() throws IOException {
-            List<String> seen = new ArrayList<>();
-            getPools().getGlobalPool().visitClassReaders((reader) -> {
-                String className = reader.getClassName();
-                // Wrong naming of module-info.class in ASM
-                if (className.endsWith("module-info")) {
-                    return null;
-                }
-                if (!classes.contains(className)) {
-                    throw new AssertionError("Class is not expected " + className);
-                }
-                if (getPools().getGlobalPool().getClassReader(className) == null) {
-                    throw new AssertionError("Class not found in pool " + className);
-                }
-                seen.add(className);
-                return null;
-            });
-
-            if (!seen.equals(classes)) {
-                throw new AssertionError("Expected and seen are not equal");
-            }
-        }
-
-        private void testPools() throws IOException {
-            Set<String> remain = new HashSet<>(classes);
-            for (ModuleEntry res : getPools().getGlobalPool().getClasses()) {
-                ClassReader reader = getPools().getGlobalPool().getClassReader(res);
-                String className = reader.getClassName();
-                // Wrong naming of module-info.class in ASM
-                if (className.endsWith("module-info")) {
-                    continue;
-                }
-                if (!classes.contains(className)) {
-                    throw new AssertionError("Class is not expected " + className);
-                }
-                if (getPools().getGlobalPool().getClassReader(className) == null) {
-                    throw new AssertionError("Class " + className + " not found in pool ");
-                }
-                // Check the module pool
-                boolean found = false;
-                for(AsmModulePool mp : getPools().getModulePools()) {
-                    if(mp.getClassReader(className) != null) {
-                        found = true;
-                        break;
-                    }
-                }
-                if(!found) {
-                    throw new AssertionError("No modular pool for " +
-                            className);
-                }
-                remain.remove(className);
-            }
-            if (!remain.isEmpty()) {
-                throw new AssertionError("Remaining classes " + remain);
-            }
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/IdentityPluginTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test basic functionality.
- * @author Jean-Francois Denise
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @build AsmPluginTestBase
- * @run main IdentityPluginTest
- */
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.UncheckedIOException;
-
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.WritableClassPool;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class IdentityPluginTest extends AsmPluginTestBase {
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new IdentityPluginTest().test();
-    }
-
-    public void test() throws Exception {
-        IdentityPlugin asm = new IdentityPlugin();
-        ModulePool resourcePool = asm.visit(getPool());
-        asm.test(getPool(), resourcePool);
-    }
-
-    private class IdentityPlugin extends TestPlugin {
-
-        @Override
-        public void visit() {
-            for (ModuleEntry res : getPools().getGlobalPool().getClasses()) {
-                if (res.getPath().endsWith("module-info.class")) {
-                    continue;
-                }
-                ClassReader reader = getPools().getGlobalPool().getClassReader(res);
-                ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                IdentityClassVisitor visitor = new IdentityClassVisitor(writer);
-                reader.accept(visitor, ClassReader.EXPAND_FRAMES);
-                getPools().getGlobalPool().getTransformedClasses().addClass(writer);
-            }
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws IOException {
-            if (outResources.isEmpty()) {
-                throw new AssertionError("Empty result");
-            }
-            if (!isVisitCalled()) {
-                throw new AssertionError("Resources not visited");
-            }
-            WritableClassPool transformedClasses = getPools().getGlobalPool().getTransformedClasses();
-            if (transformedClasses.getClasses().size() != getClasses().size()) {
-                throw new AssertionError("Number of transformed classes not equal to expected");
-            }
-            for (String className : getClasses()) {
-                if (transformedClasses.getClassReader(className) == null) {
-                    throw new AssertionError("Class not transformed " + className);
-                }
-            }
-            outResources.entries().forEach(r -> {
-                if (r.getPath().endsWith(".class") && !r.getPath().endsWith("module-info.class")) {
-                    try {
-                        ClassReader reader = new ClassReader(new ByteArrayInputStream(r.getBytes()));
-                        ClassWriter w = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                        reader.accept(w, ClassReader.EXPAND_FRAMES);
-                    } catch (IOException exp) {
-                        throw new UncheckedIOException(exp);
-                    }
-                }
-            });
-        }
-
-        @Override
-        public String getName() {
-            return "identity-plugin";
-        }
-    }
-
-    private static class IdentityClassVisitor extends ClassVisitor {
-        public IdentityClassVisitor(ClassWriter cv) {
-            super(Opcodes.ASM5, cv);
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/NegativeTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test basic functionality.
- * @author Andrei Eremeev
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @build AsmPluginTestBase
- * @run main NegativeTest
- */
-
-import java.io.IOException;
-import java.io.UncheckedIOException;
-import java.nio.ByteOrder;
-import java.util.Map;
-import java.util.Set;
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.tools.jlink.plugin.Plugin;
-import jdk.tools.jlink.internal.ModulePoolImpl;
-import jdk.tools.jlink.internal.StringTable;
-import jdk.tools.jlink.internal.plugins.asm.AsmGlobalPool;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPlugin;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ResourceFile;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.plugin.PluginException;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class NegativeTest extends AsmPluginTestBase {
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new NegativeTest().test();
-    }
-
-    @Override
-    public void test() throws Exception {
-        testNull();
-        testUnknownPackage();
-    }
-
-    private void testUnknownPackage() throws Exception {
-        AsmPlugin t = new AsmPlugin() {
-            @Override
-            public void visit(AsmPools pools) {
-                try {
-                    AsmGlobalPool globalPool = pools.getGlobalPool();
-                    AsmModulePool javabase = pools.getModulePool("java.base");
-                    ClassReader cr = new ClassReader(NegativeTest.class.getResourceAsStream("NegativeTest.class"));
-                    ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_FRAMES);
-                    cr.accept(new RenameClassVisitor(cw), ClassReader.EXPAND_FRAMES);
-                    action(() -> globalPool.getTransformedClasses().addClass(cw),
-                            "Unknown package", PluginException.class);
-                    action(() -> javabase.getTransformedClasses().addClass(cw),
-                            "Unknown package", PluginException.class);
-
-                    ResourceFile newResFile = new ResourceFile("java/aaa/file", new byte[0]);
-                    action(() -> globalPool.getTransformedResourceFiles().addResourceFile(newResFile),
-                            "Unknown package", PluginException.class);
-                    action(() -> javabase.getTransformedResourceFiles().addResourceFile(newResFile),
-                            "Unknown package", PluginException.class);
-
-                    action(() -> globalPool.getTransformedClasses().forgetClass("java/aaa/file"),
-                            "Unknown package", PluginException.class);
-                    action(() -> javabase.getTransformedClasses().forgetClass("java/aaa/file"),
-                            "Unknown package", PluginException.class);
-                    action(() -> globalPool.getTransformedResourceFiles().forgetResourceFile("java/aaa/file"),
-                            "Unknown package", PluginException.class);
-                    action(() -> javabase.getTransformedResourceFiles().forgetResourceFile("java/aaa/file"),
-                            "Unknown package", PluginException.class);
-                } catch (IOException ex) {
-                   throw new UncheckedIOException(ex);
-                }
-            }
-        };
-        ModulePool resources = new ModulePoolImpl(ByteOrder.BIG_ENDIAN, new StringTable() {
-            @Override
-            public int addString(String str) {
-                return -1;
-            }
-
-            @Override
-            public String getString(int id) {
-                throw new UnsupportedOperationException("Not supported yet.");
-            }
-        });
-        t.visit(getPool(), resources);
-    }
-
-    private static class RenameClassVisitor extends ClassVisitor {
-
-        public RenameClassVisitor(ClassWriter cv) {
-            super(Opcodes.ASM5, cv);
-        }
-
-        @Override
-        public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
-            super.visit(version, access, "RENAMED", signature, superName, interfaces);
-        }
-    }
-
-    private void testNull() throws Exception {
-        AsmPlugin t = new AsmPlugin() {
-            @Override
-            public void visit(AsmPools pools) {
-                action(() -> pools.getModulePool(null), "Module name is null", NullPointerException.class);
-                action(() -> pools.fillOutputResources(null), "Output resource is null", NullPointerException.class);
-            }
-        };
-        ModulePool resources = new ModulePoolImpl(ByteOrder.BIG_ENDIAN, new StringTable() {
-            @Override
-            public int addString(String str) {
-                return -1;
-            }
-
-            @Override
-            public String getString(int id) {
-                throw new UnsupportedOperationException("Not supported yet.");
-            }
-        });
-        action(() -> t.visit(null, resources), "Input resource is null", NullPointerException.class);
-        action(() -> t.visit(resources, null), "Output resource is null", NullPointerException.class);
-        t.visit(resources, resources);
-    }
-
-    private void action(Action action, String message, Class<? extends Exception> expected) {
-        try {
-            System.err.println("Testing: " + message);
-            action.call();
-            throw new AssertionError(message + ": should have failed");
-        } catch (Exception e) {
-            if (!expected.isInstance(e)) {
-                throw new RuntimeException(e);
-            } else {
-                System.err.println("Got exception as expected: " + e);
-            }
-        }
-    }
-
-    private interface Action {
-        void call() throws Exception;
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/PackageMappingTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test plugins
- * @author Andrei Eremeev
- * @modules jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @run main PackageMappingTest
- */
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import jdk.tools.jlink.internal.plugins.asm.AsmGlobalPool;
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ResourceFile;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.WritableResourcePool;
-import jdk.tools.jlink.plugin.PluginException;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class PackageMappingTest extends AsmPluginTestBase {
-
-    private final List<String> newFiles = Arrays.asList(
-            "/java.base/a1/bbb/c",
-            "/" + TEST_MODULE + "/a2/bbb/d"
-    );
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new PackageMappingTest().test();
-    }
-
-    public void test() throws Exception {
-        TestPlugin[] plugins = new TestPlugin[]{
-            new PackageMappingPlugin(newFiles, false),
-            new PackageMappingPlugin(newFiles, true)
-        };
-        for (TestPlugin p : plugins) {
-            ModulePool pool = p.visit(getPool());
-            p.test(getPool(), pool);
-        }
-    }
-
-    public class PackageMappingPlugin extends TestPlugin {
-
-        private final Map<String, List<ResourceFile>> newFiles;
-        private final boolean testGlobal;
-
-        private String getModuleName(String res) {
-            return res.substring(1, res.indexOf("/", 1));
-        }
-
-        private PackageMappingPlugin(List<String> files, boolean testGlobal) {
-            this.newFiles = new HashMap<>();
-            this.testGlobal = testGlobal;
-            for (String file : files) {
-                String moduleName = getModuleName(file);
-                String path = file.substring(1 + moduleName.length() + 1);
-                newFiles.computeIfAbsent(moduleName, $ -> new ArrayList<>()).add(
-                        new ResourceFile(path, new byte[0]));
-            }
-        }
-
-        @Override
-        public void visit() {
-            testMapToUnknownModule();
-            testMapPackageTwice();
-            testPackageMapping();
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) {
-            Set<String> in = getPools().getGlobalPool().getResourceFiles().stream()
-                    .map(ModuleEntry::getPath)
-                    .collect(Collectors.toSet());
-            Set<String> out = extractResources(outResources).stream()
-                    .map(ModuleEntry::getPath)
-                    .collect(Collectors.toSet());
-            in.addAll(PackageMappingTest.this.newFiles);
-            if (!Objects.equals(in, out)) {
-                throw new AssertionError("Expected: " + in + ", got: " + outResources);
-            }
-        }
-
-        private void testPackageMapping() {
-            AsmGlobalPool globalPool = getPools().getGlobalPool();
-            try {
-                Map<String, Set<String>> mappedPackages = new HashMap<>();
-                Function<String, Set<String>> produceSet = $ -> new HashSet<>();
-                for (Map.Entry<String, List<ResourceFile>> entry : newFiles.entrySet()) {
-                    String moduleName = entry.getKey();
-                    Set<String> module = mappedPackages.computeIfAbsent(moduleName, produceSet);
-                    AsmModulePool modulePool = getPools().getModulePool(moduleName);
-                    for (ResourceFile r : entry.getValue()) {
-                        String name = r.getPath();
-                        String packageName = name.substring(0, name.lastIndexOf('/'));
-                        if (module.add(packageName)) {
-                            globalPool.addPackageModuleMapping(packageName, moduleName);
-                        }
-                        WritableResourcePool transformedResourceFiles = testGlobal
-                                ? globalPool.getTransformedResourceFiles()
-                                : modulePool.getTransformedResourceFiles();
-                        transformedResourceFiles.addResourceFile(r);
-                    }
-                    try {
-                        modulePool.getTransformedResourceFiles().addResourceFile(
-                                new ResourceFile("a3/bbb", new byte[0]));
-                        throw new AssertionError("Exception expected");
-                    } catch (Exception ex) {
-                        // expected
-                    }
-                }
-                try {
-                    globalPool.getTransformedResourceFiles().addResourceFile(
-                            new ResourceFile("a3/bbb", new byte[0]));
-                    throw new AssertionError("Exception expected");
-                } catch (Exception ex) {
-                    // expected
-                }
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-
-        private void testMapPackageTwice() {
-            try {
-                AsmGlobalPool globalPool = getPools().getGlobalPool();
-                globalPool.addPackageModuleMapping("a/p1", TEST_MODULE);
-                globalPool.addPackageModuleMapping("a/p1", TEST_MODULE);
-                throw new AssertionError("Exception expected after mapping a package twice to the same module");
-            } catch (Exception e) {
-                if (e instanceof PluginException) {
-                    // expected
-                    String message = e.getMessage();
-                    if (!(TEST_MODULE + " module already contains package a.p1").equals(message)) {
-                        throw new AssertionError(e);
-                    }
-                } else {
-                    throw new AssertionError(e);
-                }
-            }
-        }
-
-        private void testMapToUnknownModule() {
-            AsmModulePool unknownModule = getPools().getModulePool("UNKNOWN");
-            if (unknownModule != null) {
-                throw new AssertionError("getModulePool returned not null value: " + unknownModule.getModuleName());
-            }
-            try {
-                AsmGlobalPool globalPool = getPools().getGlobalPool();
-                globalPool.addPackageModuleMapping("a/b", "UNKNOWN");
-                throw new AssertionError("Exception expected after mapping a package to unknown module");
-            } catch (Exception e) {
-                String message = e.getMessage();
-                if (message == null || !message.startsWith("Unknown module UNKNOWN")) {
-                    throw new AssertionError(e);
-                }
-            }
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/SortingTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test resource sorting.
- * @author Jean-Francois Denise
- * @modules jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @build AsmPluginTestBase
- * @run main SortingTest
- */
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-import jdk.tools.jlink.internal.plugins.asm.AsmModulePool;
-import jdk.tools.jlink.plugin.PluginException;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class SortingTest extends AsmPluginTestBase {
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new SortingTest().test();
-    }
-
-    @Override
-    public void test() {
-        try {
-            classSorting();
-            moduleSorting();
-        } catch (Exception ex) {
-            throw new PluginException(ex);
-        }
-    }
-
-    private void classSorting() throws Exception {
-        List<String> sorted = new ArrayList<>(getResources());
-        sorted.sort(null);
-        ClassSorterPlugin sorterPlugin = new ClassSorterPlugin(sorted);
-        ModulePool resourcePool = sorterPlugin.visit(getPool());
-        sorterPlugin.test(getPool(), resourcePool);
-    }
-
-    private String getModuleName(String p) {
-        return p.substring(1, p.indexOf('/', 1));
-    }
-
-    private void moduleSorting() throws Exception {
-        List<String> sorted = new ArrayList<>(getResources());
-        sorted.sort((s1, s2) -> -getModuleName(s1).compareTo(getModuleName(s2)));
-        ModuleSorterPlugin sorterPlugin = new ModuleSorterPlugin();
-        ModulePool resourcePool = sorterPlugin.visit(getPool());
-        sorterPlugin.test(getPool(), resourcePool);
-    }
-
-    private class ModuleSorterPlugin extends TestPlugin {
-
-        @Override
-        public void visit() {
-            for (AsmModulePool modulePool : getPools().getModulePools()) {
-                modulePool.setSorter(resources -> {
-                    List<String> sort = resources.entries()
-                            .map(ModuleEntry::getPath)
-                            .collect(Collectors.toList());
-                    sort.sort(null);
-                    return sort;
-                });
-            }
-            getPools().setModuleSorter(modules -> {
-                modules.sort((s1, s2) -> -s1.compareTo(s2));
-                return modules;
-            });
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            if (!isVisitCalled()) {
-                throw new AssertionError("Resources not visited");
-            }
-            List<String> sortedResourcePaths = outResources.entries()
-                    .map(ModuleEntry::getPath)
-                    .collect(Collectors.toList());
-
-            List<String> defaultResourceOrder = new ArrayList<>();
-            inResources.entries().forEach(r -> {
-                if (!inResources.contains(r)) {
-                    throw new AssertionError("Resource " + r.getPath() + " not in result pool");
-                }
-                defaultResourceOrder.add(r.getPath());
-            });
-            // Check that default sorting is not equal to sorted one
-            if (defaultResourceOrder.equals(sortedResourcePaths)) {
-                throw new AssertionError("Sorting not applied, default ordering");
-            }
-            // Check module order.
-            for (int i = 0; i < sortedResourcePaths.size() - 1; ++i) {
-                String first = sortedResourcePaths.get(i);
-                String p1 = getModuleName(first);
-                String second = sortedResourcePaths.get(i + 1);
-                String p2 = getModuleName(second);
-                if (p1.compareTo(p2) < 0 || p1.compareTo(p2) == 0 &&
-                        removeModule(first).compareTo(removeModule(second)) >= 0) {
-                    throw new AssertionError("Modules are not sorted properly: resources: " + first + " " + second);
-                }
-            }
-        }
-    }
-
-    private class ClassSorterPlugin extends TestPlugin {
-
-        private final List<String> expectedClassesOrder;
-
-        private ClassSorterPlugin(List<String> expectedClassesOrder) {
-            this.expectedClassesOrder = expectedClassesOrder;
-        }
-
-        @Override
-        public void visit() {
-            getPools().getGlobalPool().setSorter(
-                    (resources) -> expectedClassesOrder.stream()
-                            .map(resources::findEntry)
-                            .map(Optional::get)
-                            .map(ModuleEntry::getPath)
-                            .collect(Collectors.toList()));
-        }
-
-        @Override
-        public void test(ModulePool inResources, ModulePool outResources) throws Exception {
-            if (!isVisitCalled()) {
-                throw new AssertionError("Resources not visited");
-            }
-            List<String> sortedResourcePaths = outResources.entries()
-                    .map(ModuleEntry::getPath)
-                    .collect(Collectors.toList());
-
-            List<String> defaultResourceOrder = new ArrayList<>();
-            getPool().entries().forEach(r -> {
-                if (!getPool().contains(r)) {
-                    throw new AssertionError("Resource " + r.getPath() + " not in result pool");
-                }
-                defaultResourceOrder.add(r.getPath());
-            });
-            // Check that default sorting is not equal to sorted one
-            if (defaultResourceOrder.equals(sortedResourcePaths)) {
-                throw new AssertionError("Sorting not applied, default ordering");
-            }
-            // Check that sorted is equal to result.
-            if (!expectedClassesOrder.equals(sortedResourcePaths)) {
-                throw new AssertionError("Sorting not properly applied");
-            }
-        }
-    }
-}
--- a/jdk/test/tools/jlink/asmplugin/VisitorTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +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.
- */
-
-/*
- * Asm plugin testing.
- * @test
- * @summary Test visitors.
- * @author Andrei Eremeev
- * @modules java.base/jdk.internal.org.objectweb.asm
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jlink.internal.plugins.asm
- * @build AsmPluginTestBase
- * @run main VisitorTest
- */
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.function.Function;
-
-import jdk.internal.org.objectweb.asm.ClassReader;
-import jdk.internal.org.objectweb.asm.ClassVisitor;
-import jdk.internal.org.objectweb.asm.ClassWriter;
-import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ClassReaderVisitor;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ResourceFile;
-import jdk.tools.jlink.internal.plugins.asm.AsmPool.ResourceFileVisitor;
-import jdk.tools.jlink.internal.plugins.asm.AsmPools;
-import jdk.tools.jlink.plugin.ModuleEntry;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class VisitorTest extends AsmPluginTestBase {
-
-    public static void main(String[] args) throws Exception {
-        if (!isImageBuild()) {
-            System.err.println("Test not run. Not image build.");
-            return;
-        }
-        new VisitorTest().test();
-    }
-
-    @Override
-    public void test() throws Exception {
-        TestPlugin[] plugins = new TestPlugin[] {
-                new ClassVisitorPlugin("Class-global-pool", AsmPools::getGlobalPool),
-                new ClassVisitorPlugin("Class-module-pool", pools -> pools.getModulePool("java.base")),
-                new ResourceVisitorPlugin("Resource-global-pool", AsmPools::getGlobalPool),
-                new ResourceVisitorPlugin("Resource-module-pool", pools -> pools.getModulePool("java.base"))
-        };
-        for (TestPlugin p : plugins) {
-            System.err.println("Testing: " + p.getName());
-            ModulePool out = p.visit(getPool());
-            p.test(getPool(), out);
-        }
-    }
-
-    private static class CustomClassReaderVisitor implements ClassReaderVisitor {
-        private int amount = 0;
-        private int changed = 0;
-
-        @Override
-        public ClassWriter visit(ClassReader reader) {
-            if ((amount++ % 2) == 0) {
-                String className = reader.getClassName();
-                if (className.endsWith("module-info")) {
-                    return null;
-                }
-                ClassWriter cw = new ClassWriter(reader, ClassWriter.COMPUTE_FRAMES);
-                reader.accept(new ClassVisitor(Opcodes.ASM5, cw) {
-                    @Override
-                    public void visit(int i, int i1, String s, String s1, String s2, String[] strings) {
-                        super.visit(i, i1, s + "Changed", s1, s2, strings);
-                    }
-                }, ClassReader.EXPAND_FRAMES);
-                ++changed;
-                return cw;
-            } else {
-                return null;
-            }
-        }
-
-        public int getAmount() {
-            return amount;
-        }
-
-        public int getNumberOfChanged() {
-            return changed;
-        }
-    }
-
-    private static class CustomResourceFileVisitor implements ResourceFileVisitor {
-        private int amount = 0;
-        private int changed = 0;
-
-        @Override
-        public ResourceFile visit(ResourceFile resourceFile) {
-            if ((amount++ % 2) == 0) {
-                ++changed;
-                return new ResourceFile(resourceFile.getPath() + "Changed", resourceFile.getContent());
-            } else {
-                return null;
-            }
-        }
-
-        public int getAmount() {
-            return amount;
-        }
-
-        public int getNumberOfChanged() {
-            return changed;
-        }
-    }
-
-    public class ClassVisitorPlugin extends TestPlugin {
-
-        private final String name;
-        private final Function<AsmPools, AsmPool> getPool;
-        private final CustomClassReaderVisitor classReaderVisitor = new CustomClassReaderVisitor();
-
-        public ClassVisitorPlugin(String name, Function<AsmPools, AsmPool> getPool) {
-            this.name = name;
-            this.getPool = getPool;
-        }
-
-        @Override
-        public void visit() {
-            AsmPool pool = getPool.apply(getPools());
-            pool.visitClassReaders(classReaderVisitor);
-        }
-
-        @Override
-        public void test(ModulePool in, ModulePool out) throws Exception {
-            Collection<ModuleEntry> inClasses = getPool.apply(getPools()).getClasses();
-            if (inClasses.size() != classReaderVisitor.getAmount()) {
-                throw new AssertionError("Testing " + name + ". Number of visited classes. Expected: " +
-                        inClasses.size() + ", got: " + classReaderVisitor.getAmount());
-            }
-            Collection<ModuleEntry> outClasses = extractClasses(out);
-            int changedClasses = 0;
-            for (ModuleEntry r : outClasses) {
-                if (r.getPath().endsWith("Changed.class")) {
-                    ++changedClasses;
-                }
-            }
-            if (changedClasses != classReaderVisitor.getNumberOfChanged()) {
-                throw new AssertionError("Testing " + name + ". Changed classes. Expected: " + changedClasses +
-                        ", got: " + classReaderVisitor.getNumberOfChanged());
-            }
-        }
-
-        @Override
-        public String getName() {
-            return name;
-        }
-    }
-
-    public class ResourceVisitorPlugin extends TestPlugin {
-
-        private final String name;
-        private final Function<AsmPools, AsmPool> getPool;
-        private final CustomResourceFileVisitor resourceFileVisitor = new CustomResourceFileVisitor();
-
-        public ResourceVisitorPlugin(String name, Function<AsmPools, AsmPool> getPool) {
-            this.name = name;
-            this.getPool = getPool;
-        }
-
-        @Override
-        public void visit() {
-            AsmPool pool = getPool.apply(getPools());
-            pool.visitResourceFiles(resourceFileVisitor);
-        }
-
-        @Override
-        public void test(ModulePool in, ModulePool out) throws Exception {
-            Collection<ModuleEntry> inResources = getPool.apply(getPools()).getResourceFiles();
-            if (inResources.size() != resourceFileVisitor.getAmount()) {
-                throw new AssertionError("Testing " + name + ". Number of visited resources. Expected: " +
-                        inResources.size() + ", got: " + resourceFileVisitor.getAmount());
-            }
-            Collection<ModuleEntry> outResources = extractResources(out);
-            int changedClasses = 0;
-            for (ModuleEntry r : outResources) {
-                if (r.getPath().endsWith("Changed")) {
-                    ++changedClasses;
-                }
-            }
-            if (changedClasses != resourceFileVisitor.getNumberOfChanged()) {
-                throw new AssertionError("Testing " + name + ". Changed classes. Expected: " + changedClasses +
-                        ", got: " + resourceFileVisitor.getNumberOfChanged());
-            }
-        }
-
-        @Override
-        public String getName() {
-            return name;
-        }
-    }
-}
--- a/jdk/test/tools/jlink/plugins/PluginOrderTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +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
- * @summary Test order of plugins
- * @author Jean-Francois Denise
- * @library ../../lib
- * @modules java.base/jdk.internal.jimage
- *          jdk.jdeps/com.sun.tools.classfile
- *          jdk.jlink/jdk.tools.jlink.internal
- *          jdk.jlink/jdk.tools.jmod
- *          jdk.jlink/jdk.tools.jimage
- *          jdk.compiler
- * @build tests.*
- * @run main/othervm PluginOrderTest
- */
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import jdk.tools.jlink.internal.PluginOrderingGraph;
-import jdk.tools.jlink.plugin.Plugin;
-import jdk.tools.jlink.plugin.Plugin.Category;
-import jdk.tools.jlink.plugin.ModulePool;
-
-public class PluginOrderTest {
-
-    public static void main(String[] args) throws Exception {
-
-        validGraph0();
-        validGraph1();
-
-        boolean failed = false;
-
-        try {
-            withCycles0();
-            failed = true;
-        } catch (Exception ex) {
-            //ok
-            System.err.println(ex.getMessage());
-        }
-        if (failed) {
-            throw new Exception("Should have failed");
-        }
-
-        try {
-            withCycles1();
-            failed = true;
-        } catch (Exception ex) {
-            //ok
-            System.err.println(ex.getMessage());
-        }
-        if (failed) {
-            throw new Exception("Should have failed");
-        }
-
-        try {
-            withCycles2();
-            failed = true;
-        } catch (Exception ex) {
-            //ok
-            System.err.println(ex.getMessage());
-        }
-        if (failed) {
-            throw new Exception("Should have failed");
-        }
-    }
-
-    private static void validGraph0() throws Exception {
-        Set<String> set = new HashSet<>();
-        set.add("plug2");
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.add(new Plug("plug2", Collections.emptySet(), Collections.emptySet(),
-                Category.TRANSFORMER));
-        plugins.add(new Plug("plug1", set, Collections.emptySet(), Category.TRANSFORMER));
-        List<Plugin> ordered = PluginOrderingGraph.sort(plugins);
-        if (ordered.get(0) != plugins.get(1) || ordered.get(1) != plugins.get(0)) {
-            throw new Exception("Invalid sorting");
-        }
-    }
-
-    private static void validGraph1() {
-        Set<String> lst1 = new HashSet<>();
-        lst1.add("plug2");
-        lst1.add("plug3");
-        Plugin p1 = new Plug("plug1", lst1, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p2 = new Plug("plug2", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst3 = new HashSet<>();
-        lst3.add("plug4");
-        lst3.add("plug6");
-        Plugin p3 = new Plug("plug3", lst3, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p4 = new Plug("plug4", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst5 = new HashSet<>();
-        lst5.add("plug3");
-        lst5.add("plug1");
-        lst5.add("plug2");
-        lst5.add("plug6");
-        Plugin p5 = new Plug("plug5", lst5, Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst6 = new HashSet<>();
-        lst6.add("plug4");
-        lst6.add("plug2");
-        Plugin p6 = new Plug("plug6", lst6, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p7 = new Plug("plug7", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p8 = new Plug("plug8", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.add(p1);
-        plugins.add(p2);
-        plugins.add(p3);
-        plugins.add(p4);
-        plugins.add(p5);
-        plugins.add(p6);
-        plugins.add(p7);
-        plugins.add(p8);
-
-        PluginOrderingGraph.sort(plugins);
-    }
-
-    private static void withCycles0() throws Exception {
-        Set<String> set2 = new HashSet<>();
-        set2.add("plug1");
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.add(new Plug("plug2", set2, Collections.emptySet(),
-                Category.TRANSFORMER));
-
-        Set<String> set1 = new HashSet<>();
-        set1.add("plug2");
-        plugins.add(new Plug("plug1", set1, Collections.emptySet(), Category.TRANSFORMER));
-        PluginOrderingGraph.sort(plugins);
-
-    }
-
-    private static void withCycles2() {
-        Set<String> lst1 = new HashSet<>();
-        lst1.add("plug2");
-        lst1.add("plug3");
-        Plugin p1 = new Plug("plug1", lst1, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p2 = new Plug("plug2", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst3 = new HashSet<>();
-        lst3.add("plug4");
-        lst3.add("plug6");
-        Plugin p3 = new Plug("plug3", lst3, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p4 = new Plug("plug4", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst5 = new HashSet<>();
-        lst5.add("plug3");
-        lst5.add("plug1");
-        lst5.add("plug2");
-        Plugin p5 = new Plug("plug5", lst5, Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst6 = new HashSet<>();
-        lst6.add("plug4");
-        lst6.add("plug1");
-        Plugin p6 = new Plug("plug6", lst6, Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p7 = new Plug("plug7", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Plugin p8 = new Plug("plug8", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.add(p1);
-        plugins.add(p2);
-        plugins.add(p3);
-        plugins.add(p4);
-        plugins.add(p5);
-        plugins.add(p6);
-        plugins.add(p7);
-        plugins.add(p8);
-        PluginOrderingGraph.sort(plugins);
-    }
-
-    private static void withCycles1() {
-        Set<String> lst1 = new HashSet<>();
-        lst1.add("plug2");
-        lst1.add("plug3");
-        Plugin p = new Plug("plug1", lst1, Collections.emptySet(), Category.TRANSFORMER);
-        Plugin p2 = new Plug("plug2", Collections.emptySet(), Collections.emptySet(), Category.TRANSFORMER);
-
-        Set<String> lst3 = new HashSet<>();
-        lst3.add("plug2");
-
-        Set<String> lst4 = new HashSet<>();
-        lst4.add("plug1");
-
-        Plugin p3 = new Plug("plug3", lst4, lst3, Category.TRANSFORMER);
-        List<Plugin> plugins = new ArrayList<>();
-        plugins.add(p);
-        plugins.add(p2);
-        plugins.add(p3);
-        PluginOrderingGraph.sort(plugins);
-    }
-
-    private static class Plug implements Plugin {
-
-        private final Set<String> isBefore;
-        private final Set<String> isAfter;
-        private final Category category;
-        private final String name;
-
-        private Plug(String name, Set<String> isBefore, Set<String> isAfter, Category category) {
-            this.name = name;
-            this.isBefore = isBefore;
-            this.isAfter = isAfter;
-            this.category = category;
-        }
-
-        @Override
-        public Set<String> isAfter() {
-            return isAfter;
-        }
-
-        @Override
-        public Set<String> isBefore() {
-            return isBefore;
-        }
-
-        @Override
-        public String toString() {
-            return name;
-        }
-
-        @Override
-        public void visit(ModulePool in, ModulePool out) {
-
-        }
-
-        @Override
-        public Category getType() {
-            return category;
-        }
-
-        @Override
-        public String getName() {
-            return name;
-        }
-    }
-}
--- a/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/jdk/test/tools/launcher/modules/dryrun/DryRunTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -60,6 +60,7 @@
 
     // the module main class
     private static final String MAIN_CLASS = "jdk.test.Main";
+    private static final String MAIN_CLINIT_CLASS = "jdk.test.MainWithClinit";
 
 
     @BeforeTest
@@ -99,13 +100,27 @@
         String dir = MODS_DIR.toString();
         String mid = TEST_MODULE + "/" + MAIN_CLASS;
 
-        // java -modulepath mods -module $TESTMODULE/$MAINCLASS
         // no resolution failure
         int exitValue = exec("--dry-run", "-modulepath", dir, "-m", mid);
         assertTrue(exitValue == 0);
     }
 
     /**
+     * Test dryrun that does not invoke <clinit> of the main class
+     */
+    public void testMainClinit() throws Exception {
+        String dir = MODS_DIR.toString();
+        String mid = TEST_MODULE + "/" + MAIN_CLINIT_CLASS;
+
+        int exitValue = exec("--dry-run", "-modulepath", dir, "-m", mid);
+        assertTrue(exitValue == 0);
+
+        // expect the test to fail if main class is initialized
+        exitValue = exec("-modulepath", dir, "-m", mid);
+        assertTrue(exitValue != 0);
+    }
+
+    /**
      * Test non-existence module in -addmods
      */
     public void testNonExistAddModules() throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/tools/launcher/modules/dryrun/src/test/jdk/test/MainWithClinit.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test;
+
+public class MainWithClinit {
+    static {
+        fail();
+    }
+
+    private static void fail() {
+        throw new RuntimeException("MainWithClinit::<clinit> invoked");
+    }
+
+    public static void main(String[] args) {
+        System.out.println("hi");
+    }
+}
--- a/langtools/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -367,3 +367,4 @@
 203a9e1b82b6cc7918f96a92e5a7eb28eafcdd18 jdk-9+122
 d0c742ddfb01ebe427720798c4c8335023ae20f8 jdk-9+123
 26aa3caa778eab1c931910149c414783ee83bce7 jdk-9+124
+2d65e127e93d5ff0df61bf78e57d7f46a2f1edeb jdk-9+125
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Fri Jul 08 12:17:10 2016 -0700
@@ -113,7 +113,7 @@
     /**
      * {@inheritDoc}
      *
-     * <p>The default implementation of this method in {@code
+     * @implSpec The default implementation of this method in {@code
      * AbstractAnnotationValueVisitor6} will always throw {@code
      * UnknownAnnotationValueException}.  This behavior is not
      * required of a subclass.
@@ -121,6 +121,7 @@
      * @param av {@inheritDoc}
      * @param p  {@inheritDoc}
      */
+    @Override
     public R visitUnknown(AnnotationValue av, P p) {
         throw new UnknownAnnotationValueException(av, p);
     }
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Fri Jul 08 12:17:10 2016 -0700
@@ -118,25 +118,28 @@
     /**
      * {@inheritDoc}
      *
-     * <p> The default implementation of this method in
+     * @implSpec The default implementation of this method in
      * {@code AbstractElementVisitor6} will always throw
      * {@code UnknownElementException}.
      * This behavior is not required of a subclass.
      *
-     * @param e  the element to visit
-     * @param p  a visitor-specified parameter
+     * @param e {@inheritDoc}
+     * @param p {@inheritDoc}
      * @return a visitor-specified result
      * @throws UnknownElementException
      *          a visitor implementation may optionally throw this exception
      */
+    @Override
     public R visitUnknown(Element e, P p) {
         throw new UnknownElementException(e, p);
     }
 
     /**
-     * Visits a {@code ModuleElement} by calling {@code
+     * {@inheritDoc}
+     *
+     * @implSpec Visits a {@code ModuleElement} by calling {@code
      * visitUnknown}.
-
+     *
      * @param e  {@inheritDoc}
      * @param p  {@inheritDoc}
      * @return the result of {@code visitUnknown}
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Fri Jul 08 12:17:10 2016 -0700
@@ -114,9 +114,11 @@
     }
 
     /**
-     * Visits a {@code UnionType} element by calling {@code
+     * {@inheritDoc}
+     *
+     * @implSpec Visits a {@code UnionType} element by calling {@code
      * visitUnknown}.
-
+     *
      * @param t  {@inheritDoc}
      * @param p  {@inheritDoc}
      * @return the result of {@code visitUnknown}
@@ -128,15 +130,18 @@
     }
 
     /**
-     * Visits an {@code IntersectionType} element by calling {@code
+     * {@inheritDoc}
+     *
+     * @implSpec Visits an {@code IntersectionType} element by calling {@code
      * visitUnknown}.
-
+     *
      * @param t  {@inheritDoc}
      * @param p  {@inheritDoc}
      * @return the result of {@code visitUnknown}
      *
      * @since 1.8
      */
+    @Override
     public R visitIntersection(IntersectionType t, P p) {
         return visitUnknown(t, p);
     }
@@ -144,16 +149,18 @@
     /**
      * {@inheritDoc}
      *
-     * <p> The default implementation of this method in {@code
+     * @implSpec The default implementation of this method in {@code
      * AbstractTypeVisitor6} will always throw {@code
      * UnknownTypeException}.  This behavior is not required of a
      * subclass.
      *
-     * @param t  the type to visit
+     * @param t  {@inheritDoc}
+     * @param p  {@inheritDoc}
      * @return a visitor-specified result
      * @throws UnknownTypeException
      *  a visitor implementation may optionally throw this exception
      */
+    @Override
     public R visitUnknown(TypeMirror t, P p) {
         throw new UnknownTypeException(t, p);
     }
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Fri Jul 08 12:17:10 2016 -0700
@@ -89,5 +89,6 @@
      * @param p  {@inheritDoc}
      * @return the result of the visit as defined by a subclass
      */
+    @Override
     public abstract R visitUnion(UnionType t, P p);
 }
--- a/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/java.compiler/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Fri Jul 08 12:17:10 2016 -0700
@@ -88,5 +88,6 @@
      * @param p  {@inheritDoc}
      * @return the result of the visit as defined by a subclass
      */
+    @Override
     public abstract R visitIntersection(IntersectionType t, P p);
 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1367,6 +1367,10 @@
                 t.interfaces_field = null;
                 t.all_interfaces_field = null;
             }
+            clearAnnotationMetadata();
+        }
+
+        public void clearAnnotationMetadata() {
             metadata = null;
             annotationTypeMetadata = AnnotationTypeMetadata.notAnAnnotationType();
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1126,10 +1126,13 @@
 
             @Override
             public Boolean visitWildcardType(WildcardType t, Type s) {
-                if (s.isPartial())
-                    return visit(s, t);
-                else
+                if (!s.hasTag(WILDCARD)) {
                     return false;
+                } else {
+                    WildcardType t2 = (WildcardType)s;
+                    return (t.kind == t2.kind || (t.isExtendsBound() && s.isExtendsBound())) &&
+                            isSameType(t.type, t2.type, true);
+                }
             }
 
             @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -438,6 +438,7 @@
         c.flags_field = chk.checkFlags(tree.pos(), tree.mods.flags, c, tree);
         c.sourcefile = env.toplevel.sourcefile;
         c.members_field = WriteableScope.create(c);
+        c.clearAnnotationMetadata();
 
         ClassType ct = (ClassType)c.type;
         if (owner.kind != PCK && (c.flags_field & STATIC) == 0) {
@@ -457,6 +458,7 @@
 
         // Enter type parameters.
         ct.typarams_field = classEnter(tree.typarams, localEnv);
+        ct.allparams_field = null;
 
         // install further completer for this type.
         c.completer = typeEnter;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -67,7 +67,7 @@
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
  */
-class InferenceContext {
+public class InferenceContext {
 
     /** list of inference vars as undet vars */
     List<Type> undetvars;
@@ -112,6 +112,13 @@
     }
 
     /**
+     * returns the list of undetermined variables in this inference context
+     */
+    public List<Type> undetVars() {
+        return undetvars;
+    }
+
+    /**
      * returns the list of uninstantiated variables (as type-variables) in this
      * inference context
      */
@@ -208,7 +215,7 @@
      * undet vars (used ahead of subtyping/compatibility checks to allow propagation
      * of inference constraints).
      */
-    final Type asUndetVar(Type t) {
+    public final Type asUndetVar(Type t) {
         return types.subst(t, inferencevars, undetvars);
     }
 
@@ -286,7 +293,7 @@
     /**
      * Save the state of this inference context
      */
-    List<Type> save() {
+    public List<Type> save() {
         ListBuffer<Type> buf = new ListBuffer<>();
         for (Type t : undetvars) {
             buf.add(((UndetVar)t).dup(infer.types));
@@ -298,7 +305,7 @@
     *  Consider that the number of saved undetermined variables can be different to the current
     *  amount. This is because new captured variables could have been added.
     */
-    void rollback(List<Type> saved_undet) {
+    public void rollback(List<Type> saved_undet) {
         Assert.check(saved_undet != null);
         //restore bounds (note: we need to preserve the old instances)
         ListBuffer<Type> newUndetVars = new ListBuffer<>();
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Fri Jul 08 12:17:10 2016 -0700
@@ -50,6 +50,7 @@
 import javax.tools.JavaFileObject.Kind;
 import javax.tools.StandardLocation;
 
+import com.sun.tools.javac.code.ClassFinder;
 import com.sun.tools.javac.code.Directive;
 import com.sun.tools.javac.code.Directive.ExportsDirective;
 import com.sun.tools.javac.code.Directive.RequiresDirective;
@@ -101,6 +102,8 @@
 
 import com.sun.tools.javac.tree.JCTree.JCDirective;
 import com.sun.tools.javac.tree.JCTree.Tag;
+import com.sun.tools.javac.util.Abort;
+import com.sun.tools.javac.util.Position;
 
 import static com.sun.tools.javac.code.Flags.ABSTRACT;
 import static com.sun.tools.javac.code.Flags.ENUM;
@@ -217,6 +220,9 @@
             for (ModuleSymbol msym: roots) {
                 msym.complete();
             }
+        } catch (CompletionFailure ex) {
+            log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, "cant.access", ex.sym, ex.getDetailValue());
+            if (ex instanceof ClassFinder.BadClassFile) throw new Abort();
         } finally {
             depth--;
         }
@@ -503,7 +509,9 @@
             for (ModuleSymbol ms : allModules()) {
                 if (ms == syms.unnamedModule || ms == msym)
                     continue;
-                RequiresDirective d = new RequiresDirective(ms, EnumSet.of(RequiresFlag.PUBLIC));
+                Set<RequiresFlag> flags = (ms.flags_field & Flags.AUTOMATIC_MODULE) != 0 ?
+                        EnumSet.of(RequiresFlag.PUBLIC) : EnumSet.noneOf(RequiresFlag.class);
+                RequiresDirective d = new RequiresDirective(ms, flags);
                 directives.add(d);
                 requires.add(d);
             }
@@ -1000,29 +1008,19 @@
 
         Set<ModuleSymbol> readable = new LinkedHashSet<>();
         Set<ModuleSymbol> requiresPublic = new HashSet<>();
-        if ((msym.flags() & Flags.AUTOMATIC_MODULE) == 0) {
-            for (RequiresDirective d : msym.requires) {
-                d.module.complete();
-                readable.add(d.module);
-                Set<ModuleSymbol> s = retrieveRequiresPublic(d.module);
-                Assert.checkNonNull(s, () -> "no entry in cache for " + d.module);
-                readable.addAll(s);
-                if (d.flags.contains(RequiresFlag.PUBLIC)) {
-                    requiresPublic.add(d.module);
-                    requiresPublic.addAll(s);
-                }
+
+        for (RequiresDirective d : msym.requires) {
+            d.module.complete();
+            readable.add(d.module);
+            Set<ModuleSymbol> s = retrieveRequiresPublic(d.module);
+            Assert.checkNonNull(s, () -> "no entry in cache for " + d.module);
+            readable.addAll(s);
+            if (d.flags.contains(RequiresFlag.PUBLIC)) {
+                requiresPublic.add(d.module);
+                requiresPublic.addAll(s);
             }
-        } else {
-            //the module graph may contain cycles involving automatic modules
-            //handle automatic modules separatelly:
-            Set<ModuleSymbol> s = retrieveRequiresPublic(msym);
+        }
 
-            readable.addAll(s);
-            requiresPublic.addAll(s);
-
-            //ensure the unnamed module is added (it is not requires public):
-            readable.add(syms.unnamedModule);
-        }
         requiresPublicCache.put(msym, requiresPublic);
         initVisiblePackages(msym, readable);
         for (ExportsDirective d: msym.exports) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -241,7 +241,14 @@
         public final List<Env<AttrContext>> completeEnvs(List<Env<AttrContext>> envs) {
             boolean firstToComplete = queue.isEmpty();
 
-            doCompleteEnvs(envs);
+            Phase prevTopLevelPhase = topLevelPhase;
+
+            try {
+                topLevelPhase = this;
+                doCompleteEnvs(envs);
+            } finally {
+                topLevelPhase = prevTopLevelPhase;
+            }
 
             if (firstToComplete) {
                 List<Env<AttrContext>> out = queue.toList();
@@ -278,6 +285,7 @@
     }
 
     private final ImportsPhase completeClass = new ImportsPhase();
+    private Phase topLevelPhase;
 
     /**Analyze import clauses.
      */
@@ -773,6 +781,15 @@
 
         @Override
         public void complete(Symbol sym) throws CompletionFailure {
+            Assert.check((topLevelPhase instanceof ImportsPhase) ||
+                         (topLevelPhase == this));
+
+            if (topLevelPhase != this) {
+                //only do the processing based on dependencies in the HierarchyPhase:
+                sym.completer = this;
+                return ;
+            }
+
             Env<AttrContext> env = typeEnvs.get((ClassSymbol) sym);
 
             super.doCompleteEnvs(List.of(env));
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,10 +25,8 @@
 
 package com.sun.tools.javac.file;
 
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.OutputStreamWriter;
 import java.lang.ref.SoftReference;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
@@ -43,7 +41,6 @@
 import java.nio.charset.IllegalCharsetNameException;
 import java.nio.charset.UnsupportedCharsetException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -65,7 +62,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.JCDiagnostic.SimpleDiagnosticPosition;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Options;
 
@@ -334,8 +330,7 @@
     private String defaultEncodingName;
     private String getDefaultEncodingName() {
         if (defaultEncodingName == null) {
-            defaultEncodingName =
-                new OutputStreamWriter(new ByteArrayOutputStream()).getEncoding();
+            defaultEncodingName = Charset.defaultCharset().name();
         }
         return defaultEncodingName;
     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Jul 08 12:17:10 2016 -0700
@@ -2418,6 +2418,9 @@
         // reset and read rest of classinfo
         bp = startbp;
         int n = nextChar();
+        if ((flags & MODULE) != 0 && n > 0) {
+            throw badClassFile("module.info.invalid.super.class");
+        }
         if (ct.supertype_field == null)
             ct.supertype_field = (n == 0)
                 ? Type.noType
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1506,7 +1506,6 @@
             }
             public void visitClassDef(JCClassDecl node) {
                 if (node.sym != null) {
-                    node.sym.reset();
                     node.sym.completer = new ImplicitCompleter(topLevel);
                 }
                 node.sym = null;
@@ -1605,7 +1604,7 @@
 
     /**
      * Convert import-style string for supported annotations into a
-     * regex matching that string.  If the string is a valid
+     * regex matching that string.  If the string is not a valid
      * import-style string, return a regex that won't match anything.
      */
     private static Pattern importStringToPattern(String s, Processor p, Log log) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -1850,6 +1850,9 @@
 compiler.misc.class.file.wrong.class=\
     class file contains wrong class: {0}
 
+compiler.misc.module.info.invalid.super.class=\
+    module-info with invalid super class
+
 compiler.misc.class.file.not.found=\
     class file for {0} not found
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,7 +62,7 @@
         return htmlDoclet.sourceVersion();
     }
 
-    public boolean run(DocletEnvironment root) {
-        return htmlDoclet.run(root);
+    public boolean run(DocletEnvironment docEnv) {
+        return htmlDoclet.run(docEnv);
     }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -178,7 +178,7 @@
      */
     public static void generate(ConfigurationImpl configuration, ClassTree classtree)  {
         ClassUseMapper mapper = new ClassUseMapper(configuration, classtree);
-        for (TypeElement aClass : configuration.root.getIncludedClasses()) {
+        for (TypeElement aClass : configuration.docEnv.getIncludedClasses()) {
             // If -nodeprecated option is set and the containing package is marked
             // as deprecated, do not generate the class-use page. We will still generate
             // the class-use page if the class is marked as deprecated but the containing
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -208,7 +208,7 @@
         bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.addStyle(HtmlStyle.header);
-        ModuleElement mdle = configuration.root.getElementUtils().getModuleOf(typeElement);
+        ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(typeElement);
         if (mdle != null && !mdle.isUnnamed()) {
             Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInClass, moduleLabel);
             Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConfigurationImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConfigurationImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -360,10 +360,10 @@
         if (!validateOptions()) {
             return false;
         }
-        if (!root.getSpecifiedElements().isEmpty()) {
+        if (!docEnv.getSpecifiedElements().isEmpty()) {
             Map<String, PackageElement> map = new HashMap<>();
             PackageElement pkg;
-            List<TypeElement> classes = new ArrayList<>(root.getIncludedClasses());
+            List<TypeElement> classes = new ArrayList<>(docEnv.getIncludedClasses());
             for (TypeElement aClass : classes) {
                 pkg = utils.containingPackage(aClass);
                 if (!map.containsKey(utils.getPackageName(pkg))) {
@@ -372,7 +372,7 @@
             }
         }
         setCreateOverview();
-        setTopFile(root);
+        setTopFile(docEnv);
         workArounds.initDocLint(doclintOpts.values(), tagletManager.getCustomTagNames(),
                 Utils.toLowerCase(htmlVersion.name()));
         return true;
@@ -441,8 +441,8 @@
         return null;
     }
 
-    protected boolean checkForDeprecation(DocletEnvironment root) {
-        for (TypeElement te : root.getIncludedClasses()) {
+    protected boolean checkForDeprecation(DocletEnvironment docEnv) {
+        for (TypeElement te : docEnv.getIncludedClasses()) {
             if (isGeneratedDoc(te)) {
                 return true;
             }
@@ -496,7 +496,7 @@
      */
     @Override
     public JavaFileManager getFileManager() {
-        return root.getJavaFileManager();
+        return docEnv.getJavaFileManager();
     }
 
     @Override
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -82,12 +82,12 @@
     /**
      * The "start" method as required by Javadoc.
      *
-     * @param root the root of the documentation tree.
+     * @param docEnv the root of the documentation tree.
      * @see jdk.doclet.DocletEnvironment
      * @return true if the doclet ran without encountering any errors.
      */
-    public boolean run(DocletEnvironment root) {
-        return startDoclet(root);
+    public boolean run(DocletEnvironment docEnv) {
+        return startDoclet(docEnv);
     }
 
     /**
@@ -109,12 +109,12 @@
      *
      * @see jdk.doclet.RootDoc
      */
-    protected void generateOtherFiles(DocletEnvironment root, ClassTree classtree)
+    protected void generateOtherFiles(DocletEnvironment docEnv, ClassTree classtree)
             throws Exception {
-        super.generateOtherFiles(root, classtree);
+        super.generateOtherFiles(docEnv, classtree);
         if (configuration.linksource) {
             SourceToHTMLConverter.convertRoot(configuration,
-                root, DocPaths.SOURCE_OUTPUT);
+                docEnv, DocPaths.SOURCE_OUTPUT);
         }
 
         if (configuration.topFile.isEmpty()) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -86,7 +86,7 @@
         this.packageElement = packageElement;
         if (utils.getSpecifiedPackages().isEmpty()) {
             documentedClasses = new TreeSet<>(utils.makeGeneralPurposeComparator());
-            documentedClasses.addAll(configuration.root.getIncludedClasses());
+            documentedClasses.addAll(configuration.docEnv.getIncludedClasses());
         }
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -59,7 +59,7 @@
     /**
      * Root of the program structure. Used for "overview" documentation.
      */
-    private DocletEnvironment root;
+    private DocletEnvironment docEnv;
 
     /**
      * Map representing the group of packages as specified on the command line.
@@ -87,7 +87,7 @@
      */
     public PackageIndexWriter(ConfigurationImpl configuration, DocPath filename) throws IOException {
         super(configuration, filename);
-        this.root = configuration.root;
+        this.docEnv = configuration.docEnv;
         groupPackageMap = configuration.group.groupPackages(packages);
         groupList = configuration.group.getGroupList();
     }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -125,7 +125,7 @@
         }
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
         div.addStyle(HtmlStyle.header);
-        ModuleElement mdle = configuration.root.getElementUtils().getModuleOf(packageElement);
+        ModuleElement mdle = configuration.docEnv.getElementUtils().getModuleOf(packageElement);
         if (mdle != null && !mdle.isUnnamed()) {
             Content classModuleLabel = HtmlTree.SPAN(HtmlStyle.moduleLabelInClass, moduleLabel);
             Content moduleNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classModuleLabel);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
     public SerializedFormWriterImpl(ConfigurationImpl configuration)
             throws IOException {
         super(configuration, DocPaths.SERIALIZED_FORM);
-        visibleClasses = configuration.root.getIncludedClasses();
+        visibleClasses = configuration.docEnv.getIncludedClasses();
     }
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -75,7 +75,7 @@
     private final ConfigurationImpl configuration;
     private final Utils utils;
 
-    private final DocletEnvironment rootDoc;
+    private final DocletEnvironment docEnv;
 
     private DocPath outputdir;
 
@@ -89,7 +89,7 @@
             DocPath outputdir) {
         this.configuration  = configuration;
         this.utils = configuration.utils;
-        this.rootDoc = rd;
+        this.docEnv = rd;
         this.outputdir = outputdir;
     }
 
@@ -97,16 +97,16 @@
      * Translate the TypeElements in the given DocletEnvironment to HTML representation.
      *
      * @param configuration the configuration.
-     * @param root the DocletEnvironment to convert.
+     * @param docEnv the DocletEnvironment to convert.
      * @param outputdir the name of the directory to output to.
      */
-    public static void convertRoot(ConfigurationImpl configuration, DocletEnvironment root,
+    public static void convertRoot(ConfigurationImpl configuration, DocletEnvironment docEnv,
             DocPath outputdir) {
-        new SourceToHTMLConverter(configuration, root, outputdir).generate();
+        new SourceToHTMLConverter(configuration, docEnv, outputdir).generate();
     }
 
     void generate() {
-        if (rootDoc == null || outputdir == null) {
+        if (docEnv == null || outputdir == null) {
             return;
         }
         for (PackageElement pkg : utils.getSpecifiedPackages()) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -91,7 +91,7 @@
      */
     public boolean startDoclet(DocletEnvironment root) {
         configuration = configuration();
-        configuration.root = root;
+        configuration.docEnv = root;
         configuration.cmtUtils = new CommentUtils(configuration);
         configuration.utils = new Utils(configuration);
         utils = configuration.utils;
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java	Fri Jul 08 12:17:10 2016 -0700
@@ -66,9 +66,9 @@
 
     protected CommentUtils(Configuration configuration) {
         this.configuration = configuration;
-        trees = configuration.root.getDocTrees();
+        trees = configuration.docEnv.getDocTrees();
         treeFactory = trees.getDocTreeFactory();
-        elementUtils = configuration.root.getElementUtils();
+        elementUtils = configuration.docEnv.getElementUtils();
     }
 
     public List<? extends DocTree> makePropertyDescriptionTree(List<? extends DocTree> content) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java	Fri Jul 08 12:17:10 2016 -0700
@@ -179,7 +179,7 @@
     /**
      * The Root of the generated Program Structure from the Doclet API.
      */
-    public DocletEnvironment root;
+    public DocletEnvironment docEnv;
 
     /**
      * An utility class for commonly used helpers
@@ -365,7 +365,7 @@
         metakeywords = new MetaKeywords(this);
         optionsProcessed = new ArrayList<>();
         groups = new ArrayList<>(0);
-        overviewElement = new OverviewElement(root);
+        overviewElement = new OverviewElement(docEnv);
     }
 
     /**
@@ -388,7 +388,7 @@
         // Build the modules structure used by the doclet
         modulePackages = new TreeMap<>(utils.makeModuleComparator());
         for (PackageElement p: packages) {
-            ModuleElement mdle = root.getElementUtils().getModuleOf(p);
+            ModuleElement mdle = docEnv.getElementUtils().getModuleOf(p);
             if (mdle != null && !mdle.isUnnamed()) {
                 Set<PackageElement> s = modulePackages.get(mdle);
                 if (s == null)
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java	Fri Jul 08 12:17:10 2016 -0700
@@ -65,8 +65,8 @@
 import com.sun.tools.javac.util.Names;
 
 import jdk.javadoc.internal.doclets.toolkit.util.Utils;
-import jdk.javadoc.internal.tool.DocEnv;
-import jdk.javadoc.internal.tool.RootDocImpl;
+import jdk.javadoc.internal.tool.ToolEnvironment;
+import jdk.javadoc.internal.tool.DocEnvImpl;
 
 import static com.sun.tools.javac.code.Kinds.Kind.*;
 import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
@@ -87,7 +87,7 @@
 public class WorkArounds {
 
     public final Configuration configuration;
-    public final DocEnv env;
+    public final ToolEnvironment toolEnv;
     public final Utils utils;
 
     private DocLint doclint;
@@ -95,7 +95,7 @@
     public WorkArounds(Configuration configuration) {
         this.configuration = configuration;
         this.utils = this.configuration.utils;
-        this.env = ((RootDocImpl)this.configuration.root).env;
+        this.toolEnv = ((DocEnvImpl)this.configuration.docEnv).toolEnv;
     }
 
     Map<CompilationUnitTree, Boolean> shouldCheck = new HashMap<>();
@@ -135,7 +135,7 @@
         doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
         doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + htmlVersion);
 
-        JavacTask t = BasicJavacTask.instance(env.context);
+        JavacTask t = BasicJavacTask.instance(toolEnv.context);
         doclint = new DocLint();
         // standard doclet normally generates H1, H2
         doclintOpts.add(DocLint.XIMPLICIT_HEADERS + "2");
@@ -151,7 +151,7 @@
     // so we use javac directly, investigate why jx.l.m is not cutting it.
     public List<TypeMirror> interfaceTypesOf(TypeMirror type) {
         com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> interfaces =
-                ((RootDocImpl)configuration.root).env.getTypes().interfaces((com.sun.tools.javac.code.Type)type);
+                ((DocEnvImpl)configuration.docEnv).toolEnv.getTypes().interfaces((com.sun.tools.javac.code.Type)type);
         if (interfaces.isEmpty()) {
             return Collections.emptyList();
         }
@@ -171,7 +171,7 @@
         if (!utils.getDeprecatedTrees(e).isEmpty()) {
             return true;
         }
-        JavacTypes jctypes = ((RootDocImpl)configuration.root).env.typeutils;
+        JavacTypes jctypes = ((DocEnvImpl)configuration.docEnv).toolEnv.typeutils;
         TypeMirror deprecatedType = utils.getDeprecatedType();
         for (AnnotationMirror anno : e.getAnnotationMirrors()) {
             if (jctypes.isSameType(anno.getAnnotationType().asElement().asType(), deprecatedType))
@@ -187,7 +187,7 @@
 
     // TODO: implement using jx.l.model
     public boolean isVisible(TypeElement te) {
-        return env.isVisible((ClassSymbol)te);
+        return toolEnv.isVisible((ClassSymbol)te);
     }
 
     // TODO: fix the caller
@@ -197,13 +197,13 @@
 
     //TODO: DocTrees: Trees.getPath(Element e) is slow a factor 4-5 times.
     public Map<Element, TreePath> getElementToTreePath() {
-        return env.elementToTreePath;
+        return toolEnv.elementToTreePath;
     }
 
     // TODO: needs to ported to jx.l.m.
     public TypeElement searchClass(TypeElement klass, String className) {
         // search by qualified name first
-        TypeElement te = configuration.root.getElementUtils().getTypeElement(className);
+        TypeElement te = configuration.docEnv.getElementUtils().getTypeElement(className);
         if (te != null) {
             return te;
         }
@@ -233,7 +233,7 @@
         if (tsym.sourcefile != null) {
 
             //### This information is available only for source classes.
-            Env<AttrContext> compenv = env.getEnv(tsym);
+            Env<AttrContext> compenv = toolEnv.getEnv(tsym);
             if (compenv == null) {
                 return null;
             }
@@ -271,12 +271,12 @@
         }
         MethodSymbol sym = (MethodSymbol)method;
         ClassSymbol origin = (ClassSymbol) sym.owner;
-        for (com.sun.tools.javac.code.Type t = env.getTypes().supertype(origin.type);
+        for (com.sun.tools.javac.code.Type t = toolEnv.getTypes().supertype(origin.type);
                 t.hasTag(com.sun.tools.javac.code.TypeTag.CLASS);
-                t = env.getTypes().supertype(t)) {
+                t = toolEnv.getTypes().supertype(t)) {
             ClassSymbol c = (ClassSymbol) t.tsym;
             for (com.sun.tools.javac.code.Symbol sym2 : c.members().getSymbolsByName(sym.name)) {
-                if (sym.overrides(sym2, origin, env.getTypes(), true)) {
+                if (sym.overrides(sym2, origin, toolEnv.getTypes(), true)) {
                     return t;
                 }
             }
@@ -286,7 +286,7 @@
 
     // TODO: investigate and reimplement without javac dependencies.
     public boolean shouldDocument(Element e) {
-        return env.shouldDocument(e);
+        return toolEnv.shouldDocument(e);
     }
 
     //------------------Start of Serializable Implementation---------------------//
@@ -295,7 +295,7 @@
     public SortedSet<VariableElement> getSerializableFields(Utils utils, TypeElement klass) {
         NewSerializedForm sf = serializedForms.get(klass);
         if (sf == null) {
-            sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+            sf = new NewSerializedForm(utils, configuration.docEnv.getElementUtils(), klass);
             serializedForms.put(klass, sf);
         }
         return sf.fields;
@@ -304,7 +304,7 @@
     public SortedSet<ExecutableElement>  getSerializationMethods(Utils utils, TypeElement klass) {
         NewSerializedForm sf = serializedForms.get(klass);
         if (sf == null) {
-            sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+            sf = new NewSerializedForm(utils, configuration.docEnv.getElementUtils(), klass);
             serializedForms.put(klass, sf);
         }
         return sf.methods;
@@ -316,7 +316,7 @@
         } else {
             NewSerializedForm sf = serializedForms.get(klass);
             if (sf == null) {
-                sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+                sf = new NewSerializedForm(utils, configuration.docEnv.getElementUtils(), klass);
                 serializedForms.put(klass, sf);
             }
             return sf.definesSerializableFields;
@@ -533,7 +533,7 @@
     // TODO: this is a fast way to get the JavaFileObject for
     // a package.html file, however we need to eliminate this.
     public JavaFileObject getJavaFileObject(PackageElement pe) {
-        return env.pkgToJavaFOMap.get(pe);
+        return toolEnv.pkgToJavaFOMap.get(pe);
     }
 
     // TODO: we need to eliminate this, as it is hacky.
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Fri Jul 08 12:17:10 2016 -0700
@@ -125,7 +125,7 @@
      */
     public void build() throws IOException {
         SortedSet<TypeElement> rootclasses = new TreeSet<>(utils.makeGeneralPurposeComparator());
-        rootclasses.addAll(configuration.root.getIncludedClasses());
+        rootclasses.addAll(configuration.docEnv.getIncludedClasses());
         if (!serialClassFoundToDocument(rootclasses)) {
             //Nothing to document.
             return;
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -161,7 +161,7 @@
             memberName = sigValues[0];
         } else {
             //Case 3: @value in different class.
-            Elements elements = config.root.getElementUtils();
+            Elements elements = config.docEnv.getElementUtils();
             te = elements.getTypeElement(sigValues[0]);
             memberName = sigValues[1];
         }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassTree.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassTree.java	Fri Jul 08 12:17:10 2016 -0700
@@ -113,7 +113,7 @@
         baseEnums = new TreeSet<>(comparator);
         baseClasses = new TreeSet<>(comparator);
         baseInterfaces = new TreeSet<>(comparator);
-        buildTree(configuration.root.getIncludedClasses());
+        buildTree(configuration.docEnv.getIncludedClasses());
     }
 
     /**
@@ -130,7 +130,7 @@
         baseEnums = new TreeSet<>(comparator);
         baseClasses = new TreeSet<>(comparator);
         baseInterfaces = new TreeSet<>(comparator);
-        buildTree(configuration.root.getIncludedClasses());
+        buildTree(configuration.docEnv.getIncludedClasses());
     }
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -187,15 +187,15 @@
      */
     public final Map<TypeElement, List<VariableElement>> annotationToField = new HashMap<>();
 
-    private final DocletEnvironment root;
+    private final DocletEnvironment docEnv;
     private final Elements elementUtils;
     private final Types typeUtils;
     private final Utils utils;
 
     public ClassUseMapper(ConfigurationImpl configuration, ClassTree classtree) {
-        root = configuration.root;
-        elementUtils = root.getElementUtils();
-        typeUtils = root.getTypeUtils();
+        docEnv = configuration.docEnv;
+        elementUtils = docEnv.getElementUtils();
+        typeUtils = docEnv.getTypeUtils();
         utils = configuration.utils;
         this.classtree = classtree;
         classToPackage = new TreeMap<>(utils.makeClassUseComparator());
@@ -208,7 +208,7 @@
             implementingClasses(intfc);
         }
         // Map methods, fields, constructors using a class.
-        Set<TypeElement> classes = root.getIncludedClasses();
+        Set<TypeElement> classes = docEnv.getIncludedClasses();
         for (TypeElement aClass : classes) {
             PackageElement pkg = elementUtils.getPackageOf(aClass);
             mapAnnotations(classToPackageAnnotations, pkg, pkg);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/CommentHelper.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/CommentHelper.java	Fri Jul 08 12:17:10 2016 -0700
@@ -148,7 +148,7 @@
             if (symbol == null) {
                 return null;
             }
-            return  c.root.getTypeUtils().asElement(symbol);
+            return  c.docEnv.getTypeUtils().asElement(symbol);
         }
         // case A: the element contains no comments associated and
         // the comments need to be copied from ancestor
@@ -172,7 +172,7 @@
             }
             return null;
         }
-        DocTrees doctrees = c.root.getDocTrees();
+        DocTrees doctrees = c.docEnv.getDocTrees();
         return doctrees.getElement(docTreePath);
     }
 
@@ -419,7 +419,7 @@
     }
 
     public List<? extends DocTree> getFirstSentenceTrees(Configuration c, List<? extends DocTree> body) {
-        List<DocTree> firstSentence = c.root.getDocTrees().getFirstSentence(body);
+        List<DocTree> firstSentence = c.docEnv.getDocTrees().getFirstSentence(body);
         return firstSentence;
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java	Fri Jul 08 12:17:10 2016 -0700
@@ -96,7 +96,7 @@
             }
         }
         deprecatedMap.put(DeprElementKind.PACKAGE, pset);
-        for (Element e : configuration.root.getIncludedClasses()) {
+        for (Element e : configuration.docEnv.getIncludedClasses()) {
             TypeElement te = (TypeElement)e;
             SortedSet<Element> eset;
             if (utils.isDeprecated(e)) {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java	Fri Jul 08 12:17:10 2016 -0700
@@ -110,7 +110,7 @@
         comparator = classesOnly
                 ? utils.makeAllClassesComparator()
                 : utils.makeIndexUseComparator();
-        buildIndexMap(configuration.root);
+        buildIndexMap(configuration.docEnv);
     }
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PackageListWriter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PackageListWriter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
         PackageListWriter packgen;
         try {
             packgen = new PackageListWriter(configuration);
-            packgen.generatePackageListFile(configuration.root);
+            packgen.generatePackageListFile(configuration.docEnv);
             packgen.close();
         } catch (IOException exc) {
             configuration.message.error("doclet.exception_encountered",
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Fri Jul 08 12:17:10 2016 -0700
@@ -108,9 +108,9 @@
 
     public Utils(Configuration c) {
         configuration = c;
-        elementUtils = c.root.getElementUtils();
-        typeUtils = c.root.getTypeUtils();
-        docTrees = c.root.getDocTrees();
+        elementUtils = c.docEnv.getElementUtils();
+        typeUtils = c.docEnv.getTypeUtils();
+        docTrees = c.docEnv.getDocTrees();
     }
 
     // our own little symbol table
@@ -530,7 +530,7 @@
 
     public boolean isFunctionalInterface(AnnotationMirror amirror) {
         return amirror.getAnnotationType().equals(getFunctionalInterface()) &&
-                configuration.root.getSourceVersion()
+                configuration.docEnv.getSourceVersion()
                         .compareTo(SourceVersion.RELEASE_8) >= 0;
     }
 
@@ -2223,9 +2223,9 @@
 
     private void initSpecifiedElements() {
         specifiedClasses = new LinkedHashSet<>(
-                ElementFilter.typesIn(configuration.root.getSpecifiedElements()));
+                ElementFilter.typesIn(configuration.docEnv.getSpecifiedElements()));
         specifiedPackages = new LinkedHashSet<>(
-                ElementFilter.packagesIn(configuration.root.getSpecifiedElements()));
+                ElementFilter.packagesIn(configuration.docEnv.getSpecifiedElements()));
     }
 
     public Set<TypeElement> getSpecifiedClasses() {
@@ -2571,7 +2571,7 @@
     }
 
     public boolean isIncluded(Element e) {
-        return configuration.root.isIncluded(e);
+        return configuration.docEnv.isIncluded(e);
     }
 
     /**
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/DocEnv.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,848 +0,0 @@
-/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.javadoc.internal.tool;
-
-
-import java.lang.reflect.Modifier;
-import java.util.*;
-
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.PackageElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleElementVisitor9;
-import javax.tools.JavaFileManager;
-import javax.tools.JavaFileObject;
-
-import com.sun.source.util.DocTrees;
-import com.sun.source.util.TreePath;
-import com.sun.tools.javac.api.JavacTrees;
-import com.sun.tools.javac.code.ClassFinder;
-import com.sun.tools.javac.code.Flags;
-import com.sun.tools.javac.code.Kinds.Kind;
-import com.sun.tools.javac.code.Source;
-import com.sun.tools.javac.code.Symbol;
-import com.sun.tools.javac.code.Symbol.ClassSymbol;
-import com.sun.tools.javac.code.Symbol.CompletionFailure;
-import com.sun.tools.javac.code.Symbol.MethodSymbol;
-import com.sun.tools.javac.code.Symbol.ModuleSymbol;
-import com.sun.tools.javac.code.Symbol.PackageSymbol;
-import com.sun.tools.javac.code.Symbol.VarSymbol;
-import com.sun.tools.javac.code.Symtab;
-import com.sun.tools.javac.comp.AttrContext;
-import com.sun.tools.javac.comp.Check;
-import com.sun.tools.javac.comp.Enter;
-import com.sun.tools.javac.comp.Env;
-import com.sun.tools.javac.file.JavacFileManager;
-import com.sun.tools.javac.model.JavacElements;
-import com.sun.tools.javac.model.JavacTypes;
-import com.sun.tools.javac.tree.JCTree;
-import com.sun.tools.javac.tree.JCTree.JCClassDecl;
-import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
-import com.sun.tools.javac.tree.JCTree.JCPackageDecl;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.Convert;
-import com.sun.tools.javac.util.DefinedBy;
-import com.sun.tools.javac.util.DefinedBy.Api;
-import com.sun.tools.javac.util.Name;
-import com.sun.tools.javac.util.Names;
-
-import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
-
-/**
- * Holds the environment for a run of javadoc.
- * Holds only the information needed throughout the
- * run and not the compiler info that could be GC'ed
- * or ported.
- *
- *  <p><b>This is NOT part of any supported API.
- *  If you write code that depends on this, you do so at your own risk.
- *  This code and its internal interfaces are subject to change or
- *  deletion without notice.</b>
- *
- * @author Robert Field
- * @author Neal Gafter (rewrite)
- * @author Scott Seligman (generics)
- */
-public class DocEnv {
-    protected static final Context.Key<DocEnv> docEnvKey = new Context.Key<>();
-
-    public static DocEnv instance(Context context) {
-        DocEnv instance = context.get(docEnvKey);
-        if (instance == null)
-            instance = new DocEnv(context);
-        return instance;
-    }
-
-    private final Messager messager;
-
-    /** Predefined symbols known to the compiler. */
-    public final Symtab syms;
-
-    /** Referenced directly in RootDocImpl. */
-    private final ClassFinder finder;
-
-    /** Javadoc's own version of the compiler's enter phase. */
-    final Enter enter;
-
-    /** The name table. */
-    private Names names;
-
-    /** The encoding name. */
-    private String encoding;
-
-    final Symbol externalizableSym;
-
-    /** Access filter (public, protected, ...).  */
-    protected ModifierFilter filter;
-
-    /**
-     * True if we do not want to print any notifications at all.
-     */
-    boolean quiet = false;
-
-    Check chk;
-    com.sun.tools.javac.code.Types types;
-    JavaFileManager fileManager;
-    public final Context context;
-
-    WeakHashMap<JCTree, TreePath> treePaths = new WeakHashMap<>();
-
-    public final HashMap<PackageElement, JavaFileObject> pkgToJavaFOMap = new HashMap<>();
-
-    /** Allow documenting from class files? */
-    boolean docClasses = false;
-
-    /**
-     * The source language version.
-     */
-    public final Source source;
-
-    public final Elements elements;
-
-    public final JavacTypes typeutils;
-
-    protected RootDocImpl root;
-
-    public final DocTrees docTrees;
-
-    public final Map<Element, TreePath> elementToTreePath;
-
-    /**
-     * Constructor
-     *
-     * @param context      Context for this javadoc instance.
-     */
-    protected DocEnv(Context context) {
-        context.put(docEnvKey, this);
-        this.context = context;
-
-        messager = Messager.instance0(context);
-        syms = Symtab.instance(context);
-        finder = JavadocClassFinder.instance(context);
-        enter = JavadocEnter.instance(context);
-        names = Names.instance(context);
-        externalizableSym = syms.enterClass(syms.java_base, names.fromString("java.io.Externalizable"));
-        chk = Check.instance(context);
-        types = com.sun.tools.javac.code.Types.instance(context);
-        fileManager = context.get(JavaFileManager.class);
-        if (fileManager instanceof JavacFileManager) {
-            ((JavacFileManager)fileManager).setSymbolFileEnabled(false);
-        }
-        docTrees = JavacTrees.instance(context);
-        source = Source.instance(context);
-        elements =  JavacElements.instance(context);
-        typeutils = JavacTypes.instance(context);
-        elementToTreePath = new HashMap<>();
-    }
-
-    public void intialize(String encoding,
-            String showAccess,
-            String overviewpath,
-            List<String> javaNames,
-            Iterable<? extends JavaFileObject> fileObjects,
-            List<String> subPackages,
-            List<String> excludedPackages,
-            boolean docClasses,
-            boolean quiet) {
-        this.filter = ModifierFilter.getModifierFilter(showAccess);
-        this.quiet = quiet;
-
-        this.setEncoding(encoding);
-        this.docClasses = docClasses;
-    }
-
-    /**
-     * Load a class by qualified name.
-     */
-    public TypeElement loadClass(String name) {
-        try {
-            Name nameImpl = names.fromString(name);
-            ModuleSymbol mod = syms.inferModule(Convert.packagePart(nameImpl));
-            ClassSymbol c = finder.loadClass(mod != null ? mod : syms.errModule, nameImpl);
-            return c;
-        } catch (CompletionFailure ex) {
-            chk.completionError(null, ex);
-            return null;
-        }
-    }
-
-    private boolean isSynthetic(long flags) {
-        return (flags & Flags.SYNTHETIC) != 0;
-    }
-
-    private boolean isSynthetic(Symbol sym) {
-        return isSynthetic(sym.flags_field);
-    }
-
-    SimpleElementVisitor9<Boolean, Void> shouldDocumentVisitor = null;
-    public boolean shouldDocument(Element e) {
-        if (shouldDocumentVisitor == null) {
-            shouldDocumentVisitor = new SimpleElementVisitor9<Boolean, Void>() {
-
-            @Override @DefinedBy(Api.LANGUAGE_MODEL)
-            public Boolean visitType(TypeElement e, Void p) {
-                return shouldDocument((ClassSymbol)e);
-            }
-
-            @Override @DefinedBy(Api.LANGUAGE_MODEL)
-            public Boolean visitVariable(VariableElement e, Void p) {
-                return shouldDocument((VarSymbol)e);
-            }
-
-            @Override @DefinedBy(Api.LANGUAGE_MODEL)
-            public Boolean visitExecutable(ExecutableElement e, Void p) {
-                return shouldDocument((MethodSymbol)e);
-            }
-        };
-        }
-        return shouldDocumentVisitor.visit(e);
-    }
-
-    /** Check whether this member should be documented. */
-    public boolean shouldDocument(VarSymbol sym) {
-        long mod = sym.flags();
-        if (isSynthetic(mod)) {
-            return false;
-        }
-        return filter.checkModifier(translateModifiers(mod));
-    }
-
-    /** Check whether this member should be documented. */
-    public boolean shouldDocument(MethodSymbol sym) {
-        long mod = sym.flags();
-        if (isSynthetic(mod)) {
-            return false;
-        }
-        return filter.checkModifier(translateModifiers(mod));
-    }
-
-    void setElementToTreePath(Element e, TreePath tree) {
-        if (e == null || tree == null)
-            return;
-        elementToTreePath.put(e, tree);
-    }
-
-    private boolean hasLeaf(ClassSymbol sym) {
-        TreePath path = elementToTreePath.get(sym);
-        if (path == null)
-            return false;
-        return path.getLeaf() != null;
-    }
-
-    /** check whether this class should be documented. */
-    public boolean shouldDocument(ClassSymbol sym) {
-        return
-            !isSynthetic(sym.flags_field) && // no synthetics
-            (docClasses || hasLeaf(sym)) &&
-            isVisible(sym);
-    }
-
-    //### Comment below is inaccurate wrt modifier filter testing
-    /**
-     * Check the visibility if this is an nested class.
-     * if this is not a nested class, return true.
-     * if this is an static visible nested class,
-     *    return true.
-     * if this is an visible nested class
-     *    if the outer class is visible return true.
-     *    else return false.
-     * IMPORTANT: This also allows, static nested classes
-     * to be defined inside an nested class, which is not
-     * allowed by the compiler. So such an test case will
-     * not reach upto this method itself, but if compiler
-     * allows it, then that will go through.
-     */
-    public boolean isVisible(ClassSymbol sym) {
-        long mod = sym.flags_field;
-        if (!filter.checkModifier(translateModifiers(mod))) {
-            return false;
-        }
-        ClassSymbol encl = sym.owner.enclClass();
-        return (encl == null || (mod & Flags.STATIC) != 0 || isVisible(encl));
-    }
-
-    //---------------- print forwarders ----------------//
-
-    // ERRORS
-    /**
-     * Print error message, increment error count.
-     *
-     * @param msg message to print.
-     */
-    public void printError(String msg) {
-        messager.printError(msg);
-    }
-
-//    /**
-//     * Print error message, increment error count.
-//     *
-//     * @param key selects message from resource
-//     */
-//    public void error(Element element, String key) {
-//        if (element == null)
-//            messager.error(key);
-//        else
-//            messager.error(element, key);
-//    }
-//
-//    public void error(String prefix, String key) {
-//        printError(prefix + ":" + messager.getText(key));
-//    }
-//
-//    /**
-//     * Print error message, increment error count.
-//     *
-//     * @param path the path to the source
-//     * @param key selects message from resource
-//     */
-//    public void error(DocTreePath path, String key) {
-//        messager.error(path, key);
-//    }
-//
-//    /**
-//     * Print error message, increment error count.
-//     *
-//     * @param path the path to the source
-//     * @param msg message to print.
-//     */
-//    public void printError(DocTreePath path, String msg) {
-//        messager.printError(path, msg);
-//    }
-//
-//    /**
-//     * Print error message, increment error count.
-//     * @param e the target element
-//     * @param msg message to print.
-//     */
-//    public void printError(Element e, String msg) {
-//        messager.printError(e, msg);
-//    }
-
-    /**
-     * Print error message, increment error count.
-     *
-     * @param element the source element
-     * @param key selects message from resource
-     * @param args replacement arguments
-     */
-    public void error(Element element, String key, String... args) {
-        if (element == null)
-            messager.error(key, (Object[]) args);
-        else
-            messager.error(element, key, (Object[]) args);
-    }
-
-    // WARNINGS
-
-//    /**
-//     * Print warning message, increment warning count.
-//     *
-//     * @param msg message to print.
-//     */
-//    public void printWarning(String msg) {
-//        messager.printWarning(msg);
-//    }
-//
-//    public void warning(String key) {
-//        warning((Element)null, key);
-//    }
-
-    public void warning(String key, String... args) {
-        warning((Element)null, key, args);
-    }
-
-//    /**
-//     * Print warning message, increment warning count.
-//     *
-//     * @param element the source element
-//     * @param key selects message from resource
-//     */
-//    public void warning(Element element, String key) {
-//        if (element == null)
-//            messager.warning(key);
-//        else
-//            messager.warning(element, key);
-//    }
-//
-//    /**
-//     * Print warning message, increment warning count.
-//     *
-//     * @param path the path to the source
-//     * @param msg message to print.
-//     */
-//    public void printWarning(DocTreePath path, String msg) {
-//        messager.printWarning(path, msg);
-//    }
-//
-//    /**
-//     * Print warning message, increment warning count.
-//     *
-//     * @param e  the source element
-//     * @param msg message to print.
-//     */
-//    public void printWarning(Element e, String msg) {
-//        messager.printWarning(e, msg);
-//    }
-
-    /**
-     * Print warning message, increment warning count.
-     *
-     * @param e    the source element
-     * @param key  selects message from resource
-     * @param args the replace arguments
-     */
-    public void warning(Element e, String key, String... args) {
-        if (e == null)
-            messager.warning(key, (Object[]) args);
-        else
-            messager.warning(e, key, (Object[]) args);
-    }
-
-//    Note: no longer required
-//    /**
-//     * Print a message.
-//     *
-//     * @param msg message to print.
-//     */
-//    public void printNotice(String msg) {
-//        if (quiet) {
-//            return;
-//        }
-//        messager.printNotice(msg);
-//    }
-
-//  Note: no longer required
-//    /**
-//     * Print a message.
-//     *
-//     * @param e the source element
-//     * @param msg message to print.
-//     */
-//    public void printNotice(Element e, String msg) {
-//        if (quiet) {
-//            return;
-//        }
-//        messager.printNotice(e, msg);
-//    }
-
-    //  NOTICES
-    /**
-     * Print a message.
-     *
-     * @param key selects message from resource
-     */
-    public void notice(String key) {
-        if (quiet) {
-            return;
-        }
-        messager.notice(key);
-    }
-
-//    Note: not used anymore
-//    /**
-//     * Print a message.
-//     *
-//     * @param path the path to the source
-//     * @param msg message to print.
-//     */
-//    public void printNotice(DocTreePath path, String msg) {
-//        if (quiet) {
-//            return;
-//        }
-//        messager.printNotice(path, msg);
-//    }
-
-    /**
-     * Print a message.
-     *
-     * @param key selects message from resource
-     * @param a1 first argument
-     */
-    public void notice(String key, String a1) {
-        if (quiet) {
-            return;
-        }
-        messager.notice(key, a1);
-    }
-
-//    Note: not used anymore
-//    /**
-//     * Print a message.
-//     *
-//     * @param key selects message from resource
-//     * @param a1 first argument
-//     * @param a2 second argument
-//     */
-//    public void notice(String key, String a1, String a2) {
-//        if (quiet) {
-//            return;
-//        }
-//        messager.notice(key, a1, a2);
-//    }
-//
-
-//    Note: not used anymore
-//    /**
-//     * Print a message.
-//     *
-//     * @param key selects message from resource
-//     * @param a1 first argument
-//     * @param a2 second argument
-//     * @param a3 third argument
-//     */
-//    public void notice(String key, String a1, String a2, String a3) {
-//        if (quiet) {
-//            return;
-//        }
-//        messager.notice(key, a1, a2, a3);
-//    }
-
-    /**
-     * Exit, reporting errors and warnings.
-     */
-    public void exit() {
-        // Messager should be replaced by a more general
-        // compilation environment.  This can probably
-        // subsume DocEnv as well.
-        throw new Messager.ExitJavadoc();
-    }
-
-    /**
-     * Adds all inner classes of this class, and their inner classes recursively, to the list
-     */
-    void addAllClasses(Collection<TypeElement> list, TypeElement typeElement, boolean filtered) {
-        ClassSymbol klass = (ClassSymbol)typeElement;
-        try {
-            if (isSynthetic(klass.flags())) return;
-            // sometimes synthetic classes are not marked synthetic
-            if (!JavadocTool.isValidClassName(klass.name.toString())) return;
-            if (filtered && !shouldDocument(klass)) return;
-            if (list.contains(klass)) return;
-            list.add(klass);
-            for (Symbol sym : klass.members().getSymbols(NON_RECURSIVE)) {
-                if (sym != null && sym.kind == Kind.TYP) {
-                    ClassSymbol s = (ClassSymbol)sym;
-                    if (!isSynthetic(s.flags())) {
-                        addAllClasses(list, s, filtered);
-                    }
-                }
-            }
-        } catch (CompletionFailure e) {
-            // quietly ignore completion failures
-        }
-    }
-
-    /**
-     * Return a list of all classes contained in this package, including
-     * member classes of those classes, and their member classes, etc.
-     */
-    void addAllClasses(Collection<TypeElement> list, PackageElement pkg) {
-        boolean filtered = true;
-        PackageSymbol sym = (PackageSymbol)pkg;
-        for (Symbol isym : sym.members().getSymbols(NON_RECURSIVE)) {
-            if (isym != null) {
-                ClassSymbol s = (ClassSymbol)isym;
-                if (!isSynthetic(s)) {
-                    addAllClasses(list, s, filtered);
-                }
-            }
-        }
-    }
-
-    TreePath getTreePath(JCCompilationUnit tree) {
-        TreePath p = treePaths.get(tree);
-        if (p == null)
-            treePaths.put(tree, p = new TreePath(tree));
-        return p;
-    }
-
-    TreePath getTreePath(JCCompilationUnit toplevel, JCPackageDecl tree) {
-        TreePath p = treePaths.get(tree);
-        if (p == null)
-            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
-        return p;
-    }
-
-    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl tree) {
-        TreePath p = treePaths.get(tree);
-        if (p == null)
-            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
-        return p;
-    }
-
-    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl cdecl, JCTree tree) {
-        return new TreePath(getTreePath(toplevel, cdecl), tree);
-    }
-
-    public com.sun.tools.javac.code.Types getTypes() {
-        return types;
-    }
-
-    /**
-     * Set the encoding.
-     */
-    public void setEncoding(String encoding) {
-        this.encoding = encoding;
-    }
-
-    public Env<AttrContext> getEnv(ClassSymbol tsym) {
-        return enter.getEnv(tsym);
-    }
-
-    /**
-     * Get the encoding.
-     */
-    public String getEncoding() {
-        return encoding;
-    }
-
-    /**
-     * Convert modifier bits from private coding used by
-     * the compiler to that of java.lang.reflect.Modifier.
-     */
-    static int translateModifiers(long flags) {
-        int result = 0;
-        if ((flags & Flags.ABSTRACT) != 0)
-            result |= Modifier.ABSTRACT;
-        if ((flags & Flags.FINAL) != 0)
-            result |= Modifier.FINAL;
-        if ((flags & Flags.INTERFACE) != 0)
-            result |= Modifier.INTERFACE;
-        if ((flags & Flags.NATIVE) != 0)
-            result |= Modifier.NATIVE;
-        if ((flags & Flags.PRIVATE) != 0)
-            result |= Modifier.PRIVATE;
-        if ((flags & Flags.PROTECTED) != 0)
-            result |= Modifier.PROTECTED;
-        if ((flags & Flags.PUBLIC) != 0)
-            result |= Modifier.PUBLIC;
-        if ((flags & Flags.STATIC) != 0)
-            result |= Modifier.STATIC;
-        if ((flags & Flags.SYNCHRONIZED) != 0)
-            result |= Modifier.SYNCHRONIZED;
-        if ((flags & Flags.TRANSIENT) != 0)
-            result |= Modifier.TRANSIENT;
-        if ((flags & Flags.VOLATILE) != 0)
-            result |= Modifier.VOLATILE;
-        return result;
-    }
-
-    private final Set<Element> includedSet = new HashSet<>();
-
-    public void setIncluded(Element element) {
-        includedSet.add(element);
-    }
-
-    private SimpleElementVisitor9<Boolean, Void> includedVisitor = null;
-
-    public boolean isIncluded(Element e) {
-        if (e == null) {
-            return false;
-        }
-        if (includedVisitor == null) {
-            includedVisitor = new SimpleElementVisitor9<Boolean, Void>() {
-                @Override @DefinedBy(Api.LANGUAGE_MODEL)
-                public Boolean visitType(TypeElement e, Void p) {
-                    if (includedSet.contains(e)) {
-                        return true;
-                    }
-                    if (shouldDocument(e)) {
-                        // Class is nameable from top-level and
-                        // the class and all enclosing classes
-                        // pass the modifier filter.
-                        PackageElement pkg = elements.getPackageOf(e);
-                        if (includedSet.contains(pkg)) {
-                            setIncluded(e);
-                            return true;
-                        }
-                        Element enclosing = e.getEnclosingElement();
-                        if (enclosing != null && includedSet.contains(enclosing)) {
-                            setIncluded(e);
-                            return true;
-                        }
-                    }
-                    return false;
-                }
-
-                @Override @DefinedBy(Api.LANGUAGE_MODEL)
-                public Boolean visitPackage(PackageElement e, Void p) {
-                    return includedSet.contains(e);
-                }
-
-                @Override @DefinedBy(Api.LANGUAGE_MODEL)
-                public Boolean visitUnknown(Element e, Void p) {
-                    throw new AssertionError("unknown element: " + e);
-                }
-
-                @Override @DefinedBy(Api.LANGUAGE_MODEL)
-                public Boolean defaultAction(Element e, Void p) {
-                    return visit(e.getEnclosingElement()) && shouldDocument(e);
-                }
-            };
-        }
-        return includedVisitor.visit(e);
-    }
-
-    public boolean isQuiet() {
-        return quiet;
-    }
-
-    /**
-     * A class which filters the access flags on classes, fields, methods, etc.
-     *
-     * <p>
-     * <b>This is NOT part of any supported API. If you write code that depends on this, you do so
-     * at your own risk. This code and its internal interfaces are subject to change or deletion
-     * without notice.</b>
-     *
-     * @see javax.lang.model.element.Modifier
-     * @author Robert Field
-     */
-
-    private static class ModifierFilter {
-
-        static enum FilterFlag {
-            PACKAGE,
-            PRIVATE,
-            PROTECTED,
-            PUBLIC
-        }
-
-        private Set<FilterFlag> oneOf;
-
-        /**
-         * Constructor - Specify a filter.
-         *
-         * @param oneOf a set containing desired flags to be matched.
-         */
-        ModifierFilter(Set<FilterFlag> oneOf) {
-            this.oneOf = oneOf;
-        }
-
-        /**
-         * Constructor - Specify a filter.
-         *
-         * @param oneOf an array containing desired flags to be matched.
-         */
-        ModifierFilter(FilterFlag... oneOf) {
-            this.oneOf = new HashSet<>();
-            this.oneOf.addAll(Arrays.asList(oneOf));
-        }
-
-        static ModifierFilter getModifierFilter(String showAccess) {
-            switch (showAccess) {
-                case "public":
-                    return new ModifierFilter(FilterFlag.PUBLIC);
-                case "package":
-                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED,
-                                              FilterFlag.PACKAGE);
-                case "private":
-                    return new ModifierFilter(FilterFlag.PRIVATE);
-                default:
-                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED);
-            }
-        }
-
-        private boolean hasFlag(long flag, long modifierBits) {
-            return (flag & modifierBits) != 0;
-        }
-
-        private List<FilterFlag> flagsToModifiers(long modifierBits) {
-            List<FilterFlag> list = new ArrayList<>();
-            boolean isPackage = true;
-            if (hasFlag(com.sun.tools.javac.code.Flags.PRIVATE, modifierBits)) {
-                list.add(FilterFlag.PRIVATE);
-                isPackage = false;
-            }
-            if (hasFlag(com.sun.tools.javac.code.Flags.PROTECTED, modifierBits)) {
-                list.add(FilterFlag.PROTECTED);
-                isPackage = false;
-            }
-            if (hasFlag(com.sun.tools.javac.code.Flags.PUBLIC, modifierBits)) {
-                list.add(FilterFlag.PUBLIC);
-                isPackage = false;
-            }
-            if (isPackage) {
-                list.add(FilterFlag.PACKAGE);
-            }
-            return list;
-        }
-
-        /**
-         * Filter on modifier bits.
-         *
-         * @param modifierBits Bits as specified in the Modifier class
-         *
-         * @return Whether the modifierBits pass this filter.
-         */
-        public boolean checkModifier(int modifierBits) {
-            return checkModifier(flagsToModifiers(modifierBits));
-        }
-
-        /**
-         * Filter on Filter flags
-         *
-         * @param modifiers Flags as specified in the FilterFlags enumeration.
-         *
-         * @return if the modifier is contained.
-         */
-        public boolean checkModifier(List<FilterFlag> modifiers) {
-            if (oneOf.contains(FilterFlag.PRIVATE)) {
-                return true;
-            }
-            for (FilterFlag mod : modifiers) {
-                if (oneOf.contains(mod)) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-    } // end ModifierFilter
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/DocEnvImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,304 @@
+/*
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.javadoc.internal.tool;
+
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.Types;
+import javax.tools.JavaFileManager;
+
+import com.sun.source.util.DocTrees;
+import com.sun.tools.javac.code.Source;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/**
+ * This class holds the information from one run of javadoc.
+ * Particularly the packages, classes and options specified
+ * by the user.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Neal Gafter (rewrite)
+ */
+public class DocEnvImpl implements DocletEnvironment {
+
+    /**
+     * list of classes specified on the command line.
+     */
+    private Set<TypeElement> cmdLineClasses;
+
+    /**
+     * list of packages specified on the command line.
+     */
+    private  Set<PackageElement> cmdLinePackages;
+
+    public final ToolEnvironment toolEnv;
+
+    /**
+     * Constructor used when reading source files.
+     *
+     * @param toolEnv the documentation environment, state for this javadoc run
+     * @param classes list of classes specified on the commandline
+     * @param packages list of package names specified on the commandline
+     */
+    public DocEnvImpl(ToolEnvironment toolEnv, List<JCClassDecl> classes, List<String> packages) {
+        this.toolEnv = toolEnv;
+        setPackages(toolEnv, packages);
+        setClasses(toolEnv, classes);
+    }
+
+    /**
+     * Constructor used when reading class files.
+     *
+     * @param toolEnv the documentation environment, state for this javadoc run
+     * @param classes list of class names specified on the commandline
+     */
+    public DocEnvImpl(ToolEnvironment toolEnv, List<String> classes) {
+        //super(env, null);
+        this.toolEnv = toolEnv;
+
+        Set<TypeElement> classList = new LinkedHashSet<>();
+        for (String className : classes) {
+            TypeElement c = toolEnv.loadClass(className);
+            if (c == null)
+                toolEnv.error(null, "javadoc.class_not_found", className);
+            else
+                classList.add(c);
+        }
+        cmdLineClasses = classList;
+    }
+
+    /**
+     * Initialize classes information. Those classes are input from
+     * command line.
+     *
+     * @param toolEnv the compilation environment
+     * @param classes a list of ClassDeclaration
+     */
+    private void setClasses(ToolEnvironment toolEnv, List<JCClassDecl> classes) {
+        Set<TypeElement> result = new LinkedHashSet<>();
+        classes.stream().filter((def) -> (toolEnv.shouldDocument(def.sym))).forEach((def) -> {
+            TypeElement te = (TypeElement)def.sym;
+            if (te != null) {
+                toolEnv.setIncluded((Element)def.sym);
+                result.add(te);
+            }
+        });
+        cmdLineClasses = Collections.unmodifiableSet(result);
+    }
+
+    /**
+     * Initialize packages information.
+     *
+     * @param toolEnv the compilation environment
+     * @param packages a list of package names (String)
+     */
+    private void setPackages(ToolEnvironment toolEnv, List<String> packages) {
+        Set<PackageElement> packlist = new LinkedHashSet<>();
+        packages.stream().forEach((name) -> {
+            PackageElement pkg =  getElementUtils().getPackageElement(name);
+            if (pkg != null) {
+                toolEnv.setIncluded(pkg);
+                packlist.add(pkg);
+            } else {
+                toolEnv.warning("main.no_source_files_for_package", name);
+            }
+        });
+        cmdLinePackages = Collections.unmodifiableSet(packlist);
+    }
+
+    /**
+     * Packages specified on the command line.
+     */
+    public Set<PackageElement> specifiedPackages() {
+        return cmdLinePackages;
+    }
+
+    /**
+     * Classes and interfaces specified on the command line,
+     * including their inner classes
+     */
+    public Set<TypeElement> specifiedClasses() {
+       Set<TypeElement> out = new LinkedHashSet<>();
+       cmdLineClasses.stream().forEach((te) -> {
+            toolEnv.addAllClasses(out, te, true);
+        });
+       return out;
+    }
+
+    private Set<TypeElement> classesToDocument = null;
+    /**
+     * Return all classes and interfaces (including those inside
+     * packages) to be documented.
+     */
+    public Set<TypeElement> getIncludedClasses() {
+        if (classesToDocument == null) {
+            Set<TypeElement> classes = new LinkedHashSet<>();
+
+            cmdLineClasses.stream().forEach((te) -> {
+                toolEnv.addAllClasses(classes, te, true);
+            });
+            cmdLinePackages.stream().forEach((pkg) -> {
+                toolEnv.addAllClasses(classes, pkg);
+            });
+            classesToDocument = Collections.unmodifiableSet(classes);
+        }
+        return classesToDocument;
+    }
+
+    /**
+     * Return the name of this  item.
+     *
+     * @return the string <code>"*RootDocImpl*"</code>.
+     */
+    public String name() {
+        return "*RootDocImpl*";
+    }
+
+    /**
+     * Return the name of this Doc item.
+     *
+     * @return the string <code>"*RootDocImpl*"</code>.
+     */
+    public String qualifiedName() {
+        return "*RootDocImpl*";
+    }
+
+    /**
+     * Return true if this Element is included in the active set.
+     * RootDocImpl isn't even a program entity so it is always false.
+     */
+    @Override
+    public boolean isIncluded(Element e) {
+        return toolEnv.isIncluded(e);
+    }
+
+//    Note: these reporting methods are no longer used.
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printError(String msg) {
+//        env.printError(msg);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printError(DocTreePath path, String msg) {
+//        env.printError(path, msg);
+//    }
+//
+//    public void printError(Element e, String msg) {
+//        env.printError(e, msg);
+//    }
+//
+//    public void printWarning(Element e, String msg) {
+//        env.printWarning(e, msg);
+//    }
+//
+//    public void printNotice(Element e, String msg) {
+//       env.printNotice(e, msg);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printWarning(String msg) {
+//        env.printWarning(msg);
+//    }
+
+    /**
+     * Return the current file manager.
+     */
+    public JavaFileManager getFileManager() {
+        return toolEnv.fileManager;
+    }
+
+    @Override
+    public DocTrees getDocTrees() {
+        return toolEnv.docTrees;
+    }
+
+    @Override
+    public Elements getElementUtils() {
+        return toolEnv.elements;
+    }
+
+    @Override
+    public List<Element> getSelectedElements(List<? extends Element> elements) {
+        return elements.stream()
+                .filter(e -> isIncluded(e))
+                .collect(Collectors.<Element>toList());
+    }
+
+    @Override
+    public Set<Element> getSpecifiedElements() {
+        Set<Element> out = new LinkedHashSet<>();
+        specifiedPackages().stream().forEach((pe) -> {
+            out.add(pe);
+        });
+        specifiedClasses().stream().forEach((e) -> {
+            out.add(e);
+        });
+        return out;
+    }
+
+    @Override
+    public Types getTypeUtils() {
+        return toolEnv.typeutils;
+    }
+
+    @Override
+    public JavaFileManager getJavaFileManager() {
+        return toolEnv.fileManager;
+    }
+
+    @Override
+    public SourceVersion getSourceVersion() {
+        return Source.toSourceVersion(toolEnv.source);
+    }
+}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocClassFinder.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocClassFinder.java	Fri Jul 08 12:17:10 2016 -0700
@@ -60,7 +60,7 @@
         });
     }
 
-    private DocEnv docenv;
+    private ToolEnvironment toolEnv;
     private EnumSet<JavaFileObject.Kind> all = EnumSet.of(JavaFileObject.Kind.CLASS,
                                                           JavaFileObject.Kind.SOURCE,
                                                           JavaFileObject.Kind.HTML);
@@ -72,7 +72,7 @@
 
     public JavadocClassFinder(Context context) {
         super(context);
-        docenv = DocEnv.instance(context);
+        toolEnv = ToolEnvironment.instance(context);
         preferSource = true;
         trees = JavacTrees.instance(context);
     }
@@ -82,7 +82,7 @@
      */
     @Override
     protected EnumSet<JavaFileObject.Kind> getPackageFileKinds() {
-        return docenv.docClasses ? noSource : all;
+        return toolEnv.docClasses ? noSource : all;
     }
 
     /**
@@ -91,7 +91,7 @@
     @Override
     protected void extraFileActions(PackageSymbol pack, JavaFileObject fo) {
         if (fo.isNameCompatible("package", JavaFileObject.Kind.HTML)) {
-            docenv.pkgToJavaFOMap.put(pack, fo);
+            toolEnv.pkgToJavaFOMap.put(pack, fo);
             trees.putJavaFileObject(pack, fo);
         }
     }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocEnter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocEnter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -67,11 +67,11 @@
     protected JavadocEnter(Context context) {
         super(context);
         messager = Messager.instance0(context);
-        docenv = DocEnv.instance(context);
+        toolEnv = ToolEnvironment.instance(context);
     }
 
     final Messager messager;
-    final DocEnv docenv;
+    final ToolEnvironment toolEnv;
 
     @Override
     public void main(List<JCCompilationUnit> trees) {
@@ -87,8 +87,8 @@
         super.visitTopLevel(tree);
         if (tree.sourcefile.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE)) {
             JCPackageDecl pd = tree.getPackage();
-            TreePath tp = pd == null ? docenv.getTreePath(tree) : docenv.getTreePath(tree, pd);
-            docenv.setElementToTreePath(tree.packge, tp);
+            TreePath tp = pd == null ? toolEnv.getTreePath(tree) : toolEnv.getTreePath(tree, pd);
+            toolEnv.setElementToTreePath(tree.packge, tp);
         }
     }
 
@@ -98,7 +98,7 @@
         if (tree.sym == null) return;
         if (tree.sym.kind == TYP || tree.sym.kind == ERR) {
             ClassSymbol c = tree.sym;
-            docenv.setElementToTreePath(c, docenv.getTreePath(env.toplevel, tree));
+            toolEnv.setElementToTreePath(c, toolEnv.getTreePath(env.toplevel, tree));
         }
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,11 +63,11 @@
         });
     }
 
-    final DocEnv docenv;
+    final ToolEnvironment toolEnv;
 
     protected JavadocMemberEnter(Context context) {
         super(context);
-        docenv = DocEnv.instance(context);
+        toolEnv = ToolEnvironment.instance(context);
     }
 
     @Override
@@ -75,12 +75,12 @@
         super.visitMethodDef(tree);
         MethodSymbol meth = tree.sym;
         if (meth == null || meth.kind != MTH) return;
-        TreePath treePath = docenv.getTreePath(env.toplevel, env.enclClass, tree);
+        TreePath treePath = toolEnv.getTreePath(env.toplevel, env.enclClass, tree);
         // do not add those methods that may be mandated by the spec,
         // or those that are synthesized, thus if it does not exist in
         // tree best to let other logic determine the TreePath.
         if (env.enclClass.defs.contains(tree)) {
-            docenv.setElementToTreePath(meth, treePath);
+            toolEnv.setElementToTreePath(meth, treePath);
         }
         // release resources
         tree.body = null;
@@ -101,7 +101,7 @@
         }
         super.visitVarDef(tree);
         if (tree.sym != null && tree.sym.kind == VAR && !isParameter(tree.sym)) {
-            docenv.setElementToTreePath(tree.sym, docenv.getTreePath(env.toplevel, env.enclClass, tree));
+            toolEnv.setElementToTreePath(tree.sym, toolEnv.getTreePath(env.toplevel, env.enclClass, tree));
         }
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java	Fri Jul 08 12:17:10 2016 -0700
@@ -74,7 +74,7 @@
  *  @author Neal Gafter
  */
 public class JavadocTool extends com.sun.tools.javac.main.JavaCompiler {
-    DocEnv docenv;
+    ToolEnvironment toolEnv;
 
     final Messager messager;
     final ClassFinder javadocFinder;
@@ -138,8 +138,8 @@
                                       List<String> excludedPackages,
                                       boolean docClasses,
                                       boolean quiet) throws IOException {
-        docenv = DocEnv.instance(context);
-        docenv.intialize(encoding, showAccess, overviewpath, args, fileObjects,
+        toolEnv = ToolEnvironment.instance(context);
+        toolEnv.intialize(encoding, showAccess, overviewpath, args, fileObjects,
                          subPackages, excludedPackages, docClasses, quiet);
 
         javadocFinder.sourceCompleter = docClasses ? Completer.NULL_COMPLETER : sourceCompleter;
@@ -148,12 +148,12 @@
             // If -Xclasses is set, the args should be a series of class names
             for (String arg: args) {
                 if (!isValidPackageName(arg)) // checks
-                    docenv.error(null, "main.illegal_class_name", arg);
+                    toolEnv.error(null, "main.illegal_class_name", arg);
             }
             if (messager.nerrors() != 0) {
                 return null;
             }
-            return new RootDocImpl(docenv, args);
+            return new DocEnvImpl(toolEnv, args);
         }
 
         ListBuffer<JCCompilationUnit> classTrees = new ListBuffer<>();
@@ -161,15 +161,15 @@
 
         try {
 
-            StandardJavaFileManager fm = docenv.fileManager instanceof StandardJavaFileManager
-                    ? (StandardJavaFileManager) docenv.fileManager : null;
+            StandardJavaFileManager fm = toolEnv.fileManager instanceof StandardJavaFileManager
+                    ? (StandardJavaFileManager) toolEnv.fileManager : null;
             Set<String> packageNames = new LinkedHashSet<>();
             // Normally, the args should be a series of package names or file names.
             // Parse the files and collect the package names.
             for (String arg: args) {
                 if (fm != null && arg.endsWith(".java") && new File(arg).exists()) {
                     if (new File(arg).getName().equals("module-info.java")) {
-                        docenv.warning("main.file_ignored", arg);
+                        toolEnv.warning("main.file_ignored", arg);
                     } else {
                         parse(fm.getJavaFileObjects(arg), classTrees, true);
                     }
@@ -179,9 +179,9 @@
                     if (fm == null)
                         throw new IllegalArgumentException();
                     else
-                        docenv.error(null, "main.file_not_found", arg);
+                        toolEnv.error(null, "main.file_not_found", arg);
                 } else {
-                    docenv.error(null, "main.illegal_package_name", arg);
+                    toolEnv.error(null, "main.illegal_package_name", arg);
                 }
             }
 
@@ -193,10 +193,10 @@
 
             // Build up the complete list of any packages to be documented
             Location location = modules.multiModuleMode ? StandardLocation.MODULE_SOURCE_PATH
-                    : docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH) ? StandardLocation.SOURCE_PATH
+                    : toolEnv.fileManager.hasLocation(StandardLocation.SOURCE_PATH) ? StandardLocation.SOURCE_PATH
                     : StandardLocation.CLASS_PATH;
 
-            PackageTable t = new PackageTable(docenv.fileManager, location)
+            PackageTable t = new PackageTable(toolEnv.fileManager, location)
                     .packages(packageNames)
                     .subpackages(subPackages, excludedPackages);
 
@@ -206,9 +206,9 @@
             ListBuffer<JCCompilationUnit> packageTrees = new ListBuffer<>();
             for (String packageName: includedPackages) {
                 List<JavaFileObject> files = t.getFiles(packageName);
-                docenv.notice("main.Loading_source_files_for_package", packageName);
+                toolEnv.notice("main.Loading_source_files_for_package", packageName);
                 if (files.isEmpty())
-                    docenv.warning("main.no_source_files_for_package", packageName);
+                    toolEnv.warning("main.no_source_files_for_package", packageName);
                 parse(files, packageTrees, false);
             }
             modules.enter(packageTrees.toList(), null);
@@ -218,7 +218,7 @@
             }
 
             // Enter symbols for all files
-            docenv.notice("main.Building_tree");
+            toolEnv.notice("main.Building_tree");
             javadocEnter.main(classTrees.toList().appendList(packageTrees.toList()));
 
             enterDone = true;
@@ -226,9 +226,9 @@
 
         if (messager.nerrors() != 0)
             return null;
-        docenv.root = new RootDocImpl(docenv, listClasses(classTrees.toList()),
+        toolEnv.docEnv = new DocEnvImpl(toolEnv, listClasses(classTrees.toList()),
                                       new ArrayList<>(includedPackages));
-        return docenv.root;
+        return toolEnv.docEnv;
     }
 
     /** Is the given string a valid package name? */
@@ -246,7 +246,7 @@
         for (JavaFileObject fo: files) {
             if (uniquefiles.add(fo)) { // ignore duplicates
                 if (trace)
-                    docenv.notice("main.Loading_source_file", fo.getName());
+                    toolEnv.notice("main.Loading_source_file", fo.getName());
                 trees.append(parse(fo));
             }
         }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.javadoc.internal.tool;
-
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.PackageElement;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.util.Elements;
-import javax.lang.model.util.Types;
-import javax.tools.JavaFileManager;
-
-import com.sun.source.util.DocTrees;
-import com.sun.tools.javac.code.Source;
-import com.sun.tools.javac.tree.JCTree.JCClassDecl;
-import jdk.javadoc.doclet.DocletEnvironment;
-
-/**
- * This class holds the information from one run of javadoc.
- * Particularly the packages, classes and options specified
- * by the user.
- *
- *  <p><b>This is NOT part of any supported API.
- *  If you write code that depends on this, you do so at your own risk.
- *  This code and its internal interfaces are subject to change or
- *  deletion without notice.</b>
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Neal Gafter (rewrite)
- */
-public class RootDocImpl implements DocletEnvironment {
-
-    /**
-     * list of classes specified on the command line.
-     */
-    private Set<TypeElement> cmdLineClasses;
-
-    /**
-     * list of packages specified on the command line.
-     */
-    private  Set<PackageElement> cmdLinePackages;
-
-    public final DocEnv env;
-
-    /**
-     * Constructor used when reading source files.
-     *
-     * @param env the documentation environment, state for this javadoc run
-     * @param classes list of classes specified on the commandline
-     * @param packages list of package names specified on the commandline
-     */
-    public RootDocImpl(DocEnv env, List<JCClassDecl> classes, List<String> packages) {
-        this.env = env;
-        setPackages(env, packages);
-        setClasses(env, classes);
-    }
-
-    /**
-     * Constructor used when reading class files.
-     *
-     * @param env the documentation environment, state for this javadoc run
-     * @param classes list of class names specified on the commandline
-     */
-    public RootDocImpl(DocEnv env, List<String> classes) {
-        //super(env, null);
-        this.env = env;
-
-        Set<TypeElement> classList = new LinkedHashSet<>();
-        for (String className : classes) {
-            TypeElement c = env.loadClass(className);
-            if (c == null)
-                env.error(null, "javadoc.class_not_found", className);
-            else
-                classList.add(c);
-        }
-        cmdLineClasses = classList;
-    }
-
-    /**
-     * Initialize classes information. Those classes are input from
-     * command line.
-     *
-     * @param env the compilation environment
-     * @param classes a list of ClassDeclaration
-     */
-    private void setClasses(DocEnv env, List<JCClassDecl> classes) {
-        Set<TypeElement> result = new LinkedHashSet<>();
-        classes.stream().filter((def) -> (env.shouldDocument(def.sym))).forEach((def) -> {
-            TypeElement te = (TypeElement)def.sym;
-            if (te != null) {
-                env.setIncluded((Element)def.sym);
-                result.add(te);
-            }
-        });
-        cmdLineClasses = Collections.unmodifiableSet(result);
-    }
-
-    /**
-     * Initialize packages information.
-     *
-     * @param env the compilation environment
-     * @param packages a list of package names (String)
-     */
-    private void setPackages(DocEnv env, List<String> packages) {
-        Set<PackageElement> packlist = new LinkedHashSet<>();
-        packages.stream().forEach((name) -> {
-            PackageElement pkg =  getElementUtils().getPackageElement(name);
-            if (pkg != null) {
-                env.setIncluded(pkg);
-                packlist.add(pkg);
-            } else {
-                env.warning("main.no_source_files_for_package", name);
-            }
-        });
-        cmdLinePackages = Collections.unmodifiableSet(packlist);
-    }
-
-    /**
-     * Packages specified on the command line.
-     */
-    public Set<PackageElement> specifiedPackages() {
-        return cmdLinePackages;
-    }
-
-    /**
-     * Classes and interfaces specified on the command line,
-     * including their inner classes
-     */
-    public Set<TypeElement> specifiedClasses() {
-       Set<TypeElement> out = new LinkedHashSet<>();
-       cmdLineClasses.stream().forEach((te) -> {
-            env.addAllClasses(out, te, true);
-        });
-       return out;
-    }
-
-    private Set<TypeElement> classesToDocument = null;
-    /**
-     * Return all classes and interfaces (including those inside
-     * packages) to be documented.
-     */
-    public Set<TypeElement> getIncludedClasses() {
-        if (classesToDocument == null) {
-            Set<TypeElement> classes = new LinkedHashSet<>();
-
-            cmdLineClasses.stream().forEach((te) -> {
-                env.addAllClasses(classes, te, true);
-            });
-            cmdLinePackages.stream().forEach((pkg) -> {
-                env.addAllClasses(classes, pkg);
-            });
-            classesToDocument = Collections.unmodifiableSet(classes);
-        }
-        return classesToDocument;
-    }
-
-    /**
-     * Return the name of this  item.
-     *
-     * @return the string <code>"*RootDocImpl*"</code>.
-     */
-    public String name() {
-        return "*RootDocImpl*";
-    }
-
-    /**
-     * Return the name of this Doc item.
-     *
-     * @return the string <code>"*RootDocImpl*"</code>.
-     */
-    public String qualifiedName() {
-        return "*RootDocImpl*";
-    }
-
-    /**
-     * Return true if this Element is included in the active set.
-     * RootDocImpl isn't even a program entity so it is always false.
-     */
-    @Override
-    public boolean isIncluded(Element e) {
-        return env.isIncluded(e);
-    }
-
-//    Note: these reporting methods are no longer used.
-//    /**
-//     * Print error message, increment error count.
-//     *
-//     * @param msg message to print
-//     */
-//    public void printError(String msg) {
-//        env.printError(msg);
-//    }
-//
-//    /**
-//     * Print error message, increment error count.
-//     *
-//     * @param msg message to print
-//     */
-//    public void printError(DocTreePath path, String msg) {
-//        env.printError(path, msg);
-//    }
-//
-//    public void printError(Element e, String msg) {
-//        env.printError(e, msg);
-//    }
-//
-//    public void printWarning(Element e, String msg) {
-//        env.printWarning(e, msg);
-//    }
-//
-//    public void printNotice(Element e, String msg) {
-//       env.printNotice(e, msg);
-//    }
-//
-//    /**
-//     * Print warning message, increment warning count.
-//     *
-//     * @param msg message to print
-//     */
-//    public void printWarning(String msg) {
-//        env.printWarning(msg);
-//    }
-
-    /**
-     * Return the current file manager.
-     */
-    public JavaFileManager getFileManager() {
-        return env.fileManager;
-    }
-
-    @Override
-    public DocTrees getDocTrees() {
-        return env.docTrees;
-    }
-
-    @Override
-    public Elements getElementUtils() {
-        return env.elements;
-    }
-
-    @Override
-    public List<Element> getSelectedElements(List<? extends Element> elements) {
-        return elements.stream()
-                .filter(e -> isIncluded(e))
-                .collect(Collectors.<Element>toList());
-    }
-
-    @Override
-    public Set<Element> getSpecifiedElements() {
-        Set<Element> out = new LinkedHashSet<>();
-        specifiedPackages().stream().forEach((pe) -> {
-            out.add(pe);
-        });
-        specifiedClasses().stream().forEach((e) -> {
-            out.add(e);
-        });
-        return out;
-    }
-
-    @Override
-    public Types getTypeUtils() {
-        return env.typeutils;
-    }
-
-    @Override
-    public JavaFileManager getJavaFileManager() {
-        return env.fileManager;
-    }
-
-    @Override
-    public SourceVersion getSourceVersion() {
-        return Source.toSourceVersion(env.source);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolEnvironment.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,848 @@
+/*
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.javadoc.internal.tool;
+
+
+import java.lang.reflect.Modifier;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.api.JavacTrees;
+import com.sun.tools.javac.code.ClassFinder;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Kinds.Kind;
+import com.sun.tools.javac.code.Source;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Symbol.ModuleSymbol;
+import com.sun.tools.javac.code.Symbol.PackageSymbol;
+import com.sun.tools.javac.code.Symbol.VarSymbol;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.comp.AttrContext;
+import com.sun.tools.javac.comp.Check;
+import com.sun.tools.javac.comp.Enter;
+import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.model.JavacElements;
+import com.sun.tools.javac.model.JavacTypes;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.tree.JCTree.JCPackageDecl;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Convert;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import com.sun.tools.javac.util.Name;
+import com.sun.tools.javac.util.Names;
+
+import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
+
+/**
+ * Holds the environment for a run of javadoc.
+ * Holds only the information needed throughout the
+ * run and not the compiler info that could be GC'ed
+ * or ported.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ *
+ * @author Robert Field
+ * @author Neal Gafter (rewrite)
+ * @author Scott Seligman (generics)
+ */
+public class ToolEnvironment {
+    protected static final Context.Key<ToolEnvironment> ToolEnvKey = new Context.Key<>();
+
+    public static ToolEnvironment instance(Context context) {
+        ToolEnvironment instance = context.get(ToolEnvKey);
+        if (instance == null)
+            instance = new ToolEnvironment(context);
+        return instance;
+    }
+
+    private final Messager messager;
+
+    /** Predefined symbols known to the compiler. */
+    public final Symtab syms;
+
+    /** Referenced directly in RootDocImpl. */
+    private final ClassFinder finder;
+
+    /** Javadoc's own version of the compiler's enter phase. */
+    final Enter enter;
+
+    /** The name table. */
+    private Names names;
+
+    /** The encoding name. */
+    private String encoding;
+
+    final Symbol externalizableSym;
+
+    /** Access filter (public, protected, ...).  */
+    protected ModifierFilter filter;
+
+    /**
+     * True if we do not want to print any notifications at all.
+     */
+    boolean quiet = false;
+
+    Check chk;
+    com.sun.tools.javac.code.Types types;
+    JavaFileManager fileManager;
+    public final Context context;
+
+    WeakHashMap<JCTree, TreePath> treePaths = new WeakHashMap<>();
+
+    public final HashMap<PackageElement, JavaFileObject> pkgToJavaFOMap = new HashMap<>();
+
+    /** Allow documenting from class files? */
+    boolean docClasses = false;
+
+    /**
+     * The source language version.
+     */
+    public final Source source;
+
+    public final Elements elements;
+
+    public final JavacTypes typeutils;
+
+    protected DocEnvImpl docEnv;
+
+    public final DocTrees docTrees;
+
+    public final Map<Element, TreePath> elementToTreePath;
+
+    /**
+     * Constructor
+     *
+     * @param context      Context for this javadoc instance.
+     */
+    protected ToolEnvironment(Context context) {
+        context.put(ToolEnvKey, this);
+        this.context = context;
+
+        messager = Messager.instance0(context);
+        syms = Symtab.instance(context);
+        finder = JavadocClassFinder.instance(context);
+        enter = JavadocEnter.instance(context);
+        names = Names.instance(context);
+        externalizableSym = syms.enterClass(syms.java_base, names.fromString("java.io.Externalizable"));
+        chk = Check.instance(context);
+        types = com.sun.tools.javac.code.Types.instance(context);
+        fileManager = context.get(JavaFileManager.class);
+        if (fileManager instanceof JavacFileManager) {
+            ((JavacFileManager)fileManager).setSymbolFileEnabled(false);
+        }
+        docTrees = JavacTrees.instance(context);
+        source = Source.instance(context);
+        elements =  JavacElements.instance(context);
+        typeutils = JavacTypes.instance(context);
+        elementToTreePath = new HashMap<>();
+    }
+
+    public void intialize(String encoding,
+            String showAccess,
+            String overviewpath,
+            List<String> javaNames,
+            Iterable<? extends JavaFileObject> fileObjects,
+            List<String> subPackages,
+            List<String> excludedPackages,
+            boolean docClasses,
+            boolean quiet) {
+        this.filter = ModifierFilter.getModifierFilter(showAccess);
+        this.quiet = quiet;
+
+        this.setEncoding(encoding);
+        this.docClasses = docClasses;
+    }
+
+    /**
+     * Load a class by qualified name.
+     */
+    public TypeElement loadClass(String name) {
+        try {
+            Name nameImpl = names.fromString(name);
+            ModuleSymbol mod = syms.inferModule(Convert.packagePart(nameImpl));
+            ClassSymbol c = finder.loadClass(mod != null ? mod : syms.errModule, nameImpl);
+            return c;
+        } catch (CompletionFailure ex) {
+            chk.completionError(null, ex);
+            return null;
+        }
+    }
+
+    private boolean isSynthetic(long flags) {
+        return (flags & Flags.SYNTHETIC) != 0;
+    }
+
+    private boolean isSynthetic(Symbol sym) {
+        return isSynthetic(sym.flags_field);
+    }
+
+    SimpleElementVisitor9<Boolean, Void> shouldDocumentVisitor = null;
+    public boolean shouldDocument(Element e) {
+        if (shouldDocumentVisitor == null) {
+            shouldDocumentVisitor = new SimpleElementVisitor9<Boolean, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitType(TypeElement e, Void p) {
+                return shouldDocument((ClassSymbol)e);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitVariable(VariableElement e, Void p) {
+                return shouldDocument((VarSymbol)e);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitExecutable(ExecutableElement e, Void p) {
+                return shouldDocument((MethodSymbol)e);
+            }
+        };
+        }
+        return shouldDocumentVisitor.visit(e);
+    }
+
+    /** Check whether this member should be documented. */
+    public boolean shouldDocument(VarSymbol sym) {
+        long mod = sym.flags();
+        if (isSynthetic(mod)) {
+            return false;
+        }
+        return filter.checkModifier(translateModifiers(mod));
+    }
+
+    /** Check whether this member should be documented. */
+    public boolean shouldDocument(MethodSymbol sym) {
+        long mod = sym.flags();
+        if (isSynthetic(mod)) {
+            return false;
+        }
+        return filter.checkModifier(translateModifiers(mod));
+    }
+
+    void setElementToTreePath(Element e, TreePath tree) {
+        if (e == null || tree == null)
+            return;
+        elementToTreePath.put(e, tree);
+    }
+
+    private boolean hasLeaf(ClassSymbol sym) {
+        TreePath path = elementToTreePath.get(sym);
+        if (path == null)
+            return false;
+        return path.getLeaf() != null;
+    }
+
+    /** check whether this class should be documented. */
+    public boolean shouldDocument(ClassSymbol sym) {
+        return
+            !isSynthetic(sym.flags_field) && // no synthetics
+            (docClasses || hasLeaf(sym)) &&
+            isVisible(sym);
+    }
+
+    //### Comment below is inaccurate wrt modifier filter testing
+    /**
+     * Check the visibility if this is an nested class.
+     * if this is not a nested class, return true.
+     * if this is an static visible nested class,
+     *    return true.
+     * if this is an visible nested class
+     *    if the outer class is visible return true.
+     *    else return false.
+     * IMPORTANT: This also allows, static nested classes
+     * to be defined inside an nested class, which is not
+     * allowed by the compiler. So such an test case will
+     * not reach upto this method itself, but if compiler
+     * allows it, then that will go through.
+     */
+    public boolean isVisible(ClassSymbol sym) {
+        long mod = sym.flags_field;
+        if (!filter.checkModifier(translateModifiers(mod))) {
+            return false;
+        }
+        ClassSymbol encl = sym.owner.enclClass();
+        return (encl == null || (mod & Flags.STATIC) != 0 || isVisible(encl));
+    }
+
+    //---------------- print forwarders ----------------//
+
+    // ERRORS
+    /**
+     * Print error message, increment error count.
+     *
+     * @param msg message to print.
+     */
+    public void printError(String msg) {
+        messager.printError(msg);
+    }
+
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param key selects message from resource
+//     */
+//    public void error(Element element, String key) {
+//        if (element == null)
+//            messager.error(key);
+//        else
+//            messager.error(element, key);
+//    }
+//
+//    public void error(String prefix, String key) {
+//        printError(prefix + ":" + messager.getText(key));
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param path the path to the source
+//     * @param key selects message from resource
+//     */
+//    public void error(DocTreePath path, String key) {
+//        messager.error(path, key);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printError(DocTreePath path, String msg) {
+//        messager.printError(path, msg);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     * @param e the target element
+//     * @param msg message to print.
+//     */
+//    public void printError(Element e, String msg) {
+//        messager.printError(e, msg);
+//    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param element the source element
+     * @param key selects message from resource
+     * @param args replacement arguments
+     */
+    public void error(Element element, String key, String... args) {
+        if (element == null)
+            messager.error(key, (Object[]) args);
+        else
+            messager.error(element, key, (Object[]) args);
+    }
+
+    // WARNINGS
+
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param msg message to print.
+//     */
+//    public void printWarning(String msg) {
+//        messager.printWarning(msg);
+//    }
+//
+//    public void warning(String key) {
+//        warning((Element)null, key);
+//    }
+
+    public void warning(String key, String... args) {
+        warning((Element)null, key, args);
+    }
+
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param element the source element
+//     * @param key selects message from resource
+//     */
+//    public void warning(Element element, String key) {
+//        if (element == null)
+//            messager.warning(key);
+//        else
+//            messager.warning(element, key);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printWarning(DocTreePath path, String msg) {
+//        messager.printWarning(path, msg);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param e  the source element
+//     * @param msg message to print.
+//     */
+//    public void printWarning(Element e, String msg) {
+//        messager.printWarning(e, msg);
+//    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param e    the source element
+     * @param key  selects message from resource
+     * @param args the replace arguments
+     */
+    public void warning(Element e, String key, String... args) {
+        if (e == null)
+            messager.warning(key, (Object[]) args);
+        else
+            messager.warning(e, key, (Object[]) args);
+    }
+
+//    Note: no longer required
+//    /**
+//     * Print a message.
+//     *
+//     * @param msg message to print.
+//     */
+//    public void printNotice(String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(msg);
+//    }
+
+//  Note: no longer required
+//    /**
+//     * Print a message.
+//     *
+//     * @param e the source element
+//     * @param msg message to print.
+//     */
+//    public void printNotice(Element e, String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(e, msg);
+//    }
+
+    //  NOTICES
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     */
+    public void notice(String key) {
+        if (quiet) {
+            return;
+        }
+        messager.notice(key);
+    }
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printNotice(DocTreePath path, String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(path, msg);
+//    }
+
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     * @param a1 first argument
+     */
+    public void notice(String key, String a1) {
+        if (quiet) {
+            return;
+        }
+        messager.notice(key, a1);
+    }
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param key selects message from resource
+//     * @param a1 first argument
+//     * @param a2 second argument
+//     */
+//    public void notice(String key, String a1, String a2) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.notice(key, a1, a2);
+//    }
+//
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param key selects message from resource
+//     * @param a1 first argument
+//     * @param a2 second argument
+//     * @param a3 third argument
+//     */
+//    public void notice(String key, String a1, String a2, String a3) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.notice(key, a1, a2, a3);
+//    }
+
+    /**
+     * Exit, reporting errors and warnings.
+     */
+    public void exit() {
+        // Messager should be replaced by a more general
+        // compilation environment.  This can probably
+        // subsume DocEnv as well.
+        throw new Messager.ExitJavadoc();
+    }
+
+    /**
+     * Adds all inner classes of this class, and their inner classes recursively, to the list
+     */
+    void addAllClasses(Collection<TypeElement> list, TypeElement typeElement, boolean filtered) {
+        ClassSymbol klass = (ClassSymbol)typeElement;
+        try {
+            if (isSynthetic(klass.flags())) return;
+            // sometimes synthetic classes are not marked synthetic
+            if (!JavadocTool.isValidClassName(klass.name.toString())) return;
+            if (filtered && !shouldDocument(klass)) return;
+            if (list.contains(klass)) return;
+            list.add(klass);
+            for (Symbol sym : klass.members().getSymbols(NON_RECURSIVE)) {
+                if (sym != null && sym.kind == Kind.TYP) {
+                    ClassSymbol s = (ClassSymbol)sym;
+                    if (!isSynthetic(s.flags())) {
+                        addAllClasses(list, s, filtered);
+                    }
+                }
+            }
+        } catch (CompletionFailure e) {
+            // quietly ignore completion failures
+        }
+    }
+
+    /**
+     * Return a list of all classes contained in this package, including
+     * member classes of those classes, and their member classes, etc.
+     */
+    void addAllClasses(Collection<TypeElement> list, PackageElement pkg) {
+        boolean filtered = true;
+        PackageSymbol sym = (PackageSymbol)pkg;
+        for (Symbol isym : sym.members().getSymbols(NON_RECURSIVE)) {
+            if (isym != null) {
+                ClassSymbol s = (ClassSymbol)isym;
+                if (!isSynthetic(s)) {
+                    addAllClasses(list, s, filtered);
+                }
+            }
+        }
+    }
+
+    TreePath getTreePath(JCCompilationUnit tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCPackageDecl tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl cdecl, JCTree tree) {
+        return new TreePath(getTreePath(toplevel, cdecl), tree);
+    }
+
+    public com.sun.tools.javac.code.Types getTypes() {
+        return types;
+    }
+
+    /**
+     * Set the encoding.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    public Env<AttrContext> getEnv(ClassSymbol tsym) {
+        return enter.getEnv(tsym);
+    }
+
+    /**
+     * Get the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * Convert modifier bits from private coding used by
+     * the compiler to that of java.lang.reflect.Modifier.
+     */
+    static int translateModifiers(long flags) {
+        int result = 0;
+        if ((flags & Flags.ABSTRACT) != 0)
+            result |= Modifier.ABSTRACT;
+        if ((flags & Flags.FINAL) != 0)
+            result |= Modifier.FINAL;
+        if ((flags & Flags.INTERFACE) != 0)
+            result |= Modifier.INTERFACE;
+        if ((flags & Flags.NATIVE) != 0)
+            result |= Modifier.NATIVE;
+        if ((flags & Flags.PRIVATE) != 0)
+            result |= Modifier.PRIVATE;
+        if ((flags & Flags.PROTECTED) != 0)
+            result |= Modifier.PROTECTED;
+        if ((flags & Flags.PUBLIC) != 0)
+            result |= Modifier.PUBLIC;
+        if ((flags & Flags.STATIC) != 0)
+            result |= Modifier.STATIC;
+        if ((flags & Flags.SYNCHRONIZED) != 0)
+            result |= Modifier.SYNCHRONIZED;
+        if ((flags & Flags.TRANSIENT) != 0)
+            result |= Modifier.TRANSIENT;
+        if ((flags & Flags.VOLATILE) != 0)
+            result |= Modifier.VOLATILE;
+        return result;
+    }
+
+    private final Set<Element> includedSet = new HashSet<>();
+
+    public void setIncluded(Element element) {
+        includedSet.add(element);
+    }
+
+    private SimpleElementVisitor9<Boolean, Void> includedVisitor = null;
+
+    public boolean isIncluded(Element e) {
+        if (e == null) {
+            return false;
+        }
+        if (includedVisitor == null) {
+            includedVisitor = new SimpleElementVisitor9<Boolean, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitType(TypeElement e, Void p) {
+                    if (includedSet.contains(e)) {
+                        return true;
+                    }
+                    if (shouldDocument(e)) {
+                        // Class is nameable from top-level and
+                        // the class and all enclosing classes
+                        // pass the modifier filter.
+                        PackageElement pkg = elements.getPackageOf(e);
+                        if (includedSet.contains(pkg)) {
+                            setIncluded(e);
+                            return true;
+                        }
+                        Element enclosing = e.getEnclosingElement();
+                        if (enclosing != null && includedSet.contains(enclosing)) {
+                            setIncluded(e);
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitPackage(PackageElement e, Void p) {
+                    return includedSet.contains(e);
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitUnknown(Element e, Void p) {
+                    throw new AssertionError("unknown element: " + e);
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean defaultAction(Element e, Void p) {
+                    return visit(e.getEnclosingElement()) && shouldDocument(e);
+                }
+            };
+        }
+        return includedVisitor.visit(e);
+    }
+
+    public boolean isQuiet() {
+        return quiet;
+    }
+
+    /**
+     * A class which filters the access flags on classes, fields, methods, etc.
+     *
+     * <p>
+     * <b>This is NOT part of any supported API. If you write code that depends on this, you do so
+     * at your own risk. This code and its internal interfaces are subject to change or deletion
+     * without notice.</b>
+     *
+     * @see javax.lang.model.element.Modifier
+     * @author Robert Field
+     */
+
+    private static class ModifierFilter {
+
+        static enum FilterFlag {
+            PACKAGE,
+            PRIVATE,
+            PROTECTED,
+            PUBLIC
+        }
+
+        private Set<FilterFlag> oneOf;
+
+        /**
+         * Constructor - Specify a filter.
+         *
+         * @param oneOf a set containing desired flags to be matched.
+         */
+        ModifierFilter(Set<FilterFlag> oneOf) {
+            this.oneOf = oneOf;
+        }
+
+        /**
+         * Constructor - Specify a filter.
+         *
+         * @param oneOf an array containing desired flags to be matched.
+         */
+        ModifierFilter(FilterFlag... oneOf) {
+            this.oneOf = new HashSet<>();
+            this.oneOf.addAll(Arrays.asList(oneOf));
+        }
+
+        static ModifierFilter getModifierFilter(String showAccess) {
+            switch (showAccess) {
+                case "public":
+                    return new ModifierFilter(FilterFlag.PUBLIC);
+                case "package":
+                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED,
+                                              FilterFlag.PACKAGE);
+                case "private":
+                    return new ModifierFilter(FilterFlag.PRIVATE);
+                default:
+                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED);
+            }
+        }
+
+        private boolean hasFlag(long flag, long modifierBits) {
+            return (flag & modifierBits) != 0;
+        }
+
+        private List<FilterFlag> flagsToModifiers(long modifierBits) {
+            List<FilterFlag> list = new ArrayList<>();
+            boolean isPackage = true;
+            if (hasFlag(com.sun.tools.javac.code.Flags.PRIVATE, modifierBits)) {
+                list.add(FilterFlag.PRIVATE);
+                isPackage = false;
+            }
+            if (hasFlag(com.sun.tools.javac.code.Flags.PROTECTED, modifierBits)) {
+                list.add(FilterFlag.PROTECTED);
+                isPackage = false;
+            }
+            if (hasFlag(com.sun.tools.javac.code.Flags.PUBLIC, modifierBits)) {
+                list.add(FilterFlag.PUBLIC);
+                isPackage = false;
+            }
+            if (isPackage) {
+                list.add(FilterFlag.PACKAGE);
+            }
+            return list;
+        }
+
+        /**
+         * Filter on modifier bits.
+         *
+         * @param modifierBits Bits as specified in the Modifier class
+         *
+         * @return Whether the modifierBits pass this filter.
+         */
+        public boolean checkModifier(int modifierBits) {
+            return checkModifier(flagsToModifiers(modifierBits));
+        }
+
+        /**
+         * Filter on Filter flags
+         *
+         * @param modifiers Flags as specified in the FilterFlags enumeration.
+         *
+         * @return if the modifier is contained.
+         */
+        public boolean checkModifier(List<FilterFlag> modifiers) {
+            if (oneOf.contains(FilterFlag.PRIVATE)) {
+                return true;
+            }
+            for (FilterFlag mod : modifiers) {
+                if (oneOf.contains(mod)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+    } // end ModifierFilter
+}
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/DeclarationSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -55,8 +55,9 @@
     DeclarationSnippet(DeclarationKey key, String userSource, Wrap guts,
             String unitName, SubKind subkind, Wrap corralled,
             Collection<String> declareReferences,
-            Collection<String> bodyReferences) {
-        super(key, userSource, guts, unitName, subkind);
+            Collection<String> bodyReferences,
+            DiagList syntheticDiags) {
+        super(key, userSource, guts, unitName, subkind, syntheticDiags);
         this.corralled = corralled;
         this.declareReferences = declareReferences;
         this.bodyReferences = bodyReferences;
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ErroneousSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -28,8 +28,7 @@
 import jdk.jshell.Key.ErroneousKey;
 
 /**
- * A snippet of code that is not valid Java programming language code, and for
- * which the kind of snippet could not be determined.
+ * A snippet of code that is not valid Java programming language code.
  * The Kind is {@link jdk.jshell.Snippet.Kind#ERRONEOUS ERRONEOUS}.
  * <p>
  * <code>ErroneousSnippet</code> is immutable: an access to
@@ -38,7 +37,21 @@
  */
 public class ErroneousSnippet extends Snippet {
 
-    ErroneousSnippet(ErroneousKey key, String userSource, Wrap guts, SubKind subkind) {
-        super(key, userSource, guts, null, subkind);
+    private final Kind probableKind;
+
+    ErroneousSnippet(ErroneousKey key, String userSource, Wrap guts,
+            Kind probableKind, SubKind subkind) {
+        super(key, userSource, guts, null, subkind, null);
+        this.probableKind = probableKind;
+    }
+
+    /**
+     * Returns what appears to be the intended Kind in this erroneous snippet.
+     *
+     * @return the probable Kind; or {@link Kind#ERRONEOUS} if that cannot be
+     * determined.
+     */
+    public Kind probableKind() {
+        return probableKind;
     }
 }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Fri Jul 08 12:17:10 2016 -0700
@@ -52,6 +52,7 @@
 import jdk.jshell.Key.ErroneousKey;
 import jdk.jshell.Key.MethodKey;
 import jdk.jshell.Key.TypeDeclKey;
+import jdk.jshell.Snippet.Kind;
 import jdk.jshell.Snippet.SubKind;
 import jdk.jshell.TaskFactory.AnalyzeTask;
 import jdk.jshell.TaskFactory.BaseTask;
@@ -62,6 +63,7 @@
 import jdk.jshell.Snippet.Status;
 import static java.util.stream.Collectors.toList;
 import static java.util.stream.Collectors.toSet;
+import static java.util.Collections.singletonList;
 import static jdk.internal.jshell.debug.InternalDebugControl.DBG_GEN;
 import static jdk.jshell.Util.DOIT_METHOD_NAME;
 import static jdk.jshell.Util.PREFIX_PATTERN;
@@ -89,24 +91,75 @@
         this.state = state;
     }
 
+    /**
+     * Evaluates a snippet of source.
+     *
+     * @param userSource the source of the snippet
+     * @return the list of primary and update events
+     * @throws IllegalStateException
+     */
     List<SnippetEvent> eval(String userSource) throws IllegalStateException {
+        List<SnippetEvent> allEvents = new ArrayList<>();
+        for (Snippet snip : sourceToSnippets(userSource)) {
+            if (snip.kind() == Kind.ERRONEOUS) {
+                state.maps.installSnippet(snip);
+                allEvents.add(new SnippetEvent(
+                        snip, Status.NONEXISTENT, Status.REJECTED,
+                        false, null, null, null));
+            } else {
+                allEvents.addAll(declare(snip, snip.syntheticDiags()));
+            }
+        }
+        return allEvents;
+    }
+
+    /**
+     * Converts the user source of a snippet into a Snippet list -- Snippet will
+     * have wrappers.
+     *
+     * @param userSource the source of the snippet
+     * @return usually a singleton list of Snippet, but may be empty or multiple
+     */
+    List<Snippet> sourceToSnippetsWithWrappers(String userSource) {
+        List<Snippet> snippets = sourceToSnippets(userSource);
+        for (Snippet snip : snippets) {
+            if (snip.outerWrap() == null) {
+                snip.setOuterWrap(
+                        (snip.kind() == Kind.IMPORT)
+                                ? state.outerMap.wrapImport(snip.guts(), snip)
+                                : state.outerMap.wrapInTrialClass(snip.guts())
+                );
+            }
+        }
+        return snippets;
+    }
+
+    /**
+     * Converts the user source of a snippet into a Snippet object (or list of
+     * objects in the case of: int x, y, z;).  Does not install the Snippets
+     * or execute them.
+     *
+     * @param userSource the source of the snippet
+     * @return usually a singleton list of Snippet, but may be empty or multiple
+     */
+    private List<Snippet> sourceToSnippets(String userSource) {
         String compileSource = Util.trimEnd(new MaskCommentsAndModifiers(userSource, false).cleared());
         if (compileSource.length() == 0) {
             return Collections.emptyList();
         }
-        // String folding messes up position information.
         ParseTask pt = state.taskFactory.new ParseTask(compileSource);
+        List<? extends Tree> units = pt.units();
+        if (units.isEmpty()) {
+            return compileFailResult(pt, userSource, Kind.ERRONEOUS);
+        }
+        Tree unitTree = units.get(0);
         if (pt.getDiagnostics().hasOtherThanNotStatementErrors()) {
-            return compileFailResult(pt, userSource);
+            return compileFailResult(pt, userSource, kindOfTree(unitTree));
         }
 
-        List<? extends Tree> units = pt.units();
-        if (units.isEmpty()) {
-            return compileFailResult(pt, userSource);
-        }
-        // Erase illegal modifiers
+        // Erase illegal/ignored modifiers
         compileSource = new MaskCommentsAndModifiers(compileSource, true).cleared();
-        Tree unitTree = units.get(0);
+
         state.debug(DBG_GEN, "Kind: %s -- %s\n", unitTree.getKind(), unitTree);
         switch (unitTree.getKind()) {
             case IMPORT:
@@ -130,7 +183,7 @@
         }
     }
 
-    private List<SnippetEvent> processImport(String userSource, String compileSource) {
+    private List<Snippet> processImport(String userSource, String compileSource) {
         Wrap guts = Wrap.simpleWrap(compileSource);
         Matcher mat = IMPORT_PATTERN.matcher(compileSource);
         String fullname;
@@ -155,7 +208,7 @@
                 : (isStatic ? SINGLE_STATIC_IMPORT_SUBKIND : SINGLE_TYPE_IMPORT_SUBKIND);
         Snippet snip = new ImportSnippet(state.keyMap.keyForImport(keyName, snippetKind),
                 userSource, guts, fullname, name, snippetKind, fullkey, isStatic, isStar);
-        return declare(snip);
+        return singletonList(snip);
     }
 
     private static class EvalPretty extends Pretty {
@@ -187,8 +240,8 @@
         }
     }
 
-    private List<SnippetEvent> processVariables(String userSource, List<? extends Tree> units, String compileSource, ParseTask pt) {
-        List<SnippetEvent> allEvents = new ArrayList<>();
+    private List<Snippet> processVariables(String userSource, List<? extends Tree> units, String compileSource, ParseTask pt) {
+        List<Snippet> snippets = new ArrayList<>();
         TreeDissector dis = TreeDissector.createByFirstClass(pt);
         for (Tree unitTree : units) {
             VariableTree vt = (VariableTree) unitTree;
@@ -224,18 +277,16 @@
             int nameEnd = nameStart + name.length();
             Range rname = new Range(nameStart, nameEnd);
             Wrap guts = Wrap.varWrap(compileSource, rtype, sbBrackets.toString(), rname, rinit);
+            DiagList modDiag = modifierDiagnostics(vt.getModifiers(), dis, true);
             Snippet snip = new VarSnippet(state.keyMap.keyForVariable(name), userSource, guts,
                     name, subkind, typeName,
-                    tds.declareReferences());
-            DiagList modDiag = modifierDiagnostics(vt.getModifiers(), dis, true);
-            List<SnippetEvent> res1 = declare(snip, modDiag);
-            allEvents.addAll(res1);
+                    tds.declareReferences(), modDiag);
+            snippets.add(snip);
         }
-
-        return allEvents;
+        return snippets;
     }
 
-    private List<SnippetEvent> processExpression(String userSource, String compileSource) {
+    private List<Snippet> processExpression(String userSource, String compileSource) {
         String name = null;
         ExpressionInfo ei = typeOfExpression(compileSource);
         ExpressionTree assignVar;
@@ -266,7 +317,7 @@
                 guts = Wrap.tempVarWrap(compileSource, typeName, name);
                 Collection<String> declareReferences = null; //TODO
                 snip = new VarSnippet(state.keyMap.keyForVariable(name), userSource, guts,
-                        name, SubKind.TEMP_VAR_EXPRESSION_SUBKIND, typeName, declareReferences);
+                        name, SubKind.TEMP_VAR_EXPRESSION_SUBKIND, typeName, declareReferences, null);
             } else {
                 guts = Wrap.methodReturnWrap(compileSource);
                 snip = new ExpressionSnippet(state.keyMap.keyForExpression(name, typeName), userSource, guts,
@@ -282,15 +333,15 @@
                     at = trialCompile(guts);
                 }
                 if (at.hasErrors()) {
-                    return compileFailResult(at, userSource);
+                    return compileFailResult(at, userSource, Kind.EXPRESSION);
                 }
             }
             snip = new StatementSnippet(state.keyMap.keyForStatement(), userSource, guts);
         }
-        return declare(snip);
+        return singletonList(snip);
     }
 
-    private List<SnippetEvent> processClass(String userSource, Tree unitTree, String compileSource, SubKind snippetKind, ParseTask pt) {
+    private List<Snippet> processClass(String userSource, Tree unitTree, String compileSource, SubKind snippetKind, ParseTask pt) {
         TreeDependencyScanner tds = new TreeDependencyScanner();
         tds.scan(unitTree);
 
@@ -306,11 +357,11 @@
         Wrap guts = Wrap.classMemberWrap(compileSource);
         Snippet snip = new TypeDeclSnippet(key, userSource, guts,
                 name, snippetKind,
-                corralled, tds.declareReferences(), tds.bodyReferences());
-        return declare(snip, modDiag);
+                corralled, tds.declareReferences(), tds.bodyReferences(), modDiag);
+        return singletonList(snip);
     }
 
-    private List<SnippetEvent> processStatement(String userSource, String compileSource) {
+    private List<Snippet> processStatement(String userSource, String compileSource) {
         Wrap guts = Wrap.methodWrap(compileSource);
         // Check for unreachable by trying
         AnalyzeTask at = trialCompile(guts);
@@ -325,15 +376,15 @@
                         at = trialCompile(guts);
                     }
                     if (at.hasErrors()) {
-                        return compileFailResult(at, userSource);
+                        return compileFailResult(at, userSource, Kind.STATEMENT);
                     }
                 }
             } else {
-                return compileFailResult(at, userSource);
+                return compileFailResult(at, userSource, Kind.STATEMENT);
             }
         }
         Snippet snip = new StatementSnippet(state.keyMap.keyForStatement(), userSource, guts);
-        return declare(snip);
+        return singletonList(snip);
     }
 
     private AnalyzeTask trialCompile(Wrap guts) {
@@ -341,7 +392,7 @@
         return state.taskFactory.new AnalyzeTask(outer);
     }
 
-    private List<SnippetEvent> processMethod(String userSource, Tree unitTree, String compileSource, ParseTask pt) {
+    private List<Snippet> processMethod(String userSource, Tree unitTree, String compileSource, ParseTask pt) {
         TreeDependencyScanner tds = new TreeDependencyScanner();
         tds.scan(unitTree);
         TreeDissector dis = TreeDissector.createByFirstClass(pt);
@@ -360,7 +411,7 @@
         Wrap corralled = new Corraller(key.index(), pt.getContext()).corralMethod(mt);
 
         if (modDiag.hasErrors()) {
-            return compileFailResult(modDiag, userSource);
+            return compileFailResult(modDiag, userSource, Kind.METHOD);
         }
         Wrap guts = Wrap.classMemberWrap(compileSource);
         Range typeRange = dis.treeToRange(returnType);
@@ -368,37 +419,76 @@
 
         Snippet snip = new MethodSnippet(key, userSource, guts,
                 name, signature,
-                corralled, tds.declareReferences(), tds.bodyReferences());
-        return declare(snip, modDiag);
+                corralled, tds.declareReferences(), tds.bodyReferences(), modDiag);
+        return singletonList(snip);
     }
 
-    /**
-     * The snippet has failed, return with the rejected event
-     *
-     * @param xt the task from which to extract the failure diagnostics
-     * @param userSource the incoming bad user source
-     * @return a rejected snippet event
-     */
-    private List<SnippetEvent> compileFailResult(BaseTask xt, String userSource) {
-        return compileFailResult(xt.getDiagnostics(), userSource);
+    private Kind kindOfTree(Tree tree) {
+        switch (tree.getKind()) {
+            case IMPORT:
+                return Kind.IMPORT;
+            case VARIABLE:
+                return Kind.VAR;
+            case EXPRESSION_STATEMENT:
+                return Kind.EXPRESSION;
+            case CLASS:
+            case ENUM:
+            case ANNOTATION_TYPE:
+            case INTERFACE:
+                return Kind.TYPE_DECL;
+            case METHOD:
+                return Kind.METHOD;
+            default:
+                return Kind.STATEMENT;
+        }
     }
 
     /**
-     * The snippet has failed, return with the rejected event
+     * The snippet has failed, return with the rejected snippet
+     *
+     * @param xt the task from which to extract the failure diagnostics
+     * @param userSource the incoming bad user source
+     * @return a rejected snippet
+     */
+    private List<Snippet> compileFailResult(BaseTask xt, String userSource, Kind probableKind) {
+        return compileFailResult(xt.getDiagnostics(), userSource, probableKind);
+    }
+
+    /**
+     * The snippet has failed, return with the rejected snippet
      *
      * @param diags the failure diagnostics
      * @param userSource the incoming bad user source
-     * @return a rejected snippet event
+     * @return a rejected snippet
      */
-    private List<SnippetEvent> compileFailResult(DiagList diags, String userSource) {
+    private List<Snippet> compileFailResult(DiagList diags, String userSource, Kind probableKind) {
         ErroneousKey key = state.keyMap.keyForErroneous();
-        Snippet snip = new ErroneousSnippet(key, userSource, null, SubKind.UNKNOWN_SUBKIND);
+        Snippet snip = new ErroneousSnippet(key, userSource, null,
+                probableKind, SubKind.UNKNOWN_SUBKIND);
         snip.setFailed(diags);
-        state.maps.installSnippet(snip);
-        return Collections.singletonList(new SnippetEvent(
-                snip, Status.NONEXISTENT, Status.REJECTED,
-                false, null, null, null)
-        );
+
+        // Install  wrapper for query by SourceCodeAnalysis.wrapper
+        String compileSource = Util.trimEnd(new MaskCommentsAndModifiers(userSource, true).cleared());
+        OuterWrap outer;
+        switch (probableKind) {
+            case IMPORT:
+                outer = state.outerMap.wrapImport(Wrap.simpleWrap(compileSource), snip);
+                break;
+            case EXPRESSION:
+                outer = state.outerMap.wrapInTrialClass(Wrap.methodReturnWrap(compileSource));
+                break;
+            case VAR:
+            case TYPE_DECL:
+            case METHOD:
+                outer = state.outerMap.wrapInTrialClass(Wrap.classMemberWrap(compileSource));
+                break;
+            default:
+                outer = state.outerMap.wrapInTrialClass(Wrap.methodWrap(compileSource));
+                break;
+        }
+        snip.setOuterWrap(outer);
+
+        return singletonList(snip);
     }
 
     private ExpressionInfo typeOfExpression(String expression) {
@@ -430,10 +520,6 @@
         return events(c, outs, null, null);
     }
 
-    private List<SnippetEvent> declare(Snippet si) {
-        return declare(si, new DiagList());
-    }
-
     private List<SnippetEvent> declare(Snippet si, DiagList generatedDiagnostics) {
         Unit c = new Unit(state, si, null, generatedDiagnostics);
         Set<Unit> ins = new LinkedHashSet<>();
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -39,7 +39,7 @@
 public class ExpressionSnippet extends Snippet {
 
     ExpressionSnippet(ExpressionKey key, String userSource, Wrap guts, String name, SubKind subkind) {
-        super(key, userSource, guts, name, subkind);
+        super(key, userSource, guts, name, subkind, null);
     }
 
     /**
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -46,7 +46,7 @@
     ImportSnippet(ImportKey key, String userSource, Wrap guts,
             String fullname, String name, SubKind subkind, String fullkey,
             boolean isStatic, boolean isStar) {
-        super(key, userSource, guts, name, subkind);
+        super(key, userSource, guts, name, subkind, null);
         this.fullname = fullname;
         this.fullkey = fullkey;
         this.isStatic = isStatic;
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java	Fri Jul 08 12:17:10 2016 -0700
@@ -89,6 +89,7 @@
     final Supplier<String> tempVariableNameGenerator;
     final BiFunction<Snippet, Integer, String> idGenerator;
     final List<String> extraRemoteVMOptions;
+    final List<String> extraCompilerOptions;
     final ExecutionControl executionControl;
 
     private int nextKeyIndex = 1;
@@ -112,6 +113,7 @@
         this.tempVariableNameGenerator = b.tempVariableNameGenerator;
         this.idGenerator = b.idGenerator;
         this.extraRemoteVMOptions = b.extraRemoteVMOptions;
+        this.extraCompilerOptions = b.extraCompilerOptions;
         this.executionControl = b.executionControl==null
                 ? new FailOverExecutionControl(
                         new JDIExecutionControl(),
@@ -151,6 +153,7 @@
         Supplier<String> tempVariableNameGenerator = null;
         BiFunction<Snippet, Integer, String> idGenerator = null;
         List<String> extraRemoteVMOptions = new ArrayList<>();
+        List<String> extraCompilerOptions = new ArrayList<>();
         ExecutionControl executionControl;
 
         Builder() { }
@@ -289,6 +292,21 @@
         }
 
         /**
+         * Adds compiler options.  These additional options will be used on
+         * parsing, analysis, and code generation calls to the compiler.
+         * Options which interfere with results are not supported and have
+         * undefined effects on JShell's operation.
+         *
+         * @param options the addition options for compiler invocations
+         * @return the {@code Builder} instance (for use in chained
+         * initialization)
+         */
+        public Builder compilerOptions(String... options) {
+            this.extraCompilerOptions.addAll(Arrays.asList(options));
+            return this;
+        }
+
+        /**
          * Sets the custom engine for execution. Snippet execution will be
          * provided by the specified {@link ExecutionControl} instance.
          *
@@ -359,7 +377,9 @@
      * Evaluate the input String, including definition and/or execution, if
      * applicable. The input is checked for errors, unless the errors can be
      * deferred (as is the case with some unresolvedDependencies references),
-     * errors will abort evaluation. The input should be
+     * errors will abort evaluation.
+     * <p>
+     * The input should be
      * exactly one complete snippet of source code, that is, one expression,
      * statement, variable declaration, method declaration, class declaration,
      * or import.
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -44,8 +44,10 @@
 
     MethodSnippet(MethodKey key, String userSource, Wrap guts,
             String name, String signature, Wrap corralled,
-            Collection<String> declareReferences, Collection<String> bodyReferences) {
-        super(key, userSource, guts, name, SubKind.METHOD_SUBKIND, corralled, declareReferences, bodyReferences);
+            Collection<String> declareReferences, Collection<String> bodyReferences,
+            DiagList syntheticDiags) {
+        super(key, userSource, guts, name, SubKind.METHOD_SUBKIND, corralled,
+                declareReferences, bodyReferences, syntheticDiags);
         this.signature = signature;
     }
 
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/OuterImportSnippetWrap.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,8 +25,6 @@
 
 package jdk.jshell;
 
-import java.util.IdentityHashMap;
-import java.util.List;
 import javax.tools.Diagnostic;
 import javax.tools.JavaFileObject;
 
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/PersistentSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -37,8 +37,9 @@
  */
 public abstract class PersistentSnippet extends Snippet {
 
-    PersistentSnippet(Key key, String userSource, Wrap guts, String unitName, SubKind subkind) {
-        super(key, userSource, guts, unitName, subkind);
+    PersistentSnippet(Key key, String userSource, Wrap guts, String unitName,
+            SubKind subkind, DiagList syntheticDiags) {
+        super(key, userSource, guts, unitName, subkind, syntheticDiags);
     }
 
     /**
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -563,13 +563,18 @@
     private Status status;
     private List<String> unresolved;
     private DiagList diagnostics;
+    private final DiagList syntheticDiags;
 
-    Snippet(Key key, String userSource, Wrap guts, String unitName, SubKind subkind) {
+    Snippet(Key key, String userSource, Wrap guts, String unitName,
+            SubKind subkind, DiagList syntheticDiags) {
         this.key = key;
         this.source = userSource;
         this.guts = guts;
         this.unitName = unitName;
         this.subkind = subkind;
+        this.syntheticDiags = syntheticDiags==null
+                ? new DiagList()
+                : syntheticDiags;
         this.status = Status.NONEXISTENT;
         setSequenceNumber(0);
     }
@@ -644,6 +649,10 @@
         return diagnostics;
     }
 
+    DiagList syntheticDiags() {
+        return syntheticDiags;
+    }
+
     /**
      * @return the corralled guts
      */
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysis.java	Fri Jul 08 12:17:10 2016 -0700
@@ -25,6 +25,7 @@
 
 package jdk.jshell;
 
+import java.util.Collection;
 import java.util.List;
 
 /**
@@ -92,6 +93,51 @@
     public abstract QualifiedNames listQualifiedNames(String code, int cursor);
 
     /**
+     * Returns the wrapper information for the {@code Snippet}. The wrapper changes as
+     * the environment changes, so calls to this method at different times may
+     * yield different results.
+     *
+     * @param snippet the {@code Snippet} from which to retrieve the wrapper
+     * @return information on the wrapper
+     */
+    public abstract SnippetWrapper wrapper(Snippet snippet);
+
+    /**
+     * Returns the wrapper information for the snippet within the
+     * input source string.
+     * <p>
+     * Wrapper information for malformed and incomplete
+     * snippets also generate wrappers. The list is in snippet encounter
+     * order. The wrapper changes as the environment changes, so calls to this
+     * method at different times may yield different results.
+     * <p>
+     * The input should be
+     * exactly one complete snippet of source code, that is, one expression,
+     * statement, variable declaration, method declaration, class declaration,
+     * or import.
+     * To break arbitrary input into individual complete snippets, use
+     * {@link SourceCodeAnalysis#analyzeCompletion(String)}.
+     * <p>
+     * The wrapper may not match that returned by
+     * {@link SourceCodeAnalysis#wrapper(Snippet) wrapper(Snippet)},
+     * were the source converted to a {@code Snippet}.
+     *
+     * @param input the source input from which to generate wrappers
+     * @return a list of wrapper information
+     */
+    public abstract List<SnippetWrapper> wrappers(String input);
+
+    /**
+     * Returns a collection of {@code Snippet}s which might need updating if the
+     * given {@code Snippet} is updated. The returned collection is designed to
+     * be inclusive and may include many false positives.
+     *
+     * @param snippet the {@code Snippet} whose dependents are requested
+     * @return the collection of dependents
+     */
+    public abstract Collection<Snippet> dependents(Snippet snippet);
+
+    /**
      * Internal only constructor
      */
     SourceCodeAnalysis() {}
@@ -302,7 +348,7 @@
         }
 
         /**
-         * Indicates whether the result is based on up to date data. The
+         * Indicates whether the result is based on up-to-date data. The
          * {@link SourceCodeAnalysis#listQualifiedNames(java.lang.String, int) listQualifiedNames}
          * method may return before the classpath is fully inspected, in which case this method will
          * return {@code false}. If the result is based on a fully inspected classpath, this method
@@ -327,4 +373,83 @@
         }
 
     }
+
+    /**
+     * The wrapping of a snippet of Java source into valid top-level Java
+     * source. The wrapping will always either be an import or include a
+     * synthetic class at the top-level. If a synthetic class is generated, it
+     * will be proceeded by the package and import declarations, and may contain
+     * synthetic class members.
+     * <p>
+     * This interface, in addition to the mapped form, provides the context and
+     * position mapping information.
+     */
+    public interface SnippetWrapper {
+
+        /**
+         * Returns the input that is wrapped. For
+         * {@link SourceCodeAnalysis#wrappers(java.lang.String) wrappers(String)},
+         * this is the source of the snippet within the input. A variable
+         * declaration of {@code N} variables will map to {@code N} wrappers
+         * with the source separated.
+         * <p>
+         * For {@link SourceCodeAnalysis#wrapper(Snippet) wrapper(Snippet)},
+         * this is {@link Snippet#source() }.
+         *
+         * @return the input source corresponding to the wrapper.
+         */
+        String source();
+
+        /**
+         * Returns a Java class definition that wraps the
+         * {@link SnippetWrapper#source()} or, if an import, the import source.
+         * <p>
+         * If the input is not a valid Snippet, this will not be a valid
+         * class/import definition.
+         * <p>
+         * The source may be divided and mapped to different locations within
+         * the wrapped source.
+         *
+         * @return the source wrapped into top-level Java code
+         */
+        String wrapped();
+
+        /**
+         * Returns the fully qualified class name of the
+         * {@link SnippetWrapper#wrapped() } class.
+         * For erroneous input, a best guess is returned.
+         *
+         * @return the name of the synthetic wrapped class; if an import, the
+         * name is not defined
+         */
+        String fullClassName();
+
+        /**
+         * Returns the {@link Snippet.Kind} of the
+         * {@link SnippetWrapper#source()}.
+         *
+         * @return an enum representing the general kind of snippet.
+         */
+        Snippet.Kind kind();
+
+        /**
+         * Maps character position within the source to character position
+         * within the wrapped.
+         *
+         * @param pos the position in {@link SnippetWrapper#source()}
+         * @return the corresponding position in
+         * {@link SnippetWrapper#wrapped() }
+         */
+        int sourceToWrappedPosition(int pos);
+
+        /**
+         * Maps character position within the wrapped to character position
+         * within the source.
+         *
+         * @param pos the position in {@link SnippetWrapper#wrapped()}
+         * @return the corresponding position in
+         * {@link SnippetWrapper#source() }
+         */
+        int wrappedToSourcePosition(int pos);
+    }
 }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java	Fri Jul 08 12:17:10 2016 -0700
@@ -413,6 +413,55 @@
         return result;
     }
 
+    @Override
+    public SnippetWrapper wrapper(Snippet snippet) {
+        return new SnippetWrapper() {
+            @Override
+            public String source() {
+                return snippet.source();
+            }
+
+            @Override
+            public String wrapped() {
+                return snippet.outerWrap().wrapped();
+            }
+
+            @Override
+            public String fullClassName() {
+                return snippet.classFullName();
+            }
+
+            @Override
+            public Snippet.Kind kind() {
+                return snippet.kind() == Snippet.Kind.ERRONEOUS
+                        ? ((ErroneousSnippet) snippet).probableKind()
+                        : snippet.kind();
+            }
+
+            @Override
+            public int sourceToWrappedPosition(int pos) {
+                return snippet.outerWrap().snippetIndexToWrapIndex(pos);
+            }
+
+            @Override
+            public int wrappedToSourcePosition(int pos) {
+                return snippet.outerWrap().wrapIndexToSnippetIndex(pos);
+            }
+        };
+    }
+
+    @Override
+    public List<SnippetWrapper> wrappers(String input) {
+        return proc.eval.sourceToSnippetsWithWrappers(input).stream()
+                .map(sn -> wrapper(sn))
+                .collect(toList());
+    }
+
+    @Override
+    public Collection<Snippet> dependents(Snippet snippet) {
+        return proc.maps.getDependents(snippet);
+    }
+
     private boolean isStaticContext(AnalyzeTask at, TreePath path) {
         switch (path.getLeaf().getKind()) {
             case ARRAY_TYPE:
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -39,6 +39,6 @@
 public class StatementSnippet extends Snippet {
 
     StatementSnippet(StatementKey key, String userSource, Wrap guts) {
-        super(key, userSource, guts, null, SubKind.STATEMENT_SUBKIND);
+        super(key, userSource, guts, null, SubKind.STATEMENT_SUBKIND, null);
     }
 }
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java	Fri Jul 08 12:17:10 2016 -0700
@@ -328,7 +328,9 @@
                 SourceHandler<T> sh,
                 String... extraOptions) {
             this.sourceHandler = sh;
-            List<String> options = Arrays.asList(extraOptions);
+            List<String> options = new ArrayList<>(extraOptions.length + state.extraCompilerOptions.size());
+            options.addAll(Arrays.asList(extraOptions));
+            options.addAll(state.extraCompilerOptions);
             Iterable<? extends JavaFileObject> compilationUnits = inputs
                             .map(in -> sh.sourceToFileObject(fileManager, in))
                             .collect(Collectors.toList());
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/TypeDeclSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -42,8 +42,10 @@
     TypeDeclSnippet(TypeDeclKey key, String userSource, Wrap guts,
             String unitName, SubKind subkind, Wrap corralled,
             Collection<String> declareReferences,
-            Collection<String> bodyReferences) {
-        super(key, userSource, guts, unitName, subkind, corralled, declareReferences, bodyReferences);
+            Collection<String> bodyReferences,
+            DiagList syntheticDiags) {
+        super(key, userSource, guts, unitName, subkind, corralled,
+                declareReferences, bodyReferences, syntheticDiags);
     }
 
     /**** internal access ****/
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java	Fri Jul 08 12:17:10 2016 -0700
@@ -43,8 +43,10 @@
 
      VarSnippet(VarKey key, String userSource, Wrap guts,
             String name, SubKind subkind, String typeName,
-            Collection<String> declareReferences) {
-        super(key, userSource, guts, name, subkind, null, declareReferences, null);
+            Collection<String> declareReferences,
+            DiagList syntheticDiags) {
+        super(key, userSource, guts, name, subkind, null, declareReferences,
+                null, syntheticDiags);
         this.typeName = typeName;
     }
 
--- a/langtools/test/ProblemList.txt	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/ProblemList.txt	Fri Jul 08 12:17:10 2016 -0700
@@ -76,6 +76,7 @@
 tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java              8057687    generic-all    emit correct byte code an attributes for type annotations
 tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java         8057687    generic-all    emit correct byte code an attributes for type annotations
 tools/javac/warnings/suppress/TypeAnnotations.java                              8057683    generic-all    improve ordering of errors with type annotations
+tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.java     8160396    generic-all    current version of jtreg needs a new promotion to include lastes version of ASM
 
 ###########################################################################
 #
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/jshell/CompilerOptionsTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8159635
+ * @summary Test setting compiler options
+ * @build KullaTesting TestingInputStream
+ * @run testng CompilerOptionsTest
+ */
+
+import javax.tools.Diagnostic;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import static jdk.jshell.Snippet.Status.VALID;
+
+@Test
+public class CompilerOptionsTest extends KullaTesting {
+
+    @BeforeMethod
+    @Override
+    public void setUp() {
+        setUp(b -> b.compilerOptions("-source", "7", "-Xlint:cast"));
+    }
+
+    public void testLint() {
+        assertDeclareWarn1("String s = (String)\"hello\";",
+                new ExpectedDiagnostic("compiler.warn.redundant.cast", 11, 26, 11, -1, -1, Diagnostic.Kind.WARNING));
+    }
+
+    public void testSourceVersion() {
+        assertEval("import java.util.function.*;", added(VALID));
+        assertDeclareFail("Function<Integer,Integer> f = x -> x*2;",
+                new ExpectedDiagnostic("compiler.err.lambda.not.supported.in.source", 32, 32, 32, -1, -1, Diagnostic.Kind.ERROR));
+    }
+}
--- a/langtools/test/jdk/jshell/KullaTesting.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/jdk/jshell/KullaTesting.java	Fri Jul 08 12:17:10 2016 -0700
@@ -37,6 +37,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
+import java.util.function.Consumer;
 import java.util.function.Predicate;
 import java.util.function.Supplier;
 import java.util.stream.Collectors;
@@ -154,29 +155,23 @@
 
     @BeforeMethod
     public void setUp() {
+        setUp(b -> {});
+    }
+
+    public void setUp(ExecutionControl ec) {
+        setUp(b -> b.executionEngine(ec));
+    }
+
+    public void setUp(Consumer<JShell.Builder> bc) {
         inStream = new TestingInputStream();
         outStream = new ByteArrayOutputStream();
         errStream = new ByteArrayOutputStream();
-        state = JShell.builder()
+        JShell.Builder builder = JShell.builder()
                 .in(inStream)
                 .out(new PrintStream(outStream))
-                .err(new PrintStream(errStream))
-                .build();
-        allSnippets = new LinkedHashSet<>();
-        idToSnippet = new LinkedHashMap<>();
-        classpath = new ArrayList<>();
-    }
-
-    public void setUp(ExecutionControl ec) {
-        inStream = new TestingInputStream();
-        outStream = new ByteArrayOutputStream();
-        errStream = new ByteArrayOutputStream();
-        state = JShell.builder()
-                .executionEngine(ec)
-                .in(inStream)
-                .out(new PrintStream(outStream))
-                .err(new PrintStream(errStream))
-                .build();
+                .err(new PrintStream(errStream));
+        bc.accept(builder);
+        state = builder.build();
         allSnippets = new LinkedHashSet<>();
         idToSnippet = new LinkedHashMap<>();
         classpath = new ArrayList<>();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/jdk/jshell/WrapperTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,205 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., start1 Franklin St, Fifth Floor, Boston, MA 02110-1length01 USA.
+ *
+ * Please contact Oracle, start00 Oracle Parkway, Redwood Shores, CA 9406start USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8159111
+ * @summary test wrappers and dependencies
+ * @modules jdk.jshell/jdk.jshell
+ * @build KullaTesting
+ * @run testng WrapperTest
+ */
+
+import java.util.Collection;
+import java.util.List;
+import org.testng.annotations.Test;
+import jdk.jshell.ErroneousSnippet;
+import jdk.jshell.Snippet;
+import jdk.jshell.Snippet.Kind;
+import jdk.jshell.SourceCodeAnalysis.SnippetWrapper;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+import static jdk.jshell.Snippet.Status.RECOVERABLE_DEFINED;
+import static jdk.jshell.Snippet.Status.VALID;
+
+@Test
+public class WrapperTest extends KullaTesting {
+
+    public void testMethod() {
+        String src = "void glib() { System.out.println(\"hello\"); }";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.METHOD, "void", "glib", "println");
+        assertPosition(swl.get(0), src, 0, 4);
+        assertPosition(swl.get(0), src, 5, 4);
+        assertPosition(swl.get(0), src, 15, 6);
+
+        Snippet g = methodKey(assertEval(src, added(VALID)));
+        SnippetWrapper swg = getState().sourceCodeAnalysis().wrapper(g);
+        assertWrapperHas(swg, src, Kind.METHOD, "void", "glib", "println");
+        assertPosition(swg, src, 0, 4);
+        assertPosition(swg, src, 5, 4);
+        assertPosition(swg, src, 15, 6);
+    }
+
+    @Test(enabled = false) // TODO 8159740
+    public void testMethodCorralled() {
+        String src = "void glib() { f(); }";
+        Snippet g = methodKey(assertEval(src, added(RECOVERABLE_DEFINED)));
+        SnippetWrapper swg = getState().sourceCodeAnalysis().wrapper(g);
+        assertWrapperHas(swg, src, Kind.METHOD, "void", "glib");
+        assertPosition(swg, src, 5, 4);
+    }
+
+    public void testMethodBad() {
+        String src = "void flob() { ?????; }";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.METHOD, "void", "flob", "?????");
+        assertPosition(swl.get(0), src, 9, 2);
+
+        Snippet f = key(assertEvalFail(src));
+        assertEquals(f.kind(), Kind.ERRONEOUS);
+        assertEquals(((ErroneousSnippet)f).probableKind(), Kind.METHOD);
+        SnippetWrapper sw = getState().sourceCodeAnalysis().wrapper(f);
+        assertWrapperHas(sw, src, Kind.METHOD, "void", "flob", "?????");
+        assertPosition(swl.get(0), src, 14, 5);
+    }
+
+    public void testVar() {
+        String src = "int gx = 1234;";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.VAR, "int", "gx", "1234");
+        assertPosition(swl.get(0), src, 4, 2);
+
+        Snippet g = varKey(assertEval(src, added(VALID)));
+        SnippetWrapper swg = getState().sourceCodeAnalysis().wrapper(g);
+        assertWrapperHas(swg, src, Kind.VAR, "int", "gx", "1234");
+        assertPosition(swg, src, 0, 3);
+    }
+
+    public void testVarBad() {
+        String src = "double dd = ?????;";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.VAR, "double", "dd", "?????");
+        assertPosition(swl.get(0), src, 9, 2);
+
+        Snippet f = key(assertEvalFail(src));
+        assertEquals(f.kind(), Kind.ERRONEOUS);
+        assertEquals(((ErroneousSnippet)f).probableKind(), Kind.VAR);
+        SnippetWrapper sw = getState().sourceCodeAnalysis().wrapper(f);
+        assertWrapperHas(sw, src, Kind.VAR, "double", "dd", "?????");
+        assertPosition(swl.get(0), src, 12, 5);
+    }
+
+    public void testImport() {
+        String src = "import java.lang.*;";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.IMPORT, "import", "java.lang");
+        assertPosition(swl.get(0), src, 7, 4);
+
+        Snippet g = key(assertEval(src, added(VALID)));
+        SnippetWrapper swg = getState().sourceCodeAnalysis().wrapper(g);
+        assertWrapperHas(swg, src, Kind.IMPORT, "import", "java.lang");
+        assertPosition(swg, src, 0, 6);
+    }
+
+    public void testImportBad() {
+        String src = "import java.?????;";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.IMPORT, "import", "?????");
+        assertPosition(swl.get(0), src, 7, 4);
+
+        Snippet f = key(assertEvalFail(src));
+        assertEquals(f.kind(), Kind.ERRONEOUS);
+        assertEquals(((ErroneousSnippet)f).probableKind(), Kind.IMPORT);
+        SnippetWrapper sw = getState().sourceCodeAnalysis().wrapper(f);
+        assertWrapperHas(sw, src, Kind.IMPORT, "import", "?????");
+        assertPosition(swl.get(0), src, 0, 6);
+    }
+
+    public void testErroneous() {
+        String src = "@@@@@@@@@@";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 1, "unexpected list length");
+        assertWrapperHas(swl.get(0), src, Kind.ERRONEOUS, "@@@@@@@@@@");
+        assertPosition(swl.get(0), src, 0, 10);
+
+        Snippet f = key(assertEvalFail(src));
+        assertEquals(f.kind(), Kind.ERRONEOUS);
+        assertEquals(((ErroneousSnippet)f).probableKind(), Kind.ERRONEOUS);
+        SnippetWrapper sw = getState().sourceCodeAnalysis().wrapper(f);
+        assertWrapperHas(sw, src, Kind.ERRONEOUS, "@@@@@@@@@@");
+        assertPosition(swl.get(0), src, 0, 10);
+    }
+
+    public void testEmpty() {
+        String src = "";
+        List<SnippetWrapper> swl = getState().sourceCodeAnalysis().wrappers(src);
+        assertEquals(swl.size(), 0, "expected empty list");
+    }
+
+    public void testDependencies() {
+        Snippet a = key(assertEval("int aaa = 6;", added(VALID)));
+        Snippet b = key(assertEval("class B { B(int x) { aaa = x; } }", added(VALID)));
+        Snippet c = key(assertEval("B ccc() { return new B(aaa); }", added(VALID)));
+        Collection<Snippet> dep;
+        dep = getState().sourceCodeAnalysis().dependents(c);
+        assertEquals(dep.size(), 0);
+        dep = getState().sourceCodeAnalysis().dependents(b);
+        assertEquals(dep.size(), 1);
+        assertTrue(dep.contains(c));
+        dep = getState().sourceCodeAnalysis().dependents(a);
+        assertEquals(dep.size(), 2);
+        assertTrue(dep.contains(c));
+        assertTrue(dep.contains(b));
+    }
+
+    private void assertWrapperHas(SnippetWrapper sw, String source, Kind kind, String... has) {
+        assertEquals(sw.source(), source);
+        assertEquals(sw.kind(), kind);
+        if (kind == Kind.IMPORT) {
+            assertTrue(sw.wrapped().contains("import"));
+        } else {
+            String cn = sw.fullClassName();
+            int idx = cn.lastIndexOf(".");
+            assertTrue(sw.wrapped().contains(cn.substring(idx+1)));
+            assertTrue(sw.wrapped().contains("class"));
+        }
+        for (String s : has) {
+            assertTrue(sw.wrapped().contains(s));
+        }
+    }
+
+    private void assertPosition(SnippetWrapper sw, String source, int start, int length) {
+        int wpg = sw.sourceToWrappedPosition(start);
+        assertEquals(sw.wrapped().substring(wpg, wpg+length),
+                source.substring(start, start+length),
+                "position " + wpg + " in " + sw.wrapped());
+        assertEquals(sw.wrappedToSourcePosition(wpg), start);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8159970/TypeEqualityInInferenceTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8159970
+ * @summary javac, JLS8 18.2.4 is not completely implemented by the compiler
+ * @library /tools/lib/types
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.compiler/com.sun.tools.javac.file
+ * @build TypeHarness
+ * @run main TypeEqualityInInferenceTest
+ */
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.Type.UndetVar;
+import com.sun.tools.javac.code.Type.UndetVar.InferenceBound;
+import com.sun.tools.javac.util.Assert;
+
+public class TypeEqualityInInferenceTest extends TypeHarness {
+    StrToTypeFactory strToTypeFactory;
+
+    public static void main(String... args) throws Exception {
+        new TypeEqualityInInferenceTest().runAll();
+    }
+
+    void runAll() {
+        List<String> imports = new ArrayList<>();
+        imports.add("java.util.*");
+        List<String> typeVars = new ArrayList<>();
+        typeVars.add("T");
+        strToTypeFactory = new StrToTypeFactory(null, imports, typeVars);
+
+        runTest("List<? extends T>", "List<? extends String>", predef.stringType);
+        runTest("List<? extends T>", "List<?>", predef.objectType);
+        runTest("List<? super T>", "List<? super String>", predef.stringType);
+    }
+
+    void runTest(String freeTypeStr, String typeStr, Type equalityBoundType) {
+        Type freeType = strToTypeFactory.getType(freeTypeStr);
+        Type aType = strToTypeFactory.getType(typeStr);
+
+        withInferenceContext(strToTypeFactory.getTypeVars(), inferenceContext -> {
+            assertSameType(inferenceContext.asUndetVar(freeType), aType);
+            UndetVar undetVarForT = (UndetVar)inferenceContext.undetVars().head;
+            checkEqualityBound(undetVarForT, equalityBoundType);
+        });
+
+        withInferenceContext(strToTypeFactory.getTypeVars(), inferenceContext -> {
+            assertSameType(aType, inferenceContext.asUndetVar(freeType));
+            UndetVar undetVarForT = (UndetVar)inferenceContext.undetVars().head;
+            checkEqualityBound(undetVarForT, equalityBoundType);
+        });
+    }
+
+    void checkEqualityBound(UndetVar uv, Type boundType) {
+        com.sun.tools.javac.util.List<Type> equalBounds = uv.getBounds(InferenceBound.EQ);
+        Assert.check(!equalBounds.isEmpty() && equalBounds.length() == 1,
+                "undetVar must have only one equality bound");
+        Type bound = equalBounds.head;
+        Assert.check(bound == boundType, "equal bound must be of type " + boundType);
+    }
+}
--- a/langtools/test/tools/javac/diags/examples.not-yet.txt	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/diags/examples.not-yet.txt	Fri Jul 08 12:17:10 2016 -0700
@@ -120,6 +120,7 @@
 compiler.misc.bad.module-info.name                            # bad class file
 compiler.err.locn.bad.module-info                             # bad class file
 compiler.err.locn.cant.read.file                              # bad class file
+compiler.misc.module.info.invalid.super.class                 # bad class file
 compiler.err.locn.cant.read.directory                         # file system issue
 compiler.misc.unnamed.module                                  # fragment uninteresting in and of itself
 compiler.misc.kindname.module                                 # fragment uninteresting in and of itself
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/file/T8132857.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8132857
+ * @summary Verify an up-to-date name for UTF-8 encoding is provided in error messages.
+ * @modules jdk.compiler
+ */
+
+import java.io.*;
+import java.nio.charset.Charset;
+
+public class T8132857 {
+    public static void main(String... args) throws Exception{
+        new T8132857().run();
+    }
+
+    void run() throws IOException {
+        if (!Charset.defaultCharset().equals(Charset.forName("UTF-8"))) {
+            System.err.println("skipping test, default charset is not UTF-8");
+            return;
+        }
+
+        File src = new File("src");
+        src.mkdirs();
+        try (OutputStream out = new FileOutputStream(new File(src, "Test.java"))) {
+            out.write('/');
+            out.write('/');
+            out.write(0b1100_0000);
+            out.write('a');
+        }
+
+        try (StringWriter out = new StringWriter(); PrintWriter pw = new PrintWriter(out)) {
+            int rc = com.sun.tools.javac.Main.compile(new String[] {"-XDrawDiagnostics", "src/Test.java"}, pw);
+
+            pw.flush();
+
+            String lineSeparator = System.getProperty("line.separator");
+            String expected =
+                    "Test.java:1:3: compiler.err.illegal.char.for.encoding: C0, UTF-8" + lineSeparator +
+                    "1 error" + lineSeparator;
+            String actual = out.toString();
+
+            System.err.println(actual);
+
+            if (rc == 0) {
+                throw new Error("compilation unexpectedly passed: " + rc);
+            }
+
+            if (!expected.equals(actual)) {
+                throw new Error("unexpected output: " + actual);
+            }
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8148131/A.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8148131
+ * @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;
+
+import pkg.B.BInner;
+
+class A implements BInner {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8148131/B.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+class B implements C.DInner {
+  interface BInner {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8148131/C.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+class C extends D {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/importscope/T8148131/D.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+class D {
+  interface DInner {}
+}
--- a/langtools/test/tools/javac/modules/AutomaticModules.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/modules/AutomaticModules.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,9 +23,11 @@
 
 /**
  * @test
+ * @bug 8155026
  * @summary Test automatic modules
  * @library /tools/lib
  * @modules
+ *      java.desktop
  *      jdk.compiler/com.sun.tools.javac.api
  *      jdk.compiler/com.sun.tools.javac.main
  * @build toolbox.ToolBox toolbox.JavacTask toolbox.JarTask ModuleTestBase
@@ -34,11 +36,12 @@
 
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.List;
 
 import toolbox.JarTask;
 import toolbox.JavacTask;
 import toolbox.Task;
-import toolbox.ToolBox;
 
 public class AutomaticModules extends ModuleTestBase {
 
@@ -86,11 +89,11 @@
         Files.createDirectories(classes);
 
         tb.writeJavaFiles(m1,
-                          "module m1 { requires test.api; }",
+                          "module m1 { requires test.api; requires java.desktop; }",
                           "package impl; public class Impl { public void e(api.Api api) { api.actionPerformed(null); } }");
 
         new JavacTask(tb)
-                .options("-modulesourcepath", moduleSrc.toString(), "-modulepath", modulePath.toString(), "-addmods", "java.desktop")
+                .options("-modulesourcepath", moduleSrc.toString(), "-modulepath", modulePath.toString())
                 .outdir(classes)
                 .files(findJavaFiles(moduleSrc))
                 .run()
@@ -224,4 +227,85 @@
                 .run()
                 .writeAll();
     }
+
+    @Test
+    public void testAutomaticAndNamedModules(Path base) throws Exception {
+        Path modulePath = base.resolve("module-path");
+
+        Files.createDirectories(modulePath);
+
+        for (char c : new char[] {'A', 'B'}) {
+            Path automaticSrc = base.resolve("automaticSrc" + c);
+            tb.writeJavaFiles(automaticSrc, "package api" + c + "; public class Api {}");
+            Path automaticClasses = base.resolve("automaticClasses" + c);
+            tb.createDirectories(automaticClasses);
+
+            String automaticLog = new JavacTask(tb)
+                                    .outdir(automaticClasses)
+                                    .files(findJavaFiles(automaticSrc))
+                                    .run()
+                                    .writeAll()
+                                    .getOutput(Task.OutputKind.DIRECT);
+
+            if (!automaticLog.isEmpty())
+                throw new Exception("expected output not found: " + automaticLog);
+
+            Path automaticJar = modulePath.resolve("automatic" + c + "-1.0.jar");
+
+            new JarTask(tb, automaticJar)
+              .baseDir(automaticClasses)
+              .files("api" + c + "/Api.class")
+              .run();
+        }
+
+        Path moduleSrc = base.resolve("module-src");
+
+        tb.writeJavaFiles(moduleSrc.resolve("m1"),
+                          "module m1 { requires automaticA; }",
+                          "package impl; public class Impl { apiA.Api a; apiB.Api b; m2.M2 m;}");
+
+        tb.writeJavaFiles(moduleSrc.resolve("m2"),
+                          "module m2 { exports m2; }",
+                          "package m2; public class M2 { }");
+
+        Path classes = base.resolve("classes");
+
+        Files.createDirectories(classes);
+
+        List<String> log = new JavacTask(tb)
+                .options("-modulesourcepath", moduleSrc.toString(),
+                         "-modulepath", modulePath.toString(),
+                         "-addmods", "automaticB",
+                         "-XDrawDiagnostics")
+                .outdir(classes)
+                .files(findJavaFiles(moduleSrc))
+                .run(Task.Expect.FAIL)
+                .writeAll()
+                .getOutputLines(Task.OutputKind.DIRECT);
+
+        List<String> expected = Arrays.asList("Impl.java:1:61: compiler.err.not.def.access.package.cant.access: m2.M2, m2",
+                                              "1 error");
+
+        if (!expected.equals(log)) {
+            throw new Exception("expected output not found: " + log);
+        }
+
+        log = new JavacTask(tb)
+                .options("-modulesourcepath", moduleSrc.toString(),
+                         "-modulepath", modulePath.toString(),
+                         "-XDrawDiagnostics")
+                .outdir(classes)
+                .files(findJavaFiles(moduleSrc))
+                .run(Task.Expect.FAIL)
+                .writeAll()
+                .getOutputLines(Task.OutputKind.DIRECT);
+
+        expected = Arrays.asList("Impl.java:1:51: compiler.err.doesnt.exist: apiB",
+                                 "Impl.java:1:61: compiler.err.not.def.access.package.cant.access: m2.M2, m2",
+                                 "2 errors");
+
+        if (!expected.equals(log)) {
+            throw new Exception("expected output not found: " + log);
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,9 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8159439
+ * @summary javac throws NPE with Module attribute and super_class != 0
+ * @build module-info
+ * @compile/fail/ref=NPEForModuleInfoWithNonZeroSuperClassTest.out -XDrawDiagnostics NPEForModuleInfoWithNonZeroSuperClassTest.java
+ */
+
+class NPEForModuleInfoWithNonZeroSuperClassTest {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/modules/T8159439/NPEForModuleInfoWithNonZeroSuperClassTest.out	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,2 @@
+- compiler.err.cant.access: mod.module-info, (compiler.misc.bad.class.file.header: module-info.class, (compiler.misc.module.info.invalid.super.class))
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/modules/T8159439/module-info.jcod	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,55 @@
+module mod {
+  0xCAFEBABE;
+  0; // minor version
+  53; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Utf8 "mod/module-info"; // #1    
+    class #1; // #2    
+    Utf8 "java/lang/Object"; // #3    
+    class #3; // #4    
+    Utf8 "java.base"; // #5    
+    Utf8 "pkg"; // #6    
+    Utf8 "Module"; // #7    
+    Utf8 "Version"; // #8    
+    Utf8 "6.0"; // #9    
+  } // Constant Pool
+
+  0x8000; // access
+  #2;// this_cpx
+  #4;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+  } // methods
+
+  [] { // Attributes
+    Attr(#7) { // Module
+      [] { // requires
+        #5 0x8020;
+      } // requires
+
+      [] { // exports
+        #6
+        [] { // to
+        }; // end to
+      } // exports
+
+      [] { // uses
+      } // uses
+
+      [] { // provides
+      } // provides
+
+    } // end Module
+    ;
+    Attr(#8) { // Version
+      0x0009;
+    } // end Version
+  } // Attributes
+} // end module mod
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/8132446/Processor.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.IOError;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Set;
+
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileObject;
+
+// This processor generates the missing annotation types of the form AutoAnnotation_*
+// thereby making sure annotation processing doesn't abort/crash on account of that.
+@SupportedAnnotationTypes("*")
+public class Processor extends JavacTestingAbstractProcessor {
+
+  @Override
+  public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+    if (!roundEnv.processingOver()) {
+      for (Element element : roundEnv.getRootElements()) {
+        String elementName = element.getSimpleName().toString();
+        if (elementName.startsWith("AutoAnnotation_")) {
+          continue;
+        }
+        String name = "AutoAnnotation_" + elementName;
+        JavaFileObject jfo;
+        try {
+          jfo = processingEnv.getFiler().createSourceFile(name, element);
+        } catch (IOException e) {
+          throw new IOError(e);
+        }
+        try (OutputStream os = jfo.openOutputStream()) {
+          String output = String.format("public @interface %s {}", name);
+          os.write(output.getBytes(StandardCharsets.UTF_8));
+        } catch (IOException e) {
+          throw new IOError(e);
+        }
+      }
+    }
+    return false;
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/processing/8132446/T8132446.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug     8132446
+ * @summary AsssertionError in ClassSymbol.setAnnotationType
+ * @library /tools/javac/lib
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build   Processor
+ * @compile -processor Processor T8132446.java
+ * @compile -processor Processor T8132446.java
+ */
+
+
+@Deprecated
+@AutoAnnotation_T8132446
+public class T8132446 {}
--- a/langtools/test/tools/javac/types/BoxingConversionTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/types/BoxingConversionTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,17 +26,18 @@
  * @bug 7006109
  * @summary Add test library to simplify the task of writing automated type-system tests
  * @author mcimadamore
- * @library .
+ * @library /tools/lib/types
  * @modules jdk.compiler/com.sun.tools.javac.code
  *          jdk.compiler/com.sun.tools.javac.comp
  *          jdk.compiler/com.sun.tools.javac.file
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ * @build TypeHarness
  * @run main BoxingConversionTest
  */
 
 import com.sun.tools.javac.code.Type;
-import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.code.Symbol.*;
 import java.lang.reflect.Array;
 import java.util.EnumSet;
 
--- a/langtools/test/tools/javac/types/CastTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/types/CastTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,14 @@
  * @bug 7006109
  * @summary Add test library to simplify the task of writing automated type-system tests
  * @author mcimadamore
- * @library .
+ * @library /tools/lib/types
  * @modules jdk.compiler/com.sun.tools.javac.code
  *          jdk.compiler/com.sun.tools.javac.comp
  *          jdk.compiler/com.sun.tools.javac.file
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ * @build TypeHarness
  * @run main CastTest
  */
 
--- a/langtools/test/tools/javac/types/GenericTypeWellFormednessTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/types/GenericTypeWellFormednessTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,14 @@
  * @bug 7007432 7006109
  * @summary Test generic types well-formedness
  * @author mcimadamore
- * @library .
+ * @library /tools/lib/types
  * @modules jdk.compiler/com.sun.tools.javac.code
  *          jdk.compiler/com.sun.tools.javac.comp
  *          jdk.compiler/com.sun.tools.javac.file
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ * @build TypeHarness
  * @run main GenericTypeWellFormednessTest
  */
 
--- a/langtools/test/tools/javac/types/PrimitiveConversionTest.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/types/PrimitiveConversionTest.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,17 +26,19 @@
  * @bug 7006109
  * @summary Add test library to simplify the task of writing automated type-system tests
  * @author mcimadamore
- * @library .
+ * @library /tools/lib/types
  * @modules jdk.compiler/com.sun.tools.javac.code
  *          jdk.compiler/com.sun.tools.javac.comp
  *          jdk.compiler/com.sun.tools.javac.file
  *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ * @build TypeHarness
  * @run main PrimitiveConversionTest
  */
 
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.code.Symbol.*;
 import java.lang.reflect.Array;
 import java.util.EnumSet;
 
--- a/langtools/test/tools/javac/types/TestComparisons.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/langtools/test/tools/javac/types/TestComparisons.java	Fri Jul 08 12:17:10 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,6 @@
  */
 
 import java.io.*;
-import java.lang.reflect.Array;
-import java.util.EnumSet;
 
 public class TestComparisons {
 
--- a/langtools/test/tools/javac/types/TypeHarness.java	Fri Jul 08 17:36:34 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
- * Copyright (c) 2010, 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 com.sun.tools.javac.code.BoundKind;
-import com.sun.tools.javac.code.Flags;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.code.Types;
-import com.sun.tools.javac.code.Symtab;
-import com.sun.tools.javac.code.Type;
-import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.comp.Check;
-import com.sun.tools.javac.util.List;
-import com.sun.tools.javac.util.ListBuffer;
-import com.sun.tools.javac.util.Name;
-import com.sun.tools.javac.util.Names;
-import com.sun.tools.javac.file.JavacFileManager;
-
-/**
- * Test harness whose goal is to simplify the task of writing type-system
- * regression test. It provides functionalities to build custom types as well
- * as to access the underlying javac's symbol table in order to retrieve
- * predefined types. Among the features supported by the harness are: type
- * substitution, type containment, subtyping, cast-conversion, assigment
- * conversion.
- *
- * This class is meant to be a common super class for all concrete type test
- * classes. A subclass can access the type-factory and the test methods so as
- * to write compact tests. An example is reported below:
- *
- * <pre>
- * Type X = fac.TypeVariable();
- * Type Y = fac.TypeVariable();
- * Type A_X_Y = fac.Class(0, X, Y);
- * Type A_Obj_Obj = fac.Class(0,
- *           predef.objectType,
- *           predef.objectType);
- * checkSameType(A_Obj_Obj, subst(A_X_Y,
- *           Mapping(X, predef.objectType),
- *           Mapping(Y, predef.objectType)));
- * </pre>
- *
- * The above code is used to create two class types, namely {@code A<X,Y>} and
- * {@code A<Object,Object>} where both {@code X} and {@code Y} are type-variables.
- * The code then verifies that {@code [X:=Object,Y:=Object]A<X,Y> == A<Object,Object>}.
- *
- * @author mcimadamore
- */
-public class TypeHarness {
-
-    protected Types types;
-    protected Check chk;
-    protected Symtab predef;
-    protected Names names;
-    protected Factory fac;
-
-    protected TypeHarness() {
-        Context ctx = new Context();
-        JavacFileManager.preRegister(ctx);
-        types = Types.instance(ctx);
-        chk = Check.instance(ctx);
-        predef = Symtab.instance(ctx);
-        names = Names.instance(ctx);
-        fac = new Factory();
-    }
-
-    // <editor-fold defaultstate="collapsed" desc="type assertions">
-
-    /** assert that 's' is a subtype of 't' */
-    public void assertSubtype(Type s, Type t) {
-        assertSubtype(s, t, true);
-    }
-
-    /** assert that 's' is/is not a subtype of 't' */
-    public void assertSubtype(Type s, Type t, boolean expected) {
-        if (types.isSubtype(s, t) != expected) {
-            String msg = expected ?
-                " is not a subtype of " :
-                " is a subtype of ";
-            error(s + msg + t);
-        }
-    }
-
-    /** assert that 's' is the same type as 't' */
-    public void assertSameType(Type s, Type t) {
-        assertSameType(s, t, true);
-    }
-
-    /** assert that 's' is/is not the same type as 't' */
-    public void assertSameType(Type s, Type t, boolean expected) {
-        if (types.isSameType(s, t) != expected) {
-            String msg = expected ?
-                " is not the same type as " :
-                " is the same type as ";
-            error(s + msg + t);
-        }
-    }
-
-    /** assert that 's' is castable to 't' */
-    public void assertCastable(Type s, Type t) {
-        assertCastable(s, t, true);
-    }
-
-    /** assert that 's' is/is not castable to 't' */
-    public void assertCastable(Type s, Type t, boolean expected) {
-        if (types.isCastable(s, t) != expected) {
-            String msg = expected ?
-                " is not castable to " :
-                " is castable to ";
-            error(s + msg + t);
-        }
-    }
-
-    /** assert that 's' is convertible (method invocation conversion) to 't' */
-    public void assertConvertible(Type s, Type t) {
-        assertCastable(s, t, true);
-    }
-
-    /** assert that 's' is/is not convertible (method invocation conversion) to 't' */
-    public void assertConvertible(Type s, Type t, boolean expected) {
-        if (types.isConvertible(s, t) != expected) {
-            String msg = expected ?
-                " is not convertible to " :
-                " is convertible to ";
-            error(s + msg + t);
-        }
-    }
-
-    /** assert that 's' is assignable to 't' */
-    public void assertAssignable(Type s, Type t) {
-        assertCastable(s, t, true);
-    }
-
-    /** assert that 's' is/is not assignable to 't' */
-    public void assertAssignable(Type s, Type t, boolean expected) {
-        if (types.isAssignable(s, t) != expected) {
-            String msg = expected ?
-                " is not assignable to " :
-                " is assignable to ";
-            error(s + msg + t);
-        }
-    }
-
-    /** assert that generic type 't' is well-formed */
-    public void assertValidGenericType(Type t) {
-        assertValidGenericType(t, true);
-    }
-
-    /** assert that 's' is/is not assignable to 't' */
-    public void assertValidGenericType(Type t, boolean expected) {
-        if (chk.checkValidGenericType(t) != expected) {
-            String msg = expected ?
-                " is not a valid generic type" :
-                " is a valid generic type";
-            error(t + msg + "   " + t.tsym.type);
-        }
-    }
-    // </editor-fold>
-
-    private void error(String msg) {
-        throw new AssertionError("Unexpected result: " + msg);
-    }
-
-    // <editor-fold defaultstate="collapsed" desc="type functions">
-
-    /** compute the erasure of a type 't' */
-    public Type erasure(Type t) {
-        return types.erasure(t);
-    }
-
-    /** compute the capture of a type 't' */
-    public Type capture(Type t) {
-        return types.capture(t);
-    }
-
-    /** compute the boxed type associated with 't' */
-    public Type box(Type t) {
-        if (!t.isPrimitive()) {
-            throw new AssertionError("Cannot box non-primitive type: " + t);
-        }
-        return types.boxedClass(t).type;
-    }
-
-    /** compute the unboxed type associated with 't' */
-    public Type unbox(Type t) {
-        Type u = types.unboxedType(t);
-        if (t == null) {
-            throw new AssertionError("Cannot unbox reference type: " + t);
-        } else {
-            return u;
-        }
-    }
-
-    /** compute a type substitution on 't' given a list of type mappings */
-    public Type subst(Type t, Mapping... maps) {
-        ListBuffer<Type> from = new ListBuffer<>();
-        ListBuffer<Type> to = new ListBuffer<>();
-        for (Mapping tm : maps) {
-            from.append(tm.from);
-            to.append(tm.to);
-        }
-        return types.subst(t, from.toList(), to.toList());
-    }
-
-    /** create a fresh type mapping from a type to another */
-    public Mapping Mapping(Type from, Type to) {
-        return new Mapping(from, to);
-    }
-
-    public static class Mapping {
-        Type from;
-        Type to;
-        private Mapping(Type from, Type to) {
-            this.from = from;
-            this.to = to;
-        }
-    }
-    // </editor-fold>
-
-    // <editor-fold defaultstate="collapsed" desc="type factory">
-
-    /**
-     * This class is used to create Java types in a simple way. All main
-     * kinds of type are supported: primitive, reference, non-denotable. The
-     * factory also supports creation of constant types (used by the compiler
-     * to represent the type of a literal).
-     */
-    public class Factory {
-
-        private int synthNameCount = 0;
-
-        private Name syntheticName() {
-            return names.fromString("A$" + synthNameCount++);
-        }
-
-        public ClassType Class(long flags, Type... typeArgs) {
-            ClassSymbol csym = new ClassSymbol(flags, syntheticName(), predef.noSymbol);
-            csym.type = new ClassType(Type.noType, List.from(typeArgs), csym);
-            ((ClassType)csym.type).supertype_field = predef.objectType;
-            return (ClassType)csym.type;
-        }
-
-        public ClassType Class(Type... typeArgs) {
-            return Class(0, typeArgs);
-        }
-
-        public ClassType Interface(Type... typeArgs) {
-            return Class(Flags.INTERFACE, typeArgs);
-        }
-
-        public ClassType Interface(long flags, Type... typeArgs) {
-            return Class(Flags.INTERFACE | flags, typeArgs);
-        }
-
-        public Type Constant(byte b) {
-            return predef.byteType.constType(b);
-        }
-
-        public Type Constant(short s) {
-            return predef.shortType.constType(s);
-        }
-
-        public Type Constant(int i) {
-            return predef.intType.constType(i);
-        }
-
-        public Type Constant(long l) {
-            return predef.longType.constType(l);
-        }
-
-        public Type Constant(float f) {
-            return predef.floatType.constType(f);
-        }
-
-        public Type Constant(double d) {
-            return predef.doubleType.constType(d);
-        }
-
-        public Type Constant(char c) {
-            return predef.charType.constType(c + 0);
-        }
-
-        public ArrayType Array(Type elemType) {
-            return new ArrayType(elemType, predef.arrayClass);
-        }
-
-        public TypeVar TypeVariable() {
-            return TypeVariable(predef.objectType);
-        }
-
-        public TypeVar TypeVariable(Type bound) {
-            TypeSymbol tvsym = new TypeVariableSymbol(0, syntheticName(), null, predef.noSymbol);
-            tvsym.type = new TypeVar(tvsym, bound, null);
-            return (TypeVar)tvsym.type;
-        }
-
-        public WildcardType Wildcard(BoundKind bk, Type bound) {
-            return new WildcardType(bound, bk, predef.boundClass);
-        }
-
-        public CapturedType CapturedVariable(Type upper, Type lower) {
-            return new CapturedType(syntheticName(), predef.noSymbol, upper, lower, null);
-        }
-
-        public ClassType Intersection(Type classBound, Type... intfBounds) {
-            ClassType ct = Class(Flags.COMPOUND);
-            ct.supertype_field = classBound;
-            ct.interfaces_field = List.from(intfBounds);
-            return ct;
-        }
-    }
-    // </editor-fold>
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/lib/types/TypeHarness.java	Fri Jul 08 12:17:10 2016 -0700
@@ -0,0 +1,540 @@
+/*
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.net.URI;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+import com.sun.tools.javac.code.BoundKind;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.comp.Attr;
+import com.sun.tools.javac.comp.Check;
+import com.sun.tools.javac.comp.Infer;
+import com.sun.tools.javac.comp.InferenceContext;
+import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.util.ListBuffer;
+import com.sun.tools.javac.util.Name;
+import com.sun.tools.javac.util.Names;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.main.JavaCompiler;
+import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
+import com.sun.tools.javac.util.Abort;
+import com.sun.tools.javac.util.Assert;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+
+import static com.sun.tools.javac.util.List.*;
+
+/**
+ * Test harness whose goal is to simplify the task of writing type-system
+ * regression test. It provides functionalities to build custom types as well
+ * as to access the underlying javac's symbol table in order to retrieve
+ * predefined types. Among the features supported by the harness are: type
+ * substitution, type containment, subtyping, cast-conversion, assigment
+ * conversion.
+ *
+ * This class is meant to be a common super class for all concrete type test
+ * classes. A subclass can access the type-factory and the test methods so as
+ * to write compact tests. An example is reported below:
+ *
+ * <pre>
+ * Type X = fac.TypeVariable();
+ * Type Y = fac.TypeVariable();
+ * Type A_X_Y = fac.Class(0, X, Y);
+ * Type A_Obj_Obj = fac.Class(0,
+ *           predef.objectType,
+ *           predef.objectType);
+ * checkSameType(A_Obj_Obj, subst(A_X_Y,
+ *           Mapping(X, predef.objectType),
+ *           Mapping(Y, predef.objectType)));
+ * </pre>
+ *
+ * The above code is used to create two class types, namely {@code A<X,Y>} and
+ * {@code A<Object,Object>} where both {@code X} and {@code Y} are type-variables.
+ * The code then verifies that {@code [X:=Object,Y:=Object]A<X,Y> == A<Object,Object>}.
+ *
+ * @author mcimadamore
+ */
+public class TypeHarness {
+
+    protected Types types;
+    protected Check chk;
+    protected Symtab predef;
+    protected Names names;
+    protected ReusableJavaCompiler tool;
+    protected Infer infer;
+
+    protected Factory fac;
+
+    protected TypeHarness() {
+        Context ctx = new Context();
+        JavacFileManager.preRegister(ctx);
+        MyAttr.preRegister(ctx);
+        tool = new ReusableJavaCompiler(ctx);
+        types = Types.instance(ctx);
+        infer = Infer.instance(ctx);
+        chk = Check.instance(ctx);
+        predef = Symtab.instance(ctx);
+        names = Names.instance(ctx);
+        fac = new Factory();
+    }
+
+    // <editor-fold defaultstate="collapsed" desc="type assertions">
+
+    /** assert that 's' is a subtype of 't' */
+    public void assertSubtype(Type s, Type t) {
+        assertSubtype(s, t, true);
+    }
+
+    /** assert that 's' is/is not a subtype of 't' */
+    public void assertSubtype(Type s, Type t, boolean expected) {
+        if (types.isSubtype(s, t) != expected) {
+            String msg = expected ?
+                " is not a subtype of " :
+                " is a subtype of ";
+            error(s + msg + t);
+        }
+    }
+
+    /** assert that 's' is the same type as 't' */
+    public void assertSameType(Type s, Type t) {
+        assertSameType(s, t, true);
+    }
+
+    /** assert that 's' is/is not the same type as 't' */
+    public void assertSameType(Type s, Type t, boolean expected) {
+        if (types.isSameType(s, t) != expected) {
+            String msg = expected ?
+                " is not the same type as " :
+                " is the same type as ";
+            error(s + msg + t);
+        }
+    }
+
+    /** assert that 's' is castable to 't' */
+    public void assertCastable(Type s, Type t) {
+        assertCastable(s, t, true);
+    }
+
+    /** assert that 's' is/is not castable to 't' */
+    public void assertCastable(Type s, Type t, boolean expected) {
+        if (types.isCastable(s, t) != expected) {
+            String msg = expected ?
+                " is not castable to " :
+                " is castable to ";
+            error(s + msg + t);
+        }
+    }
+
+    /** assert that 's' is convertible (method invocation conversion) to 't' */
+    public void assertConvertible(Type s, Type t) {
+        assertCastable(s, t, true);
+    }
+
+    /** assert that 's' is/is not convertible (method invocation conversion) to 't' */
+    public void assertConvertible(Type s, Type t, boolean expected) {
+        if (types.isConvertible(s, t) != expected) {
+            String msg = expected ?
+                " is not convertible to " :
+                " is convertible to ";
+            error(s + msg + t);
+        }
+    }
+
+    /** assert that 's' is assignable to 't' */
+    public void assertAssignable(Type s, Type t) {
+        assertCastable(s, t, true);
+    }
+
+    /** assert that 's' is/is not assignable to 't' */
+    public void assertAssignable(Type s, Type t, boolean expected) {
+        if (types.isAssignable(s, t) != expected) {
+            String msg = expected ?
+                " is not assignable to " :
+                " is assignable to ";
+            error(s + msg + t);
+        }
+    }
+
+    /** assert that generic type 't' is well-formed */
+    public void assertValidGenericType(Type t) {
+        assertValidGenericType(t, true);
+    }
+
+    /** assert that 's' is/is not assignable to 't' */
+    public void assertValidGenericType(Type t, boolean expected) {
+        if (chk.checkValidGenericType(t) != expected) {
+            String msg = expected ?
+                " is not a valid generic type" :
+                " is a valid generic type";
+            error(t + msg + "   " + t.tsym.type);
+        }
+    }
+    // </editor-fold>
+
+    /** Creates an inference context given a list of type variables and performs the given action on it.
+     *  The intention is to provide a way to do unit testing on inference contexts.
+     *  @param typeVars  a list of type variables to create the inference context from
+     *  @param consumer  the action to be performed on the inference context
+     */
+    protected void withInferenceContext(List<Type> typeVars, Consumer<InferenceContext> consumer) {
+        Assert.check(!typeVars.isEmpty(), "invalid parameter, empty type variables list");
+        ListBuffer undetVarsBuffer = new ListBuffer();
+        typeVars.stream().map((tv) -> new UndetVar((TypeVar)tv, null, types)).forEach((undetVar) -> {
+            undetVarsBuffer.add(undetVar);
+        });
+        List<Type> undetVarsList = undetVarsBuffer.toList();
+        InferenceContext inferenceContext = new InferenceContext(infer, nil(), undetVarsList);
+        inferenceContext.rollback(undetVarsList);
+        consumer.accept(inferenceContext);
+    }
+
+    private void error(String msg) {
+        throw new AssertionError("Unexpected result: " + msg);
+    }
+
+    // <editor-fold defaultstate="collapsed" desc="type functions">
+
+    /** compute the erasure of a type 't' */
+    public Type erasure(Type t) {
+        return types.erasure(t);
+    }
+
+    /** compute the capture of a type 't' */
+    public Type capture(Type t) {
+        return types.capture(t);
+    }
+
+    /** compute the boxed type associated with 't' */
+    public Type box(Type t) {
+        if (!t.isPrimitive()) {
+            throw new AssertionError("Cannot box non-primitive type: " + t);
+        }
+        return types.boxedClass(t).type;
+    }
+
+    /** compute the unboxed type associated with 't' */
+    public Type unbox(Type t) {
+        Type u = types.unboxedType(t);
+        if (t == null) {
+            throw new AssertionError("Cannot unbox reference type: " + t);
+        } else {
+            return u;
+        }
+    }
+
+    /** compute a type substitution on 't' given a list of type mappings */
+    public Type subst(Type t, Mapping... maps) {
+        ListBuffer<Type> from = new ListBuffer<>();
+        ListBuffer<Type> to = new ListBuffer<>();
+        for (Mapping tm : maps) {
+            from.append(tm.from);
+            to.append(tm.to);
+        }
+        return types.subst(t, from.toList(), to.toList());
+    }
+
+    /** create a fresh type mapping from a type to another */
+    public Mapping Mapping(Type from, Type to) {
+        return new Mapping(from, to);
+    }
+
+    public static class Mapping {
+        Type from;
+        Type to;
+        private Mapping(Type from, Type to) {
+            this.from = from;
+            this.to = to;
+        }
+    }
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="type factory">
+
+    /**
+     * This class is used to create Java types in a simple way. All main
+     * kinds of type are supported: primitive, reference, non-denotable. The
+     * factory also supports creation of constant types (used by the compiler
+     * to represent the type of a literal).
+     */
+    public class Factory {
+
+        private int synthNameCount = 0;
+
+        private Name syntheticName() {
+            return names.fromString("A$" + synthNameCount++);
+        }
+
+        public ClassType Class(long flags, Type... typeArgs) {
+            ClassSymbol csym = new ClassSymbol(flags, syntheticName(), predef.noSymbol);
+            csym.type = new ClassType(Type.noType, List.from(typeArgs), csym);
+            ((ClassType)csym.type).supertype_field = predef.objectType;
+            return (ClassType)csym.type;
+        }
+
+        public ClassType Class(Type... typeArgs) {
+            return Class(0, typeArgs);
+        }
+
+        public ClassType Interface(Type... typeArgs) {
+            return Class(Flags.INTERFACE, typeArgs);
+        }
+
+        public ClassType Interface(long flags, Type... typeArgs) {
+            return Class(Flags.INTERFACE | flags, typeArgs);
+        }
+
+        public Type Constant(byte b) {
+            return predef.byteType.constType(b);
+        }
+
+        public Type Constant(short s) {
+            return predef.shortType.constType(s);
+        }
+
+        public Type Constant(int i) {
+            return predef.intType.constType(i);
+        }
+
+        public Type Constant(long l) {
+            return predef.longType.constType(l);
+        }
+
+        public Type Constant(float f) {
+            return predef.floatType.constType(f);
+        }
+
+        public Type Constant(double d) {
+            return predef.doubleType.constType(d);
+        }
+
+        public Type Constant(char c) {
+            return predef.charType.constType(c + 0);
+        }
+
+        public ArrayType Array(Type elemType) {
+            return new ArrayType(elemType, predef.arrayClass);
+        }
+
+        public TypeVar TypeVariable() {
+            return TypeVariable(predef.objectType);
+        }
+
+        public TypeVar TypeVariable(Type bound) {
+            TypeSymbol tvsym = new TypeVariableSymbol(0, syntheticName(), null, predef.noSymbol);
+            tvsym.type = new TypeVar(tvsym, bound, null);
+            return (TypeVar)tvsym.type;
+        }
+
+        public WildcardType Wildcard(BoundKind bk, Type bound) {
+            return new WildcardType(bound, bk, predef.boundClass);
+        }
+
+        public CapturedType CapturedVariable(Type upper, Type lower) {
+            return new CapturedType(syntheticName(), predef.noSymbol, upper, lower, null);
+        }
+
+        public ClassType Intersection(Type classBound, Type... intfBounds) {
+            ClassType ct = Class(Flags.COMPOUND);
+            ct.supertype_field = classBound;
+            ct.interfaces_field = List.from(intfBounds);
+            return ct;
+        }
+    }
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="StrToTypeFactory">
+    /**
+     * StrToTypeFactory is a class provided to ease the creation of complex types from Strings.
+     * The client code can specify a package, a list of imports and a list of type variables when
+     * creating an instance of StrToTypeFactory. Later types including, or not, these type variables
+     * can be created by the factory. All occurrences of the same type variable in a type defined
+     * using a String are guaranteed to refer to the same type variable in the created type.
+     *
+     * An example is reported below:
+     *
+     * <pre>
+     * List<String> imports = new ArrayList<>();
+     * imports.add("java.util.*");
+     * List<String> typeVars = new ArrayList<>();
+     * typeVars.add("T");
+     * strToTypeFactory = new StrToTypeFactory(null, imports, typeVars);
+     *
+     * Type freeType = strToTypeFactory.getType("List<? extends T>");
+     * Type aType = strToTypeFactory.getType("List<? extends String>");
+     *
+     * // method withInferenceContext() belongs to TypeHarness
+     * withInferenceContext(strToTypeFactory.getTypeVars(), inferenceContext -> {
+     *     assertSameType(inferenceContext.asUndetVar(freeType), aType);
+     *     UndetVar undetVarForT = (UndetVar)inferenceContext.undetVars().head;
+     *     com.sun.tools.javac.util.List<Type> equalBounds = undetVarForT.getBounds(InferenceBound.EQ);
+     *     Assert.check(!equalBounds.isEmpty() && equalBounds.length() == 1,
+     *          "undetVar must have only one equality bound");
+     * });
+     * </pre>
+     */
+    public class StrToTypeFactory {
+        int id = 0;
+        String pkg;
+        java.util.List<String> imports;
+        public java.util.List<String> typeVarDecls;
+        public List<Type> typeVariables;
+
+        public StrToTypeFactory(String pkg, java.util.List<String> imports, java.util.List<String> typeVarDecls) {
+            this.pkg = pkg;
+            this.imports = imports;
+            this.typeVarDecls = typeVarDecls;
+            this.typeVariables = from(typeVarDecls.stream()
+                    .map(this::typeVarName)
+                    .map(this::getType)
+                    .collect(Collectors.toList())
+            );
+        }
+
+        TypeVar getTypeVarFromStr(String name) {
+            if (typeVarDecls == null) {
+                return null;
+            }
+            int index = typeVarDecls.indexOf(name);
+            if (index != -1) {
+                return (TypeVar)typeVariables.get(index);
+            }
+            return null;
+        }
+
+        List<Type> getTypeVars() {
+            return typeVariables;
+        }
+
+        String typeVarName(String typeVarDecl) {
+            String[] ss = typeVarDecl.split(" ");
+            return ss[0];
+        }
+
+        public final Type getType(String type) {
+            JavaSource source = new JavaSource(type);
+            MyAttr.theType = null;
+            MyAttr.typeParameters = List.nil();
+            tool.clear();
+            List<JavaFileObject> inputs = of(source);
+            try {
+                tool.compile(inputs);
+            } catch (Throwable ex) {
+                throw new Abort(ex);
+            }
+            if (typeVariables != null) {
+                return types.subst(MyAttr.theType, MyAttr.typeParameters, typeVariables);
+            }
+            return MyAttr.theType;
+        }
+
+        class JavaSource extends SimpleJavaFileObject {
+
+            String id;
+            String type;
+            String template = "#Package;\n" +
+                    "#Imports\n" +
+                    "class G#Id#TypeVars {\n" +
+                    "   #FieldType var;" +
+                    "}";
+
+            JavaSource(String type) {
+                super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+                this.id = String.valueOf(StrToTypeFactory.this.id++);
+                this.type = type;
+            }
+
+            @Override
+            public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+                String impStmts = imports.size() > 0 ?
+                        imports.stream().map(i -> "import " + i + ";").collect(Collectors.joining("\n")) : "";
+                String tvars = typeVarDecls.size() > 0 ?
+                        typeVarDecls.stream().collect(Collectors.joining(",", "<", ">")) : "";
+                return template
+                        .replace("#Package", (pkg == null) ? "" : "package " + pkg + ";")
+                        .replace("#Imports", impStmts)
+                        .replace("#Id", id)
+                        .replace("#TypeVars", tvars)
+                        .replace("#FieldType", type);
+            }
+        }
+    }
+    // </editor-fold>
+
+    // <editor-fold defaultstate="collapsed" desc="helper classes">
+    static class MyAttr extends Attr {
+
+        private static Type theType;
+        private static List<Type> typeParameters = List.nil();
+
+        static void preRegister(Context context) {
+            context.put(attrKey, (com.sun.tools.javac.util.Context.Factory<Attr>) c -> new MyAttr(c));
+        }
+
+        MyAttr(Context context) {
+            super(context);
+        }
+
+        @Override
+        public void visitVarDef(JCVariableDecl tree) {
+            super.visitVarDef(tree);
+            theType = tree.type;
+        }
+
+        @Override
+        public void attribClass(DiagnosticPosition pos, ClassSymbol c) {
+            super.attribClass(pos, c);
+            ClassType ct = (ClassType)c.type;
+            typeParameters = ct.typarams_field;
+        }
+    }
+
+    static class ReusableJavaCompiler extends JavaCompiler {
+        ReusableJavaCompiler(Context context) {
+            super(context);
+        }
+
+        @Override
+        protected void checkReusable() {
+            // do nothing
+        }
+
+        @Override
+        public void close() {
+            //do nothing
+        }
+
+        void clear() {
+            newRound();
+        }
+    }
+    // </editor-fold>
+}
--- a/make/CompileJavaModules.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/make/CompileJavaModules.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -55,10 +55,6 @@
 # data files and shouldn't go in the product
 java.base_EXCLUDE_FILES += sun/text/resources/BreakIteratorRules.java
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  java.base_EXCLUDE_FILES += sun/nio/fs/GnomeFileTypeDetector.java
-endif
-
 ifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), )
   java.base_EXCLUDE_FILES += \
       sun/nio/ch/AbstractPollSelectorImpl.java \
--- a/make/Main.gmk	Fri Jul 08 17:36:34 2016 +0300
+++ b/make/Main.gmk	Fri Jul 08 12:17:10 2016 -0700
@@ -633,7 +633,9 @@
 
   # Jmods cannot be created until we have the jlink tool ready to run, which requires
   # all java modules to be compiled and jdk.jlink-launchers.
-  $(JMOD_TARGETS): java.base-libs jdk.jlink-launchers
+  # And we also need to copy jvm.cfg (done in java.base-copy) and tzdb.dat (done in
+  # java.base-gendata) to the appropriate location otherwise jimage, jlink and jmod won't start.
+  $(JMOD_TARGETS): java.base-libs java.base-copy java.base-gendata jdk.jlink-launchers
   # When creating a BUILDJDK, the java compilation has already been done by the
   # normal build and copied in.
   ifneq ($(CREATING_BUILDJDK), true)
--- a/make/jprt.properties	Fri Jul 08 17:36:34 2016 +0300
+++ b/make/jprt.properties	Fri Jul 08 12:17:10 2016 -0700
@@ -75,7 +75,7 @@
 jprt.macosx.jdk9.target.attribute.compilerXcode511.appliesTo.builds=none
 
 # Set up the run flavors (jvm variants)
-jprt.run.flavors=c1,c2,default,${my.additional.run.flavors}
+jprt.run.flavors=c2,default,${my.additional.run.flavors}
 
 # Setup jib profiles
 jprt.linux_i586.product.build.jib.profile=linux-x86
@@ -208,10 +208,10 @@
 my.test.target.set=							\
     solaris_sparcv9_5.11-product-c2-TESTNAME,				\
     solaris_x64_5.11-product-c2-TESTNAME,				\
-    linux_i586_3.8-product-{c1|c2}-TESTNAME,				\
+    linux_i586_3.8-product-c2-TESTNAME, 				\
     linux_x64_3.8-product-c2-TESTNAME,					\
     macosx_x64_10.9-product-c2-TESTNAME,				\
-    windows_i586_6.3-product-c1-TESTNAME,				\
+    windows_i586_6.3-product-c2-TESTNAME,				\
     windows_x64_6.3-product-c2-TESTNAME
 
 # Default vm test targets (testset=default)
@@ -296,7 +296,7 @@
 my.test.target.set.jck=							\
     solaris_sparcv9_5.11-product-c2-JCK7TESTRULE,			\
     solaris_x64_5.11-product-c2-JCK7TESTRULE,				\
-    linux_i586_3.8-product-c1-JCK7TESTRULE,				\
+    linux_i586_3.8-product-c2-JCK7TESTRULE,				\
     linux_x64_3.8-product-c2-JCK7TESTRULE
 
 # JCK testset targets
--- a/nashorn/.hgtags	Fri Jul 08 17:36:34 2016 +0300
+++ b/nashorn/.hgtags	Fri Jul 08 12:17:10 2016 -0700
@@ -358,3 +358,4 @@
 b1de131a3fed6845c78bdda358ee127532f16a3f jdk-9+122
 9ed859b4faaf9ff7cd35f9e7f51c7e630303067a jdk-9+123
 5d68f5155dded7efec7d5aca5d631caa7ee1042b jdk-9+124
+a32d419d73fe881a935b567c57dab9bfe3ed5f92 jdk-9+125
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Source.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Source.java	Fri Jul 08 12:17:10 2016 -0700
@@ -36,6 +36,7 @@
 import java.io.Reader;
 import java.lang.ref.WeakReference;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLConnection;
@@ -75,8 +76,8 @@
     private final String name;
 
     /**
-     * Base directory the File or base part of the URL. Used to implement __DIR__.
-     * Used to load scripts relative to the 'directory' or 'base' URL of current script.
+     * Base path or URL of this source. Used to implement __DIR__, which can be
+     * used to load scripts relative to the location of the current script.
      * This will be null when it can't be computed.
      */
     private final String base;
@@ -875,31 +876,25 @@
     }
 
     /**
-     * Get the base url. This is currently used for testing only
+     * Returns the base directory or URL for the given URL. Used to implement __DIR__.
      * @param url a URL
-     * @return base URL for url
+     * @return base path or URL, or null if argument is not a hierarchical URL
      */
     public static String baseURL(final URL url) {
-        if (url.getProtocol().equals("file")) {
-            try {
-                final Path path = Paths.get(url.toURI());
+        try {
+            final URI uri = url.toURI();
+
+            if (uri.getScheme().equals("file")) {
+                final Path path = Paths.get(uri);
                 final Path parent = path.getParent();
                 return (parent != null) ? (parent + File.separator) : null;
-            } catch (final SecurityException | URISyntaxException | IOError e) {
+            }
+            if (uri.isOpaque() || uri.getPath() == null || uri.getPath().isEmpty()) {
                 return null;
             }
-        }
+            return uri.resolve("").toString();
 
-        // FIXME: is there a better way to find 'base' URL of a given URL?
-        String path = url.getPath();
-        if (path.isEmpty()) {
-            return null;
-        }
-        path = path.substring(0, path.lastIndexOf('/') + 1);
-        final int port = url.getPort();
-        try {
-            return new URL(url.getProtocol(), url.getHost(), port, path).toString();
-        } catch (final MalformedURLException e) {
+        } catch (final SecurityException | URISyntaxException | IOError e) {
             return null;
         }
     }
--- a/nashorn/test/Makefile	Fri Jul 08 17:36:34 2016 +0300
+++ b/nashorn/test/Makefile	Fri Jul 08 12:17:10 2016 -0700
@@ -118,19 +118,6 @@
   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 endif
 
-# jtreg -nativepath <dir>
-#
-# Local make tests will be TEST_IMAGE_DIR and JPRT with jprt.use.reg.test.bundle=true
-# should be JPRT_TESTNATIVE_PATH
-ifdef TEST_IMAGE_DIR
-  TESTNATIVE_DIR = $(TEST_IMAGE_DIR)
-else ifdef JPRT_TESTNATIVE_PATH
-  TESTNATIVE_DIR = $(JPRT_TESTNATIVE_PATH)
-endif
-ifdef TESTNATIVE_DIR
-  JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/nashorn/jtreg/native")
-endif
-
 # jtreg failure handler config
 ifeq ($(FAILURE_HANDLER_DIR), )
   ifneq ($(TESTNATIVE_DIR), )
--- a/test/jtreg-ext/requires/VMProps.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/test/jtreg-ext/requires/VMProps.java	Fri Jul 08 12:17:10 2016 -0700
@@ -23,6 +23,8 @@
 package requires;
 
 import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.ArrayList;
@@ -52,10 +54,30 @@
         map.put("vm.flavor", vmFlavor());
         map.put("vm.compMode", vmCompMode());
         map.put("vm.bits", vmBits());
+        map.put("vm.flightRecorder", vmFlightRecorder());
+        map.put("vm.simpleArch", vmArch());
         dump(map);
         return map;
     }
 
+
+    /**
+     * @return vm.simpleArch value of "os.simpleArch" property of tested JDK.
+     */
+    protected String vmArch() {
+        String arch = System.getProperty("os.arch");
+        if (arch.equals("x86_64") || arch.equals("amd64")) {
+            return "x64";
+        }
+        else if (arch.contains("86")) {
+            return "x86";
+        } else {
+            return arch;
+        }
+    }
+
+
+
     /**
      * @return VM type value extracted from the "java.vm.name" property.
      */
@@ -104,6 +126,27 @@
     }
 
     /**
+     * @return "true" if Flight Recorder is enabled, "false" if is disabled.
+     */
+    protected String vmFlightRecorder() {
+        RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+        List<String> arguments = runtimeMxBean.getInputArguments();
+        if (arguments.contains("-XX:+UnlockCommercialFeatures")) {
+            if (arguments.contains("-XX:+FlightRecorder")) {
+                return "true";
+            }
+            if (arguments.contains("-XX:-FlightRecorder")) {
+                return "false";
+            }
+            if (arguments.stream()
+                    .anyMatch(option -> option.startsWith("-XX:StartFlightRecording"))) {
+                return "true";
+            }
+        }
+        return "false";
+    }
+
+    /**
      * Dumps the map to the file if the file name is given as the property.
      * This functionality could be helpful to know context in the real
      * execution.
@@ -116,9 +159,9 @@
             return;
         }
         List<String> lines = new ArrayList<>();
-        map.forEach((k,v) -> lines.add(k + ":" + v));
+        map.forEach((k, v) -> lines.add(k + ":" + v));
         try {
-             Files.write(Paths.get(dumpFileName), lines);
+            Files.write(Paths.get(dumpFileName), lines);
         } catch (IOException e) {
             throw new RuntimeException("Failed to dump properties into '"
                     + dumpFileName + "'", e);
@@ -131,6 +174,6 @@
      */
     public static void main(String args[]) {
         Map<String, String> map = new VMProps().call();
-        map.forEach((k,v) -> System.out.println(k + ": '" + v + "'"));
+        map.forEach((k, v) -> System.out.println(k + ": '" + v + "'"));
     }
 }
--- a/test/lib/sun/hotspot/WhiteBox.java	Fri Jul 08 17:36:34 2016 +0300
+++ b/test/lib/sun/hotspot/WhiteBox.java	Fri Jul 08 12:17:10 2016 -0700
@@ -376,6 +376,7 @@
   public native void freeMetaspace(ClassLoader classLoader, long addr, long size);
   public native long incMetaspaceCapacityUntilGC(long increment);
   public native long metaspaceCapacityUntilGC();
+  public native boolean metaspaceShouldConcurrentCollect();
 
   // Don't use these methods directly
   // Use sun.hotspot.gc.GC class instead.