Merge
authorbobv
Tue, 27 Jun 2017 16:00:14 -0400 (2017-06-27)
changeset 46234 6209c6d48052
parent 46233 91715f519bb4 (current diff)
parent 46231 070d55554f06 (diff)
child 46235 f02db39faf24
Merge
common/autoconf/generated-configure.sh
jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/Catalog.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogEntry.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogException.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogManager.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/Resolver.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/BootstrapResolver.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/Debug.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/FileURL.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/Namespaces.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/PublicId.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/CatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogParser.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/ExtendedXMLCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/OASISXMLCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogParser.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXParserHandler.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/TR9401CatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/TextCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/XCatalogReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/CatalogResolver.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLReader.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMHelper.java
jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java
jdk/src/java.base/share/specs/serialization/class.md
jdk/src/java.base/share/specs/serialization/examples.md
jdk/src/java.base/share/specs/serialization/exceptions.md
jdk/src/java.base/share/specs/serialization/images/version.gif
jdk/src/java.base/share/specs/serialization/index.md
jdk/src/java.base/share/specs/serialization/input.md
jdk/src/java.base/share/specs/serialization/output.md
jdk/src/java.base/share/specs/serialization/protocol.md
jdk/src/java.base/share/specs/serialization/security.md
jdk/src/java.base/share/specs/serialization/serial-arch.md
jdk/src/java.base/share/specs/serialization/version.md
jdk/src/java.desktop/share/specs/AWT_Native_Interface.html
jdk/src/java.management/share/specs/JVM-MANAGEMENT-MIB.mib
jdk/test/java/io/File/MacPathTest.sh
jdk/test/java/io/File/basic.sh
jdk/test/java/io/FileOutputStream/FileOpen.sh
jdk/test/java/io/FileOutputStream/FileOpenNeg.java
jdk/test/java/io/FileOutputStream/FileOpenPos.java
jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh
jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh
jdk/test/java/nio/charset/Charset/default.sh
jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh
jdk/test/java/nio/charset/spi/Test.java
jdk/test/java/nio/charset/spi/basic.sh
jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java
jdk/test/java/nio/file/Files/walkFileTree/find.sh
jdk/test/java/nio/file/Path/MacPathTest.sh
jdk/test/java/util/Arrays/ParallelPrefix.java
jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java
jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java
jdk/test/lib/testlibrary/jdk/testlibrary/TimeLimitedRunner.java
jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh
jdk/test/sun/net/ftp/MarkResetTest.sh
jdk/test/sun/net/www/protocol/file/DirPermissionDenied.sh
jdk/test/sun/net/www/protocol/jrt/other_resources.sh
langtools/make/src/classes/build/tools/listjdkinternals/ListJDKInternals.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/LayoutParser.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/XMLNode.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclet.xml
--- a/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -1,3 +1,5 @@
+94680c6d60ecd9ed3ffd1847706efde7eb947afc jdk-9+174
+6dd7fda42bab7ecf648cafb0a4e9b4ca11b3094f jdk-9+173
 dad6746278facbbea57dd462cb56fb743dc0a5f0 jdk-9+172
 643b5f18c2656fe91b69fea85b07b98d5fad394d jdk-9+171
 898cbe31fbdae2d25d141384fac746cc244a730c jdk-9+170
@@ -426,3 +428,5 @@
 c42dc7b58b4d4301ea676a76326fd9bbd403d595 jdk-10+8
 aa5b01f5e5620438fd39efdb2e2f6365a2c7d898 jdk-10+9
 b0f2b8ff25a2209b2c807785d75f20e5086bbfc2 jdk-10+10
+036dbf8b381798e5d31065109714d04d97bf98a4 jdk-10+11
+e6d70017f5b9adbb2ec82d826973d0251800a3c3 jdk-10+12
--- a/.hgtags-top-repo	Tue Jun 27 14:30:44 2017 -0400
+++ b/.hgtags-top-repo	Tue Jun 27 16:00:14 2017 -0400
@@ -426,3 +426,7 @@
 4c12464a907db4656c1033f56fa49cba643ac629 jdk-9+171
 6558c37afe832582238d338578d598f30c6fdd75 jdk-10+10
 2c25fc24103251f9711a1c280c31e1e41016d90f jdk-9+172
+6b750cdb823a029a25ff2e560302cc2d28a86cb6 jdk-10+11
+88d7fd969e7df0e07a53b201cfd29393ca33ede9 jdk-9+173
+5466f409346e0446ee9a6daeb7f5d75c8fc76823 jdk-9+174
+8d4ed1e06fe184c9cb08c5b708e7d6f5c066644f jdk-10+12
--- a/common/autoconf/flags.m4	Tue Jun 27 14:30:44 2017 -0400
+++ b/common/autoconf/flags.m4	Tue Jun 27 16:00:14 2017 -0400
@@ -910,7 +910,7 @@
     $2CFLAGS_JDK="[$]$2CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_REENTRANT"
     $2CFLAGS_JDK="[$]$2CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     $2CXXFLAGS_JDK="[$]$2CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -975,6 +975,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_$1_OS_UPPERCASE=`$ECHO $OPENJDK_$1_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D$OPENJDK_$1_OS_UPPERCASE"
@@ -1012,7 +1017,7 @@
   elif test "x$OPENJDK_$1_OS" = xsolaris; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
--- a/common/autoconf/generated-configure.sh	Tue Jun 27 14:30:44 2017 -0400
+++ b/common/autoconf/generated-configure.sh	Tue Jun 27 16:00:14 2017 -0400
@@ -686,6 +686,7 @@
 LIBFFI_CFLAGS
 ALSA_LIBS
 ALSA_CFLAGS
+FREETYPE_LICENSE
 FREETYPE_BUNDLE_LIB_PATH
 FREETYPE_LIBS
 FREETYPE_CFLAGS
@@ -1200,6 +1201,7 @@
 with_freetype_lib
 with_freetype_src
 enable_freetype_bundling
+with_freetype_license
 with_alsa
 with_alsa_include
 with_alsa_lib
@@ -2149,6 +2151,7 @@
   --with-freetype-src     specify directory with freetype sources to
                           automatically build the library (experimental,
                           Windows-only)
+  --with-freetype-license if bundling freetype, also bundle this license file
   --with-alsa             specify prefix directory for the alsa package
                           (expecting the libraries under PATH/lib and the
                           headers under PATH/include)
@@ -5148,7 +5151,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1496941901
+DATE_WHEN_GENERATED=1498593591
 
 ###############################################################################
 #
@@ -51424,7 +51427,7 @@
     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -51489,6 +51492,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
@@ -51526,7 +51534,7 @@
   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -52252,7 +52260,7 @@
     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
-    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -52317,6 +52325,11 @@
     fi
   fi
 
+  # Always enable optional macros for VM.
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
+  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
+
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
@@ -52354,7 +52367,7 @@
   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
-        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
+        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
@@ -53976,7 +53989,7 @@
 
   if test "x$ENABLE_AOT" = "xtrue"; then
     # Only enable AOT on X64 platforms.
-    if test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
         if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
           ENABLE_AOT="true"
@@ -57991,6 +58004,12 @@
 fi
 
 
+# Check whether --with-freetype-license was given.
+if test "${with_freetype_license+set}" = set; then :
+  withval=$with_freetype_license;
+fi
+
+
   # Need to specify explicitly since it needs to be overridden on some versions of macosx
   FREETYPE_BASE_NAME=freetype
   FREETYPE_CFLAGS=
@@ -63937,6 +63956,153 @@
 
   fi # end freetype needed
 
+  FREETYPE_LICENSE=""
+  if test "x$with_freetype_license" = "xyes"; then
+    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
+  elif test "x$with_freetype_license" != "x"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
+$as_echo_n "checking for freetype license... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
+$as_echo "$with_freetype_license" >&6; }
+    FREETYPE_LICENSE="$with_freetype_license"
+
+  # Only process if variable expands to non-empty
+
+  if test "x$FREETYPE_LICENSE" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  path="$FREETYPE_LICENSE"
+  new_path=`$CYGPATH -u "$path"`
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file precense.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
+    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+
+  if test "x$path" != "x$new_path"; then
+    FREETYPE_LICENSE="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
+  fi
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  path="$FREETYPE_LICENSE"
+  has_colon=`$ECHO $path | $GREP ^.:`
+  new_path="$path"
+  if test "x$has_colon" = x; then
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $path`
+  fi
+
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+  if test "x$path" != "x$new_path"; then
+    FREETYPE_LICENSE="$new_path"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
+$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
+  fi
+
+  # Save the first 10 bytes of this path to the storage, so fixpath can work.
+  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+
+    else
+      # We're on a unix platform. Hooray! :)
+      path="$FREETYPE_LICENSE"
+      has_space=`$ECHO "$path" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
+$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
+        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
+      fi
+
+      # Use eval to expand a potential ~
+      eval path="$path"
+      if test ! -f "$path" && test ! -d "$path"; then
+        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
+      fi
+
+      if test -d "$path"; then
+        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
+      else
+        dir="`$DIRNAME "$path"`"
+        base="`$BASENAME "$path"`"
+        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
+      fi
+    fi
+  fi
+
+    if test ! -f "$FREETYPE_LICENSE"; then
+      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
+    fi
+  fi
+
+
 
 
 
--- a/common/autoconf/lib-freetype.m4	Tue Jun 27 14:30:44 2017 -0400
+++ b/common/autoconf/lib-freetype.m4	Tue Jun 27 16:00:14 2017 -0400
@@ -194,6 +194,8 @@
       [specify directory with freetype sources to automatically build the library (experimental, Windows-only)])])
   AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling],
       [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])])
+  AC_ARG_WITH(freetype-license, [AS_HELP_STRING([--with-freetype-license],
+      [if bundling freetype, also bundle this license file])])
 
   # Need to specify explicitly since it needs to be overridden on some versions of macosx
   FREETYPE_BASE_NAME=freetype
@@ -443,7 +445,21 @@
 
   fi # end freetype needed
 
+  FREETYPE_LICENSE=""
+  if test "x$with_freetype_license" = "xyes"; then
+    AC_MSG_ERROR([--with-freetype-license must have a value])
+  elif test "x$with_freetype_license" != "x"; then
+    AC_MSG_CHECKING([for freetype license])
+    AC_MSG_RESULT([$with_freetype_license])
+    FREETYPE_LICENSE="$with_freetype_license"
+    BASIC_FIXUP_PATH(FREETYPE_LICENSE)
+    if test ! -f "$FREETYPE_LICENSE"; then
+      AC_MSG_ERROR([$FREETYPE_LICENSE cannot be found])
+    fi
+  fi
+
   AC_SUBST(FREETYPE_BUNDLE_LIB_PATH)
   AC_SUBST(FREETYPE_CFLAGS)
   AC_SUBST(FREETYPE_LIBS)
+  AC_SUBST(FREETYPE_LICENSE)
 ])
--- a/common/autoconf/spec.gmk.in	Tue Jun 27 14:30:44 2017 -0400
+++ b/common/autoconf/spec.gmk.in	Tue Jun 27 16:00:14 2017 -0400
@@ -312,6 +312,7 @@
 FREETYPE_LIBS:=@FREETYPE_LIBS@
 FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@
 FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
+FREETYPE_LICENSE=@FREETYPE_LICENSE@
 CUPS_CFLAGS:=@CUPS_CFLAGS@
 ALSA_LIBS:=@ALSA_LIBS@
 ALSA_CFLAGS:=@ALSA_CFLAGS@
--- a/common/conf/jib-profiles.js	Tue Jun 27 14:30:44 2017 -0400
+++ b/common/conf/jib-profiles.js	Tue Jun 27 16:00:14 2017 -0400
@@ -387,7 +387,7 @@
     // on such hardware.
     if (input.build_cpu == "sparcv9") {
        var cpu_brand = $EXEC("bash -c \"kstat -m cpu_info | grep brand | head -n1 | awk '{ print \$2 }'\"");
-       if (cpu_brand.trim().match('SPARC-.7')) {
+       if (cpu_brand.trim().match('SPARC-.[78]')) {
            boot_jdk_revision = "8u20";
            boot_jdk_subdirpart = "1.8.0_20";
        }
@@ -893,6 +893,16 @@
             }
         });
 
+    // The windows ri profile needs to add the freetype license file
+    profilesRiFreetype = {
+        "windows-x86-ri": {
+            configure_args: "--with-freetype-license="
+                + input.get("freetype", "install_path")
+                + "/freetype-2.7.1-v120-x86/freetype.md"
+        }
+    };
+    profiles = concatObjects(profiles, profilesRiFreetype);
+
     // Generate the missing platform attributes
     profiles = generatePlatformAttributes(profiles);
     profiles = generateDefaultMakeTargetsConfigureArg(common, profiles);
--- a/corba/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -426,3 +426,7 @@
 c62e5964cfcf144d8f72e9ba69757897785349a9 jdk-9+171
 080c37fd77e2c4629b91059298e37758afbdbc46 jdk-10+10
 95ed14547ca9246baed34f90ef3ca13217538a8c jdk-9+172
+8ef8a0f1c4dfea17e10125e1f885920538e63085 jdk-10+11
+534ba4f8cfcf12accc5b9adb943103f2ff79fe16 jdk-9+173
+3615768c12904e29bb2ec1b506cd4633cd8a9ced jdk-9+174
+00ae6307d78bac49883ddc85d687aa88c49f3971 jdk-10+12
--- a/corba/src/java.corba/share/classes/javax/rmi/PortableRemoteObject.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/javax/rmi/PortableRemoteObject.java	Tue Jun 27 16:00:14 2017 -0400
@@ -62,6 +62,8 @@
  * attempts to narrow it to conform to
  * the given interface. If the operation is successful the result will be an
  * object of the specified type, otherwise an exception will be thrown.
+ *
+ * <p>See also {@extLink rmi_iiop_guides RMI-IIOP developer's guides}.</p>
  */
 public class PortableRemoteObject {
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/ACTIVITY_COMPLETED.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/ACTIVITY_COMPLETED.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * the Activity, or that the Activity completed in a manner other than that
  * originally requested.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/ACTIVITY_REQUIRED.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/ACTIVITY_REQUIRED.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,8 +31,8 @@
  * Activity context was necessary to perform the invoked operation, but one
  * was not found associated with the calling thread.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_CONTEXT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_CONTEXT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since    JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_INV_ORDER.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_INV_ORDER.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_OPERATION.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_OPERATION.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_PARAM.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_PARAM.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,10 +37,9 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning of
- * minor codes</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions},
+ * {@extLink jidlexception_minorcodes meaning of minor codes}
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_QOS.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_QOS.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
  * support the quality of service required by an invocation parameter that
  * has a quality of service semantics associated with it.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_TYPECODE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/BAD_TYPECODE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/Bounds.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/Bounds.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
  * the legal bounds for the object that a method is trying
  * to access.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class Bounds extends org.omg.CORBA.UserException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/CODESET_INCOMPATIBLE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/CODESET_INCOMPATIBLE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,8 @@
  * This exception is raised whenever meaningful communication is not possible
  * between client and server native code sets.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/COMM_FAILURE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/COMM_FAILURE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,11 +33,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning
- * of minor codes</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning of
- * minor codes</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/DATA_CONVERSION.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/DATA_CONVERSION.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,11 +35,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning
- * of minor codes</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/FREE_MEM.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/FREE_MEM.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/IMP_LIMIT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/IMP_LIMIT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INITIALIZE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INITIALIZE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INTERNAL.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INTERNAL.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,11 +33,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">meaning
- * of minor codes</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes meaning of minor codes}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INTF_REPOS.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INTF_REPOS.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INVALID_ACTIVITY.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INVALID_ACTIVITY.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * suspended. It is also raised when an attempted invocation is made that
  * is incompatible with the Activity's current state.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INVALID_TRANSACTION.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INVALID_TRANSACTION.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   JDK1.2
  *
  */
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INV_FLAG.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INV_FLAG.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INV_IDENT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INV_IDENT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INV_OBJREF.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INV_OBJREF.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,11 +37,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/INV_POLICY.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/INV_POLICY.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class INV_POLICY extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/MARSHAL.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/MARSHAL.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
  * @since       JDK1.2
  */
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/NO_IMPLEMENT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/NO_IMPLEMENT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,8 +36,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
  * @since       JDK1.2
  */
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/NO_MEMORY.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/NO_MEMORY.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/NO_PERMISSION.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/NO_PERMISSION.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/NO_RESOURCES.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/NO_RESOURCES.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/NO_RESPONSE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/NO_RESPONSE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/OBJECT_NOT_EXIST.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/OBJECT_NOT_EXIST.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,11 +39,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/OBJ_ADAPTER.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/OBJ_ADAPTER.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,11 +34,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meanings}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since       JDK1.2
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/ORB.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/ORB.java	Tue Jun 27 16:00:14 2017 -0400
@@ -184,6 +184,8 @@
  * Therefore, the implementation first checks the ${java.home}/conf directory for orb.properties,
  * and thereafter the ${java.home}/lib directory.
  *
+ * <p>See also {@extLink idl_guides IDL developer's guide}.</p>
+ *
  * @since   JDK1.2
  */
 abstract public class ORB {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/PERSIST_STORE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/PERSIST_STORE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class PERSIST_STORE extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/REBIND.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/REBIND.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * This exception is also raised if the current effective RebindPolicy has
  * a value of NO_RECONNECT and a connection must be reopened.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/SystemException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/SystemException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,8 +44,8 @@
  * declared in signatures of the Java methods mapped from operations in
  * IDL interfaces.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public abstract class SystemException extends java.lang.RuntimeException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TIMEOUT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TIMEOUT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
  * specified time-to-live period has been exceeded. It is a standard system
  * exception because time-to-live QoS can be applied to any invocation.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- *      Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @since   J2SE 1.5
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_MODE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_MODE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,8 +35,8 @@
  * a string describing the exception.
  * The OMG CORBA core 2.4 specification has details.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class TRANSACTION_MODE extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_REQUIRED.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_REQUIRED.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,8 @@
  * a string describing the exception.
  * The OMG Transaction Service specfication has details.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class TRANSACTION_REQUIRED extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_ROLLEDBACK.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class TRANSACTION_ROLLEDBACK extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_UNAVAILABLE.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSACTION_UNAVAILABLE.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,8 +35,8 @@
  * a string describing the exception.
  * The OMG CORBA core 2.4 specification has details.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class TRANSACTION_UNAVAILABLE extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSIENT.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/TRANSIENT.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,8 +36,8 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class TRANSIENT extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/UNKNOWN.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/UNKNOWN.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,11 +39,11 @@
  * what caused the exception, and a completion status. It may also contain
  * a string describing the exception.
  * <P>
- * See the section <A href="../../../../technotes/guides/idl/jidlExceptions.html#minorcodemeanings">Minor
- * Code Meanings</A> to see the minor codes for this exception.
+ * See the section {@extLink jidlexception_minorcodes Minor Code Meaning}
+ * to see the minor codes for this exception.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class UNKNOWN extends SystemException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/UnknownUserException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/UnknownUserException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * <code>UnknownUserException</code> object. This is available from the
  * <code>Environment</code> object returned by the method <code>Request.env</code>.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  * @see Request
  */
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/UserException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/UserException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,8 +31,8 @@
  * means that they need to
  * be declared in method signatures.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 public abstract class UserException extends java.lang.Exception implements org.omg.CORBA.portable.IDLEntity {
 
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/WrongTransaction.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/WrongTransaction.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * which the client originally sent the request.
  * See the OMG Transaction Service Specification for details.
  *
- * @see <A href="../../../../technotes/guides/idl/jidlExceptions.html">documentation on
- * Java&nbsp;IDL exceptions</A>
+ * <p>See also {@extLink jidlexception documentation on Java&nbsp;IDL exceptions}.
+ * </p>
  */
 
 public final class WrongTransaction extends UserException {
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/doc-files/generatedfiles.html	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/doc-files/generatedfiles.html	Tue Jun 27 16:00:14 2017 -0400
@@ -42,7 +42,7 @@
 </UL>
 
 
-<H2><a name="helper">Helper Files</a></H2>
+<H2><a id="helper">Helper Files</a></H2>
 
 <P>Helper files supply several static methods needed to manipulate the type.
 These include <code>Any</code> insert and extract operations for the type,
@@ -57,7 +57,7 @@
 is raised to indicate other kinds of errors. Trying to narrow
 a null will always succeed with a return value of null.
 
-<H2><a name="holder">Holder Files</a></H2>
+<H2><a id="holder">Holder Files</a></H2>
 
 <P>Support for out and inout parameter passing modes requires the use of additional holder classes.
 These classes are available for all of the basic IDL datatypes in the <code>org.omg.CORBA</code> package
@@ -74,7 +74,7 @@
 the <code>org.omg.CORBA.portable.Streamable</code> interface.
 
 
-<H2><a name="operations">Operations Files</a></H2>
+<H2><a id="operations">Operations Files</a></H2>
 
 <P>A non abstract IDL interface is mapped to two public Java interfaces:
 a <em>signature</em> interface and an <em>operations</em> interface.
@@ -96,7 +96,7 @@
 interface and operations interface hierarchies.
 
 
-<H2><a name="stub">Stubs</a></H2>
+<H2><a id="stub">Stubs</a></H2>
 
 <P>For the mapping of a non-object-oriented language, there will be
 a programming interface to the stubs for each interface type. Generally, the stubs
--- a/corba/src/java.corba/share/classes/org/omg/CORBA/package.html	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CORBA/package.html	Tue Jun 27 16:00:14 2017 -0400
@@ -147,9 +147,7 @@
 <code><b>register_initial_reference</b>(String id, org.omg.CORBA.Object obj)</code>
 </UL>
 
-<P>An example that uses some of these methods is <A
-HREF="{@docRoot}/../technotes/guides/idl/GShome.html">
-<em>Getting Started with Java IDL</em></A>.
+<P>An example that uses some of these methods is {@extLink idl_getting_started Getting Started with Java IDL}.
 
 <H2>
 Exceptions</H2>
@@ -158,9 +156,8 @@
 then any code using that method must have a <code>try</code>/<code>catch</code>
 block and handle that exception when it is thrown.
 
-<P>The documentation on <A 
-HREF="{@docRoot}/../technotes/guides/idl/jidlExceptions.html"><em>Java
-IDL exceptions</em></A> has more information and explains the difference between
+<P>The documentation on {@extLink jidlexception Java&nbsp;IDL exceptions }
+has more information and explains the difference between
 system exceptions and user-defined exceptions.
 
 <P>The following is a list of the system exceptions (which are unchecked
@@ -447,8 +444,8 @@
 will take an object in the Java programming language.  The helper class for a
 non-abstract interface that has at least one abstract base interface will provide
 both versions of the <code>narrow</code> method.
-<P>The <A HREF="{@docRoot}/../technotes/guides/idl/jidlExample.html"><em>Hello World</em></A>
-tutorial uses a <code>narrow</code> method that looks like this:
+<P>The {@extLink idl_guides Hello World tutorial}
+uses a <code>narrow</code> method that looks like this:
 <PRE>
         // create and initialize the ORB
         ORB orb = ORB.init(args, null);
@@ -548,6 +545,7 @@
 }
 </PRE>
 
+<a id="value"></a>
 <h3>Value Type Helper Classes</h3>
 A helper class for a value type includes different renderings of
 the same methods generated for non-value type methods. The main difference
@@ -861,8 +859,8 @@
 Related Documentation</H1>
 For overviews, guides, and a tutorial, please see:
 <UL>
-<LI>
-<A HREF="{@docRoot}/../technotes/guides/idl/index.html">Java IDL home page</A>
+<LI> {@extLink idl_guides Java&nbsp;IDL tutorial page}.</LI>
+<LI> {@extLink rmi_iiop_guides RMI-IIOP developer's guide}.</LI>
 </UL>
 
 
--- a/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/CosNaming/package.html	Tue Jun 27 16:00:14 2017 -0400
@@ -3,7 +3,7 @@
 <head>
 <!--
 /*
-* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -334,14 +334,12 @@
 For an overview and examples of how to use the
 <code>CosNaming</code> API, please see:
 <ul>
-  <li><a href="../../../../technotes/guides/idl/tnameserv.html">
-    Naming Service</a>
+  <li>{@extLink tnameserv NamingService}
 </ul>
 <p>
 For an overview of Java&nbsp;IDL, please see:
 <ul>
-  <li><a href="../../../../technotes/guides/idl/index.html">
-    Java&nbsp;IDL home page</a>
+  <li>{@extLink idl_guides  Java&nbsp;IDL developer's home page}
 </ul>
 
 @since JDK1.3
--- a/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html	Tue Jun 27 14:30:44 2017 -0400
+++ b/corba/src/java.corba/share/classes/org/omg/PortableServer/package.html	Tue Jun 27 16:00:14 2017 -0400
@@ -157,7 +157,7 @@
 <H2>Related Documentation</H2>
 
 <P>For an overview of Java IDL, please see:
-<A HREF="../../../../technotes/guides/idl/index.html">Java IDL home page</A>.
+{@extLink idl_guides Java&nbsp;IDL home page}.
 
 <H2>Example Code</H2>
 <a id="sampleserver"></a>
--- a/hotspot/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -586,3 +586,7 @@
 d53171650a2cc6c6f699c966c533b914ca9c0602 jdk-9+171
 c6cd3ec8d46b034e57c86399380ffcf7f25706e4 jdk-10+10
 1ae9e84f68b359420d2d153ecfe5ee2903e33a2e jdk-9+172
+7f14e550f1e8abea41c223e5fdad2261e99ba929 jdk-10+11
+e64b1cb48d6e7703928a9d1da106fc27f8cb65fd jdk-9+173
+944791f8160185bffa13fbb821fc09b6198f1f25 jdk-9+174
+070aa7a2eb14c4645f7eb31384cba0a2ba72a4b5 jdk-10+12
--- a/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/cpu/arm/vm/relocInfo_arm.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -139,7 +139,7 @@
 #ifdef AARCH64
 #ifdef COMPILER2
   NativeMovConstReg* ni = nativeMovConstReg_at(addr());
-  if (ni->is_movz()) {
+  if (ni->is_mov_slow()) {
     return;
   }
 #endif
--- a/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,15 @@
 /**
  * Defines the implementation of the HotSpot Serviceability Agent.
  *
+ * <p> This module includes the <em>{@index jhsdb jhsdb tool}</em> tool to
+ * attach to a running Java Virtual Machine (JVM) or launch a postmortem
+ * debugger to analyze the content of a core-dump from a crashed JVM.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:</dt>
+ * <dd> {@extLink jhsdb_tool_reference jhsdb}</dd>
+ * </dl>
+ *
  * @moduleGraph
  * @since 9
  */
--- a/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java	Tue Jun 27 16:00:14 2017 -0400
@@ -251,7 +251,13 @@
 
         for (JavaKind kind : new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object}) {
             Class<?> javaClass = kind == JavaKind.Object ? Object.class : kind.toJavaClass();
-            r.register5("compareAndSwap" + kind.name(), Receiver.class, Object.class, long.class, javaClass, javaClass, new InvocationPlugin() {
+            String casName;
+            if (Java8OrEarlier) {
+                casName = "compareAndSwap";
+            } else {
+                casName = "compareAndSet";
+            }
+            r.register5(casName + kind.name(), Receiver.class, Object.class, long.class, javaClass, javaClass, new InvocationPlugin() {
                 @Override
                 public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unsafe, ValueNode object, ValueNode offset, ValueNode expected, ValueNode x) {
                     // Emits a null-check for the otherwise unused receiver
--- a/hotspot/src/share/vm/opto/arraycopynode.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/arraycopynode.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "opto/arraycopynode.hpp"
 #include "opto/graphKit.hpp"
+#include "runtime/sharedRuntime.hpp"
 
 ArrayCopyNode::ArrayCopyNode(Compile* C, bool alloc_tightly_coupled, bool has_negative_length_guard)
   : CallNode(arraycopy_type(), NULL, TypeRawPtr::BOTTOM),
@@ -631,42 +632,76 @@
   return CallNode::may_modify_arraycopy_helper(dest_t, t_oop, phase);
 }
 
-bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, ArrayCopyNode*& ac) {
-  if (n->Opcode() == Op_StoreCM ||
-      n->Opcode() == Op_StoreB) {
-    // Ignore card mark stores
-    n = n->in(MemNode::Memory);
-  }
-
-  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;
-    }
+bool ArrayCopyNode::may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call) {
+  if (n != NULL &&
+      n->is_Call() &&
+      n->as_Call()->may_modify(t_oop, phase) &&
+      (n->as_Call()->is_ArrayCopy() || n->as_Call()->is_call_to_arraycopystub())) {
+    call = n->as_Call();
+    return true;
   }
   return false;
 }
 
-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, 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, ac)) {
-            return true;
+static Node* step_over_gc_barrier(Node* c) {
+  if (UseG1GC && !GraphKit::use_ReduceInitialCardMarks() &&
+      c != NULL && c->is_Region() && c->req() == 3) {
+    for (uint i = 1; i < c->req(); i++) {
+      if (c->in(i) != NULL && c->in(i)->is_Region() &&
+          c->in(i)->req() == 3) {
+        Node* r = c->in(i);
+        for (uint j = 1; j < r->req(); j++) {
+          if (r->in(j) != NULL && r->in(j)->is_Proj() &&
+              r->in(j)->in(0) != NULL &&
+              r->in(j)->in(0)->Opcode() == Op_CallLeaf &&
+              r->in(j)->in(0)->as_Call()->entry_point() == CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post)) {
+            Node* call = r->in(j)->in(0);
+            c = c->in(i == 1 ? 2 : 1);
+            if (c != NULL) {
+              c = c->in(0);
+              if (c != NULL) {
+                c = c->in(0);
+                assert(call->in(0) == NULL ||
+                       call->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0)->in(0) == NULL ||
+                       call->in(0)->in(0)->in(0)->in(0)->in(0) == NULL ||
+                       c == call->in(0)->in(0)->in(0)->in(0)->in(0), "bad barrier shape");
+                return c;
+              }
+            }
           }
         }
       }
     }
   }
+  return c;
+}
+
+bool ArrayCopyNode::may_modify(const TypeOopPtr *t_oop, MemBarNode* mb, PhaseTransform *phase, ArrayCopyNode*& ac) {
+
+  Node* c = mb->in(0);
+
+  // step over g1 gc barrier if we're at a clone with ReduceInitialCardMarks off
+  c = step_over_gc_barrier(c);
+
+  CallNode* call = NULL;
+  if (c != NULL && c->is_Region()) {
+    for (uint i = 1; i < c->req(); i++) {
+      if (c->in(i) != NULL) {
+        Node* n = c->in(i)->in(0);
+        if (may_modify_helper(t_oop, n, phase, call)) {
+          ac = call->isa_ArrayCopy();
+          assert(c == mb->in(0), "only for clone");
+          return true;
+        }
+      }
+    }
+  } else if (may_modify_helper(t_oop, c->in(0), phase, call)) {
+    ac = call->isa_ArrayCopy();
+    assert(c == mb->in(0) || (ac != NULL && ac->is_clonebasic() && !GraphKit::use_ReduceInitialCardMarks()), "only for clone");
+    return true;
+  }
 
   return false;
 }
@@ -677,37 +712,77 @@
 // between offset_lo and offset_hi
 // if must_modify is true, return true if the copy is guaranteed to
 // write between offset_lo and offset_hi
-bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) {
+bool ArrayCopyNode::modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const {
   assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
 
-  Node* dest = in(ArrayCopyNode::Dest);
-  Node* src_pos = in(ArrayCopyNode::SrcPos);
-  Node* dest_pos = in(ArrayCopyNode::DestPos);
-  Node* len = in(ArrayCopyNode::Length);
+  Node* dest = in(Dest);
+  Node* dest_pos = in(DestPos);
+  Node* len = in(Length);
 
   const TypeInt *dest_pos_t = phase->type(dest_pos)->isa_int();
   const TypeInt *len_t = phase->type(len)->isa_int();
   const TypeAryPtr* ary_t = phase->type(dest)->isa_aryptr();
 
-  if (dest_pos_t != NULL && len_t != NULL && ary_t != NULL) {
-    BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
-    uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
-    uint elemsize = type2aelembytes(ary_elem);
+  if (dest_pos_t == NULL || len_t == NULL || ary_t == NULL) {
+    return !must_modify;
+  }
+
+  BasicType ary_elem = ary_t->klass()->as_array_klass()->element_type()->basic_type();
+  uint header = arrayOopDesc::base_offset_in_bytes(ary_elem);
+  uint elemsize = type2aelembytes(ary_elem);
 
-    jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
-    jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
-    jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
-    jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
+  jlong dest_pos_plus_len_lo = (((jlong)dest_pos_t->_lo) + len_t->_lo) * elemsize + header;
+  jlong dest_pos_plus_len_hi = (((jlong)dest_pos_t->_hi) + len_t->_hi) * elemsize + header;
+  jlong dest_pos_lo = ((jlong)dest_pos_t->_lo) * elemsize + header;
+  jlong dest_pos_hi = ((jlong)dest_pos_t->_hi) * elemsize + header;
 
-    if (must_modify) {
-      if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
-        return true;
-      }
-    } else {
-      if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
-        return true;
-      }
+  if (must_modify) {
+    if (offset_lo >= dest_pos_hi && offset_hi < dest_pos_plus_len_lo) {
+      return true;
+    }
+  } else {
+    if (offset_hi >= dest_pos_lo && offset_lo < dest_pos_plus_len_hi) {
+      return true;
     }
   }
   return false;
 }
+
+// We try to replace a load from the destination of an arraycopy with
+// a load from the source so the arraycopy has a chance to be
+// eliminated. It's only valid if the arraycopy doesn't change the
+// element that would be loaded from the source array.
+bool ArrayCopyNode::can_replace_dest_load_with_src_load(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase) const {
+  assert(_kind == ArrayCopy || _kind == CopyOf || _kind == CopyOfRange, "only for real array copies");
+
+  Node* src = in(Src);
+  Node* dest = in(Dest);
+
+  // Check whether, assuming source and destination are the same
+  // array, the arraycopy modifies the element from the source we
+  // would load.
+  if ((src != dest && in(SrcPos) == in(DestPos)) || !modifies(offset_lo, offset_hi, phase, false)) {
+    // if not the transformation is legal
+    return true;
+  }
+
+  AllocateNode* src_alloc = AllocateNode::Ideal_allocation(src, phase);
+  AllocateNode* dest_alloc = AllocateNode::Ideal_allocation(dest, phase);
+
+  // Check whether source and destination can be proved to be
+  // different arrays
+  const TypeOopPtr* t_src = phase->type(src)->isa_oopptr();
+  const TypeOopPtr* t_dest = phase->type(dest)->isa_oopptr();
+
+  if (t_src != NULL && t_dest != NULL &&
+      (t_src->is_known_instance() || t_dest->is_known_instance()) &&
+      t_src->instance_id() != t_dest->instance_id()) {
+    return true;
+  }
+
+  if (MemNode::detect_ptr_independence(src->uncast(), src_alloc, dest->uncast(), dest_alloc, phase)) {
+    return true;
+  }
+
+  return false;
+}
--- a/hotspot/src/share/vm/opto/arraycopynode.hpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/arraycopynode.hpp	Tue Jun 27 16:00:14 2017 -0400
@@ -108,7 +108,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, ArrayCopyNode*& ac);
+  static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
 
 public:
 
@@ -167,7 +167,8 @@
   bool has_negative_length_guard() const { return _has_negative_length_guard; }
 
   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);
+  bool modifies(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase, bool must_modify) const;
+  bool can_replace_dest_load_with_src_load(intptr_t offset_lo, intptr_t offset_hi, PhaseTransform* phase) const;
 
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
--- a/hotspot/src/share/vm/opto/loopnode.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/loopnode.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -1860,6 +1860,9 @@
   if (_required_safept != NULL && _required_safept->size() > 0) {
     tty->print(" req={"); _required_safept->dump_simple(); tty->print(" }");
   }
+  if (Verbose) {
+    tty->print(" body={"); _body.dump_simple(); tty->print(" }");
+  }
   tty->cr();
 }
 
--- a/hotspot/src/share/vm/opto/loopopts.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/loopopts.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -913,7 +913,11 @@
 
   if (n->is_ConstraintCast()) {
     Node* dom_cast = n->as_ConstraintCast()->dominating_cast(this);
-    if (dom_cast != NULL) {
+    // ConstraintCastNode::dominating_cast() uses node control input to determine domination.
+    // Node control inputs don't necessarily agree with loop control info (due to
+    // transformations happened in between), thus additional dominance check is needed
+    // to keep loop info valid.
+    if (dom_cast != NULL && is_dominator(get_ctrl(dom_cast), get_ctrl(n))) {
       _igvn.replace_node(n, dom_cast);
       return dom_cast;
     }
--- a/hotspot/src/share/vm/opto/macro.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/macro.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -1047,7 +1047,9 @@
         // opportunities for allocation elimination
         Node* src = ac->in(ArrayCopyNode::Src);
         ac->replace_edge(src, top());
-        if (src->outcnt() == 0) {
+        // src can be top at this point if src and dest of the
+        // arraycopy were the same
+        if (src->outcnt() == 0 && !src->is_top()) {
           _igvn.remove_dead_node(src);
         }
 
--- a/hotspot/src/share/vm/opto/macroArrayCopy.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/macroArrayCopy.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -718,6 +718,15 @@
   _igvn.replace_node(_ioproj_fallthrough, *io);
   _igvn.replace_node(_fallthroughcatchproj, *ctrl);
 
+#ifdef ASSERT
+  const TypeOopPtr* dest_t = _igvn.type(dest)->is_oopptr();
+  if (dest_t->is_known_instance()) {
+    ArrayCopyNode* ac = NULL;
+    assert(ArrayCopyNode::may_modify(dest_t, (*ctrl)->in(0)->as_MemBar(), &_igvn, ac), "dependency on arraycopy lost");
+    assert(ac == NULL, "no arraycopy anymore");
+  }
+#endif
+
   return out_mem;
 }
 
@@ -1139,8 +1148,25 @@
   const TypeAryPtr* top_src = src_type->isa_aryptr();
   const TypeAryPtr* top_dest = dest_type->isa_aryptr();
 
-  if (top_src  == NULL || top_src->klass()  == NULL ||
-      top_dest == NULL || top_dest->klass() == NULL) {
+  BasicType src_elem = T_CONFLICT;
+  BasicType dest_elem = T_CONFLICT;
+
+  if (top_dest != NULL && top_dest->klass() != NULL) {
+    dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
+  }
+  if (top_src != NULL && top_src->klass() != NULL) {
+    src_elem = top_src->klass()->as_array_klass()->element_type()->basic_type();
+  }
+  if (src_elem  == T_ARRAY)  src_elem  = T_OBJECT;
+  if (dest_elem == T_ARRAY)  dest_elem = T_OBJECT;
+
+  if (ac->is_arraycopy_validated() &&
+      dest_elem != T_CONFLICT &&
+      src_elem == T_CONFLICT) {
+    src_elem = dest_elem;
+  }
+
+  if (src_elem == T_CONFLICT || dest_elem == T_CONFLICT) {
     // Conservatively insert a memory barrier on all memory slices.
     // Do not let writes into the source float below the arraycopy.
     {
@@ -1169,13 +1195,11 @@
     }
     return;
   }
+
+  assert(!ac->is_arraycopy_validated() || (src_elem == dest_elem && dest_elem != T_VOID), "validated but different basic types");
+
   // (2) src and dest arrays must have elements of the same BasicType
   // Figure out the size and type of the elements we will be copying.
-  BasicType src_elem  = top_src->klass()->as_array_klass()->element_type()->basic_type();
-  BasicType dest_elem = top_dest->klass()->as_array_klass()->element_type()->basic_type();
-  if (src_elem  == T_ARRAY)  src_elem  = T_OBJECT;
-  if (dest_elem == T_ARRAY)  dest_elem = T_OBJECT;
-
   if (src_elem != dest_elem || dest_elem == T_VOID) {
     // The component types are not the same or are not recognized.  Punt.
     // (But, avoid the native method wrapper to JVM_ArrayCopy.)
--- a/hotspot/src/share/vm/opto/memnode.cpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Tue Jun 27 16:00:14 2017 -0400
@@ -908,10 +908,11 @@
         ld->set_req(0, ld_alloc->in(0));
       }
     } else {
+      Node* src = ac->in(ArrayCopyNode::Src);
       Node* addp = in(MemNode::Address)->clone();
       assert(addp->in(AddPNode::Base) == addp->in(AddPNode::Address), "should be");
-      addp->set_req(AddPNode::Base, ac->in(ArrayCopyNode::Src));
-      addp->set_req(AddPNode::Address, ac->in(ArrayCopyNode::Src));
+      addp->set_req(AddPNode::Base, src);
+      addp->set_req(AddPNode::Address, src);
 
       const TypeAryPtr* ary_t = phase->type(in(MemNode::Address))->isa_aryptr();
       BasicType ary_elem  = ary_t->klass()->as_array_klass()->element_type()->basic_type();
@@ -928,6 +929,12 @@
       addp->set_req(AddPNode::Offset, offset);
       ld->set_req(MemNode::Address, phase->transform(addp));
 
+      const TypeX *ld_offs_t = phase->type(offset)->isa_intptr_t();
+
+      if (!ac->as_ArrayCopy()->can_replace_dest_load_with_src_load(ld_offs_t->_lo, ld_offs_t->_hi, phase)) {
+        return NULL;
+      }
+
       if (in(0) != NULL) {
         assert(ac->in(0) != NULL, "alloc must have control");
         ld->set_req(0, ac->in(0));
--- a/hotspot/src/share/vm/prims/jvmti.xml	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/prims/jvmti.xml	Tue Jun 27 16:00:14 2017 -0400
@@ -24,11 +24,11 @@
 -->
 
 <!DOCTYPE specification [
-   <!ELEMENT specification (title, intro*, functionsection, errorsection, 
+   <!ELEMENT specification (title, intro*, functionsection, errorsection,
                             eventsection, datasection, issuessection, changehistory)>
-   <!ATTLIST specification label CDATA #REQUIRED 
-                           majorversion CDATA #REQUIRED 
-                           minorversion CDATA #REQUIRED 
+   <!ATTLIST specification label CDATA #REQUIRED
+                           majorversion CDATA #REQUIRED
+                           minorversion CDATA #REQUIRED
                            microversion CDATA #REQUIRED>
 
    <!ELEMENT title (#PCDATA|jvmti|tm)*>
@@ -41,13 +41,13 @@
    <!ELEMENT functionsection (intro*, category*)>
    <!ATTLIST functionsection label CDATA #REQUIRED>
 
-   <!ELEMENT category ((intro|typedef|uniontypedef|capabilitiestypedef)*, 
+   <!ELEMENT category ((intro|typedef|uniontypedef|capabilitiestypedef)*,
                           (function|callback|elide)*)>
    <!ATTLIST category id CDATA #REQUIRED
                       label CDATA #REQUIRED>
 
    <!ELEMENT function (synopsis, typedef*, description?, origin,
-                         (capabilities|eventcapabilities), 
+                         (capabilities|eventcapabilities),
                          parameters, errors)>
    <!ATTLIST function id CDATA #REQUIRED
                       num CDATA #REQUIRED
@@ -77,7 +77,7 @@
                      since CDATA "1.0">
 
    <!ELEMENT field ((jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|jthreadGroup|jobject|
-                     jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|allocfieldbuf|inptr|inbuf|outbuf|vmbuf|ptrtype|struct), 
+                     jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|allocfieldbuf|inptr|inbuf|outbuf|vmbuf|ptrtype|struct),
                     description)>
    <!ATTLIST field id CDATA #REQUIRED>
 
@@ -107,7 +107,7 @@
 
    <!ELEMENT param ((jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|jthreadGroup|jobject|
                      jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct|ptrtype|
-                     outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf), 
+                     outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf),
                     description)>
    <!ATTLIST param id CDATA #REQUIRED>
 
@@ -292,16 +292,16 @@
    <!ATTLIST eventphaselist phase (onload|start|live|any) #REQUIRED>
 
    <!ELEMENT issue ANY>
-   
+
    <!ELEMENT rationale ANY>
-   
+
    <!ELEMENT todo ANY>
-   
+
    <!ELEMENT origin (#PCDATA)*>
 
    <!ELEMENT elide (intro|function|callback|event)*>
    <!ATTLIST elide why CDATA #IMPLIED>
-   
+
    <!ELEMENT constants (constant*)>
    <!ATTLIST constants id CDATA #REQUIRED
                        label CDATA #REQUIRED
@@ -361,11 +361,11 @@
   <title subtitle="Version">
     <tm>JVM</tm> Tool Interface
   </title>
-  
+
   <intro id="whatIs" label="What is the JVM Tool Interface?">
-    The <tm>JVM</tm> Tool Interface (<jvmti/>) 
-    is a programming interface used by development and monitoring tools. 
-    It provides both a way to inspect the state and 
+    The <tm>JVM</tm> Tool Interface (<jvmti/>)
+    is a programming interface used by development and monitoring tools.
+    It provides both a way to inspect the state and
     to control the execution of applications running in the
     <tm>Java</tm> virtual machine (VM).
     <p/>
@@ -376,21 +376,21 @@
     <jvmti/> may not be available in all implementations of the <tm>Java</tm> virtual
     machine.
     <p/>
-    <jvmti/> is a two-way interface. 
+    <jvmti/> is a two-way interface.
     A client of <jvmti/>, hereafter called an <i>agent</i>,
     can be notified of
-    interesting occurrences through <internallink id="EventSection">events</internallink>. 
+    interesting occurrences through <internallink id="EventSection">events</internallink>.
     <jvmti/>
-    can query and control the application through many 
-    <internallink id="FunctionSection">functions</internallink>, 
-    either in response to events or 
+    can query and control the application through many
+    <internallink id="FunctionSection">functions</internallink>,
+    either in response to events or
     independent of them.
     <p/>
-    Agents run in the same process with and communicate directly with 
+    Agents run in the same process with and communicate directly with
     the virtual machine executing
     the application being examined.  This communication is
     through a native interface (<jvmti/>). The native in-process interface allows
-    maximal control with minimal intrusion on the part of a tool. 
+    maximal control with minimal intrusion on the part of a tool.
     Typically, agents are relatively compact. They can be controlled
     by a separate process which implements the bulk of a tool's
     function without interfering with the target application's normal execution.
@@ -400,12 +400,12 @@
     Tools can be written directly to <jvmti/> or indirectly
     through higher level interfaces.
     The Java Platform Debugger Architecture includes <jvmti/>, but also
-    contains higher-level, out-of-process debugger interfaces. The higher-level 
-    interfaces are more appropriate than <jvmti/> for many tools. 
-    For more information on the Java Platform Debugger Architecture, 
-    see the 
-    <externallink id="docs/technotes/guides/jpda/architecture.html">Java 
-      Platform Debugger Architecture website</externallink>. 
+    contains higher-level, out-of-process debugger interfaces. The higher-level
+    interfaces are more appropriate than <jvmti/> for many tools.
+    For more information on the Java Platform Debugger Architecture,
+    see the
+    <externallink id="docs/technotes/guides/jpda/architecture.html">Java
+      Platform Debugger Architecture website</externallink>.
   </intro>
 
   <intro id="writingAgents" label="Writing Agents">
@@ -424,16 +424,16 @@
   </intro>
 
   <intro id="deployingAgents" label="Deploying Agents">
-    An agent is deployed in a platform specific manner but is typically the 
-    platform equivalent of a dynamic library. On the <tm>Windows</tm> operating 
-    system, for example, an agent library is a "Dynamic Linked Library" (DLL). 
+    An agent is deployed in a platform specific manner but is typically the
+    platform equivalent of a dynamic library. On the <tm>Windows</tm> operating
+    system, for example, an agent library is a "Dynamic Linked Library" (DLL).
     On the <tm>Solaris</tm> Operating Environment, an agent library is a shared
     object (<code>.so</code> file).
     <p/>
 
     An agent may be started at VM startup by specifying the agent library
     name using a <internallink id="starting">command line option</internallink>.
-    Some implementations may support a mechanism to <internallink id="onattach"> 
+    Some implementations may support a mechanism to <internallink id="onattach">
     start agents</internallink> in the live <functionlink id="GetPhase">phase</functionlink>.
     The details of how this is initiated are implementation specific.
   </intro>
@@ -460,7 +460,7 @@
       a function is exported, at the same point during VM execution as it would
       have called the dynamic entry point Agent_OnUnLoad. A statically loaded
       agent cannot be unloaded. The Agent_OnUnload_L function will still be
-      called to do any other agent shutdown related tasks. 
+      called to do any other agent shutdown related tasks.
       If a <i>statically linked</i> agent L exports a function called
       Agent_OnUnLoad_L and a function called Agent_OnUnLoad, the Agent_OnUnLoad
       function will be ignored.
@@ -472,19 +472,19 @@
       Agent_OnAttach_L and a function called Agent_OnAttach, the Agent_OnAttach
       function will be ignored.
 </intro>
-  
+
   <intro id="starting" label="Agent Command Line Options">
     The term "command-line option" is used below to
     mean options supplied in the <code>JavaVMInitArgs</code> argument
     to the <code>JNI_CreateJavaVM</code> function of the JNI
     Invocation API.
     <p/>
-    One of the two following 
-    command-line options is used on VM startup to 
+    One of the two following
+    command-line options is used on VM startup to
     properly load and run agents.
-    These arguments identify the library containing 
+    These arguments identify the library containing
     the agent as well as an options
-    string to be passed in at startup. 
+    string to be passed in at startup.
     <dl>
       <dt><code>-agentlib:</code><i>&lt;agent-lib-name&gt;</i><code>=</code><i>&lt;options&gt;</i></dt>
       <dd>
@@ -494,10 +494,10 @@
 	Typically, the <i>&lt;agent-lib-name&gt;</i> is expanded to an
 	operating system specific file name.
 	The <i>&lt;options&gt;</i> will be passed to the agent on start-up.
-	For example, if the option 
-	<code>-agentlib:foo=opt1,opt2</code> is specified, the VM will attempt to 
+	For example, if the option
+	<code>-agentlib:foo=opt1,opt2</code> is specified, the VM will attempt to
 	load the shared library <code>foo.dll</code> from the system <code>PATH</code>
-        under <tm>Windows</tm> or <code>libfoo.so</code> from the 
+        under <tm>Windows</tm> or <code>libfoo.so</code> from the
 	<code>LD_LIBRARY_PATH</code> under the <tm>Solaris</tm> operating
         environment.
         If the agent library is statically linked into the executable
@@ -510,8 +510,8 @@
 	to load the library.
 	No library name expansion will occur.
 	The <i>&lt;options&gt;</i> will be passed to the agent on start-up.
-	For example, if the option 
-	<code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code> is specified, the VM will attempt to 
+	For example, if the option
+	<code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code> is specified, the VM will attempt to
 	load the shared library <code>c:\myLibs\foo.dll</code>. If the agent
         library is statically linked into the executable
         then no actual loading takes place.
@@ -523,13 +523,13 @@
     in the library will be invoked. If the agent library is statically linked
     into the executable then the system will attempt to invoke the
     <code>Agent_OnLoad_&lt;agent-lib-name&gt;</code> entry point where
-    &lt;agent-lib-name&gt; is the basename of the 
+    &lt;agent-lib-name&gt; is the basename of the
     agent. In the above example <code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code>,
     the system will attempt to find and call the <code>Agent_OnLoad_foo</code> start-up routine.
     <p/>
     Libraries loaded with <code>-agentlib:</code> or <code>-agentpath:</code>
     will be searched for JNI native method implementations to facilitate the
-    use of Java programming language code in tools, as is needed for 
+    use of Java programming language code in tools, as is needed for
     <internallink id="bci">bytecode instrumentation</internallink>.
     <p/>
     The agent libraries will be searched after all other libraries have been
@@ -537,11 +537,11 @@
     implementations of non-agent methods can use the
     <eventlink id="NativeMethodBind">NativeMethodBind event</eventlink>).
     <p/>
-    These switches do the above and nothing more - they do not change the 
-    state of the VM or <jvmti/>.  No command line options are needed 
-    to enable <jvmti/> 
+    These switches do the above and nothing more - they do not change the
+    state of the VM or <jvmti/>.  No command line options are needed
+    to enable <jvmti/>
     or aspects of <jvmti/>, this is handled programmatically
-    by the use of 
+    by the use of
     <internallink id="capability">capabilities</internallink>.
   </intro>
 
@@ -557,29 +557,29 @@
     <internallink id="onattach"><code>Agent_OnAttach</code></internallink>
     or <internallink id="onattach"><code>Agent_OnAttach_L</code></internallink>
     for statically linked agents will be invoked.
-    Exactly one call to a start-up function is made per agent.  
+    Exactly one call to a start-up function is made per agent.
   </intro>
 
   <intro id="onload" label="Agent Start-Up (OnLoad phase)">
     If an agent is started during the <code>OnLoad</code> phase then its
     agent library must export a start-up function with the following prototype:
     <example>
-JNIEXPORT jint JNICALL 
+JNIEXPORT jint JNICALL
 Agent_OnLoad(JavaVM *vm, char *options, void *reserved)</example>
     Or for a statically linked agent named 'L':
     <example>
-JNIEXPORT jint JNICALL 
+JNIEXPORT jint JNICALL
 Agent_OnLoad_L(JavaVM *vm, char *options, void *reserved)</example>
 
-    The VM will start the agent by calling this function.  
+    The VM will start the agent by calling this function.
     It will be called early enough in VM initialization that:
     <ul>
       <li><functionlink id="SetSystemProperty">system properties</functionlink>
 	may be set before they have been used in the start-up of the VM</li>
-      <li>the full set of 
+      <li>the full set of
 	<internallink id="capability">capabilities</internallink>
 	is still available (note that capabilities that configure the VM
-	may only be available at this time--see the 
+	may only be available at this time--see the
 	<internallink id="capability">Capability function section</internallink>)</li>
       <li>no bytecodes have executed</li>
       <li>no classes have been loaded</li>
@@ -588,13 +588,13 @@
     <p/>
     The VM will call the <code>Agent_OnLoad</code> or
     <code>Agent_OnLoad_&lt;agent-lib-name&gt;</code> function with
-    <i>&lt;options&gt;</i> as the second argument - 
+    <i>&lt;options&gt;</i> as the second argument -
     that is, using the command-line option examples,
-    <code>"opt1,opt2"</code> will be passed to the <code>char *options</code> 
+    <code>"opt1,opt2"</code> will be passed to the <code>char *options</code>
     argument of <code>Agent_OnLoad</code>.
     The <code>options</code> argument is encoded as a
     <internallink id="mUTF">modified UTF-8</internallink> string.
-    If <i>=&lt;options&gt;</i> is not specified, 
+    If <i>=&lt;options&gt;</i> is not specified,
     a zero length string is passed to <code>options</code>.
     The lifespan of the <code>options</code> string is the
     <code>Agent_OnLoad</code> or <code>Agent_OnLoad_&lt;agent-lib-name&gt;</code>
@@ -602,26 +602,26 @@
     be copied.
     The period between when <code>Agent_OnLoad</code> is called and when it
     returns is called the <i>OnLoad phase</i>.
-    Since the VM is not initialized during the OnLoad 
+    Since the VM is not initialized during the OnLoad
     <functionlink id="GetPhase">phase</functionlink>,
-    the set of allowed operations 
+    the set of allowed operations
     inside <code>Agent_OnLoad</code> is restricted (see the function descriptions for the
-    functionality available at this time). 
-    The agent can safely process the options and set 
-    event callbacks with <functionlink id="SetEventCallbacks"></functionlink>. Once  
-    the VM initialization event is received 
-    (that is, the <eventlink id="VMInit">VMInit</eventlink> 
+    functionality available at this time).
+    The agent can safely process the options and set
+    event callbacks with <functionlink id="SetEventCallbacks"></functionlink>. Once
+    the VM initialization event is received
+    (that is, the <eventlink id="VMInit">VMInit</eventlink>
     callback is invoked), the agent
     can complete its initialization.
     <rationale>
       Early startup is required so that agents can set the desired capabilities,
       many of which must be set before the VM is initialized.
-      In JVMDI, the -Xdebug command-line option provided 
-      very coarse-grain control of capabilities. 
+      In JVMDI, the -Xdebug command-line option provided
+      very coarse-grain control of capabilities.
       JVMPI implementations use various tricks to provide a single "JVMPI on" switch.
-      No reasonable command-line 
+      No reasonable command-line
       option could provide the fine-grain of control required to balance needed capabilities vs
-      performance impact.  
+      performance impact.
       Early startup is also needed so that agents can control the execution
       environment - modifying the file system and system properties to install
       their functionality.
@@ -631,75 +631,75 @@
     <code>Agent_OnLoad_&lt;agent-lib-name&gt;</code> is used to indicate an error.
     Any value other than zero indicates an error and causes termination of the VM.
   </intro>
-  
+
   <intro id="onattach" label="Agent Start-Up (Live phase)">
-    A VM may support a mechanism that allows agents to be started in the VM during the live 
+    A VM may support a mechanism that allows agents to be started in the VM during the live
     <functionlink id="GetPhase">phase</functionlink>. The details of how this is supported,
-    are implementation specific. For example, a tool may use some platform specific mechanism, 
+    are implementation specific. For example, a tool may use some platform specific mechanism,
     or implementation specific API, to attach to the running VM, and request it start a given
     agent.
     <p/>
     If an agent is started during the live phase then its agent library
-    must export a start-up function 
+    must export a start-up function
     with the following prototype:
     <example>
-JNIEXPORT jint JNICALL 
+JNIEXPORT jint JNICALL
 Agent_OnAttach(JavaVM* vm, char *options, void *reserved)</example>
 Or for a statically linked agent named 'L':
     <example>
-JNIEXPORT jint JNICALL 
+JNIEXPORT jint JNICALL
 Agent_OnAttach_L(JavaVM* vm, char *options, void *reserved)</example>
 
-    <p/>         
-    The VM will start the agent by calling this function.  
+    <p/>
+    The VM will start the agent by calling this function.
     It will be called in the context of a thread
     that is attached to the VM. The first argument <i>&lt;vm&gt;</i> is the Java VM.
     The <i>&lt;options&gt;</i> argument is the startup options provided to the agent.
     <i>&lt;options&gt;</i> is encoded as a <internallink id="mUTF">modified UTF-8
     </internallink> string.
-    If startup options were not provided, a zero length string is passed to 
-    <code>options</code>. The lifespan of the <code>options</code> string is the 
+    If startup options were not provided, a zero length string is passed to
+    <code>options</code>. The lifespan of the <code>options</code> string is the
     <code>Agent_OnAttach</code> or <code>Agent_OnAttach_&lt;agent-lib-name&gt;</code> call.
     If needed beyond this time the string or parts of the string must be copied.
     <p/>
-    Note that some <internallink id="capability">capabilities</internallink> 
+    Note that some <internallink id="capability">capabilities</internallink>
     may not be available in the live phase.
     <p/>
     The <code>Agent_OnAttach</code> or <code>Agent_OnAttach_&lt;agent-lib-name
     &gt;</code> function initializes the agent and returns a value
-    to the VM to indicate if an error occurred. Any value other than zero indicates an error. 
-    An error does not cause the VM to terminate. Instead the VM ignores the error, or takes 
-    some implementation specific action -- for example it might print an error to standard error, 
+    to the VM to indicate if an error occurred. Any value other than zero indicates an error.
+    An error does not cause the VM to terminate. Instead the VM ignores the error, or takes
+    some implementation specific action -- for example it might print an error to standard error,
     or record the error in a system log.
   </intro>
 
   <intro id="onunload" label="Agent Shutdown">
-    The library may optionally export a 
+    The library may optionally export a
     shutdown function with the following prototype:
     <example>
-JNIEXPORT void JNICALL 
+JNIEXPORT void JNICALL
 Agent_OnUnload(JavaVM *vm)</example>
     Or for a statically linked agent named 'L':
     <example>
-JNIEXPORT void JNICALL 
+JNIEXPORT void JNICALL
 Agent_OnUnload_L(JavaVM *vm)</example>
 
     This function will be called by the VM when the library is about to be unloaded.
     The library will be unloaded (unless it is statically linked into the
-    executable) and this function will be called if some platform specific 
+    executable) and this function will be called if some platform specific
     mechanism causes the unload (an unload mechanism is not specified in this document)
-    or the library is (in effect) unloaded by the termination of the VM whether through 
+    or the library is (in effect) unloaded by the termination of the VM whether through
     normal termination or VM failure, including start-up failure.
     Uncontrolled shutdown is, of couse, an exception to this rule.
-    Note the distinction between this function and the 
+    Note the distinction between this function and the
     <eventlink id="VMDeath">VM Death event</eventlink>: for the VM Death event
-    to be sent, the VM must have run at least to the point of initialization and a valid 
+    to be sent, the VM must have run at least to the point of initialization and a valid
     <jvmti/> environment must exist which has set a callback for VMDeath
     and enabled the event.
     None of these are required for <code>Agent_OnUnload</code> or
     <code>Agent_OnUnload_&lt;agent-lib-name&gt;</code> and this function
     is also called if the library is unloaded for other reasons.
-    In the case that a VM Death event is sent, it will be sent before this 
+    In the case that a VM Death event is sent, it will be sent before this
     function is called (assuming this function is called due to VM termination).
     This function can be used to clean-up resources allocated by the agent.
   </intro>
@@ -709,17 +709,17 @@
     or simply VMs launched deep within scripts, a <code>JAVA_TOOL_OPTIONS</code> variable is
     provided so that agents may be launched in these cases.
     <p/>
-    Platforms which support environment variables or other named strings, may support the 
-    <code>JAVA_TOOL_OPTIONS</code> variable.  This variable will be broken into options at white-space 
-    boundaries.  White-space characters include space, tab, carriage-return, new-line, 
-    vertical-tab, and form-feed.  Sequences of white-space characters are considered 
-    equivalent to a single white-space character.  No white-space is included in the options 
+    Platforms which support environment variables or other named strings, may support the
+    <code>JAVA_TOOL_OPTIONS</code> variable.  This variable will be broken into options at white-space
+    boundaries.  White-space characters include space, tab, carriage-return, new-line,
+    vertical-tab, and form-feed.  Sequences of white-space characters are considered
+    equivalent to a single white-space character.  No white-space is included in the options
     unless quoted.  Quoting is as follows:
     <ul>
-        <li>All characters enclosed between a pair of single quote marks (''), except a single 
+        <li>All characters enclosed between a pair of single quote marks (''), except a single
         quote, are quoted.</li>
         <li>Double quote characters have no special meaning inside a pair of single quote marks.</li>
-        <li>All characters enclosed between a pair of double quote marks (""), except a double 
+        <li>All characters enclosed between a pair of double quote marks (""), except a double
         quote, are quoted.</li>
         <li>Single quote characters have no special meaning inside a pair of double quote marks.</li>
         <li>A quoted part can start or end anywhere in the variable.</li>
@@ -727,24 +727,24 @@
         the option like any other character and do not mark white-space boundaries.</li>
         <li>The pair of quote marks is not included in the option.</li>
     </ul>
-    <code>JNI_CreateJavaVM</code> (in the JNI Invocation API) will prepend these options to the options supplied 
-    in its <code>JavaVMInitArgs</code> argument. Platforms may disable this feature in cases where security is 
-    a concern; for example, the Reference Implementation disables this feature on Unix systems when 
-    the effective user or group ID differs from the real ID.  
-    This feature is intended to support the initialization of tools -- specifically including the 
-    launching of native or Java programming language agents.  Multiple tools may wish to use this 
-    feature, so the variable should not be overwritten, instead,  options should be appended to 
-    the variable.  Note that since the variable is processed at the time of the JNI Invocation 
+    <code>JNI_CreateJavaVM</code> (in the JNI Invocation API) will prepend these options to the options supplied
+    in its <code>JavaVMInitArgs</code> argument. Platforms may disable this feature in cases where security is
+    a concern; for example, the Reference Implementation disables this feature on Unix systems when
+    the effective user or group ID differs from the real ID.
+    This feature is intended to support the initialization of tools -- specifically including the
+    launching of native or Java programming language agents.  Multiple tools may wish to use this
+    feature, so the variable should not be overwritten, instead,  options should be appended to
+    the variable.  Note that since the variable is processed at the time of the JNI Invocation
     API create VM call, options processed by a launcher (e.g., VM selection options) will not be handled.
   </intro>
 
   <intro id="environments" label="Environments">
     The <jvmti/> specification supports the use of multiple simultaneous
     <jvmti/> agents.
-    Each agent has its own <jvmti/> environment.  
+    Each agent has its own <jvmti/> environment.
     That is, the <jvmti/> state is
     separate for each agent - changes to one environment do not affect the
-    others.  The state of a <jvmti/> 
+    others.  The state of a <jvmti/>
     environment includes:
     <ul>
       <li><functionlink id="SetEventCallbacks">the event callbacks</functionlink></li>
@@ -752,7 +752,7 @@
       <li><internallink id="capability">the capabilities</internallink></li>
       <li><internallink id="memory">the memory allocation/deallocation hooks</internallink></li>
     </ul>
-    Although their <jvmti/> state 
+    Although their <jvmti/> state
     is separate, agents inspect and modify the shared state
     of the VM, they also share the native environment in which they execute.
     As such, an agent can perturb the results of other agents or cause them
@@ -761,30 +761,30 @@
     of preventing destructive interactions between agents. Techniques to reduce
     the likelihood of these occurrences are beyond the scope of this document.
     <p/>
-    An agent creates a <jvmti/> environment 
-    by passing a <jvmti/> version 
-    as the interface ID to the JNI Invocation API function 
-    <externallink id="docs/technotes/guides/jni/spec/invocation.html#GetEnv">
+    An agent creates a <jvmti/> environment
+    by passing a <jvmti/> version
+    as the interface ID to the JNI Invocation API function
+    <externallink id="jni/invocation.html#getenv">
       <code>GetEnv</code></externallink>.
     See <internallink id="jvmtiEnvAccess">Accessing <jvmti/> Functions</internallink>
-    for more details on the creation and use of 
+    for more details on the creation and use of
     <jvmti/> environments.
-    Typically, <jvmti/> environments are created by calling <code>GetEnv</code> from 
+    Typically, <jvmti/> environments are created by calling <code>GetEnv</code> from
     <internallink id="onload"><code>Agent_OnLoad</code></internallink>.
   </intro>
 
   <intro id="bci" label="Bytecode Instrumentation">
     This interface does not include some events that one might expect in an interface with
     profiling support.  Some examples include object allocation events and full speed
-    method enter and exit events.  The interface instead provides support for 
+    method enter and exit events.  The interface instead provides support for
     <i>bytecode instrumentation</i>, the ability to alter the Java virtual machine
     bytecode instructions which comprise the target program.  Typically, these alterations
     are to add "events" to the code of a method - for example, to add, at the beginning of a method,
-    a call to <code>MyProfiler.methodEntered()</code>.  
+    a call to <code>MyProfiler.methodEntered()</code>.
     Since the changes are purely additive, they do not modify application
     state or behavior.
     Because the inserted agent code is standard bytecodes, the VM can run at full speed,
-    optimizing not only the target program but also the instrumentation.  If the 
+    optimizing not only the target program but also the instrumentation.  If the
     instrumentation does not involve switching from bytecode execution, no expensive
     state transitions are needed.  The result is high performance events.
     This approach also provides complete control to the agent: instrumentation can be
@@ -792,14 +792,14 @@
     can be conditional.  Instrumentation can run entirely in Java programming language
     code or can call into the native agent.  Instrumentation can simply maintain
     counters or can statistically sample events.
-    <p/>  
+    <p/>
     Instrumentation can be inserted in one of three ways:
     <ul>
       <li>
 	Static Instrumentation: The class file is instrumented before it
 	is loaded into the VM - for example, by creating a duplicate directory of
 	<code>*.class</code> files which have been modified to add the instrumentation.
-	This method is extremely awkward and, in general, an agent cannot know 
+	This method is extremely awkward and, in general, an agent cannot know
 	the origin of the class files which will be loaded.
       </li>
       <li>
@@ -817,21 +817,21 @@
 	<functionlink id="RetransformClasses"/> function.
 	Classes can be modified multiple times and can be returned to their
 	original state.
-	The mechanism allows instrumentation which changes during the 
+	The mechanism allows instrumentation which changes during the
 	course of execution.
       </li>
     </ul>
-    <p/>  
+    <p/>
     The class modification functionality provided in this interface
     is intended to provide a mechanism for instrumentation
     (the <eventlink id="ClassFileLoadHook"/> event
     and the <functionlink id="RetransformClasses"/> function)
     and, during development, for fix-and-continue debugging
     (the <functionlink id="RedefineClasses"/> function).
-    <p/>  
-    Care must be taken to avoid perturbing dependencies, especially when 
+    <p/>
+    Care must be taken to avoid perturbing dependencies, especially when
     instrumenting core classes.  For example, an approach to getting notification
-    of every object allocation is to instrument the constructor on 
+    of every object allocation is to instrument the constructor on
     <code>Object</code>.  Assuming that the constructor is initially
     empty, the constructor could be changed to:
     <example>
@@ -839,15 +839,15 @@
         MyProfiler.allocationTracker(this);
       }
     </example>
-    However, if this change was made using the 
+    However, if this change was made using the
     <eventlink id="ClassFileLoadHook"/>
-    event then this might impact a typical VM as follows: 
+    event then this might impact a typical VM as follows:
     the first created object will call the constructor causing a class load of
     <code>MyProfiler</code>; which will then cause
     object creation, and since <code>MyProfiler</code> isn't loaded yet,
     infinite recursion; resulting in a stack overflow.  A refinement of this
     would be to delay invoking the tracking method until a safe time.  For
-    example, <code>trackAllocations</code> could be set in the 
+    example, <code>trackAllocations</code> could be set in the
     handler for the <code>VMInit</code> event.
     <example>
       static boolean trackAllocations = false;
@@ -881,17 +881,17 @@
   <intro id="mUTF" label="Modified UTF-8 String Encoding">
     <jvmti/> uses modified UTF-8 to encode character strings.
     This is the same encoding used by JNI.
-    Modified UTF-8 differs 
-    from standard UTF-8 in the representation of supplementary characters 
+    Modified UTF-8 differs
+    from standard UTF-8 in the representation of supplementary characters
     and of the null character. See the
-    <externallink id="docs/technotes/guides/jni/spec/types.html#modified_utf_8_strings">
+    <externallink id="jni/types.html#modified-utf-8-strings">
       Modified UTF-8 Strings</externallink>
     section of the JNI specification for details.
   </intro>
 
   <intro id="context" label="Specification Context">
     Since this interface provides access to the state of applications running in the
-    Java virtual machine; 
+    Java virtual machine;
     terminology refers to the Java platform and not the native
     platform (unless stated otherwise).  For example:
     <ul>
@@ -903,20 +903,20 @@
     </ul>
     <p/>
     Sun, Sun Microsystems, the Sun logo, Java, and JVM
-    are trademarks or registered trademarks of Oracle 
+    are trademarks or registered trademarks of Oracle
     and/or its affiliates, in the U.S. and other countries.
   </intro>
 
 
 <functionsection label="Functions">
   <intro id="jvmtiEnvAccess" label="Accessing Functions">
-    Native code accesses <jvmti/> features 
-    by calling <jvmti/> functions. 
+    Native code accesses <jvmti/> features
+    by calling <jvmti/> functions.
     Access to <jvmti/> functions is by use of an interface pointer
-    in the same manner as 
-    <externallink id="docs/technotes/guides/jni/spec/design.html">Java 
+    in the same manner as
+    <externallink id="jni/design.html">Java
       Native Interface (JNI) functions</externallink> are accessed.
-    The <jvmti/> interface pointer is called the 
+    The <jvmti/> interface pointer is called the
     <i>environment pointer</i>.
     <p/>
     An environment pointer is a pointer to an environment and has
@@ -924,8 +924,8 @@
     An environment has information about its <jvmti/> connection.
     The first value in the environment is a pointer to the function table.
     The function table is an array of pointers to <jvmti/> functions.
-    Every function pointer is at a predefined offset inside the 
-    array. 
+    Every function pointer is at a predefined offset inside the
+    array.
     <p/>
     When used from the C language:
     double indirection is used to access the functions;
@@ -945,7 +945,7 @@
 ...
 jvmtiError err = jvmti->GetLoadedClasses(&amp;class_count, &amp;classes);
     </example>
-    Unless otherwise stated, all examples and declarations in this 
+    Unless otherwise stated, all examples and declarations in this
     specification use the C language.
     <p/>
     A <jvmti/> environment can be obtained through the JNI Invocation API
@@ -955,24 +955,24 @@
 ...
 (*jvm)->GetEnv(jvm, &amp;jvmti, JVMTI_VERSION_1_0);
     </example>
-    Each call to <code>GetEnv</code> 
+    Each call to <code>GetEnv</code>
     creates a new <jvmti/> connection and thus
-    a new <jvmti/> environment. 
+    a new <jvmti/> environment.
     The <code>version</code> argument of <code>GetEnv</code> must be
     a <jvmti/> version.
     The returned environment may have a different version than the
     requested version but the returned environment must be compatible.
-    <code>GetEnv</code> will return <code>JNI_EVERSION</code> if a 
+    <code>GetEnv</code> will return <code>JNI_EVERSION</code> if a
     compatible version is not available, if <jvmti/> is not supported or
     <jvmti/> is not supported in the current VM configuration.
     Other interfaces may be added for creating <jvmti/> environments
     in specific contexts.
     Each environment has its own state (for example,
-    <functionlink id="SetEventNotificationMode">desired events</functionlink>, 
-    <functionlink id="SetEventCallbacks">event handling functions</functionlink>, and 
-    <functionlink id="AddCapabilities">capabilities</functionlink>). 
-    An environment is released with 
-    <functionlink id="DisposeEnvironment"></functionlink>. 
+    <functionlink id="SetEventNotificationMode">desired events</functionlink>,
+    <functionlink id="SetEventCallbacks">event handling functions</functionlink>, and
+    <functionlink id="AddCapabilities">capabilities</functionlink>).
+    An environment is released with
+    <functionlink id="DisposeEnvironment"></functionlink>.
     Thus, unlike JNI which has one environment per thread, <jvmti/> environments work
     across threads and are created dynamically.
   </intro>
@@ -980,12 +980,12 @@
   <intro id="functionReturn" label="Function Return Values">
     <jvmti/> functions always return an
     <internallink id="ErrorSection">error code</internallink> via the
-    <datalink id="jvmtiError"/> function return value. 
+    <datalink id="jvmtiError"/> function return value.
     Some functions can return additional
-    values through pointers provided by the calling function. 
+    values through pointers provided by the calling function.
     In some cases, <jvmti/> functions allocate memory that your program must
     explicitly deallocate. This is indicated in the individual <jvmti/>
-    function descriptions.  Empty lists, arrays, sequences, etc are 
+    function descriptions.  Empty lists, arrays, sequences, etc are
     returned as <code>NULL</code>.
     <p/>
     In the event that the <jvmti/> function encounters
@@ -996,26 +996,26 @@
   </intro>
 
 <intro id="refs" label="Managing JNI Object References">
-    <jvmti/> functions identify objects with JNI references 
+    <jvmti/> functions identify objects with JNI references
     (<datalink id="jobject"/> and <datalink id="jclass"/>)
     and their derivatives
     (<datalink id="jthread"/> and <datalink id="jthreadGroup"/>).
-    References passed to 
-    <jvmti/> functions can be either global or local, but they must be 
-    strong references. All references returned by <jvmti/> functions are 
-    local references--these local references are created 
+    References passed to
+    <jvmti/> functions can be either global or local, but they must be
+    strong references. All references returned by <jvmti/> functions are
+    local references--these local references are created
     during the <jvmti/> call.
-    Local references are a resource that must be managed (see the 
-    <externallink id="docs/technotes/guides/jni/spec/functions.html#local_references">
-      JNI Documentation</externallink>).  
+    Local references are a resource that must be managed (see the
+    <externallink id="jni/functions.html#local-references">
+      JNI Documentation</externallink>).
     When threads return from native code all local references
     are freed.  Note that some threads, including typical
     agent threads, will never return from native code.
-    A thread is ensured the ability to create sixteen local 
+    A thread is ensured the ability to create sixteen local
     references without the need for any explicit management.
     For threads executing a limited number of <jvmti/> calls before
     returning from native code
-    (for example, threads processing events), 
+    (for example, threads processing events),
     it may be determined that no explicit management
     is needed.
     However, long running agent threads will need explicit
@@ -1023,7 +1023,7 @@
     <code>PushLocalFrame</code> and <code>PopLocalFrame</code>.
     Conversely, to preserve references beyond the
     return from native code, they must be converted to global references.
-    These rules do not apply to <datalink id="jmethodID"/> and <datalink id="jfieldID"/> 
+    These rules do not apply to <datalink id="jmethodID"/> and <datalink id="jfieldID"/>
     as they are not <datalink id="jobject"/>s.
 </intro>
 
@@ -1035,21 +1035,21 @@
     </intro>
 
     <intro id="functionsExceptions" label="Exceptions and Functions">
-      <jvmti/> functions never throw exceptions; error conditions are 
-      communicated via the 
+      <jvmti/> functions never throw exceptions; error conditions are
+      communicated via the
       <internallink id="functionReturn">function return value</internallink>.
-      Any existing exception state is preserved across a call to a 
+      Any existing exception state is preserved across a call to a
       <jvmti/> function.
       See the
-      <externallink 
-        id="docs/technotes/guides/jni/spec/design.html#java_exceptions"
+      <externallink
+        id="jni/design.html#java-exceptions"
              >Java Exceptions</externallink>
       section of the JNI specification for information on handling exceptions.
     </intro>
 
   <category id="memory" label="Memory Management">
     <intro>
-      These functions provide for the allocation and deallocation of 
+      These functions provide for the allocation and deallocation of
       memory used by <jvmti/> functionality and can be used to provide
       working memory for agents.
       Memory managed by <jvmti/> is not compatible with other memory
@@ -1059,7 +1059,7 @@
     <function id="Allocate" jkernel="yes" phase="any" callbacksafe="safe" impl="notrace" num="46">
       <synopsis>Allocate</synopsis>
       <description>
-	Allocate an area of memory through the <jvmti/> allocator. 
+	Allocate an area of memory through the <jvmti/> allocator.
         The allocated
 	memory should be freed with <functionlink id="Deallocate"></functionlink>.
       </description>
@@ -1097,9 +1097,9 @@
     <function id="Deallocate" jkernel="yes" phase="any" callbacksafe="safe" impl="notrace" num="47">
       <synopsis>Deallocate</synopsis>
       <description>
-	Deallocate <code>mem</code>  using the <jvmti/> allocator. 
+	Deallocate <code>mem</code>  using the <jvmti/> allocator.
         This function should
-	be used to deallocate any memory allocated and returned 
+	be used to deallocate any memory allocated and returned
         by a <jvmti/> function
 	(including memory allocated with <functionlink id="Allocate"></functionlink>).
         All allocated memory must be deallocated
@@ -1143,60 +1143,60 @@
                     <li><i>Why not alive?</i>
                       <ul>
                         <li>New.</li>
-                        <li>Terminated (<datalink 
+                        <li>Terminated (<datalink
                             id="JVMTI_THREAD_STATE_TERMINATED"><code>JVMTI_THREAD_STATE_TERMINATED</code></datalink>)</li>
                       </ul>
                     </li>
                   </ul>
                 </li>
-                <li>Alive (<datalink 
+                <li>Alive (<datalink
                     id="JVMTI_THREAD_STATE_ALIVE"><code>JVMTI_THREAD_STATE_ALIVE</code></datalink>)
                   <ul type="circle">
                     <li><i>Suspended?</i>
                       <ul>
-                        <li>Suspended (<datalink 
+                        <li>Suspended (<datalink
                             id="JVMTI_THREAD_STATE_SUSPENDED"><code>JVMTI_THREAD_STATE_SUSPENDED</code></datalink>)</li>
                         <li>Not suspended</li>
                       </ul>
                     </li>
                     <li><i>Interrupted?</i>
                       <ul>
-                        <li>Interrupted (<datalink 
+                        <li>Interrupted (<datalink
                             id="JVMTI_THREAD_STATE_INTERRUPTED"><code>JVMTI_THREAD_STATE_INTERRUPTED</code></datalink>)</li>
                         <li>Not interrupted.</li>
                       </ul>
                     </li>
                     <li><i>In native?</i>
                       <ul>
-                        <li>In native code (<datalink 
+                        <li>In native code (<datalink
                             id="JVMTI_THREAD_STATE_IN_NATIVE"><code>JVMTI_THREAD_STATE_IN_NATIVE</code></datalink>)</li>
                         <li>In Java programming language code</li>
                       </ul>
                     </li>
                     <li><i>What alive state?</i>
                       <ul>
-                        <li>Runnable (<datalink 
+                        <li>Runnable (<datalink
                             id="JVMTI_THREAD_STATE_RUNNABLE"><code>JVMTI_THREAD_STATE_RUNNABLE</code></datalink>)</li>
-                        <li>Blocked (<datalink 
+                        <li>Blocked (<datalink
                             id="JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER"><code>JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER</code></datalink>)</li>
-                        <li>Waiting (<datalink 
+                        <li>Waiting (<datalink
                             id="JVMTI_THREAD_STATE_WAITING"><code>JVMTI_THREAD_STATE_WAITING</code></datalink>)
                           <ul type="circle">
                             <li><i>Timed wait?</i>
                               <ul>
-                                <li>Indefinite (<datalink 
+                                <li>Indefinite (<datalink
                                     id="JVMTI_THREAD_STATE_WAITING_INDEFINITELY"><code>JVMTI_THREAD_STATE_WAITING_INDEFINITELY</code></datalink></li>
-                                <li>Timed (<datalink 
+                                <li>Timed (<datalink
                                     id="JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT"><code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code></datalink>)</li>
                               </ul>
                             </li>
                             <li><i>Why waiting?</i>
                               <ul>
-                                <li>Object.wait (<datalink 
+                                <li>Object.wait (<datalink
                                     id="JVMTI_THREAD_STATE_IN_OBJECT_WAIT"><code>JVMTI_THREAD_STATE_IN_OBJECT_WAIT</code></datalink>)</li>
-                                <li>LockSupport.park (<datalink 
+                                <li>LockSupport.park (<datalink
                                     id="JVMTI_THREAD_STATE_PARKED"><code>JVMTI_THREAD_STATE_PARKED</code></datalink>)</li>
-                                <li>Sleeping (<datalink 
+                                <li>Sleeping (<datalink
                                     id="JVMTI_THREAD_STATE_SLEEPING"><code>JVMTI_THREAD_STATE_SLEEPING</code></datalink>)</li>
                               </ul>
                             </li>
@@ -1210,7 +1210,7 @@
             </li>
           </ul>
         <p/>
-	The answers are represented by the following bit vector. 
+	The answers are represented by the following bit vector.
 	<constants id="jvmtiThreadState" label="Thread State Flags" kind="bits">
 	  <constant id="JVMTI_THREAD_STATE_ALIVE" num="0x0001">
 	    Thread is alive. Zero if thread is new (not started) or terminated.
@@ -1223,7 +1223,7 @@
 	  </constant>
 	  <constant id="JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER" num="0x0400">
 	    Thread is waiting to enter a synchronization block/method or,
-            after an <code>Object.wait()</code>, waiting to re-enter a 
+            after an <code>Object.wait()</code>, waiting to re-enter a
             synchronization block/method.
 	  </constant>
 	  <constant id="JVMTI_THREAD_STATE_WAITING" num="0x0080">
@@ -1250,8 +1250,8 @@
 	  <constant id="JVMTI_THREAD_STATE_SUSPENDED" num="0x100000">
 	    Thread suspended.
 	    <code>java.lang.Thread.suspend()</code>
-	    or a <jvmti/> suspend function 
-            (such as <functionlink id="SuspendThread"></functionlink>) 
+	    or a <jvmti/> suspend function
+            (such as <functionlink id="SuspendThread"></functionlink>)
             has been called on the thread. If this bit
 	    is set, the other bits refer to the thread state before suspension.
 	  </constant>
@@ -1313,7 +1313,7 @@
         <b>Rules</b>
         <p/>
         There can be no more than one answer to a question, although there can be no
-        answer (because the answer is unknown, does not apply, or none of the answers is 
+        answer (because the answer is unknown, does not apply, or none of the answers is
         correct).  An answer is set only when the enclosing answers match.
         That is, no more than one of
           <ul type="circle">
@@ -1322,32 +1322,32 @@
               <li><code>JVMTI_THREAD_STATE_WAITING</code></li>
           </ul>
         can be set (a <tm>J2SE</tm> compliant implementation will always set
-        one of these if <code>JVMTI_THREAD_STATE_ALIVE</code> is set). 
-        And if any of these are set, the enclosing answer 
-        <code>JVMTI_THREAD_STATE_ALIVE</code> is set. 
+        one of these if <code>JVMTI_THREAD_STATE_ALIVE</code> is set).
+        And if any of these are set, the enclosing answer
+        <code>JVMTI_THREAD_STATE_ALIVE</code> is set.
         No more than one of
           <ul type="circle">
               <li><code>JVMTI_THREAD_STATE_WAITING_INDEFINITELY</code></li>
               <li><code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code></li>
           </ul>
         can be set (a <tm>J2SE</tm> compliant implementation will always set
-        one of these if <code>JVMTI_THREAD_STATE_WAITING</code> is set). 
-        And if either is set, the enclosing answers 
-        <code>JVMTI_THREAD_STATE_ALIVE</code> and 
-        <code>JVMTI_THREAD_STATE_WAITING</code> are set. 
+        one of these if <code>JVMTI_THREAD_STATE_WAITING</code> is set).
+        And if either is set, the enclosing answers
+        <code>JVMTI_THREAD_STATE_ALIVE</code> and
+        <code>JVMTI_THREAD_STATE_WAITING</code> are set.
         No more than one of
           <ul type="circle">
               <li><code>JVMTI_THREAD_STATE_IN_OBJECT_WAIT</code></li>
               <li><code>JVMTI_THREAD_STATE_PARKED</code></li>
               <li><code>JVMTI_THREAD_STATE_SLEEPING</code></li>
           </ul>
-        can be set. And if any of these is set, the enclosing answers 
-        <code>JVMTI_THREAD_STATE_ALIVE</code> and 
-        <code>JVMTI_THREAD_STATE_WAITING</code> are set. 
+        can be set. And if any of these is set, the enclosing answers
+        <code>JVMTI_THREAD_STATE_ALIVE</code> and
+        <code>JVMTI_THREAD_STATE_WAITING</code> are set.
         Also, if <code>JVMTI_THREAD_STATE_SLEEPING</code> is set,
         then <code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code> is set.
-        If a state <i>A</i> is implemented using the mechanism of 
-        state <i>B</i> then it is state <i>A</i> which 
+        If a state <i>A</i> is implemented using the mechanism of
+        state <i>B</i> then it is state <i>A</i> which
         is returned by this function.
         For example, if <code>Thread.sleep(long)</code>
         is implemented using <code>Object.wait(long)</code>
@@ -1364,16 +1364,16 @@
         <p/>
         And finally,
         <code>JVMTI_THREAD_STATE_TERMINATED</code> cannot be set unless
-        <code>JVMTI_THREAD_STATE_ALIVE</code> is not set.  
+        <code>JVMTI_THREAD_STATE_ALIVE</code> is not set.
         <p/>
         The thread state representation is designed for extension in future versions
         of the specification; thread state values should be used accordingly, that is
-        they should not be used as ordinals.  
+        they should not be used as ordinals.
         Most queries can be made by testing a single bit, if use in a switch statement is desired,
         the state bits should be masked with the interesting bits.
-        All bits not defined above are reserved for future use.  
+        All bits not defined above are reserved for future use.
         A VM, compliant to the current specification, must set reserved bits to zero.
-        An agent should ignore reserved bits -- 
+        An agent should ignore reserved bits --
         they should not be assumed to be zero and thus should not be included in comparisons.
         <p/>
         <b>Examples</b>
@@ -1390,8 +1390,8 @@
         </example>
         The state of a thread at a <code>Object.wait(3000)</code> would be:
         <example>
-            JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING + 
-                JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT + 
+            JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING +
+                JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT +
                 JVMTI_THREAD_STATE_MONITOR_WAITING
         </example>
         The state of a thread suspended while runnable would be:
@@ -1423,7 +1423,7 @@
         </example>
         To distinguish timed from untimed <code>Object.wait</code>:
         <example>
-	   if (state &amp; JVMTI_THREAD_STATE_IN_OBJECT_WAIT)  {  
+	   if (state &amp; JVMTI_THREAD_STATE_IN_OBJECT_WAIT)  {
              if (state &amp; JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)  {
                printf("in Object.wait(long timeout)\n");
              } else {
@@ -1436,7 +1436,7 @@
         <p/>
         The thread state represented by <code>java.lang.Thread.State</code>
         returned from <code>java.lang.Thread.getState()</code> is a subset of the
-        information returned from this function.  
+        information returned from this function.
         The corresponding <code>java.lang.Thread.State</code> can be determined
         by using the provided conversion masks.
         For example, this returns the name of the <code>java.lang.Thread.State</code> thread state:
@@ -1466,7 +1466,7 @@
 	<param id="thread">
 	  <jthread null="current" started="maybe" impl="noconvert"/>
 	    <description>
-	      The thread to query. 
+	      The thread to query.
 	    </description>
 	</param>
 	<param id="thread_state_ptr">
@@ -1484,15 +1484,15 @@
     <function id="GetCurrentThread" phase="start" num="18" since="1.1">
       <synopsis>Get Current Thread</synopsis>
       <description>
-        Get the current thread.  
+        Get the current thread.
         The current thread is the Java programming language thread which has called the function.
         The function may return <code>NULL</code> in the start phase if the
         <internallink id="jvmtiCapabilities.can_generate_early_vmstart">
         <code>can_generate_early_vmstart</code></internallink> capability is enabled
         and the <code>java.lang.Thread</code> class has not been initialized yet.
         <p/>
-        Note that most <jvmti/> functions that take a thread 
-        as an argument will accept <code>NULL</code> to mean 
+        Note that most <jvmti/> functions that take a thread
+        as an argument will accept <code>NULL</code> to mean
         the current thread.
       </description>
       <origin>new</origin>
@@ -1516,12 +1516,12 @@
         Get all live threads.
         The threads are Java programming language threads;
         that is, threads that are attached to the VM.
-        A thread is live if <code>java.lang.Thread.isAlive()</code> 
+        A thread is live if <code>java.lang.Thread.isAlive()</code>
         would return <code>true</code>, that is, the thread has
         been started and has not yet died.
         The universe of threads is determined by the context of the <jvmti/>
         environment, which typically is all threads attached to the VM.
-        Note that this includes <jvmti/> agent threads 
+        Note that this includes <jvmti/> agent threads
         (see <functionlink id="RunAgentThread"/>).
       </description>
       <origin>jvmdi</origin>
@@ -1549,8 +1549,8 @@
     <function id="SuspendThread" num="5">
       <synopsis>Suspend Thread</synopsis>
       <description>
-        Suspend the specified thread. If the calling thread is specified, 
-        this function will not return until some other thread calls 
+        Suspend the specified thread. If the calling thread is specified,
+        this function will not return until some other thread calls
         <functionlink id="ResumeThread"></functionlink>.
         If the thread is currently suspended, this function
         does nothing and returns an error.
@@ -1563,7 +1563,7 @@
         <param id="thread">
 	  <jthread null="current"/>
 	    <description>
-	      The thread to suspend. 
+	      The thread to suspend.
 	    </description>
 	</param>
       </parameters>
@@ -1592,22 +1592,22 @@
         The threads are Java programming language threads;
         native threads which are not attached to the VM are not
         Java programming language threads.
-        A thread is live if <code>java.lang.Thread.isAlive()</code> 
+        A thread is live if <code>java.lang.Thread.isAlive()</code>
         would return <code>true</code>, that is, the thread has
         been started and has not yet died.
-        The universe of threads is determined 
+        The universe of threads is determined
         by the context of the <jvmti/>
         environment, which, typically, is all threads attached to the VM,
-        except critical VM internal threads and <jvmti/> agent threads 
+        except critical VM internal threads and <jvmti/> agent threads
 	(see <functionlink id="RunAgentThread"/>).
         <p/>
-        If the calling thread is specified, 
+        If the calling thread is specified,
         all other threads are suspended first then the caller thread is suspended -
-        this function will not return until some other thread calls 
+        this function will not return until some other thread calls
         <functionlink id="ResumeThread"></functionlink>.
         <p/>
         The list of actually
-        suspended threads is returned in 
+        suspended threads is returned in
         <paramlink id="suspended_list_ptr"></paramlink>.
         Suspension is as defined in <functionlink id="SuspendThread"></functionlink>.
         <functionlink id="ResumeThreadList"></functionlink>
@@ -1662,13 +1662,13 @@
     <function id="SuspendThreadList" num="92">
       <synopsis>Suspend Thread List</synopsis>
       <description>
-        Suspend the <paramlink id="request_count"></paramlink> 
-        threads specified in the 
-        <paramlink id="request_list"></paramlink> array. 
+        Suspend the <paramlink id="request_count"></paramlink>
+        threads specified in the
+        <paramlink id="request_list"></paramlink> array.
         Threads may be resumed with
         <functionlink id="ResumeThreadList"></functionlink> or
         <functionlink id="ResumeThread"></functionlink>.
-        If the calling thread is specified in the 
+        If the calling thread is specified in the
         <paramlink id="request_list"></paramlink> array, this function will
         not return until some other thread resumes it.
         Errors encountered in the suspension of a thread
@@ -1696,11 +1696,11 @@
         <param id="results">
 	  <outbuf incount="request_count"><enum>jvmtiError</enum></outbuf>
 	  <description>
-	    An agent supplied array of 
+	    An agent supplied array of
 	    <paramlink id="request_count"></paramlink> elements.
 	    On return, filled with the error code for
 	    the suspend of the corresponding thread.
-	    The error code will be 
+	    The error code will be
 	    <errorlink id="JVMTI_ERROR_NONE"></errorlink>
 	    if the thread was suspended by this call.
 	    Possible error codes are those specified
@@ -1715,12 +1715,12 @@
     <function id="ResumeThread" num="6">
       <synopsis>Resume Thread</synopsis>
       <description>
-        Resume a suspended thread. 
+        Resume a suspended thread.
         Any threads currently suspended through
         a <jvmti/> suspend function (eg.
-        <functionlink id="SuspendThread"></functionlink>) 
+        <functionlink id="SuspendThread"></functionlink>)
         or <code>java.lang.Thread.suspend()</code>
-        will resume execution;  
+        will resume execution;
 	all other threads are unaffected.
       </description>
       <origin>jvmdi</origin>
@@ -1740,7 +1740,7 @@
           Thread was not suspended.
         </error>
         <error id="JVMTI_ERROR_INVALID_TYPESTATE">
-          The state of the thread has been modified, and is now inconsistent. 
+          The state of the thread has been modified, and is now inconsistent.
         </error>
       </errors>
     </function>
@@ -1748,12 +1748,12 @@
     <function id="ResumeThreadList" num="93">
       <synopsis>Resume Thread List</synopsis>
       <description>
-        Resume the <paramlink id="request_count"></paramlink> 
-        threads specified in the 
-        <paramlink id="request_list"></paramlink> array. 
+        Resume the <paramlink id="request_count"></paramlink>
+        threads specified in the
+        <paramlink id="request_list"></paramlink> array.
         Any thread suspended through
         a <jvmti/> suspend function (eg.
-        <functionlink id="SuspendThreadList"></functionlink>) 
+        <functionlink id="SuspendThreadList"></functionlink>)
         or <code>java.lang.Thread.suspend()</code>
         will resume execution.
       </description>
@@ -1777,11 +1777,11 @@
         <param id="results">
 	  <outbuf incount="request_count"><enum>jvmtiError</enum></outbuf>
 	  <description>
-	    An agent supplied array of 
+	    An agent supplied array of
 	    <paramlink id="request_count"></paramlink> elements.
 	    On return, filled with the error code for
 	    the resume of the corresponding thread.
-	    The error code will be 
+	    The error code will be
 	    <errorlink id="JVMTI_ERROR_NONE"></errorlink>
 	    if the thread was suspended by this call.
 	    Possible error codes are those specified
@@ -1796,9 +1796,9 @@
     <function id="StopThread" num="7">
       <synopsis>Stop Thread</synopsis>
       <description>
-	Send the specified asynchronous exception to the specified thread 
+	Send the specified asynchronous exception to the specified thread
 	(similar to <code>java.lang.Thread.stop</code>).
-	Normally, this function is used to kill the specified thread with an 
+	Normally, this function is used to kill the specified thread with an
 	instance of the exception <code>ThreadDeath</code>.
       </description>
       <origin>jvmdi</origin>
@@ -1883,7 +1883,7 @@
 	</field>
       </typedef>
       <description>
-	Get thread information. The fields of the <datalink id="jvmtiThreadInfo"/> structure 
+	Get thread information. The fields of the <datalink id="jvmtiThreadInfo"/> structure
 	are filled in with details of the specified thread.
       </description>
       <origin>jvmdi</origin>
@@ -1910,8 +1910,8 @@
     <function id="GetOwnedMonitorInfo" num="10">
       <synopsis>Get Owned Monitor Info</synopsis>
       <description>
-	Get information about the monitors owned by the 
-	specified thread. 
+	Get information about the monitors owned by the
+	specified thread.
       </description>
       <origin>jvmdiClone</origin>
       <capabilities>
@@ -1943,7 +1943,7 @@
 
     <function id="GetOwnedMonitorStackDepthInfo" num="153" since="1.1">
       <synopsis>Get Owned Monitor Stack Depth Info</synopsis>
-      <typedef id="jvmtiMonitorStackDepthInfo" 
+      <typedef id="jvmtiMonitorStackDepthInfo"
                label="Monitor stack depth information structure">
         <field id="monitor">
 	  <jobject/>
@@ -1954,18 +1954,18 @@
         <field id="stack_depth">
 	  <jint/>
 	  <description>
-	    The stack depth.  Corresponds to the stack depth used in the 
+	    The stack depth.  Corresponds to the stack depth used in the
             <internallink id="stack">Stack Frame functions</internallink>.
             That is, zero is the current frame, one is the frame which
-            called the current frame. And it is negative one if the 
-	    implementation cannot determine the stack depth (e.g., for 
+            called the current frame. And it is negative one if the
+	    implementation cannot determine the stack depth (e.g., for
 	    monitors acquired by JNI <code>MonitorEnter</code>).
 	  </description>
 	</field>
       </typedef>
       <description>
-	Get information about the monitors owned by the 
-	specified thread and the depth of the stack frame which locked them. 
+	Get information about the monitors owned by the
+	specified thread and the depth of the stack frame which locked them.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -2000,7 +2000,7 @@
     <function id="GetCurrentContendedMonitor" num="11">
       <synopsis>Get Current Contended Monitor</synopsis>
       <description>
-	Get the object, if any, whose monitor the specified thread is waiting to 
+	Get the object, if any, whose monitor the specified thread is waiting to
 	enter or waiting to regain through <code>java.lang.Object.wait</code>.
       </description>
       <origin>jvmdi</origin>
@@ -2057,7 +2057,7 @@
               <void/>
             </outptr>
               <description>
-                The <code>arg</code> parameter passed to 
+                The <code>arg</code> parameter passed to
                 <functionlink id="RunAgentThread"></functionlink>.
               </description>
           </param>
@@ -2071,13 +2071,13 @@
 	The parameter <paramlink id="arg"></paramlink> is forwarded on to the
 	<functionlink id="jvmtiStartFunction">start function</functionlink>
 	(specified with <paramlink id="proc"></paramlink>) as its single argument.
-	This function allows the creation of agent threads 
-	for handling communication with another process or for handling events 
-	without the need to load a special subclass of <code>java.lang.Thread</code> or 
-	implementer of <code>java.lang.Runnable</code>. 
+	This function allows the creation of agent threads
+	for handling communication with another process or for handling events
+	without the need to load a special subclass of <code>java.lang.Thread</code> or
+	implementer of <code>java.lang.Runnable</code>.
 	Instead, the created thread can run entirely in native code.
 	However, the created thread does require a newly created instance
-	of <code>java.lang.Thread</code> (referenced by the argument <code>thread</code>) to 
+	of <code>java.lang.Thread</code> (referenced by the argument <code>thread</code>) to
 	which it will be associated.
 	The thread object can be created with JNI calls.
 	<p/>
@@ -2105,14 +2105,14 @@
         added to the thread group and the thread is not seen on queries of the thread
         group at either the Java programming language or <jvmti/> levels.
 	<p/>
-        The thread is not visible to Java programming language queries but is 
-        included in <jvmti/> queries (for example, 
+        The thread is not visible to Java programming language queries but is
+        included in <jvmti/> queries (for example,
         <functionlink id="GetAllThreads"/> and
         <functionlink id="GetAllStackTraces"/>).
 	<p/>
 	Upon execution of <code>proc</code>, the new thread will be attached to the
-	VM -- see the JNI documentation on 
-	<externallink id="docs/technotes/guides/jni/spec/invocation.html#attaching_to_the_vm"
+	VM -- see the JNI documentation on
+	<externallink id="jni/invocation.html#attaching-to-the-vm"
 		      >Attaching to the VM</externallink>.
       </description>
       <origin>jvmdiClone</origin>
@@ -2152,8 +2152,8 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_INVALID_PRIORITY"> 
-            <paramlink id="priority"/> is less than 
+	<error id="JVMTI_ERROR_INVALID_PRIORITY">
+            <paramlink id="priority"/> is less than
             <datalink id="JVMTI_THREAD_MIN_PRIORITY"/>
               or greater than
             <datalink id="JVMTI_THREAD_MAX_PRIORITY"/>
@@ -2169,7 +2169,7 @@
         This value is <code>NULL</code> unless set with this function.
 	Agents can allocate memory in which they store thread specific
         information. By setting thread-local storage it can then be
-	accessed with 
+	accessed with
 	<functionlink id="GetThreadLocalStorage"></functionlink>.
 	<p/>
         This function is called by the agent to set the value of the <jvmti/>
@@ -2188,10 +2188,10 @@
 	    </description>
 	</param>
         <param id="data">
-	  <inbuf> 
-	    <void/> 
-	    <nullok>value is set to <code>NULL</code></nullok> 
-	  </inbuf> 
+	  <inbuf>
+	    <void/>
+	    <nullok>value is set to <code>NULL</code></nullok>
+	  </inbuf>
 	  <description>
 	    The value to be entered into the thread-local storage.
 	  </description>
@@ -2205,7 +2205,7 @@
       <synopsis>Get Thread Local Storage</synopsis>
       <description>
         Called by the agent to get the value of the <jvmti/> thread-local
-        storage. 
+        storage.
       </description>
       <origin>jvmpi</origin>
       <capabilities>
@@ -2220,10 +2220,10 @@
         <param id="data_ptr">
 	  <agentbuf><void/></agentbuf>
 	  <description>
-	    Pointer through which the value of the thread local 
+	    Pointer through which the value of the thread local
 	    storage is returned.
 	    If thread-local storage has not been set with
-	    <functionlink id="SetThreadLocalStorage"></functionlink> the returned 
+	    <functionlink id="SetThreadLocalStorage"></functionlink> the returned
 	    pointer is <code>NULL</code>.
 	  </description>
 	</param>
@@ -2294,8 +2294,8 @@
 	</field>
       </typedef>
       <description>
-	Get information about the thread group. The fields of the 
-	<functionlink id="jvmtiThreadGroupInfo"></functionlink> structure 
+	Get information about the thread group. The fields of the
+	<functionlink id="jvmtiThreadGroupInfo"></functionlink> structure
 	are filled in with details of the specified thread group.
       </description>
       <origin>jvmdi</origin>
@@ -2312,7 +2312,7 @@
 	  <outptr><struct>jvmtiThreadGroupInfo</struct></outptr>
 	  <description>
 	    On return, filled with information describing the specified
-	    thread group. 
+	    thread group.
 	  </description>
 	</param>
       </parameters>
@@ -2373,15 +2373,15 @@
         <p/>
         Stack frames are as described in
         <vmspec chapter="3.6"/>,
-        That is, they correspond to method 
-        invocations (including native methods) but do not correspond to platform native or 
+        That is, they correspond to method
+        invocations (including native methods) but do not correspond to platform native or
         VM internal frames.
         <p/>
         A <jvmti/> implementation may use method invocations to launch a thread and
         the corresponding frames may be included in the stack as presented by these functions --
         that is, there may be frames shown
         deeper than <code>main()</code> and <code>run()</code>.
-        However this presentation must be consistent across all <jvmti/> functionality which 
+        However this presentation must be consistent across all <jvmti/> functionality which
         uses stack frames or stack depth.
     </intro>
 
@@ -2425,16 +2425,16 @@
 	    <struct>jvmtiFrameInfo</struct>
 	  </outbuf>
 	    <description>
-	      On return, this agent allocated buffer is filled 
-	      with stack frame information.  
+	      On return, this agent allocated buffer is filled
+	      with stack frame information.
 	    </description>
 	</field>
         <field id="frame_count">
 	  <jint/>
 	  <description>
-	    On return, the number of records filled into 
+	    On return, the number of records filled into
             <code>frame_buffer</code>.
-            This will be 
+            This will be
             min(<code>max_frame_count</code>, <i>stackDepth</i>).
 	  </description>
 	</field>
@@ -2445,7 +2445,7 @@
       <description>
         Get information about the stack of a thread.
         If <paramlink id="max_frame_count"></paramlink> is less than the depth of the stack,
-        the <paramlink id="max_frame_count"></paramlink> topmost frames are returned, 
+        the <paramlink id="max_frame_count"></paramlink> topmost frames are returned,
         otherwise the entire stack is returned.
         The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
         <p/>
@@ -2457,23 +2457,23 @@
 jint count;
 jvmtiError err;
 
-err = (*jvmti)-&gt;GetStackTrace(jvmti, aThread, 0, 5, 
+err = (*jvmti)-&gt;GetStackTrace(jvmti, aThread, 0, 5,
                                frames, &amp;count);
 if (err == JVMTI_ERROR_NONE &amp;&amp; count &gt;= 1) {
    char *methodName;
-   err = (*jvmti)-&gt;GetMethodName(jvmti, frames[0].method, 
+   err = (*jvmti)-&gt;GetMethodName(jvmti, frames[0].method,
                        &amp;methodName, NULL, NULL);
    if (err == JVMTI_ERROR_NONE) {
       printf("Executing method: %s", methodName);
    }
 }
         </example>
-        <todo> 
+        <todo>
           check example code.
         </todo>
         <p/>
         The <paramlink id="thread"></paramlink> need not be suspended
-        to call this function.  
+        to call this function.
         <p/>
         The <functionlink id="GetLineNumberTable"></functionlink>
         function can be used to map locations to line numbers. Note that
@@ -2492,15 +2492,15 @@
         <param id="start_depth">
 	  <jint/>
 	  <description>
-	    Begin retrieving frames at this depth.  
-            If non-negative, count from the current frame, 
-            the first frame retrieved is at depth <code>start_depth</code>.  
+	    Begin retrieving frames at this depth.
+            If non-negative, count from the current frame,
+            the first frame retrieved is at depth <code>start_depth</code>.
             For example, if zero, start from the current frame; if one, start from the
             caller of the current frame; if two, start from the caller of the
             caller of the current frame; and so on.
             If negative, count from below the oldest frame,
-            the first frame retrieved is at depth <i>stackDepth</i><code> + start_depth</code>,  
-            where <i>stackDepth</i> is the count of frames on the stack.  
+            the first frame retrieved is at depth <i>stackDepth</i><code> + start_depth</code>,
+            where <i>stackDepth</i> is the count of frames on the stack.
             For example, if negative one, only the oldest frame is retrieved;
             if negative two, start from the frame called by the oldest frame.
 	  </description>
@@ -2516,17 +2516,17 @@
 	    <struct>jvmtiFrameInfo</struct>
 	  </outbuf>
 	    <description>
-	      On return, this agent allocated buffer is filled 
-	      with stack frame information.  
+	      On return, this agent allocated buffer is filled
+	      with stack frame information.
 	    </description>
 	</param>
         <param id="count_ptr">
 	  <outptr><jint/></outptr>
 	  <description>
 	    On return, points to the number of records filled in.
-            For non-negative <code>start_depth</code>, this will be 
+            For non-negative <code>start_depth</code>, this will be
             min(<code>max_frame_count</code>, <i>stackDepth</i><code> - start_depth</code>).
-            For negative <code>start_depth</code>, this will be 
+            For negative <code>start_depth</code>, this will be
             min(<code>max_frame_count</code>, <code>-start_depth</code>).
 	  </description>
 	</param>
@@ -2546,23 +2546,23 @@
         Get information about the stacks of all live threads
         (including <internallink id="RunAgentThread">agent threads</internallink>).
         If <paramlink id="max_frame_count"/> is less than the depth of a stack,
-        the <paramlink id="max_frame_count"/> topmost frames are returned for that thread, 
+        the <paramlink id="max_frame_count"/> topmost frames are returned for that thread,
         otherwise the entire stack is returned.
         The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
         <p/>
-        All stacks are collected simultaneously, that is, no changes will occur to the 
+        All stacks are collected simultaneously, that is, no changes will occur to the
         thread state or stacks between the sampling of one thread and the next.
         The threads need not be suspended.
-        
+
         <example>
 jvmtiStackInfo *stack_info;
 jint thread_count;
 int ti;
 jvmtiError err;
 
-err = (*jvmti)-&gt;GetAllStackTraces(jvmti, MAX_FRAMES, &amp;stack_info, &amp;thread_count); 
+err = (*jvmti)-&gt;GetAllStackTraces(jvmti, MAX_FRAMES, &amp;stack_info, &amp;thread_count);
 if (err != JVMTI_ERROR_NONE) {
-   ...   
+   ...
 }
 for (ti = 0; ti &lt; thread_count; ++ti) {
    jvmtiStackInfo *infop = &amp;stack_info[ti];
@@ -2577,9 +2577,9 @@
    }
 }
 /* this one Deallocate call frees all data allocated by GetAllStackTraces */
-err = (*jvmti)-&gt;Deallocate(jvmti, stack_info); 
+err = (*jvmti)-&gt;Deallocate(jvmti, stack_info);
         </example>
-        <todo> 
+        <todo>
           check example code.
         </todo>
 
@@ -2599,12 +2599,12 @@
 	    <struct>jvmtiStackInfo</struct>
 	  </allocbuf>
 	    <description>
-	      On return, this buffer is filled 
-	      with stack information for each thread.  
-              The number of <datalink id="jvmtiStackInfo"/> records is determined 
+	      On return, this buffer is filled
+	      with stack information for each thread.
+              The number of <datalink id="jvmtiStackInfo"/> records is determined
               by <paramlink id="thread_count_ptr"/>.
               <p/>
-              Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/> 
+              Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/>
               buffers pointed to by <datalink id="jvmtiStackInfo.frame_buffer"/>.
               These buffers must not be separately deallocated.
 	    </description>
@@ -2625,11 +2625,11 @@
       <description>
         Get information about the stacks of the supplied threads.
         If <paramlink id="max_frame_count"/> is less than the depth of a stack,
-        the <paramlink id="max_frame_count"/> topmost frames are returned for that thread, 
+        the <paramlink id="max_frame_count"/> topmost frames are returned for that thread,
         otherwise the entire stack is returned.
         The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
         <p/>
-        All stacks are collected simultaneously, that is, no changes will occur to the 
+        All stacks are collected simultaneously, that is, no changes will occur to the
         thread state or stacks between the sampling one thread and the next.
         The threads need not be suspended.
         <p/>
@@ -2667,12 +2667,12 @@
 	    <struct>jvmtiStackInfo</struct>
 	  </allocbuf>
 	    <description>
-	      On return, this buffer is filled 
-	      with stack information for each thread.  
-              The number of <datalink id="jvmtiStackInfo"/> records is determined 
+	      On return, this buffer is filled
+	      with stack information for each thread.
+              The number of <datalink id="jvmtiStackInfo"/> records is determined
               by <paramlink id="thread_count"/>.
               <p/>
-              Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/> 
+              Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/>
               buffers pointed to by <datalink id="jvmtiStackInfo.frame_buffer"/>.
               These buffers must not be separately deallocated.
 	    </description>
@@ -2703,8 +2703,8 @@
       <capabilities>
         <required id="can_get_async_stack_trace"></required>
         <capability id="can_show_JVM_spec_async_frames">
-          If <code>false</code>, 
-          <paramlink id="use_java_stack"></paramlink> 
+          If <code>false</code>,
+          <paramlink id="use_java_stack"></paramlink>
           must be <code>false</code>.
         </capability>
       </capabilities>
@@ -2713,7 +2713,7 @@
 	  <jboolean/>
 	  <description>
 	    Return the stack showing <vmspec/>
-	    model of the stack; 
+	    model of the stack;
 	    otherwise, show the internal representation of the stack with
 	    inlined and optimized methods missing.  If the virtual machine
 	    is using the <i>Java Virtual Machine Specification</i> stack model
@@ -2734,9 +2734,9 @@
 	  </outbuf>
 	    <description>
 	      The agent passes in a buffer
-	      large enough to hold <code>max_count</code> records of 
+	      large enough to hold <code>max_count</code> records of
 	      <datalink id="jvmtiFrameInfo"></datalink>.  This buffer must be
-	      pre-allocated by the agent.  
+	      pre-allocated by the agent.
 	    </description>
 	</param>
         <param id="count_ptr">
@@ -2788,27 +2788,27 @@
       <synopsis>Pop Frame</synopsis>
       <description>
 	Pop the current frame of <code>thread</code>'s stack.
-	Popping a frame takes you to the previous frame.  
-	When the thread is resumed, the execution 
+	Popping a frame takes you to the previous frame.
+	When the thread is resumed, the execution
 	state of the thread is reset to the state
 	immediately before the called method was invoked.
 	That is (using <vmspec/> terminology):
 	  <ul>
 	    <li>the current frame is discarded as the previous frame becomes the current one</li>
 	    <li>the operand stack is restored--the argument values are added back
-	      and if the invoke was not <code>invokestatic</code>, 
+	      and if the invoke was not <code>invokestatic</code>,
 	      <code>objectref</code> is added back as well</li>
 	    <li>the Java virtual machine PC is restored to the opcode
 	      of the invoke instruction</li>
 	  </ul>
 	Note however, that any changes to the arguments, which
-	occurred in the called method, remain; 
-	when execution continues, the first instruction to 
-	execute will be the invoke.  
+	occurred in the called method, remain;
+	when execution continues, the first instruction to
+	execute will be the invoke.
 	<p/>
-	Between calling <code>PopFrame</code> and resuming the 
-	thread the state of the stack is undefined.  
-	To pop frames beyond the first, 
+	Between calling <code>PopFrame</code> and resuming the
+	thread the state of the stack is undefined.
+	To pop frames beyond the first,
 	these three steps must be repeated:
 	<ul>
 	  <li>suspend the thread via an event (step, breakpoint, ...)</li>
@@ -2816,11 +2816,11 @@
 	  <li>resume the thread</li>
 	</ul>
 	<p/>
-	A lock acquired by calling the called method 
-	(if it is a <code>synchronized</code>  method) 
+	A lock acquired by calling the called method
+	(if it is a <code>synchronized</code>  method)
 	and locks acquired by entering <code>synchronized</code>
-	blocks within the called method are released. 
-	Note: this does not apply to native locks or 
+	blocks within the called method are released.
+	Note: this does not apply to native locks or
 	<code>java.util.concurrent.locks</code> locks.
 	<p/>
 	Finally blocks are not executed.
@@ -2829,7 +2829,7 @@
 	<p/>
 	The specified thread must be suspended (which implies it cannot be the current thread).
 	<p/>
-	Both the called method and calling method must be non-native Java programming 
+	Both the called method and calling method must be non-native Java programming
         language methods.
 	<p/>
 	No <jvmti/> events are generated by this function.
@@ -2892,7 +2892,7 @@
 	<param id="location_ptr">
 	  <outptr><jlocation/></outptr>
 	  <description>
-	    On return, points to the index of the currently 
+	    On return, points to the index of the currently
 	    executing instruction.
             Is set to <code>-1</code> if the frame is executing
             a native method.
@@ -2906,11 +2906,11 @@
     <function id="NotifyFramePop" num="20">
       <synopsis>Notify Frame Pop</synopsis>
       <description>
-	When the frame that is currently at <paramlink id="depth"></paramlink> 
+	When the frame that is currently at <paramlink id="depth"></paramlink>
         is popped from the stack, generate a
-	<eventlink id="FramePop"></eventlink> event.  See the 
+	<eventlink id="FramePop"></eventlink> event.  See the
 	<eventlink id="FramePop"></eventlink> event for details.
-        Only frames corresponding to non-native Java programming language 
+        Only frames corresponding to non-native Java programming language
         methods can receive notification.
         <p/>
         The specified thread must either be the current thread
@@ -2922,7 +2922,7 @@
       </capabilities>
       <parameters>
  	<param id="thread">
-	  <jthread null="current" frame="depth"/>	  
+	  <jthread null="current" frame="depth"/>
 	  <description>
 	    The thread of the frame for which the frame pop event will be generated.
 	  </description>
@@ -2935,7 +2935,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  The frame at <code>depth</code> is executing a
           native method.
 	</error>
@@ -2954,7 +2954,7 @@
       The method which will return early is referred to as the <i>called method</i>.
       The called method is the current method
       (as defined by
-      <vmspec chapter="3.6"/>) 
+      <vmspec chapter="3.6"/>)
       for the specified thread at
       the time the function is called.
       <p/>
@@ -2962,17 +2962,17 @@
       The return occurs when execution of Java programming
       language code is resumed on this thread.
       Between calling one of these functions and resumption
-      of thread execution, the state of the stack is undefined.  
+      of thread execution, the state of the stack is undefined.
       <p/>
-      No further instructions are executed in the called method.  
+      No further instructions are executed in the called method.
       Specifically, finally blocks are not executed.
       Note: this can cause inconsistent states in the application.
       <p/>
-      A lock acquired by calling the called method 
-      (if it is a <code>synchronized</code>  method) 
+      A lock acquired by calling the called method
+      (if it is a <code>synchronized</code>  method)
       and locks acquired by entering <code>synchronized</code>
-      blocks within the called method are released. 
-      Note: this does not apply to native locks or 
+      blocks within the called method are released.
+      Note: this does not apply to native locks or
       <code>java.util.concurrent.locks</code> locks.
       <p/>
       Events, such as <eventlink id="MethodExit"></eventlink>,
@@ -2989,7 +2989,7 @@
       <description>
 	This function can be used to return from a method whose
         result type is <code>Object</code>
-        or a subclass of <code>Object</code>. 
+        or a subclass of <code>Object</code>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -3005,7 +3005,7 @@
 	<param id="value">
 	  <jobject/>
 	  <description>
-	    The return value for the called frame. 
+	    The return value for the called frame.
             An object or <code>NULL</code>.
 	  </description>
 	</param>
@@ -3017,12 +3017,12 @@
           Or the implementation is unable to provide
           this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The result type of the called method is not 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The result type of the called method is not
           <code>Object</code> or a subclass of <code>Object</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The supplied <paramlink id="value"/> is not compatible with the 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The supplied <paramlink id="value"/> is not compatible with the
           result type of the called method.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
@@ -3039,8 +3039,8 @@
       <description>
 	This function can be used to return from a method whose
         result type is <code>int</code>, <code>short</code>,
-        <code>char</code>, <code>byte</code>, or 
-	<code>boolean</code>. 
+        <code>char</code>, <code>byte</code>, or
+	<code>boolean</code>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -3067,10 +3067,10 @@
           Or the implementation is unable to provide
           this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The result type of the called method is not 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The result type of the called method is not
           <code>int</code>, <code>short</code>,
-          <code>char</code>, <code>byte</code>, or 
+          <code>char</code>, <code>byte</code>, or
   	  <code>boolean</code>.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
@@ -3113,7 +3113,7 @@
           Or the implementation is unable to provide
           this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The result type of the called method is not <code>long</code>.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
@@ -3156,7 +3156,7 @@
           Or the implementation is unable to provide
           this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The result type of the called method is not <code>float</code>.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
@@ -3197,7 +3197,7 @@
 	  Attempted to return early from a frame corresponding to a native method.
           Or the implementation is unable to provide this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The result type of the called method is not <code>double</code>.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
@@ -3234,8 +3234,8 @@
           Or the implementation is unable to provide
           this functionality on this frame.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The called method has a result type.  
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The called method has a result type.
 	</error>
 	<error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
 	  Thread was not the current thread and was not suspended.
@@ -3254,12 +3254,12 @@
       Functionality includes the ability to view the objects in the
       heap and to tag these objects.
     </intro>
-   
+
     <intro id="objectTags" label="Object Tags">
       A <i>tag</i> is a value associated with an object.
       Tags are explicitly set by the agent using the
       <functionlink id="SetTag"></functionlink> function or by
-      callback functions such as <functionlink id="jvmtiHeapIterationCallback"/>.    
+      callback functions such as <functionlink id="jvmtiHeapIterationCallback"/>.
       <p/>
       Tags are local to the environment; that is, the tags of one
       environment are not visible in another.
@@ -3267,10 +3267,10 @@
       Tags are <code>jlong</code> values which can be used
       simply to mark an object or to store a pointer to more detailed
       information.  Objects which have not been tagged have a
-      tag of zero.  
+      tag of zero.
       Setting a tag to zero makes the object untagged.
     </intro>
-   
+
     <intro id="heapCallbacks" label="Heap Callback Functions">
         Heap functions which iterate through the heap and recursively
         follow object references use agent supplied callback functions
@@ -3278,7 +3278,7 @@
         <p/>
         These heap callback functions must adhere to the following restrictions --
         These callbacks must not use JNI functions.
-        These callbacks must not use <jvmti/> functions except 
+        These callbacks must not use <jvmti/> functions except
         <i>callback safe</i> functions which
         specifically allow such use (see the raw monitor, memory management,
         and environment local storage functions).
@@ -3289,7 +3289,7 @@
         be invoked at a time.
         <p/>
         The Heap Filter Flags can be used to prevent reporting
-        based on the tag status of an object or its class.  
+        based on the tag status of an object or its class.
         If no flags are set (the <code>jint</code> is zero), objects
         will not be filtered out.
 
@@ -3310,43 +3310,43 @@
 
         <p/>
         The Heap Visit Control Flags are returned by the heap callbacks
-        and can be used to abort the iteration.  For the 
-        <functionlink id="jvmtiHeapReferenceCallback">Heap 
-        Reference Callback</functionlink>, it can also be used 
+        and can be used to abort the iteration.  For the
+        <functionlink id="jvmtiHeapReferenceCallback">Heap
+        Reference Callback</functionlink>, it can also be used
         to prune the graph of traversed references
         (<code>JVMTI_VISIT_OBJECTS</code> is not set).
 
-        <constants id="jvmtiHeapVisitControl" 
-                   label="Heap Visit Control Flags" 
-                   kind="bits" 
+        <constants id="jvmtiHeapVisitControl"
+                   label="Heap Visit Control Flags"
+                   kind="bits"
                    since="1.1">
 	  <constant id="JVMTI_VISIT_OBJECTS" num="0x100">
             If we are visiting an object and if this callback
-            was initiated by <functionlink id="FollowReferences"/>, 
+            was initiated by <functionlink id="FollowReferences"/>,
             traverse the references of this object.
             Otherwise ignored.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_VISIT_ABORT" num="0x8000">
 	    Abort the iteration.  Ignore all other bits.
 	  </constant>
 	</constants>
 
         <p/>
-        The Heap Reference Enumeration is provided by the 
-        <functionlink id="jvmtiHeapReferenceCallback">Heap 
-        Reference Callback</functionlink> and 
-        <functionlink id="jvmtiPrimitiveFieldCallback">Primitive Field 
-        Callback</functionlink> to 
+        The Heap Reference Enumeration is provided by the
+        <functionlink id="jvmtiHeapReferenceCallback">Heap
+        Reference Callback</functionlink> and
+        <functionlink id="jvmtiPrimitiveFieldCallback">Primitive Field
+        Callback</functionlink> to
         describe the kind of reference
         being reported.
 
-        <constants id="jvmtiHeapReferenceKind" 
-                   label="Heap Reference Enumeration" 
-                   kind="enum" 
+        <constants id="jvmtiHeapReferenceKind"
+                   label="Heap Reference Enumeration"
+                   kind="enum"
                    since="1.1">
 	  <constant id="JVMTI_HEAP_REFERENCE_CLASS" num="1">
 	    Reference from an object to its class.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_FIELD" num="2">
 	    Reference from an object to the value of one of its instance fields.
 	  </constant>
@@ -3361,11 +3361,11 @@
 	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN" num="6">
 	    Reference from a class to its protection domain.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_INTERFACE" num="7">
-            Reference from a class to one of its interfaces. 
+            Reference from a class to one of its interfaces.
             Note: interfaces are defined via a constant pool reference,
-            so the referenced interfaces may also be reported with a 
+            so the referenced interfaces may also be reported with a
             <code>JVMTI_HEAP_REFERENCE_CONSTANT_POOL</code> reference kind.
 	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_STATIC_FIELD" num="8">
@@ -3375,10 +3375,10 @@
 	    Reference from a class to a resolved entry in the constant pool.
 	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_SUPERCLASS" num="10">
-            Reference from a class to its superclass. 
+            Reference from a class to its superclass.
             A callback is not sent if the superclass is <code>java.lang.Object</code>.
             Note: loaded classes define superclasses via a constant pool
-            reference, so the referenced superclass may also be reported with 
+            reference, so the referenced superclass may also be reported with
             a <code>JVMTI_HEAP_REFERENCE_CONSTANT_POOL</code> reference kind.
 	  </constant>
 	  <constant id="JVMTI_HEAP_REFERENCE_JNI_GLOBAL" num="21">
@@ -3408,88 +3408,88 @@
         Definitions for the single character type descriptors of
         primitive types.
 
-        <constants id="jvmtiPrimitiveType" 
-                   label="Primitive Type Enumeration" 
-                   kind="enum" 
+        <constants id="jvmtiPrimitiveType"
+                   label="Primitive Type Enumeration"
+                   kind="enum"
                    since="1.1">
 	  <constant id="JVMTI_PRIMITIVE_TYPE_BOOLEAN" num="90">
             'Z' - Java programming language <code>boolean</code> - JNI <code>jboolean</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_BYTE" num="66">
             'B' - Java programming language <code>byte</code> - JNI <code>jbyte</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_CHAR" num="67">
             'C' - Java programming language <code>char</code> - JNI <code>jchar</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_SHORT" num="83">
             'S' - Java programming language <code>short</code> - JNI <code>jshort</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_INT" num="73">
             'I' - Java programming language <code>int</code> - JNI <code>jint</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_LONG" num="74">
             'J' - Java programming language <code>long</code> - JNI <code>jlong</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_FLOAT" num="70">
             'F' - Java programming language <code>float</code> - JNI <code>jfloat</code>
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_PRIMITIVE_TYPE_DOUBLE" num="68">
             'D' - Java programming language <code>double</code> - JNI <code>jdouble</code>
-	  </constant>	  
+	  </constant>
 	</constants>
     </intro>
 
-      <typedef id="jvmtiHeapReferenceInfoField" 
-               label="Reference information structure for Field references" 
+      <typedef id="jvmtiHeapReferenceInfoField"
+               label="Reference information structure for Field references"
                since="1.1">
         <description>
-          Reference information returned for 
-          <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> and 
+          Reference information returned for
+          <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> and
           <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/> references.
         </description>
 	<field id="index">
 	  <jint/>
-	  <description>	    
-            For <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>, the 
-            referrer object is not a class or an inteface.  
-            In this case, <code>index</code> is the index of the field 
-            in the class of the referrer object.  
+	  <description>
+            For <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>, the
+            referrer object is not a class or an inteface.
+            In this case, <code>index</code> is the index of the field
+            in the class of the referrer object.
             This class is referred to below as <i>C</i>.
             <p/>
             For <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>,
             the referrer object is a class (referred to below as <i>C</i>)
             or an interface (referred to below as <i>I</i>).
-            In this case, <code>index</code> is the index of the field in 
+            In this case, <code>index</code> is the index of the field in
             that class or interface.
             <p/>
-            If the referrer object is not an interface, then the field 
-            indices are determined as follows: 
+            If the referrer object is not an interface, then the field
+            indices are determined as follows:
             <ul>
               <li>make a list of all the fields in <i>C</i> and its
-                  superclasses, starting with all the fields in 
+                  superclasses, starting with all the fields in
                   <code>java.lang.Object</code> and ending with all the
                   fields in <i>C</i>.</li>
-              <li>Within this list, put 
+              <li>Within this list, put
                   the fields for a given class in the order returned by
                   <functionlink id="GetClassFields"/>.</li>
-              <li>Assign the fields in this list indices 
-                  <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i> 
+              <li>Assign the fields in this list indices
+                  <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i>
                   is the count of the fields in all the interfaces
-                  implemented by <i>C</i>. 
-                  Note that <i>C</i> implements all interfaces 
+                  implemented by <i>C</i>.
+                  Note that <i>C</i> implements all interfaces
                   directly implemented by its superclasses; as well
                   as all superinterfaces of these interfaces.</li>
             </ul>
-            If the referrer object is an interface, then the field 
+            If the referrer object is an interface, then the field
             indices are determined as follows:
             <ul>
-              <li>make a list of the fields directly declared in 
+              <li>make a list of the fields directly declared in
                   <i>I</i>.</li>
-              <li>Within this list, put 
+              <li>Within this list, put
                   the fields in the order returned by
                   <functionlink id="GetClassFields"/>.</li>
-              <li>Assign the fields in this list indices 
-                  <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i> 
+              <li>Assign the fields in this list indices
+                  <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i>
                   is the count of the fields in all the superinterfaces
                   of <i>I</i>.</li>
             </ul>
@@ -3522,7 +3522,7 @@
             </example>
             Assume that <functionlink id="GetClassFields"/> called on
             <code>C1</code> returns the fields of <code>C1</code> in the
-            order: a, b; and that the fields of <code>C2</code> are 
+            order: a, b; and that the fields of <code>C2</code> are
             returned in the order: q, r.
             An instance of class <code>C1</code> will have the
             following field indices:
@@ -3569,7 +3569,7 @@
                   The count of the fields in the interfaces
                   implemented by <code>C2</code> is three (<i>n</i>=3):
                   <code>p</code> of <code>I0</code>,
-                  <code>x</code> of <code>I1</code> and <code>y</code> of <code>I2</code> 
+                  <code>x</code> of <code>I1</code> and <code>y</code> of <code>I2</code>
                   (an interface of <code>C2</code>).  Note that the field <code>p</code>
                   of <code>I0</code> is only included once.
                 </td>
@@ -3611,7 +3611,7 @@
             The class <code>C2</code> will have the same field indices.
             Note that a field may have a different index depending on the
             object that is viewing it -- for example field "a" above.
-            Note also: not all field indices may be visible from the 
+            Note also: not all field indices may be visible from the
             callbacks, but all indices are shown for illustrative purposes.
             <p/>
             The interface <code>I1</code> will have the
@@ -3631,46 +3631,46 @@
                 </td>
               </tr>
             </table></dd></dl>
-	  </description>	    
+	  </description>
 	</field>
       </typedef>
 
-      <typedef id="jvmtiHeapReferenceInfoArray" 
-               label="Reference information structure for Array references" 
+      <typedef id="jvmtiHeapReferenceInfoArray"
+               label="Reference information structure for Array references"
                since="1.1">
         <description>
-          Reference information returned for 
+          Reference information returned for
          <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/> references.
         </description>
 	<field id="index">
 	  <jint/>
-	  <description>	    
+	  <description>
 	    The array index.
 	  </description>
 	</field>
       </typedef>
 
-      <typedef id="jvmtiHeapReferenceInfoConstantPool" 
-               label="Reference information structure for Constant Pool references" 
+      <typedef id="jvmtiHeapReferenceInfoConstantPool"
+               label="Reference information structure for Constant Pool references"
                since="1.1">
         <description>
-          Reference information returned for 
+          Reference information returned for
           <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/> references.
         </description>
 	<field id="index">
 	  <jint/>
-	  <description>	    
-	    The index into the constant pool of the class. See the description in 
+	  <description>
+	    The index into the constant pool of the class. See the description in
       <vmspec chapter="4.4"/>.
 	  </description>
 	</field>
       </typedef>
 
-      <typedef id="jvmtiHeapReferenceInfoStackLocal" 
-               label="Reference information structure for Local Variable references" 
+      <typedef id="jvmtiHeapReferenceInfoStackLocal"
+               label="Reference information structure for Local Variable references"
                since="1.1">
         <description>
-          Reference information returned for 
+          Reference information returned for
           <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/> references.
         </description>
         <field id="thread_tag">
@@ -3688,7 +3688,7 @@
         <field id="depth">
 	  <jint/>
 	  <description>
-	    The depth of the frame. 
+	    The depth of the frame.
 	  </description>
 	</field>
         <field id="method">
@@ -3711,11 +3711,11 @@
 	</field>
       </typedef>
 
-      <typedef id="jvmtiHeapReferenceInfoJniLocal" 
-               label="Reference information structure for JNI local references" 
+      <typedef id="jvmtiHeapReferenceInfoJniLocal"
+               label="Reference information structure for JNI local references"
                since="1.1">
         <description>
-          Reference information returned for 
+          Reference information returned for
           <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/> references.
         </description>
         <field id="thread_tag">
@@ -3733,7 +3733,7 @@
         <field id="depth">
 	  <jint/>
 	  <description>
-	    The depth of the frame. 
+	    The depth of the frame.
 	  </description>
 	</field>
         <field id="method">
@@ -3744,8 +3744,8 @@
 	</field>
       </typedef>
 
-      <typedef id="jvmtiHeapReferenceInfoReserved" 
-               label="Reference information structure for Other references" 
+      <typedef id="jvmtiHeapReferenceInfoReserved"
+               label="Reference information structure for Other references"
                since="1.1">
         <description>
           Reference information returned for other references.
@@ -3800,8 +3800,8 @@
 	</field>
       </typedef>
 
-      <uniontypedef id="jvmtiHeapReferenceInfo" 
-               label="Reference information structure" 
+      <uniontypedef id="jvmtiHeapReferenceInfo"
+               label="Reference information structure"
                since="1.1">
         <description>
           The information returned about referrers.
@@ -3809,50 +3809,50 @@
         </description>
 	<field id="field">
 	  <struct>jvmtiHeapReferenceInfoField</struct>
-	  <description>	    
-	    The referrer information for 
-            <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> 
+	  <description>
+	    The referrer information for
+            <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>
             and <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/> references.
 	  </description>
 	</field>
 	<field id="array">
 	  <struct>jvmtiHeapReferenceInfoArray</struct>
-	  <description>	    
-	    The referrer information for 
+	  <description>
+	    The referrer information for
 	    For <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/> references.
 	  </description>
 	</field>
 	<field id="constant_pool">
 	  <struct>jvmtiHeapReferenceInfoConstantPool</struct>
-	  <description>	    
-	    The referrer information for 
+	  <description>
+	    The referrer information for
 	    For <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/> references.
 	  </description>
 	</field>
         <field id="stack_local">
 	  <struct>jvmtiHeapReferenceInfoStackLocal</struct>
-	  <description>	    
-	    The referrer information for 
+	  <description>
+	    The referrer information for
 	    For <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/> references.
 	  </description>
 	</field>
         <field id="jni_local">
 	  <struct>jvmtiHeapReferenceInfoJniLocal</struct>
-	  <description>	    
-	    The referrer information for 
+	  <description>
+	    The referrer information for
 	    For <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/> references.
 	  </description>
 	</field>
         <field id="other">
 	  <struct>jvmtiHeapReferenceInfoReserved</struct>
-	  <description>	    
+	  <description>
 	    reserved for future use.
 	  </description>
 	</field>
       </uniontypedef>
 
-      <typedef id="jvmtiHeapCallbacks" 
-               label="Heap callback function structure" 
+      <typedef id="jvmtiHeapCallbacks"
+               label="Heap callback function structure"
                since="1.1">
         <field id="heap_iteration_callback">
 	  <ptrtype>
@@ -3860,22 +3860,22 @@
 	  </ptrtype>
 	  <description>
 	    The callback to be called to describe an
-	    object in the heap. Used by the 
+	    object in the heap. Used by the
             <functionlink id="IterateThroughHeap"/> function, ignored by the
             <functionlink id="FollowReferences"/> function.
 	  </description>
-	</field>		  
+	</field>
         <field id="heap_reference_callback">
 	  <ptrtype>
 	    <struct>jvmtiHeapReferenceCallback</struct>
 	  </ptrtype>
 	  <description>
 	    The callback to be called to describe an
-	    object reference.  Used by the 
+	    object reference.  Used by the
             <functionlink id="FollowReferences"/> function, ignored by the
             <functionlink id="IterateThroughHeap"/> function.
 	  </description>
-	</field>		  
+	</field>
         <field id="primitive_field_callback">
 	  <ptrtype>
 	    <struct>jvmtiPrimitiveFieldCallback</struct>
@@ -3884,7 +3884,7 @@
             The callback to be called to describe a
             primitive field.
           </description>
-	</field>		  
+	</field>
         <field id="array_primitive_value_callback">
 	  <ptrtype>
 	    <struct>jvmtiArrayPrimitiveValueCallback</struct>
@@ -3893,7 +3893,7 @@
 	    The callback to be called to describe an
 	    array of primitive values.
 	  </description>
-	</field>		  
+	</field>
         <field id="string_primitive_value_callback">
 	  <ptrtype>
 	    <struct>jvmtiStringPrimitiveValueCallback</struct>
@@ -3901,7 +3901,7 @@
 	  <description>
 	    The callback to be called to describe a String value.
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved5">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3909,7 +3909,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved6">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3917,7 +3917,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved7">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3925,7 +3925,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved8">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3933,7 +3933,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved9">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3941,7 +3941,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved10">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3949,7 +3949,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved11">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3957,7 +3957,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved12">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3965,7 +3965,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved13">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3973,7 +3973,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved14">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3981,7 +3981,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
         <field id="reserved15">
 	  <ptrtype>
 	    <struct>jvmtiReservedCallback</struct>
@@ -3989,7 +3989,7 @@
 	  <description>
 	    Reserved for future use..
 	  </description>
-	</field>		  
+	</field>
       </typedef>
 
 
@@ -4033,10 +4033,10 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of object (zero if the class is not tagged). 
-	    If the object represents a runtime class, 
-            the <code>class_tag</code> is the tag 
-	    associated with <code>java.lang.Class</code> 
+	    The tag of the class of object (zero if the class is not tagged).
+	    If the object represents a runtime class,
+            the <code>class_tag</code> is the tag
+	    associated with <code>java.lang.Class</code>
             (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
 	</param>
@@ -4051,7 +4051,7 @@
 	  <description>
 	    The object tag value, or zero if the object is not tagged.
 	    To set the tag value to be associated with the object
-	    the agent sets the <code>jlong</code> pointed to by the parameter. 
+	    the agent sets the <code>jlong</code> pointed to by the parameter.
 	  </description>
 	</param>
         <param id="length">
@@ -4063,17 +4063,17 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
-	  </description>
-	</param>
-      </parameters>
-    </callback>  
+	    The user supplied data that was passed into the iteration function.
+	  </description>
+	</param>
+      </parameters>
+    </callback>
 
     <callback id="jvmtiHeapReferenceCallback" since="1.1">
       <jint/>
       <synopsis>Heap Reference Callback</synopsis>
       <description>
-        Agent supplied callback function.	
+        Agent supplied callback function.
 	Describes a reference from an object or the VM (the referrer) to another object
 	(the referree) or a heap root to a referree.
         <p/>
@@ -4097,12 +4097,12 @@
 	    <struct>jvmtiHeapReferenceInfo</struct>
 	  </inptr>
 	  <description>
-	    Details about the reference. 
+	    Details about the reference.
             Set when the <datalink id="jvmtiHeapReferenceCallback.reference_kind">reference_kind</datalink> is
             <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>,
 	    <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>,
 	    <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/>,
-	    <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/>, 
+	    <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/>,
             <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/>,
             or <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/>.
             Otherwise <code>NULL</code>.
@@ -4111,9 +4111,9 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of referree object (zero if the class is not tagged). 
-            If the referree object represents a runtime class, 
-            the <code>class_tag</code> is the tag 
+	    The tag of the class of referree object (zero if the class is not tagged).
+            If the referree object represents a runtime class,
+            the <code>class_tag</code> is the tag
             associated with <code>java.lang.Class</code>
             (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
@@ -4131,14 +4131,14 @@
         <param id="size">
 	  <jlong/>
 	  <description>
-	    Size of the referree object (in bytes). 
+	    Size of the referree object (in bytes).
             See <functionlink id="GetObjectSize"/>.
 	  </description>
 	</param>
         <param id="tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    Points to the referree object tag value, or zero if the object is not 
+	    Points to the referree object tag value, or zero if the object is not
 	    tagged.
 	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
@@ -4147,14 +4147,14 @@
         <param id="referrer_tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    Points to the tag of the referrer object, or 
+	    Points to the tag of the referrer object, or
             points to the zero if the referrer
-	    object is not tagged. 
+	    object is not tagged.
             <code>NULL</code> if the referrer in not an object (that is,
             this callback is reporting a heap root).
 	    To set the tag value to be associated with the referrer object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
-            If this callback is reporting a reference from an object to itself, 
+            If this callback is reporting a reference from an object to itself,
             <code>referrer_tag_ptr == tag_ptr</code>.
 	  </description>
 	</param>
@@ -4167,7 +4167,7 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -4177,7 +4177,7 @@
       <jint/>
       <synopsis>Primitive Field Callback</synopsis>
       <description>
-        Agent supplied callback function which	
+        Agent supplied callback function which
         describes a primitive field of an object (<i>the object</i>).
         A primitive field is a field whose type is a primitive type.
         This callback will describe a static field if the object is a class,
@@ -4195,7 +4195,7 @@
 	<param id="kind">
 	  <enum>jvmtiHeapReferenceKind</enum>
 	  <description>
-	    The kind of field -- instance or static (<datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> or 
+	    The kind of field -- instance or static (<datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> or
             <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>).
 	  </description>
 	</param>
@@ -4210,17 +4210,17 @@
         <param id="object_class_tag">
 	  <jlong/>
 	  <description>
-            The tag of the class of the object (zero if the class is not tagged). 
-            If the object represents a runtime class, the 
-            <code>object_class_tag</code> is the tag 
-            associated with <code>java.lang.Class</code> 
+            The tag of the class of the object (zero if the class is not tagged).
+            If the object represents a runtime class, the
+            <code>object_class_tag</code> is the tag
+            associated with <code>java.lang.Class</code>
             (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
 	</param>
         <param id="object_tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    Points to the tag of the object, or zero if the object is not 
+	    Points to the tag of the object, or zero if the object is not
 	    tagged.
 	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
@@ -4241,7 +4241,7 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -4251,7 +4251,7 @@
       <jint/>
       <synopsis>Array Primitive Value Callback</synopsis>
       <description>
-        Agent supplied callback function.	
+        Agent supplied callback function.
 	Describes the values in an array of a primitive type.
         <p/>
         This function should return a bit vector of the desired
@@ -4266,20 +4266,20 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of the array object (zero if the class is not tagged). 
+	    The tag of the class of the array object (zero if the class is not tagged).
 	  </description>
 	</param>
         <param id="size">
 	  <jlong/>
 	  <description>
-	    Size of the array (in bytes). 
+	    Size of the array (in bytes).
             See <functionlink id="GetObjectSize"/>.
 	  </description>
 	</param>
         <param id="tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    Points to the tag of the array object, or zero if the object is not 
+	    Points to the tag of the array object, or zero if the object is not
 	    tagged.
 	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
@@ -4307,7 +4307,7 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -4317,7 +4317,7 @@
       <jint/>
       <synopsis>String Primitive Value Callback</synopsis>
       <description>
-        Agent supplied callback function.	
+        Agent supplied callback function.
 	Describes the value of a java.lang.String.
         <p/>
         This function should return a bit vector of the desired
@@ -4332,21 +4332,21 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of the String class (zero if the class is not tagged). 
+	    The tag of the class of the String class (zero if the class is not tagged).
             <issue>Is this needed?</issue>
 	  </description>
 	</param>
         <param id="size">
 	  <jlong/>
 	  <description>
-	    Size of the string (in bytes). 
+	    Size of the string (in bytes).
             See <functionlink id="GetObjectSize"/>.
 	  </description>
 	</param>
         <param id="tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    Points to the tag of the String object, or zero if the object is not 
+	    Points to the tag of the String object, or zero if the object is not
 	    tagged.
 	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
@@ -4361,15 +4361,15 @@
         <param id="value_length">
 	  <jint/>
 	  <description>
-	    The length of the string. 
-            The length is equal to the number of 16-bit Unicode 
+	    The length of the string.
+            The length is equal to the number of 16-bit Unicode
             characters in the string.
 	  </description>
 	</param>
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -4388,27 +4388,27 @@
 
     <function id="FollowReferences" num="115" since="1.1">
       <synopsis>Follow References</synopsis>
-      <description>	
-        This function initiates a traversal over the objects that are 
+      <description>
+        This function initiates a traversal over the objects that are
         directly and indirectly reachable from the specified object or,
-        if <code>initial_object</code> is not specified, all objects 
+        if <code>initial_object</code> is not specified, all objects
         reachable from the heap roots.
-	The heap root are the set of system classes, 
-	JNI globals, references from thread stacks, and other objects used as roots 
-	for the purposes of garbage collection. 
+	The heap root are the set of system classes,
+	JNI globals, references from thread stacks, and other objects used as roots
+	for the purposes of garbage collection.
         <p/>
         This function operates by traversing the reference graph.
         Let <i>A</i>, <i>B</i>, ... represent objects.
         When a reference from <i>A</i> to <i>B</i> is traversed,
-        when a reference from a heap root to <i>B</i> is traversed, 
-        or when <i>B</i> is specified as the <paramlink id="initial_object"/>, 
+        when a reference from a heap root to <i>B</i> is traversed,
+        or when <i>B</i> is specified as the <paramlink id="initial_object"/>,
         then <i>B</i> is said to be <i>visited</i>.
-        A reference from <i>A</i> to <i>B</i> is not traversed until <i>A</i> 
+        A reference from <i>A</i> to <i>B</i> is not traversed until <i>A</i>
         is visited.
         References are reported in the same order that the references are traversed.
-        Object references are reported by invoking the agent supplied  
+        Object references are reported by invoking the agent supplied
         callback function <functionlink id="jvmtiHeapReferenceCallback"/>.
-        In a reference from <i>A</i> to <i>B</i>, <i>A</i> is known 
+        In a reference from <i>A</i> to <i>B</i>, <i>A</i> is known
         as the <i>referrer</i> and <i>B</i> as the <i>referree</i>.
         The callback is invoked exactly once for each reference from a referrer;
         this is true even if there are reference cycles or multiple paths to
@@ -4416,10 +4416,10 @@
         There may be more than one reference between a referrer and a referree,
         each reference is reported.
         These references may be distinguished by examining the
-        <datalink 
+        <datalink
          id="jvmtiHeapReferenceCallback.reference_kind"><code>reference_kind</code></datalink>
          and
-        <datalink 
+        <datalink
          id="jvmtiHeapReferenceCallback.reference_info"><code>reference_info</code></datalink>
         parameters of the <functionlink id="jvmtiHeapReferenceCallback"/> callback.
 	<p/>
@@ -4456,10 +4456,10 @@
         whether the callback will be invoked, it does not influence
         which objects are visited nor does it influence whether other callbacks
         will be invoked.
-        However, the 
+        However, the
         <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>
         returned by <functionlink id="jvmtiHeapReferenceCallback"/>
-        do determine if the objects referenced by the 
+        do determine if the objects referenced by the
         current object as visited.
         The <datalink id="jvmtiHeapFilter">heap filter flags</datalink>
         and <paramlink id="klass"/> provided as parameters to this function
@@ -4468,7 +4468,7 @@
         For example, if the only callback that was set is
         <fieldlink id="array_primitive_value_callback" struct="jvmtiHeapCallbacks"/> and <code>klass</code>
         is set to the array of bytes class, then only arrays of byte will be
-        reported.  
+        reported.
         The table below summarizes this:
         <p/>
         <table>
@@ -4547,22 +4547,22 @@
         <p/>
         During the execution of this function the state of the heap
         does not change: no objects are allocated, no objects are
-        garbage collected, and the state of objects (including 
-        held values) does not change. 
-        As a result, threads executing Java 
+        garbage collected, and the state of objects (including
+        held values) does not change.
+        As a result, threads executing Java
         programming language code, threads attempting to resume the
-        execution of Java programming language code, and threads 
+        execution of Java programming language code, and threads
         attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
       <capabilities>
         <required id="can_tag_objects"></required>
       </capabilities>
-      <parameters>             
+      <parameters>
         <param id="heap_filter">
           <jint/>
           <description>
-            This bit vector of 
+            This bit vector of
             <datalink id="jvmtiHeapFilter">heap filter flags</datalink>.
             restricts the objects for which the callback function is called.
             This applies to both the object and primitive callbacks.
@@ -4575,7 +4575,7 @@
                     class</nullok>
           </ptrtype>
           <description>
-            Callbacks are only reported when the object is an instance of 
+            Callbacks are only reported when the object is an instance of
             this class.
             Objects which are instances of a subclass of <code>klass</code>
             are not reported.
@@ -4599,14 +4599,14 @@
           <description>
             Structure defining the set of callback functions.
           </description>
-        </param>                  
+        </param>
         <param id="user_data">
           <inbuf>
             <void/>
             <nullok><code>NULL</code> is passed as the user supplied data</nullok>
           </inbuf>
           <description>
-            User supplied data to be passed to the callback. 
+            User supplied data to be passed to the callback.
           </description>
         </param>
       </parameters>
@@ -4623,12 +4623,12 @@
 
     <function id="IterateThroughHeap" num="116" since="1.1">
       <synopsis>Iterate Through Heap</synopsis>
-      <description>        
-        Initiate an iteration over all objects in the heap. 
-        This includes both reachable and 
+      <description>
+        Initiate an iteration over all objects in the heap.
+        This includes both reachable and
         unreachable objects. Objects are visited in no particular order.
         <p/>
-        Heap objects are reported by invoking the agent supplied 
+        Heap objects are reported by invoking the agent supplied
         callback function <functionlink id="jvmtiHeapIterationCallback"/>.
         References between objects are not reported.
         If only reachable objects are desired, or if object reference information
@@ -4642,7 +4642,7 @@
         <functionlink id="jvmtiStringPrimitiveValueCallback"/>.
         A primitive field
         is reported after the object with that field is visited;
-        it is reported by invoking the agent supplied 
+        it is reported by invoking the agent supplied
         callback function
         <functionlink id="jvmtiPrimitiveFieldCallback"/>.
         <p/>
@@ -4660,7 +4660,7 @@
         For example, if the only callback that was set is
         <fieldlink id="array_primitive_value_callback" struct="jvmtiHeapCallbacks"/> and <code>klass</code>
         is set to the array of bytes class, then only arrays of byte will be
-        reported. The table below summarizes this (contrast this with 
+        reported. The table below summarizes this (contrast this with
         <functionlink id="FollowReferences"/>):
         <p/>
         <table>
@@ -4739,11 +4739,11 @@
         <p/>
         During the execution of this function the state of the heap
         does not change: no objects are allocated, no objects are
-        garbage collected, and the state of objects (including 
-        held values) does not change. 
-        As a result, threads executing Java 
+        garbage collected, and the state of objects (including
+        held values) does not change.
+        As a result, threads executing Java
         programming language code, threads attempting to resume the
-        execution of Java programming language code, and threads 
+        execution of Java programming language code, and threads
         attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
@@ -4754,7 +4754,7 @@
         <param id="heap_filter">
           <jint/>
           <description>
-            This bit vector of 
+            This bit vector of
             <datalink id="jvmtiHeapFilter">heap filter flags</datalink>.
             restricts the objects for which the callback function is called.
             This applies to both the object and primitive callbacks.
@@ -4766,7 +4766,7 @@
             <nullok>callbacks are not limited to instances of a particular class</nullok>
           </ptrtype>
           <description>
-            Callbacks are only reported when the object is an instance of 
+            Callbacks are only reported when the object is an instance of
             this class.
             Objects which are instances of a subclass of <code>klass</code>
             are not reported.
@@ -4781,14 +4781,14 @@
           <description>
             Structure defining the set callback functions.
           </description>
-        </param>                  
+        </param>
         <param id="user_data">
           <inbuf>
             <void/>
             <nullok><code>NULL</code> is passed as the user supplied data</nullok>
           </inbuf>
           <description>
-            User supplied data to be passed to the callback. 
+            User supplied data to be passed to the callback.
           </description>
         </param>
       </parameters>
@@ -4803,7 +4803,7 @@
       <synopsis>Get Tag</synopsis>
       <description>
         Retrieve the tag associated with an object.
-        The tag is a long value typically used to store a 
+        The tag is a long value typically used to store a
         unique identifier or pointer to object information.
         The tag is set with
         <functionlink id="SetTag"></functionlink>.
@@ -4824,7 +4824,7 @@
         <param id="tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    On return, the referenced long is set to the value 
+	    On return, the referenced long is set to the value
 	    of the tag.
 	  </description>
 	</param>
@@ -4837,7 +4837,7 @@
       <synopsis>Set Tag</synopsis>
       <description>
         Set the tag associated with an object.
-        The tag is a long value typically used to store a 
+        The tag is a long value typically used to store a
         unique identifier or pointer to object information.
         The tag is visible with
         <functionlink id="GetTag"></functionlink>.
@@ -4895,7 +4895,7 @@
 	    <jint/>
 	  </outptr>
 	    <description>
-	      Return the number of objects with any of the tags 
+	      Return the number of objects with any of the tags
 	      in <paramlink id="tags"/>.
 	    </description>
 	</param>
@@ -4905,7 +4905,7 @@
 	    <nullok>this information is not returned</nullok>
 	  </allocbuf>
 	    <description>
-	      Returns the array of objects with any of the tags 
+	      Returns the array of objects with any of the tags
 	      in <paramlink id="tags"/>.
 	    </description>
 	</param>
@@ -4936,13 +4936,13 @@
         This function does not return until the garbage collection
         is finished.
         <p/>
-        Although garbage collection is as complete 
-        as possible there is no guarantee that all 
+        Although garbage collection is as complete
+        as possible there is no guarantee that all
         <eventlink id="ObjectFree"/>
-        events will have been 
-        sent by the time that this function 
-        returns. In particular, an object may be 
-        prevented from being freed because it 
+        events will have been
+        sent by the time that this function
+        returns. In particular, an object may be
+        prevented from being freed because it
         is awaiting finalization.
       </description>
       <origin>new</origin>
@@ -4960,7 +4960,7 @@
   <category id="Heap_1_0" label="Heap (1.0)">
     <intro>
       <b>
-        These functions and data types were introduced in the original 
+        These functions and data types were introduced in the original
         <jvmti/> version 1.0 and have been superseded by more
       </b>
       <internallink id="Heap"><b>powerful and flexible versions</b></internallink>
@@ -4970,7 +4970,7 @@
       <ul>
         <li>
           <b>
-            Allow access to primitive values (the value of Strings, arrays, 
+            Allow access to primitive values (the value of Strings, arrays,
             and primitive fields)
           </b>
         </li>
@@ -5034,13 +5034,13 @@
         <constants id="jvmtiObjectReferenceKind" label="Object Reference Enumeration" kind="enum">
 	  <constant id="JVMTI_REFERENCE_CLASS" num="1">
 	    Reference from an object to its class.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_REFERENCE_FIELD" num="2">
 	    Reference from an object to the value of one of its instance fields.
 	    For references of this kind the <code>referrer_index</code>
 	    parameter to the <internallink id="jvmtiObjectReferenceCallback">
             jvmtiObjectReferenceCallback</internallink> is the index of the
- 	    the instance field. The index is based on the order of all the 
+ 	    the instance field. The index is based on the order of all the
             object's fields. This includes all fields of the directly declared
             static and instance fields in the class, and includes all fields (both
             public and private) fields declared in superclasses and superinterfaces.
@@ -5063,7 +5063,7 @@
 	  </constant>
 	  <constant id="JVMTI_REFERENCE_PROTECTION_DOMAIN" num="6">
 	    Reference from a class to its protection domain.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_REFERENCE_INTERFACE" num="7">
 	    Reference from a class to one of its interfaces.
 	  </constant>
@@ -5072,7 +5072,7 @@
 	    For references of this kind the <code>referrer_index</code>
 	    parameter to the <internallink id="jvmtiObjectReferenceCallback">
             jvmtiObjectReferenceCallback</internallink> is the index of the
- 	    the static field. The index is based on the order of all the 
+ 	    the static field. The index is based on the order of all the
             object's fields. This includes all fields of the directly declared
             static and instance fields in the class, and includes all fields (both
             public and private) fields declared in superclasses and superinterfaces.
@@ -5095,11 +5095,11 @@
 
         <constants id="jvmtiIterationControl" label="Iteration Control Enumeration" kind="enum">
 	  <constant id="JVMTI_ITERATION_CONTINUE" num="1">
-	    Continue the iteration.  
+	    Continue the iteration.
             If this is a reference iteration, follow the references of this object.
-	  </constant>	  
+	  </constant>
 	  <constant id="JVMTI_ITERATION_IGNORE" num="2">
-	    Continue the iteration.  
+	    Continue the iteration.
             If this is a reference iteration, ignore the references of this object.
 	  </constant>
 	  <constant id="JVMTI_ITERATION_ABORT" num="0">
@@ -5125,9 +5125,9 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of object (zero if the class is not tagged). 
-	    If the object represents a runtime class, 
-            the <code>class_tag</code> is the tag 
+	    The tag of the class of object (zero if the class is not tagged).
+	    If the object represents a runtime class,
+            the <code>class_tag</code> is the tag
 	    associated with <code>java.lang.Class</code>
             (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
@@ -5143,82 +5143,82 @@
 	  <description>
 	    The object tag value, or zero if the object is not tagged.
 	    To set the tag value to be associated with the object
-	    the agent sets the <code>jlong</code> pointed to by the parameter. 
-	  </description>
-	</param>
-        <param id="user_data">
-	  <outptr><void/></outptr>
-	  <description>
-	    The user supplied data that was passed into the iteration function. 
-	  </description>
-	</param>
-      </parameters>
-    </callback>  
-
-    <callback id="jvmtiHeapRootCallback">
-      <enum>jvmtiIterationControl</enum>
-      <synopsis>Heap Root Object Callback</synopsis>
-      <description>
-        Agent supplied callback function.
-	Describes (but does not pass in) an object that is a root for the purposes
-	of garbage collection.
-        <p/>
-        Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
-        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing 
-        references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
-        <p/>
-        See the <internallink id="heapCallbacks">heap callback
-        function restrictions</internallink>.
-      </description>
-      <parameters>
-	<param id="root_kind">
-	  <enum>jvmtiHeapRootKind</enum>
-	  <description>
-	    The kind of heap root.
-	  </description>
-	</param>
-        <param id="class_tag">
-	  <jlong/>
-	  <description>
-	    The tag of the class of object (zero if the class is not tagged). 
-            If the object represents a runtime class, the <code>class_tag</code> is the tag 
-            associated with <code>java.lang.Class</code> 
-            (zero if <code>java.lang.Class</code> is not tagged).
-	  </description>
-	</param>
-        <param id="size">
-	  <jlong/>
-	  <description>
-	    Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
-	  </description>
-	</param>
-        <param id="tag_ptr">
-	  <outptr><jlong/></outptr>
-	  <description>
-	    The object tag value, or zero if the object is not tagged.
-	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
 	  </description>
 	</param>
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
-	  </description>
-	</param>
-      </parameters>
-    </callback> 
+	    The user supplied data that was passed into the iteration function.
+	  </description>
+	</param>
+      </parameters>
+    </callback>
+
+    <callback id="jvmtiHeapRootCallback">
+      <enum>jvmtiIterationControl</enum>
+      <synopsis>Heap Root Object Callback</synopsis>
+      <description>
+        Agent supplied callback function.
+	Describes (but does not pass in) an object that is a root for the purposes
+	of garbage collection.
+        <p/>
+        Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
+        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
+        references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
+        <p/>
+        See the <internallink id="heapCallbacks">heap callback
+        function restrictions</internallink>.
+      </description>
+      <parameters>
+	<param id="root_kind">
+	  <enum>jvmtiHeapRootKind</enum>
+	  <description>
+	    The kind of heap root.
+	  </description>
+	</param>
+        <param id="class_tag">
+	  <jlong/>
+	  <description>
+	    The tag of the class of object (zero if the class is not tagged).
+            If the object represents a runtime class, the <code>class_tag</code> is the tag
+            associated with <code>java.lang.Class</code>
+            (zero if <code>java.lang.Class</code> is not tagged).
+	  </description>
+	</param>
+        <param id="size">
+	  <jlong/>
+	  <description>
+	    Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
+	  </description>
+	</param>
+        <param id="tag_ptr">
+	  <outptr><jlong/></outptr>
+	  <description>
+	    The object tag value, or zero if the object is not tagged.
+	    To set the tag value to be associated with the object
+	    the agent sets the <code>jlong</code> pointed to by the parameter.
+	  </description>
+	</param>
+        <param id="user_data">
+	  <outptr><void/></outptr>
+	  <description>
+	    The user supplied data that was passed into the iteration function.
+	  </description>
+	</param>
+      </parameters>
+    </callback>
 
     <callback id="jvmtiStackReferenceCallback">
       <enum>jvmtiIterationControl</enum>
       <synopsis>Stack Reference Object Callback</synopsis>
       <description>
         Agent supplied callback function.
-	Describes (but does not pass in) an object on the stack that is a root for 
+	Describes (but does not pass in) an object on the stack that is a root for
 	the purposes of garbage collection.
         <p/>
         Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
-        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing 
+        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
         references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
         <p/>
         See the <internallink id="heapCallbacks">heap callback
@@ -5235,9 +5235,9 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-           The tag of the class of object (zero if the class is not tagged). 
-           If the object represents a runtime class, the  <code>class_tag</code> is the tag 
-           associated with <code>java.lang.Class</code> 
+           The tag of the class of object (zero if the class is not tagged).
+           If the object represents a runtime class, the  <code>class_tag</code> is the tag
+           associated with <code>java.lang.Class</code>
            (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
 	</param>
@@ -5264,7 +5264,7 @@
         <param id="depth">
 	  <jint/>
 	  <description>
-	    The depth of the frame. 
+	    The depth of the frame.
 	  </description>
 	</param>
         <param id="method">
@@ -5282,7 +5282,7 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -5292,12 +5292,12 @@
       <enum>jvmtiIterationControl</enum>
       <synopsis>Object Reference Callback</synopsis>
       <description>
-        Agent supplied callback function.	
+        Agent supplied callback function.
 	Describes a reference from an object (the referrer) to another object
 	(the referree).
         <p/>
         Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
-        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing 
+        <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
         references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
         <p/>
         See the <internallink id="heapCallbacks">heap callback
@@ -5313,24 +5313,24 @@
         <param id="class_tag">
 	  <jlong/>
 	  <description>
-	    The tag of the class of referree object (zero if the class is not tagged). 
+	    The tag of the class of referree object (zero if the class is not tagged).
             If the referree object represents a runtime class,
-            the  <code>class_tag</code> is the tag 
-            associated with <code>java.lang.Class</code> 
+            the  <code>class_tag</code> is the tag
+            associated with <code>java.lang.Class</code>
             (zero if <code>java.lang.Class</code> is not tagged).
 	  </description>
 	</param>
         <param id="size">
 	  <jlong/>
 	  <description>
-	    Size of the referree object (in bytes). 
+	    Size of the referree object (in bytes).
             See <functionlink id="GetObjectSize"/>.
 	  </description>
 	</param>
         <param id="tag_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    The referree object tag value, or zero if the object is not 
+	    The referree object tag value, or zero if the object is not
 	    tagged.
 	    To set the tag value to be associated with the object
 	    the agent sets the <code>jlong</code> pointed to by the parameter.
@@ -5345,11 +5345,11 @@
 	</param>
 	<param id="referrer_index">
 	  <jint/>
-	  <description>	    
+	  <description>
 	    For references of type <code>JVMTI_REFERENCE_FIELD</code> or
             <code>JVMTI_REFERENCE_STATIC_FIELD</code> the index
-	    of the field in the referrer object. The index is based on the 
-	    order of all the object's fields - see <internallink 
+	    of the field in the referrer object. The index is based on the
+	    order of all the object's fields - see <internallink
 	    id="JVMTI_REFERENCE_FIELD">JVMTI_REFERENCE_FIELD</internallink>
             or <internallink
 	    id="JVMTI_REFERENCE_STATIC_FIELD">JVMTI_REFERENCE_STATIC_FIELD
@@ -5362,7 +5362,7 @@
 	    For references of type <code>JVMTI_REFERENCE_CONSTANT_POOL</code>
 	    the index into the constant pool of the class - see
 	    <internallink id="JVMTI_REFERENCE_CONSTANT_POOL">
-	    JVMTI_REFERENCE_CONSTANT_POOL</internallink> for further 
+	    JVMTI_REFERENCE_CONSTANT_POOL</internallink> for further
 	    description.
 	    <p/>
 	    For references of other kinds the <code>referrer_index</code> is
@@ -5372,7 +5372,7 @@
         <param id="user_data">
 	  <outptr><void/></outptr>
 	  <description>
-	    The user supplied data that was passed into the iteration function. 
+	    The user supplied data that was passed into the iteration function.
 	  </description>
 	</param>
       </parameters>
@@ -5380,17 +5380,17 @@
 
     <function id="IterateOverObjectsReachableFromObject" num="109">
       <synopsis>Iterate Over Objects Reachable From Object</synopsis>
-      <description>	
+      <description>
         This function iterates over all objects that are directly
         and indirectly reachable from the specified object.
 	For each object <i>A</i> (known
-	as the referrer) with a reference to object <i>B</i> the specified 
+	as the referrer) with a reference to object <i>B</i> the specified
 	callback function is called to describe the object reference.
         The callback is called exactly once for each reference from a referrer;
         this is true even if there are reference cycles or multiple paths to
         the referrer.
         There may be more than one reference between a referrer and a referree,
-        These may be distinguished by the 
+        These may be distinguished by the
         <datalink id="jvmtiObjectReferenceCallback.reference_kind"></datalink> and
         <datalink id="jvmtiObjectReferenceCallback.referrer_index"></datalink>.
         The callback for an object will always occur after the callback for
@@ -5401,18 +5401,18 @@
         <p/>
         During the execution of this function the state of the heap
         does not change: no objects are allocated, no objects are
-        garbage collected, and the state of objects (including 
-        held values) does not change. 
-        As a result, threads executing Java 
+        garbage collected, and the state of objects (including
+        held values) does not change.
+        As a result, threads executing Java
         programming language code, threads attempting to resume the
-        execution of Java programming language code, and threads 
+        execution of Java programming language code, and threads
         attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
       <capabilities>
         <required id="can_tag_objects"></required>
       </capabilities>
-      <parameters>             
+      <parameters>
         <param id="object">
 	  <jobject/>
 	    <description>
@@ -5427,14 +5427,14 @@
 	      The callback to be called to describe each
 	      object reference.
 	    </description>
-	</param>		  
+	</param>
         <param id="user_data">
 	  <inbuf>
 	    <void/>
 	    <nullok><code>NULL</code> is passed as the user supplied data</nullok>
 	  </inbuf>
 	  <description>
-	    User supplied data to be passed to the callback. 
+	    User supplied data to be passed to the callback.
 	  </description>
 	</param>
       </parameters>
@@ -5447,9 +5447,9 @@
       <description>
         This function iterates over the root objects and all objects that
         are directly and indirectly reachable from the root objects.
-	The root objects comprise the set of system classes, 
-	JNI globals, references from thread stacks, and other objects used as roots 
-	for the purposes of garbage collection. 
+	The root objects comprise the set of system classes,
+	JNI globals, references from thread stacks, and other objects used as roots
+	for the purposes of garbage collection.
 	<p/>
 	For each root the <paramlink id="heap_root_callback"></paramlink>
 	or <paramlink id="stack_ref_callback"></paramlink> callback is called.
@@ -5462,7 +5462,7 @@
         this is true even if there are reference cycles or multiple paths to
         the referrer.
         There may be more than one reference between a referrer and a referree,
-        These may be distinguished by the 
+        These may be distinguished by the
         <datalink id="jvmtiObjectReferenceCallback.reference_kind"></datalink> and
         <datalink id="jvmtiObjectReferenceCallback.referrer_index"></datalink>.
         The callback for an object will always occur after the callback for
@@ -5472,26 +5472,26 @@
         references which are reported.
 	<p/>
 	Roots are always reported to the profiler before any object references
-	are reported. In other words, the <paramlink id="object_ref_callback"></paramlink> 
+	are reported. In other words, the <paramlink id="object_ref_callback"></paramlink>
 	callback will not be called until the appropriate callback has been called
-	for all roots. If the <paramlink id="object_ref_callback"></paramlink> callback is 
+	for all roots. If the <paramlink id="object_ref_callback"></paramlink> callback is
 	specified as <code>NULL</code> then this function returns after
 	reporting the root objects to the profiler.
         <p/>
         During the execution of this function the state of the heap
         does not change: no objects are allocated, no objects are
-        garbage collected, and the state of objects (including 
-        held values) does not change. 
-        As a result, threads executing Java 
+        garbage collected, and the state of objects (including
+        held values) does not change.
+        As a result, threads executing Java
         programming language code, threads attempting to resume the
-        execution of Java programming language code, and threads 
+        execution of Java programming language code, and threads
         attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
       <capabilities>
         <required id="can_tag_objects"></required>
       </capabilities>
-      <parameters>      	
+      <parameters>
         <param id="heap_root_callback">
 	  <ptrtype>
 	    <struct>jvmtiHeapRootCallback</struct>
@@ -5502,7 +5502,7 @@
 	      <code>JVMTI_HEAP_ROOT_JNI_GLOBAL</code>,
 	      <code>JVMTI_HEAP_ROOT_SYSTEM_CLASS</code>,
 	      <code>JVMTI_HEAP_ROOT_MONITOR</code>,
-	      <code>JVMTI_HEAP_ROOT_THREAD</code>, or 
+	      <code>JVMTI_HEAP_ROOT_THREAD</code>, or
 	      <code>JVMTI_HEAP_ROOT_OTHER</code>.
 	    </description>
 	</param>
@@ -5532,7 +5532,7 @@
 	    <nullok><code>NULL</code> is passed as the user supplied data</nullok>
 	  </inbuf>
 	  <description>
-	    User supplied data to be passed to the callback. 
+	    User supplied data to be passed to the callback.
 	  </description>
 	</param>
       </parameters>
@@ -5542,14 +5542,14 @@
 
     <function id="IterateOverHeap" num="111">
       <synopsis>Iterate Over Heap</synopsis>
-      <description>        
-        Iterate over all objects in the heap. This includes both reachable and 
+      <description>
+        Iterate over all objects in the heap. This includes both reachable and
 	unreachable objects.
 	<p/>
 	The <paramlink id="object_filter"></paramlink> parameter indicates the
 	objects for which the callback function is called. If this parameter
-	is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be 
-	called for every object that is tagged. If the parameter is 
+	is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be
+	called for every object that is tagged. If the parameter is
 	<code>JVMTI_HEAP_OBJECT_UNTAGGED</code> then the callback will only be
 	for objects that are not tagged. If the parameter
 	is <code>JVMTI_HEAP_OBJECT_EITHER</code> then the callback will be
@@ -5558,11 +5558,11 @@
         <p/>
         During the execution of this function the state of the heap
         does not change: no objects are allocated, no objects are
-        garbage collected, and the state of objects (including 
-        held values) does not change. 
-        As a result, threads executing Java 
+        garbage collected, and the state of objects (including
+        held values) does not change.
+        As a result, threads executing Java
         programming language code, threads attempting to resume the
-        execution of Java programming language code, and threads 
+        execution of Java programming language code, and threads
         attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
@@ -5591,7 +5591,7 @@
 	    <nullok><code>NULL</code> is passed as the user supplied data</nullok>
 	  </inbuf>
 	  <description>
-	    User supplied data to be passed to the callback. 
+	    User supplied data to be passed to the callback.
 	  </description>
 	</param>
       </parameters>
@@ -5602,15 +5602,15 @@
     <function id="IterateOverInstancesOfClass" num="112">
       <synopsis>Iterate Over Instances Of Class</synopsis>
       <description>
-        Iterate over all objects in the heap that are instances of the specified class. 
-        This includes direct instances of the specified class and 
+        Iterate over all objects in the heap that are instances of the specified class.
+        This includes direct instances of the specified class and
         instances of all subclasses of the specified class.
 	This includes both reachable and unreachable objects.
 	<p/>
 	The <paramlink id="object_filter"></paramlink> parameter indicates the
 	objects for which the callback function is called. If this parameter
-	is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be 
-	called for every object that is tagged. If the parameter is 
+	is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be
+	called for every object that is tagged. If the parameter is
 	<code>JVMTI_HEAP_OBJECT_UNTAGGED</code> then the callback will only be
 	called for objects that are not tagged. If the parameter
 	is <code>JVMTI_HEAP_OBJECT_EITHER</code> then the callback will be
@@ -5619,11 +5619,11 @@
 	<p/>
 	During the execution of this function the state of the heap
 	does not change: no objects are allocated, no objects are
-	garbage collected, and the state of objects (including 
-	held values) does not change. 
-	As a result, threads executing Java 
+	garbage collected, and the state of objects (including
+	held values) does not change.
+	As a result, threads executing Java
 	programming language code, threads attempting to resume the
-	execution of Java programming language code, and threads 
+	execution of Java programming language code, and threads
 	attempting to execute JNI functions are typically stalled.
       </description>
       <origin>new</origin>
@@ -5649,7 +5649,7 @@
 	  </ptrtype>
 	    <description>
 	      The iterator function to be called for each
-	      <paramlink id="klass"/> instance matching 
+	      <paramlink id="klass"/> instance matching
               the <paramlink id="object_filter"/>.
 	    </description>
 	</param>
@@ -5659,7 +5659,7 @@
 	    <nullok><code>NULL</code> is passed as the user supplied data</nullok>
 	  </inbuf>
 	  <description>
-	    User supplied data to be passed to the callback. 
+	    User supplied data to be passed to the callback.
 	  </description>
 	</param>
       </parameters>
@@ -5672,19 +5672,19 @@
   <category id="local" label="Local Variable">
 
     <intro>
-      These functions are used to retrieve or set the value of a local variable. 
+      These functions are used to retrieve or set the value of a local variable.
       The variable is identified by the depth of the frame containing its
-      value and the variable's slot number within that frame. 
-      The mapping of variables to 
-      slot numbers can be obtained with the function 
+      value and the variable's slot number within that frame.
+      The mapping of variables to
+      slot numbers can be obtained with the function
       <functionlink id="GetLocalVariableTable"></functionlink>.
     </intro>
 
     <function id="GetLocalObject" num="21">
       <synopsis>Get Local Variable - Object</synopsis>
       <description>
-	This function can be used to retrieve the value of a local 
-        variable whose type is <code>Object</code> or a subclass of <code>Object</code>. 
+	This function can be used to retrieve the value of a local
+        variable whose type is <code>Object</code> or a subclass of <code>Object</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -5712,7 +5712,7 @@
 	<param id="value_ptr">
 	  <outptr><jobject/></outptr>
 	    <description>
-	      On return, points to the variable's value. 
+	      On return, points to the variable's value.
 	    </description>
 	</param>
       </parameters>
@@ -5720,11 +5720,11 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
           The variable type is not
           <code>Object</code> or a subclass of <code>Object</code>.
 	</error>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  Not a visible frame
 	</error>
       </errors>
@@ -5736,7 +5736,7 @@
         This function can be used to retrieve the value of the local object
         variable at slot 0 (the "<code>this</code>" object) from non-static
         frames.  This function can retrieve the "<code>this</code>" object from
-        native method frames, whereas <code>GetLocalObject()</code> would 
+        native method frames, whereas <code>GetLocalObject()</code> would
         return <code>JVMTI_ERROR_OPAQUE_FRAME</code> in those cases.
       </description>
       <origin>new</origin>
@@ -5759,7 +5759,7 @@
 	<param id="value_ptr">
 	  <outptr><jobject/></outptr>
 	    <description>
-	      On return, points to the variable's value. 
+	      On return, points to the variable's value.
 	    </description>
 	</param>
       </parameters>
@@ -5772,10 +5772,10 @@
     <function id="GetLocalInt" num="22">
       <synopsis>Get Local Variable - Int</synopsis>
       <description>
-	This function can be used to retrieve the value of a local 
+	This function can be used to retrieve the value of a local
         variable whose type is <code>int</code>,
-        <code>short</code>, <code>char</code>, <code>byte</code>, or 
-	<code>boolean</code>. 
+        <code>short</code>, <code>char</code>, <code>byte</code>, or
+	<code>boolean</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -5803,7 +5803,7 @@
 	<param id="value_ptr">
 	  <outptr><jint/></outptr>
 	  <description>
-	    On return, points to the variable's value. 
+	    On return, points to the variable's value.
 	  </description>
 	</param>
       </parameters>
@@ -5811,13 +5811,13 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The variable type is not 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The variable type is not
           <code>int</code>, <code>short</code>,
-          <code>char</code>, <code>byte</code>, or 
+          <code>char</code>, <code>byte</code>, or
   	  <code>boolean</code>.
 	</error>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  Not a visible frame
 	</error>
       </errors>
@@ -5826,8 +5826,8 @@
     <function id="GetLocalLong" num="23">
       <synopsis>Get Local Variable - Long</synopsis>
       <description>
-	This function can be used to retrieve the value of a local 
-        variable whose type is <code>long</code>. 
+	This function can be used to retrieve the value of a local
+        variable whose type is <code>long</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -5855,7 +5855,7 @@
 	<param id="value_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    On return, points to the variable's value. 
+	    On return, points to the variable's value.
 	  </description>
 	</param>
       </parameters>
@@ -5863,10 +5863,10 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>long</code>.
 	</error>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  Not a visible frame
 	</error>
       </errors>
@@ -5875,8 +5875,8 @@
     <function id="GetLocalFloat" num="24">
       <synopsis>Get Local Variable - Float</synopsis>
       <description>
-	This function can be used to retrieve the value of a local 
-        variable whose type is <code>float</code>. 
+	This function can be used to retrieve the value of a local
+        variable whose type is <code>float</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -5904,7 +5904,7 @@
 	<param id="value_ptr">
 	  <outptr><jfloat/></outptr>
 	  <description>
-	    On return, points to the variable's value. 
+	    On return, points to the variable's value.
 	  </description>
 	</param>
       </parameters>
@@ -5912,10 +5912,10 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>float</code>.
 	</error>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  Not a visible frame
 	</error>
       </errors>
@@ -5924,8 +5924,8 @@
     <function id="GetLocalDouble" num="25">
       <synopsis>Get Local Variable - Double</synopsis>
       <description>
-	This function can be used to retrieve the value of a local 
-        variable whose type is <code>long</code>. 
+	This function can be used to retrieve the value of a local
+        variable whose type is <code>long</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -5953,7 +5953,7 @@
 	<param id="value_ptr">
 	  <outptr><jdouble/></outptr>
 	  <description>
-	    On return, points to the variable's value. 
+	    On return, points to the variable's value.
 	  </description>
 	</param>
       </parameters>
@@ -5961,10 +5961,10 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>double</code>.
 	</error>
-	<error id="JVMTI_ERROR_OPAQUE_FRAME"> 
+	<error id="JVMTI_ERROR_OPAQUE_FRAME">
 	  Not a visible frame
 	</error>
       </errors>
@@ -5973,8 +5973,8 @@
     <function id="SetLocalObject" num="26">
       <synopsis>Set Local Variable - Object</synopsis>
       <description>
-	This function can be used to set the value of a local 
-        variable whose type is <code>Object</code> or a subclass of <code>Object</code>. 
+	This function can be used to set the value of a local
+        variable whose type is <code>Object</code> or a subclass of <code>Object</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6015,7 +6015,7 @@
 	  <code>Object</code> or a subclass of <code>Object</code>.
 	</error>
 	<error id="JVMTI_ERROR_TYPE_MISMATCH">
-	  The supplied <paramlink id="value"/> is not compatible 
+	  The supplied <paramlink id="value"/> is not compatible
 	  with the variable type.
 	</error>
 	<error id="JVMTI_ERROR_OPAQUE_FRAME">
@@ -6027,10 +6027,10 @@
     <function id="SetLocalInt" num="27">
       <synopsis>Set Local Variable - Int</synopsis>
       <description>
-	This function can be used to set the value of a local 
+	This function can be used to set the value of a local
         variable whose type is <code>int</code>,
-        <code>short</code>, <code>char</code>, <code>byte</code>, or 
-	<code>boolean</code>. 
+        <code>short</code>, <code>char</code>, <code>byte</code>, or
+	<code>boolean</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6066,10 +6066,10 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
-	  The variable type is not 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
+	  The variable type is not
           <code>int</code>, <code>short</code>,
-          <code>char</code>, <code>byte</code>, or 
+          <code>char</code>, <code>byte</code>, or
   	  <code>boolean</code>.
 	</error>
 	<error id="JVMTI_ERROR_OPAQUE_FRAME">
@@ -6081,8 +6081,8 @@
     <function id="SetLocalLong" num="28">
       <synopsis>Set Local Variable - Long</synopsis>
       <description>
-	This function can be used to set the value of a local 
-        variable whose type is <code>long</code>. 
+	This function can be used to set the value of a local
+        variable whose type is <code>long</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6118,7 +6118,7 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>long</code>.
 	</error>
 	<error id="JVMTI_ERROR_OPAQUE_FRAME">
@@ -6130,8 +6130,8 @@
     <function id="SetLocalFloat" num="29">
       <synopsis>Set Local Variable - Float</synopsis>
       <description>
-	This function can be used to set the value of a local 
-        variable whose type is <code>float</code>. 
+	This function can be used to set the value of a local
+        variable whose type is <code>float</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6167,7 +6167,7 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>float</code>.
 	</error>
 	<error id="JVMTI_ERROR_OPAQUE_FRAME">
@@ -6179,8 +6179,8 @@
     <function id="SetLocalDouble" num="30">
       <synopsis>Set Local Variable - Double</synopsis>
       <description>
-	This function can be used to set the value of a local 
-        variable whose type is <code>double</code>. 
+	This function can be used to set the value of a local
+        variable whose type is <code>double</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6216,7 +6216,7 @@
 	<error id="JVMTI_ERROR_INVALID_SLOT">
 	  Invalid <code>slot</code>.
 	</error>
-	<error id="JVMTI_ERROR_TYPE_MISMATCH"> 
+	<error id="JVMTI_ERROR_TYPE_MISMATCH">
 	  The variable type is not <code>double</code>.
 	</error>
 	<error id="JVMTI_ERROR_OPAQUE_FRAME">
@@ -6267,7 +6267,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_DUPLICATE"> 
+	<error id="JVMTI_ERROR_DUPLICATE">
 	  The designated bytecode already has a breakpoint.
 	</error>
       </errors>
@@ -6304,7 +6304,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_FOUND"> 
+	<error id="JVMTI_ERROR_NOT_FOUND">
 	  There's no breakpoint at the designated bytecode.
 	</error>
       </errors>
@@ -6325,14 +6325,14 @@
 	by <code>klass</code> and
 	<code>field</code> is about to be accessed.
 	An event will be generated for each access of the field
-	until it is canceled with 
+	until it is canceled with
 	<functionlink id="ClearFieldAccessWatch"></functionlink>.
 	Field accesses from Java programming language code or from JNI code are watched,
 	fields modified by other means are not watched.
 	Note that <jvmti/> users should be aware that their own field accesses
 	will trigger the watch.
 	A field can only have one field access watch set.
-	Modification of a field is not considered an access--use 
+	Modification of a field is not considered an access--use
 	<functionlink id="SetFieldModificationWatch"></functionlink>
 	to monitor modifications.
       </description>
@@ -6356,7 +6356,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_DUPLICATE"> 
+	<error id="JVMTI_ERROR_DUPLICATE">
 	  The designated field is already being watched for accesses.
 	</error>
       </errors>
@@ -6365,8 +6365,8 @@
     <function id="ClearFieldAccessWatch" num="42">
       <synopsis>Clear Field Access Watch</synopsis>
       <description>
-	Cancel a field access watch previously set by 
-	<functionlink id="SetFieldAccessWatch"></functionlink>, on the 
+	Cancel a field access watch previously set by
+	<functionlink id="SetFieldAccessWatch"></functionlink>, on the
 	field specified
 	by <code>klass</code> and
 	<code>field</code>.
@@ -6391,7 +6391,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_FOUND"> 
+	<error id="JVMTI_ERROR_NOT_FOUND">
 	  The designated field is not being watched for accesses.
 	</error>
       </errors>
@@ -6405,7 +6405,7 @@
 	by <code>klass</code> and
 	<code>field</code> is about to be modified.
 	An event will be generated for each modification of the field
-	until it is canceled with 
+	until it is canceled with
 	<functionlink id="ClearFieldModificationWatch"></functionlink>.
 	Field modifications from Java programming language code or from JNI code are watched,
 	fields modified by other means are not watched.
@@ -6433,7 +6433,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_DUPLICATE"> 
+	<error id="JVMTI_ERROR_DUPLICATE">
 	  The designated field is already being watched for modifications.
 	</error>
       </errors>
@@ -6443,8 +6443,8 @@
       <synopsis>Clear Field Modification Watch</synopsis>
       <description>
 
-	Cancel a field modification watch previously set by 
-	<functionlink id="SetFieldModificationWatch"></functionlink>, on the 
+	Cancel a field modification watch previously set by
+	<functionlink id="SetFieldModificationWatch"></functionlink>, on the
 	field specified
 	by <code>klass</code> and
 	<code>field</code>.
@@ -6469,7 +6469,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_FOUND"> 
+	<error id="JVMTI_ERROR_NOT_FOUND">
 	  The designated field is not being watched for modifications.
 	</error>
       </errors>
@@ -6857,9 +6857,9 @@
 	<code>class_count_ptr</code>, and the array itself via
 	<code>classes_ptr</code>.
 	<p/>
-	Array classes of all types (including arrays of primitive types) are 
-	included in the returned list. Primitive classes (for example, 
-	<code>java.lang.Integer.TYPE</code>) are <i>not</i> included in this list. 
+	Array classes of all types (including arrays of primitive types) are
+	included in the returned list. Primitive classes (for example,
+	<code>java.lang.Integer.TYPE</code>) are <i>not</i> included in this list.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -6887,8 +6887,8 @@
       <synopsis>Get Classloader Classes</synopsis>
       <description>
 	Returns an array of those classes for which this class loader has
-	been recorded as an initiating loader. Each 
-	class in the returned array was created by this class loader, 
+	been recorded as an initiating loader. Each
+	class in the returned array was created by this class loader,
 	either by defining it directly or by delegation to another class loader.
 	See <vmspec chapter="5.3"/>.
 	<p/>
@@ -6930,14 +6930,14 @@
     <function id="GetClassSignature" phase="start" num="48">
       <synopsis>Get Class Signature</synopsis>
       <description>
-        For the class indicated by <code>klass</code>, return the 
-        <externallink id="docs/technotes/guides/jni/spec/types.html#type_signatures">JNI 
-            type signature</externallink> 
+        For the class indicated by <code>klass</code>, return the
+        <externallink id="jni/types.html#type-signatures">JNI
+            type signature</externallink>
         and the generic signature of the class.
         For example, <code>java.util.List</code> is <code>"Ljava/util/List;"</code>
         and <code>int[]</code> is <code>"[I"</code>
 	The returned name for primitive classes
-	is the type signature character of the corresponding primitive type. 
+	is the type signature character of the corresponding primitive type.
         For example, <code>java.lang.Integer.TYPE</code> is <code>"I"</code>.
       </description>
       <origin>jvmdiClone</origin>
@@ -6952,7 +6952,7 @@
 	</param>
 	<param id="signature_ptr">
 	  <allocbuf>
-            <char/>           
+            <char/>
             <nullok>the signature is not returned</nullok>
           </allocbuf>
 	  <description>
@@ -6962,14 +6962,14 @@
 	</param>
 	<param id="generic_ptr">
 	  <allocbuf>
-            <char/>           
+            <char/>
             <nullok>the generic signature is not returned</nullok>
           </allocbuf>
 	  <description>
 	    On return, points to the generic signature of the class, encoded as a
 	    <internallink id="mUTF">modified UTF-8</internallink> string.
             If there is no generic signature attribute for the class, then,
-            on return, points to <code>NULL</code>. 
+            on return, points to <code>NULL</code>.
 	  </description>
 	</param>
       </parameters>
@@ -6980,7 +6980,7 @@
     <function id="GetClassStatus" phase="start" num="49">
       <synopsis>Get Class Status</synopsis>
       <description>
-	Get the status of the class. Zero or more of the following bits can be 
+	Get the status of the class. Zero or more of the following bits can be
 	set.
 	<constants id="jvmtiClassStatus" label="Class Status Flags" kind="bits">
 	  <constant id="JVMTI_CLASS_STATUS_VERIFIED" num="1">
@@ -6999,7 +6999,7 @@
 	    Class is an array.  If set, all other bits are zero.
 	  </constant>
 	  <constant id="JVMTI_CLASS_STATUS_PRIMITIVE" num="32">
-	    Class is a primitive class (for example, <code>java.lang.Integer.TYPE</code>).  
+	    Class is a primitive class (for example, <code>java.lang.Integer.TYPE</code>).
 	    If set, all other bits are zero.
 	  </constant>
 	</constants>
@@ -7017,7 +7017,7 @@
 	<param id="status_ptr">
 	  <outptr><jint/></outptr>
 	  <description>
-	    On return, points to the current state of this class as one or 
+	    On return, points to the current state of this class as one or
 	    more of the <internallink id="jvmtiClassStatus">class status flags</internallink>.
 	  </description>
 	</param>
@@ -7030,11 +7030,11 @@
       <synopsis>Get Source File Name</synopsis>
       <description>
 	For the class indicated by <code>klass</code>, return the source file
-	name via <code>source_name_ptr</code>. The returned string 
-	is a file name only and never contains a directory name. 
+	name via <code>source_name_ptr</code>. The returned string
+	is a file name only and never contains a directory name.
 	<p/>
-	For primitive classes (for example, <code>java.lang.Integer.TYPE</code>) 
-	and for arrays this function returns 
+	For primitive classes (for example, <code>java.lang.Integer.TYPE</code>)
+	and for arrays this function returns
 	<errorlink id="JVMTI_ERROR_ABSENT_INFORMATION"></errorlink>.
       </description>
       <origin>jvmdi</origin>
@@ -7057,7 +7057,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  Class information does not include a source file name. This includes
 	  cases where the class is an array class or primitive class.
 	</error>
@@ -7072,17 +7072,17 @@
 	via <code>modifiers_ptr</code>.
 	Access flags are defined in <vmspec chapter="4"/>.
 	<p/>
-	If the class is an array class, then its public, private, and protected 
-	modifiers are the same as those of its component type. For arrays of 
-	primitives, this component type is represented by one of the primitive 
-	classes (for example, <code>java.lang.Integer.TYPE</code>). 
+	If the class is an array class, then its public, private, and protected
+	modifiers are the same as those of its component type. For arrays of
+	primitives, this component type is represented by one of the primitive
+	classes (for example, <code>java.lang.Integer.TYPE</code>).
 	<p/>
-	If the class is a primitive class, its public modifier is always true, 
-	and its protected and private modifiers are always false. 
+	If the class is a primitive class, its public modifier is always true,
+	and its protected and private modifiers are always false.
 	<p/>
-	If the class is an array class or a primitive class then its final 
-	modifier is always true and its interface modifier is always false. 
-	The values of its other modifiers are not determined by this specification. 
+	If the class is an array class or a primitive class then its final
+	modifier is always true and its interface modifier is always false.
+	The values of its other modifiers are not determined by this specification.
 
       </description>
       <origin>jvmdi</origin>
@@ -7112,7 +7112,7 @@
       <description>
 	For the class indicated by <code>klass</code>, return a count of
 	methods via <code>method_count_ptr</code> and a list of
-	method IDs via <code>methods_ptr</code>. The method list contains 
+	method IDs via <code>methods_ptr</code>. The method list contains
 	constructors and static initializers as well as true methods.
 	Only directly declared methods are returned (not inherited methods).
 	An empty method list is returned for array classes and primitive classes
@@ -7185,7 +7185,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_CLASS_NOT_PREPARED"> 
+	<error id="JVMTI_ERROR_CLASS_NOT_PREPARED">
 	  <paramlink id="klass"></paramlink> is not prepared.
 	</error>
       </errors>
@@ -7194,7 +7194,7 @@
     <function id="GetImplementedInterfaces" phase="start" num="54">
       <synopsis>Get Implemented Interfaces</synopsis>
       <description>
-	Return the direct super-interfaces of this class. For a class, this 
+	Return the direct super-interfaces of this class. For a class, this
 	function returns the interfaces declared in its <code>implements</code>
 	clause. For an interface, this function returns the interfaces declared in
 	its <code>extends</code> clause.
@@ -7225,7 +7225,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_CLASS_NOT_PREPARED"> 
+	<error id="JVMTI_ERROR_CLASS_NOT_PREPARED">
 	  <paramlink id="klass"></paramlink> is not prepared.
 	</error>
       </errors>
@@ -7234,10 +7234,10 @@
     <function id="GetClassVersionNumbers" phase="start" num="145" since="1.1">
       <synopsis>Get Class Version Numbers</synopsis>
       <description>
-        For the class indicated by <code>klass</code>, 
+        For the class indicated by <code>klass</code>,
         return the minor and major version numbers,
         as defined in
-        <vmspec chapter="4"/>. 
+        <vmspec chapter="4"/>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -7253,7 +7253,7 @@
 	  <outptr><jint/></outptr>
 	  <description>
 	    On return, points to the value of the
-            <code>minor_version</code> item of the 
+            <code>minor_version</code> item of the
             Class File Format.
             Note: to be consistent with the Class File Format,
             the minor version number is the first parameter.
@@ -7263,13 +7263,13 @@
 	  <outptr><jint/></outptr>
 	  <description>
 	    On return, points to the value of the
-            <code>major_version</code> item of the 
+            <code>major_version</code> item of the
             Class File Format.
 	  </description>
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  The class is a primitive or array class.
 	</error>
       </errors>
@@ -7278,13 +7278,13 @@
     <function id="GetConstantPool" phase="start" num="146" since="1.1">
       <synopsis>Get Constant Pool</synopsis>
       <description>
-	For the class indicated by <code>klass</code>, 
+	For the class indicated by <code>klass</code>,
         return the raw bytes of the constant pool in the format of the
-        <code>constant_pool</code> item of 
+        <code>constant_pool</code> item of
         <vmspec chapter="4"/>.
         The format of the constant pool may differ between versions
-        of the Class File Format, so, the 
-        <functionlink id="GetClassVersionNumbers">minor and major 
+        of the Class File Format, so, the
+        <functionlink id="GetClassVersionNumbers">minor and major
         class version numbers</functionlink> should be checked for
         compatibility.
         <p/>
@@ -7294,17 +7294,17 @@
         more or fewer entries than the defining constant pool.
         Entries may be in a different order.
         The constant pool returned by GetConstantPool() will match the
-        constant pool used by 
+        constant pool used by
         <functionlink id="GetBytecodes">GetBytecodes()</functionlink>.
         That is, the bytecodes returned by GetBytecodes() will have
         constant pool indices which refer to constant pool entries returned
         by GetConstantPool().
-        Note that since <functionlink id="RetransformClasses"/> 
-        and <functionlink id="RedefineClasses"/> can change 
+        Note that since <functionlink id="RetransformClasses"/>
+        and <functionlink id="RedefineClasses"/> can change
         the constant pool, the constant pool returned by this function
-        can change accordingly.  Thus, the correspondence between 
+        can change accordingly.  Thus, the correspondence between
         GetConstantPool() and GetBytecodes() does not hold if there
-        is an intervening class retransformation or redefinition. 
+        is an intervening class retransformation or redefinition.
         The value of a constant pool entry used by a given bytecode will
         match that of the defining class file (even if the indices don't match).
         Constant pool entries which are not used directly or indirectly by
@@ -7342,13 +7342,13 @@
 	  <allocbuf outcount="constant_pool_byte_count_ptr"><uchar/></allocbuf>
 	    <description>
 	      On return, points to the raw constant pool, that is the bytes
-              defined by the <code>constant_pool</code> item of the 
+              defined by the <code>constant_pool</code> item of the
               Class File Format
 	    </description>
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  The class is a primitive or array class.
 	</error>
       </errors>
@@ -7360,7 +7360,7 @@
 	Determines whether a class object reference represents an interface.
 	The <code>jboolean</code> result is
 	<code>JNI_TRUE</code> if the "class" is actually an interface,
-	<code>JNI_FALSE</code> otherwise. 
+	<code>JNI_FALSE</code> otherwise.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -7390,7 +7390,7 @@
 	Determines whether a class object reference represents an array.
 	The <code>jboolean</code> result is
 	<code>JNI_TRUE</code> if the class is an array,
-	<code>JNI_FALSE</code> otherwise. 
+	<code>JNI_FALSE</code> otherwise.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -7420,11 +7420,11 @@
 	Determines whether a class is modifiable.
         If a class is modifiable (<paramlink id="is_modifiable_class_ptr"/>
         returns <code>JNI_TRUE</code>) the class can be
-        redefined with <functionlink id="RedefineClasses"/> (assuming 
+        redefined with <functionlink id="RedefineClasses"/> (assuming
         the agent possesses the
         <fieldlink id="can_redefine_classes" struct="jvmtiCapabilities"/>
         capability) or
-        retransformed with <functionlink id="RetransformClasses"/> (assuming 
+        retransformed with <functionlink id="RetransformClasses"/> (assuming
         the agent possesses the
         <fieldlink id="can_retransform_classes" struct="jvmtiCapabilities"/>
         capability).
@@ -7433,7 +7433,7 @@
         redefined nor retransformed.
         <p/>
         Primitive classes (for example, <code>java.lang.Integer.TYPE</code>),
-        array classes, and some implementation defined classes are never modifiable. 
+        array classes, and some implementation defined classes are never modifiable.
         <p/>
       </description>
       <origin>new</origin>
@@ -7511,11 +7511,11 @@
     <function id="GetSourceDebugExtension" phase="start" num="90">
       <synopsis>Get Source Debug Extension</synopsis>
       <description>
-	For the class indicated by <code>klass</code>, return the debug 
+	For the class indicated by <code>klass</code>, return the debug
         extension via <code>source_debug_extension_ptr</code>.
-        The returned string 
+        The returned string
 	contains exactly the debug extension information present in the
-	class file of <code>klass</code>. 
+	class file of <code>klass</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -7537,7 +7537,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  Class information does not include a debug extension.
 	</error>
       </errors>
@@ -7546,15 +7546,15 @@
     <function id="RetransformClasses" jkernel="yes" num="152" since="1.1">
       <synopsis>Retransform Classes</synopsis>
       <description>
-        This function facilitates the 
+        This function facilitates the
         <internallink id="bci">bytecode instrumentation</internallink>
         of already loaded classes.
         To replace the class definition without reference to the existing
-        bytecodes, as one might do when recompiling from source for 
+        bytecodes, as one might do when recompiling from source for
         fix-and-continue debugging, <functionlink id="RedefineClasses"/>
         function should be used instead.
         <p/>
-        When classes are initially loaded or when they are 
+        When classes are initially loaded or when they are
         <functionlink id="RedefineClasses">redefined</functionlink>,
         the initial class file bytes can be transformed with the
         <eventlink id="ClassFileLoadHook"/> event.
@@ -7562,16 +7562,16 @@
         (whether or not a transformation has previously occurred).
         This retransformation follows these steps:
         <ul>
-          <li>starting from the initial class file bytes 
+          <li>starting from the initial class file bytes
           </li>
           <li>for each <fieldlink id="can_retransform_classes"
                      struct="jvmtiCapabilities">retransformation
                                                 incapable</fieldlink>
             agent which received a
             <code>ClassFileLoadHook</code> event during the previous
-            load or redefine, the bytes it returned 
+            load or redefine, the bytes it returned
             (via the <code>new_class_data</code> parameter)
-            are reused as the output of the transformation; 
+            are reused as the output of the transformation;
             note that this is equivalent to reapplying
             the previous transformation, unaltered. except that
             the <code>ClassFileLoadHook</code> event
@@ -7589,7 +7589,7 @@
         </ul>
         See the <eventlink id="ClassFileLoadHook"/> event for more details.
         <p/>
-        The initial class file bytes represent the bytes passed to 
+        The initial class file bytes represent the bytes passed to
         <code>ClassLoader.defineClass</code>
         or <code>RedefineClasses</code> (before any transformations
         were applied), however they may not exactly match them.
@@ -7601,13 +7601,13 @@
         order may not be preserved.
         <p/>
         Retransformation can cause new versions of methods to be installed.
-        Old method versions may become 
+        Old method versions may become
         <internallink id="obsoleteMethods">obsolete</internallink>
-        The new method version will be used on new invokes.  
+        The new method version will be used on new invokes.
         If a method has active stack frames, those active frames continue to
-        run the bytecodes of the original method version. 
-        <p/>
-        This function does not cause any initialization except that which 
+        run the bytecodes of the original method version.
+        <p/>
+        This function does not cause any initialization except that which
         would occur under the customary JVM semantics.
         In other words, retransforming a class does not cause its initializers to be
         run. The values of static fields will remain as they were
@@ -7620,7 +7620,7 @@
         All attributes are updated.
         <p/>
         Instances of the retransformed class are not affected -- fields retain their
-        previous values.  
+        previous values.
         <functionlink id="GetTag">Tags</functionlink> on the instances are
         also unaffected.
         <p/>
@@ -7629,8 +7629,8 @@
         will be sent.
         <p/>
         The retransformation may change method bodies, the constant pool and attributes.
-        The retransformation must not add, remove or rename fields or methods, change the 
-        signatures of methods, change modifiers, or change inheritance.  
+        The retransformation must not add, remove or rename fields or methods, change the
+        signatures of methods, change modifiers, or change inheritance.
         These restrictions may be lifted in future versions.
         See the error return description below for information on error codes
         returned if an unsupported retransformation is attempted.
@@ -7640,7 +7640,7 @@
         If any error code is returned other than <code>JVMTI_ERROR_NONE</code>,
         none of the classes to be retransformed will have a new definition installed.
         When this function returns (with the error code of <code>JVMTI_ERROR_NONE</code>)
-        all of the classes to be retransformed will have their new definitions installed.        
+        all of the classes to be retransformed will have their new definitions installed.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -7663,7 +7663,7 @@
       </parameters>
       <errors>
         <error id="JVMTI_ERROR_UNMODIFIABLE_CLASS">
-          One of the <paramlink id="classes"/> cannot be modified. 
+          One of the <paramlink id="classes"/> cannot be modified.
           See <functionlink id="IsModifiableClass"/>.
         </error>
         <error id="JVMTI_ERROR_INVALID_CLASS">
@@ -7676,7 +7676,7 @@
           A retransformed class file is malformed (The VM would return a <code>ClassFormatError</code>).
         </error>
         <error id="JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION">
-          The retransformed class file definitions would lead to a circular definition 
+          The retransformed class file definitions would lead to a circular definition
           (the VM would return a <code>ClassCircularityError</code>).
         </error>
         <error id="JVMTI_ERROR_FAILS_VERIFICATION">
@@ -7739,22 +7739,22 @@
 	This function is used to replace the definition of a class
 	with a new definition, as might be needed in fix-and-continue
 	debugging.
-	Where the existing class file bytes are to be transformed, for 
+	Where the existing class file bytes are to be transformed, for
 	example in
 	<internallink id="bci">bytecode instrumentation</internallink>,
 	<functionlink id="RetransformClasses"/> should be used.
 	<p/>
 	Redefinition can cause new versions of methods to be installed.
-	Old method versions may become 
+	Old method versions may become
 	<internallink id="obsoleteMethods">obsolete</internallink>
-	The new method version will be used on new invokes.  
+	The new method version will be used on new invokes.
 	If a method has active stack frames, those active frames continue to
-        run the bytecodes of the original method version. 
-	If resetting of stack frames is desired, use 
+        run the bytecodes of the original method version.
+	If resetting of stack frames is desired, use
 	<functionlink id="PopFrame"></functionlink>
 	to pop frames with obsolete method versions.
 	<p/>
-	This function does not cause any initialization except that which 
+	This function does not cause any initialization except that which
 	would occur under the customary JVM semantics.
 	In other words, redefining a class does not cause its initializers to be
 	run. The values of static fields will remain as they were
@@ -7767,7 +7767,7 @@
 	All attributes are updated.
 	<p/>
         Instances of the redefined class are not affected -- fields retain their
-        previous values.  
+        previous values.
 	<functionlink id="GetTag">Tags</functionlink> on the instances are
         also unaffected.
 	<p/>
@@ -7776,8 +7776,8 @@
         will be sent (if enabled), but no other <jvmti/> events will be sent.
         <p/>
         The redefinition may change method bodies, the constant pool and attributes.
-        The redefinition must not add, remove or rename fields or methods, change the 
-        signatures of methods, change modifiers, or change inheritance.  
+        The redefinition must not add, remove or rename fields or methods, change the
+        signatures of methods, change modifiers, or change inheritance.
         These restrictions may be lifted in future versions.
 	See the error return description below for information on error codes
 	returned if an unsupported redefinition is attempted.
@@ -7788,7 +7788,7 @@
         If any error code is returned other than <code>JVMTI_ERROR_NONE</code>,
         none of the classes to be redefined will have a new definition installed.
         When this function returns (with the error code of <code>JVMTI_ERROR_NONE</code>)
-        all of the classes to be redefined will have their new definitions installed.        
+        all of the classes to be redefined will have their new definitions installed.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -7827,7 +7827,7 @@
 	  A new class file is malformed (The VM would return a <code>ClassFormatError</code>).
 	</error>
 	<error id="JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION">
-	  The new class file definitions would lead to a circular definition 
+	  The new class file definitions would lead to a circular definition
 	  (the VM would return a <code>ClassCircularityError</code>).
 	</error>
 	<error id="JVMTI_ERROR_FAILS_VERIFICATION">
@@ -7876,7 +7876,7 @@
 	For the object indicated by <code>object</code>,
 	return via <code>size_ptr</code> the size of the object.
         This size is an implementation-specific approximation of
-        the amount of storage consumed by this object. 
+        the amount of storage consumed by this object.
         It may include some or all of the object's overhead, and thus
         is useful for comparison within an implementation but not
         between implementations.
@@ -7909,11 +7909,11 @@
 	For the object indicated by <code>object</code>,
 	return via <code>hash_code_ptr</code> a hash code.
         This hash code could be used to maintain a hash table of object references,
-        however, on some implementations this can cause significant performance 
-        impacts--in most cases 
-        <internallink id="Heap">tags</internallink> 
+        however, on some implementations this can cause significant performance
+        impacts--in most cases
+        <internallink id="Heap">tags</internallink>
         will be a more efficient means of associating information with objects.
-	This function guarantees 
+	This function guarantees
 	the same hash code value for a particular object throughout its life
       </description>
       <origin>jvmdi</origin>
@@ -7979,7 +7979,7 @@
       </typedef>
       <description>
 	Get information about the object's monitor.
-	The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure 
+	The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure
 	are filled in with information about usage of the monitor.
 	  <todo>
 	    Decide and then clarify suspend requirements.
@@ -7999,7 +7999,7 @@
 	<param id="info_ptr">
 	  <outptr><struct>jvmtiMonitorUsage</struct></outptr>
 	  <description>
-	    On return, filled with monitor information for the 
+	    On return, filled with monitor information for the
 	    specified object.
 	  </description>
 	</param>
@@ -8014,7 +8014,7 @@
       <description>
         Return the list of object monitors.
         <p/>
-        Note: details about each monitor can be examined with 
+        Note: details about each monitor can be examined with
         <functionlink id="GetObjectMonitorUsage"></functionlink>.
       </description>
       <origin>new</origin>
@@ -8025,7 +8025,7 @@
         <param id="monitorCnt">
 	  <outptr><jint/></outptr>
 	  <description>
-	    On return, pointer to the number 
+	    On return, pointer to the number
 	    of monitors returned in <code>monitors_ptr</code>.
 	  </description>
 	</param>
@@ -8056,7 +8056,7 @@
 	<paramlink id="signature_ptr"/>.
 	<p/>
         Field signatures are defined in the
-        <externallink id="docs/technotes/guides/jni/spec/jniTOC.html">JNI Specification</externallink>
+        <externallink id="jni/index.html">JNI Specification</externallink>
         and are referred to as <code>field descriptors</code> in
         <vmspec chapter="4.3.2"/>.
       </description>
@@ -8098,14 +8098,14 @@
 	</param>
 	<param id="generic_ptr">
 	  <allocbuf>
-            <char/>           
+            <char/>
             <nullok>the generic signature is not returned</nullok>
           </allocbuf>
 	  <description>
 	    On return, points to the generic signature of the field, encoded as a
 	    <internallink id="mUTF">modified UTF-8</internallink> string.
             If there is no generic signature attribute for the field, then,
-            on return, points to <code>NULL</code>. 
+            on return, points to <code>NULL</code>.
 	  </description>
 	</param>
       </parameters>
@@ -8187,7 +8187,7 @@
       <description>
 	For the field indicated by <code>klass</code> and <code>field</code>, return a
 	value indicating whether the field is synthetic via <code>is_synthetic_ptr</code>.
-	Synthetic fields are generated by the compiler but not present in the 
+	Synthetic fields are generated by the compiler but not present in the
 	original source code.
       </description>
       <origin>jvmdi</origin>
@@ -8241,7 +8241,7 @@
       An original method version which is not equivalent to the
       new method version is called obsolete and is assigned a new method ID;
       the original method ID now refers to the new method version.
-      A method ID can be tested for obsolescence with 
+      A method ID can be tested for obsolescence with
       <functionlink id="IsMethodObsolete"/>.
     </intro>
 
@@ -8253,8 +8253,8 @@
 	<code>signature_ptr</code>.
         <p/>
         Method signatures are defined in the
-        <externallink id="docs/technotes/guides/jni/spec/jniTOC.html">JNI Specification</externallink>
-        and are referred to as <code>method descriptors</code> in 
+        <externallink id="jni/index.html">JNI Specification</externallink>
+        and are referred to as <code>method descriptors</code> in
         <vmspec chapter="4.3.3"/>.
 	Note this is different
 	than method signatures as defined in the <i>Java Language Specification</i>.
@@ -8291,14 +8291,14 @@
 	</param>
 	<param id="generic_ptr">
 	  <allocbuf>
-            <char/>           
+            <char/>
             <nullok>the generic signature is not returned</nullok>
           </allocbuf>
 	  <description>
 	    On return, points to the generic signature of the method, encoded as a
 	    <internallink id="mUTF">modified UTF-8</internallink> string.
             If there is no generic signature attribute for the method, then,
-            on return, points to <code>NULL</code>. 
+            on return, points to <code>NULL</code>.
 	  </description>
 	</param>
       </parameters>
@@ -8379,7 +8379,7 @@
 	  For the method indicated by <code>method</code>,
 	  return the number of local variable slots used by the method,
 	  including the local variables used to pass parameters to the
-	  method on its invocation. 
+	  method on its invocation.
 	  <p/>
 	  See <code>max_locals</code> in <vmspec chapter="4.7.3"/>.
       </description>
@@ -8465,7 +8465,7 @@
 	For the method indicated by <code>method</code>,
 	return a table of source line number entries. The size of the table is
 	returned via <code>entry_count_ptr</code> and the table itself is
-	returned via <code>table_ptr</code>. 
+	returned via <code>table_ptr</code>.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -8498,7 +8498,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  Class information does not include line numbers.
 	</error>
       </errors>
@@ -8510,10 +8510,10 @@
 	For the method indicated by <code>method</code>,
 	return the beginning and ending addresses through
 	<code>start_location_ptr</code> and <code>end_location_ptr</code>. In a
-	conventional byte code indexing scheme, 
+	conventional byte code indexing scheme,
 	<code>start_location_ptr</code> will always point to zero
-	and <code>end_location_ptr</code> 
-	will always point to the byte code count minus one. 
+	and <code>end_location_ptr</code>
+	will always point to the byte code count minus one.
       </description>
       <origin>jvmdi</origin>
       <capabilities>
@@ -8534,9 +8534,9 @@
 	<param id="start_location_ptr">
 	  <outptr><jlocation/></outptr>
 	  <description>
-	    On return, points to the first location, or 
+	    On return, points to the first location, or
 	    <code>-1</code> if location information is not available.
-	    If the information is available and 
+	    If the information is available and
 	    <functionlink id="GetJLocationFormat"></functionlink>
 	    returns <datalink id="JVMTI_JLOCATION_JVMBCI"></datalink>
 	    then this will always be zero.
@@ -8551,7 +8551,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_ABSENT_INFORMATION"> 
+	<error id="JVMTI_ERROR_ABSENT_INFORMATION">
 	  Class information does not include method sizes.
 	</error>
       </errors>
@@ -8571,7 +8571,7 @@
 	  <jint/>
 	  <description>
             The length of the valid section for this local variable.
-	    The last code array index where the local variable is valid 
+	    The last code array index where the local variable is valid
             is <code>start_location + length</code>.
 	  </description>
 	</field>
@@ -8596,7 +8596,7 @@
 	  <description>
 	    The local variable's generic signature, encoded as a
 	    <internallink id="mUTF">modified UTF-8</internallink> string.
-            The value of this field will be <code>NULL</code> for any local 
+            The value of this field will be <code>NULL</code> for any local
             variable which does not have a generic type.
 	  </description>
 	</field>
@@ -8722,7 +8722,7 @@
       <description>
 	For the method indicated by <code>method</code>, return a
 	value indicating whether the method is synthetic via <code>is_synthetic_ptr</code>.
-	Synthetic methods are generated by the compiler but not present in the 
+	Synthetic methods are generated by the compiler but not present in the
 	original source code.
       </description>
       <origin>jvmdi</origin>
@@ -8793,7 +8793,7 @@
 	This function modifies the failure handling of
         native method resolution by allowing retry
         with a prefix applied to the name.
-        When used with the 
+        When used with the
         <eventlink id="ClassFileLoadHook">ClassFileLoadHook
         event</eventlink>, it enables native methods to be
         <internallink id="bci">instrumented</internallink>.
@@ -8805,7 +8805,7 @@
         <example>
 native boolean foo(int x);</example>
         <p/>
-        We could transform the class file (with the 
+        We could transform the class file (with the
         ClassFileLoadHook event) so that this becomes:
         <example>
 boolean foo(int x) {
@@ -8823,28 +8823,28 @@
         better but would make these examples less readable.
         <p/>
         The wrapper will allow data to be collected on the native
-        method call, but now the problem becomes linking up the  
-        wrapped method with the native implementation.  
-        That is, the method <code>wrapped_foo</code> needs to be 
+        method call, but now the problem becomes linking up the
+        wrapped method with the native implementation.
+        That is, the method <code>wrapped_foo</code> needs to be
         resolved to the native implementation of <code>foo</code>,
         which might be:
         <example>
 Java_somePackage_someClass_foo(JNIEnv* env, jint x)</example>
         <p/>
         This function allows the prefix to be specified and the
-        proper resolution to occur.  
+        proper resolution to occur.
         Specifically, when the standard resolution fails, the
         resolution is retried taking the prefix into consideration.
         There are two ways that resolution occurs, explicit
         resolution with the JNI function <code>RegisterNatives</code>
-        and the normal automatic resolution.  For 
-        <code>RegisterNatives</code>, the VM will attempt this 
+        and the normal automatic resolution.  For
+        <code>RegisterNatives</code>, the VM will attempt this
         association:
         <example>
 method(foo) -> nativeImplementation(foo)</example>
         <p/>
         When this fails, the resolution will be retried with
-        the specified prefix prepended to the method name, 
+        the specified prefix prepended to the method name,
         yielding the correct resolution:
         <example>
 method(wrapped_foo) -> nativeImplementation(foo)</example>
@@ -8854,7 +8854,7 @@
 method(wrapped_foo) -> nativeImplementation(wrapped_foo)</example>
         <p/>
         When this fails, the resolution will be retried with
-        the specified prefix deleted from the implementation name, 
+        the specified prefix deleted from the implementation name,
         yielding the correct resolution:
         <example>
 method(wrapped_foo) -> nativeImplementation(foo)</example>
@@ -8863,7 +8863,7 @@
         resolution fails, native methods can be wrapped selectively.
         <p/>
         Since each <jvmti/> environment is independent and
-        can do its own transformation of the bytecodes, more 
+        can do its own transformation of the bytecodes, more
         than one layer of wrappers may be applied. Thus each
         environment needs its own prefix.  Since transformations
         are applied in order, the prefixes, if applied, will
@@ -8871,21 +8871,21 @@
         The order of transformation application is described in
         the <eventlink id="ClassFileLoadHook"/> event.
         Thus if three environments applied
-        wrappers, <code>foo</code> might become 
+        wrappers, <code>foo</code> might become
         <code>$env3_$env2_$env1_foo</code>.  But if, say,
         the second environment did not apply a wrapper to
-        <code>foo</code> it would be just 
-        <code>$env3_$env1_foo</code>.  To be able to 
+        <code>foo</code> it would be just
+        <code>$env3_$env1_foo</code>.  To be able to
         efficiently determine the sequence of prefixes,
         an intermediate prefix is only applied if its non-native
-        wrapper exists.  Thus, in the last example, even though 
+        wrapper exists.  Thus, in the last example, even though
         <code>$env1_foo</code> is not a native method, the
-        <code>$env1_</code> prefix is applied since 
+        <code>$env1_</code> prefix is applied since
         <code>$env1_foo</code> exists.
         <p/>
         Since the prefixes are used at resolution time
         and since resolution may be arbitrarily delayed, a
-        native method prefix must remain set as long as there 
+        native method prefix must remain set as long as there
         are corresponding prefixed native methods.
       </description>
       <origin>new</origin>
@@ -8918,7 +8918,7 @@
          For a meta-agent that performs multiple independent class
          file transformations (for example as a proxy for another
          layer of agents) this function allows each transformation
-         to have its own prefix.  
+         to have its own prefix.
          The prefixes are applied in the order supplied and are
          processed in the same manor as described for the
          application of prefixes from multiple <jvmti/> environments
@@ -8929,13 +8929,13 @@
          disables prefixing in this environment.
          <p/>
          <functionlink id="SetNativeMethodPrefix"/> and this function
-         are the two ways to set the prefixes.  
-         Calling <code>SetNativeMethodPrefix</code> with 
-         a prefix is the same as calling this function with 
-         <paramlink id="prefix_count"/> of <code>1</code>. 
-         Calling <code>SetNativeMethodPrefix</code> with 
-         <code>NULL</code> is the same as calling this function with 
-         <paramlink id="prefix_count"/> of <code>0</code>. 
+         are the two ways to set the prefixes.
+         Calling <code>SetNativeMethodPrefix</code> with
+         a prefix is the same as calling this function with
+         <paramlink id="prefix_count"/> of <code>1</code>.
+         Calling <code>SetNativeMethodPrefix</code> with
+         <code>NULL</code> is the same as calling this function with
+         <paramlink id="prefix_count"/> of <code>0</code>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -9014,16 +9014,16 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER"> 
+	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
 	  Not monitor owner
-	</error>        
+	</error>
       </errors>
     </function>
 
     <function id="RawMonitorEnter" phase="any" callbacksafe="safe" impl="innative notrace" num="33">
       <synopsis>Raw Monitor Enter</synopsis>
       <description>
-	Gain exclusive ownership of a raw monitor.  
+	Gain exclusive ownership of a raw monitor.
         The same thread may enter a monitor more then once.
         The thread must
         <functionlink id="RawMonitorExit">exit</functionlink>
@@ -9064,7 +9064,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER"> 
+	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
 	  Not monitor owner
 	</error>
       </errors>
@@ -9075,9 +9075,9 @@
       <description>
         Wait for notification of the raw monitor.
         <p/>
-        Causes the current thread to wait until either another thread calls 
-        <functionlink id="RawMonitorNotify"/> or 
-        <functionlink id="RawMonitorNotifyAll"/> 
+        Causes the current thread to wait until either another thread calls
+        <functionlink id="RawMonitorNotify"/> or
+        <functionlink id="RawMonitorNotifyAll"/>
         for the specified raw monitor, or the specified
         <paramlink id="millis">timeout</paramlink>
         has elapsed.
@@ -9102,10 +9102,10 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER"> 
+	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
 	  Not monitor owner
 	</error>
-	<error id="JVMTI_ERROR_INTERRUPT"> 
+	<error id="JVMTI_ERROR_INTERRUPT">
 	  Wait was interrupted, try again
 	</error>
       </errors>
@@ -9151,7 +9151,7 @@
 	</param>
       </parameters>
       <errors>
-	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER"> 
+	<error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
 	  Not monitor owner
 	</error>
       </errors>
@@ -9161,7 +9161,7 @@
     <function id="GetRawMonitorUse" num="118">
       <synopsis>Get Raw Monitor Use</synopsis>
       <description>
-        The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure 
+        The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure
         are filled in with information about usage of the raw monitor.
       </description>
       <origin>new</origin>
@@ -9178,7 +9178,7 @@
         <param id="info_ptr">
 	  <outptr><struct>jvmtiMonitorUsage</struct></outptr>
 	  <description>
-	    On return, filled with monitor information for the 
+	    On return, filled with monitor information for the
 	    specified raw monitor.
 	  </description>
 	</param>
@@ -9192,7 +9192,7 @@
       <description>
         Return the list of raw monitors.
         <p/>
-        Note: details about each monitor can be examined with 
+        Note: details about each monitor can be examined with
         <functionlink id="GetRawMonitorUse"></functionlink>.
       </description>
       <origin>new</origin>
@@ -9203,7 +9203,7 @@
         <param id="monitorCnt">
 	  <outptr><jint/></outptr>
 	  <description>
-	    On return, pointer to the number 
+	    On return, pointer to the number
 	    of monitors returned in <code>monitors_ptr</code>.
 	  </description>
 	</param>
@@ -9223,13 +9223,13 @@
   <category id="jniIntercept" label="JNI Function Interception">
 
     <intro>
-      Provides the ability to intercept and resend 
+      Provides the ability to intercept and resend
       Java Native Interface (JNI) function calls
       by manipulating the JNI function table.
-      See <externallink id="docs/technotes/guides/jni/spec/functions.html">JNI
+      See <externallink id="jni/functions.html">JNI
 	Functions</externallink> in the <i>Java Native Interface Specification</i>.
       <p/>
-      The following example illustrates intercepting the 
+      The following example illustrates intercepting the
       <code>NewGlobalRef</code> JNI call in order to count reference
       creation.
       <example>
@@ -9274,19 +9274,19 @@
 	check that the example compiles and executes.
       </todo>
     </intro>
-    
+
     <function id="SetJNIFunctionTable" phase="start" num="120">
       <synopsis>Set JNI Function Table</synopsis>
       <description>
-        Set the JNI function table 
+        Set the JNI function table
         in all current and future JNI environments.
         As a result, all future JNI calls are directed to the specified functions.
         Use <functionlink id="GetJNIFunctionTable"></functionlink> to get the
         function table to pass to this function.
-        For this function to take effect the the updated table entries must be 
+        For this function to take effect the the updated table entries must be
         used by the JNI clients.
         Since the table is defined <code>const</code> some compilers may optimize
-        away the access to the table, thus preventing this function from taking 
+        away the access to the table, thus preventing this function from taking
         effect.
         The table is copied--changes to the local copy of the
         table have no effect.
@@ -9310,16 +9310,16 @@
       <errors>
       </errors>
     </function>
-    
+
     <function id="GetJNIFunctionTable" phase="start" num="121">
       <synopsis>Get JNI Function Table</synopsis>
       <description>
         Get the JNI function table.
         The JNI function table is copied into allocated memory.
-        If <functionlink id="SetJNIFunctionTable"></functionlink> 
+        If <functionlink id="SetJNIFunctionTable"></functionlink>
         has been called, the modified (not the original) function
         table is returned.
-        Only the function table is copied, no other aspects of the environment 
+        Only the function table is copied, no other aspects of the environment
         are copied.
         See the examples <internallink id="jniIntercept">above</internallink>.
       </description>
@@ -9332,7 +9332,7 @@
 	    <struct>jniNativeInterface</struct>
 	  </allocbuf>
           <description>
-	    On return, <code>*function_table</code> 
+	    On return, <code>*function_table</code>
 	    points a newly allocated copy of the JNI function table.
 	  </description>
 	</param>
@@ -9354,13 +9354,13 @@
         table have no effect.
         This is an atomic action, all callbacks are set at once.
         No events are sent before this function is called.
-        When an entry is <code>NULL</code> or when the event is beyond 
+        When an entry is <code>NULL</code> or when the event is beyond
         <paramlink id="size_of_callbacks"></paramlink> no event is sent.
-        Details on events are 
+        Details on events are
         described <internallink id="EventSection">later</internallink> in this document.
         An event must be enabled and have a callback in order to be
-        sent--the order in which this function and 
-        <functionlink id="SetEventNotificationMode"></functionlink> 
+        sent--the order in which this function and
+        <functionlink id="SetEventNotificationMode"></functionlink>
         are called does not affect the result.
       </description>
       <origin>new</origin>
@@ -9391,28 +9391,28 @@
     <function id="SetEventNotificationMode" jkernel="yes" phase="onload" num="2">
       <synopsis>Set Event Notification Mode</synopsis>
       <description>
-	Control the generation of events. 
+	Control the generation of events.
 	<constants id="jvmtiEventMode" label="Event Enable/Disable" kind="enum">
 	  <constant id="JVMTI_ENABLE" num="1">
-	    If <paramlink id="mode"></paramlink> is <code>JVMTI_ENABLE</code>, 
+	    If <paramlink id="mode"></paramlink> is <code>JVMTI_ENABLE</code>,
 	    the event <paramlink id="event_type"></paramlink> will be enabled
 	  </constant>
 	  <constant id="JVMTI_DISABLE" num="0">
-	    If <paramlink id="mode"></paramlink> is <code>JVMTI_DISABLE</code>, 
+	    If <paramlink id="mode"></paramlink> is <code>JVMTI_DISABLE</code>,
 	    the event <paramlink id="event_type"></paramlink> will be disabled
 	  </constant>
 	</constants>
 	If <code>thread</code> is <code>NULL</code>,
-	the event is enabled or disabled globally; otherwise, it is 
-	enabled or disabled for a particular thread. 
-	An event is generated for 
+	the event is enabled or disabled globally; otherwise, it is
+	enabled or disabled for a particular thread.
+	An event is generated for
 	a particular thread if it is enabled either at the thread or global
-	levels. 
+	levels.
 	<p/>
 	See <internallink id="EventIndex">below</internallink> for information on specific events.
 	<p/>
 	The following events cannot be controlled at the thread
-	level through this function. 
+	level through this function.
 	<ul>
 	  <li><eventlink id="VMInit"></eventlink></li>
 	  <li><eventlink id="VMStart"></eventlink></li>
@@ -9424,13 +9424,13 @@
 	  <li><eventlink id="DataDumpRequest"></eventlink></li>
 	</ul>
 	<p/>
-	Initially, no events are enabled at either the thread level 
+	Initially, no events are enabled at either the thread level
 	or the global level.
 	<p/>
         Any needed capabilities (see Event Enabling Capabilities below) must be possessed
         before calling this function.
         <p/>
-	Details on events are 
+	Details on events are
 	described <internallink id="EventSection">below</internallink>.
       </description>
       <origin>jvmdiClone</origin>
@@ -9472,10 +9472,10 @@
           <paramlink id="event_thread"/> is non-<code>NULL</code> and is not live (has not been started or is now dead).
         </error>
 	<error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
-	  thread level control was attempted on events which do not 
+	  thread level control was attempted on events which do not
           permit thread level control.
 	</error>
-        <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY"> 
+        <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY">
           The Required Event Enabling Capability is not possessed.
         </error>
       </errors>
@@ -9484,14 +9484,14 @@
     <function id="GenerateEvents" num="123">
       <synopsis>Generate Events</synopsis>
       <description>
-        Generate events to represent the current state of the VM.  
-        For example, if <paramlink id="event_type"/> is 
+        Generate events to represent the current state of the VM.
+        For example, if <paramlink id="event_type"/> is
         <code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code>,
         a <eventlink id="CompiledMethodLoad"></eventlink> event will be
         sent for each currently compiled method.
         Methods that were loaded and now have been unloaded are not sent.
-        The history of what events have previously been sent does not 
-        effect what events are sent by this function--for example, 
+        The history of what events have previously been sent does not
+        effect what events are sent by this function--for example,
         all currently compiled methods
         will be sent each time this function is called.
         <p/>
@@ -9502,14 +9502,14 @@
 	Attempts to execute Java programming language code or
 	JNI functions may be paused until this function returns -
 	so neither should be called from the thread sending the event.
-	This function returns only after the missed events have been 
+	This function returns only after the missed events have been
         sent, processed and have returned.
 	The event may be sent on a different thread than the thread
 	on which the event occurred.
-	The callback for the event must be set with 
-        <functionlink id="SetEventCallbacks"></functionlink> 
+	The callback for the event must be set with
+        <functionlink id="SetEventCallbacks"></functionlink>
 	and the event must be enabled with
-        <functionlink id="SetEventNotificationMode"></functionlink> 
+        <functionlink id="SetEventNotificationMode"></functionlink>
 	or the events will not occur.
 	If the VM no longer has the information to generate some or
         all of the requested events, the events are simply not sent -
@@ -9538,13 +9538,13 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY"> 
-          <paramlink id="event_type"/> is 
+        <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY">
+          <paramlink id="event_type"/> is
 	  <eventlink id="CompiledMethodLoad"><code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code></eventlink>
 	  and <fieldlink id="can_generate_compiled_method_load_events" struct="jvmtiCapabilities"></fieldlink>
 	  is <code>false</code>.
         </error>
-        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT"> 
+        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
           <paramlink id="event_type"/> is other than
 	  <eventlink id="CompiledMethodLoad"><code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code></eventlink>
 	  or <eventlink id="DynamicCodeGenerated"><code>JVMTI_EVENT_DYNAMIC_CODE_GENERATED</code></eventlink>.
@@ -9566,63 +9566,63 @@
 
 	<constants id="jvmtiParamTypes" label="Extension Function/Event Parameter Types" kind="enum">
 	  <constant id="JVMTI_TYPE_JBYTE" num="101">
-	    Java programming language primitive type - <code>byte</code>. 
+	    Java programming language primitive type - <code>byte</code>.
 	    JNI type <code>jbyte</code>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JCHAR" num="102">
-	    Java programming language primitive type - <code>char</code>. 
+	    Java programming language primitive type - <code>char</code>.
 	    JNI type <code>jchar</code>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JSHORT" num="103">
-	    Java programming language primitive type - <code>short</code>. 
+	    Java programming language primitive type - <code>short</code>.
 	    JNI type <code>jshort</code>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JINT" num="104">
-	    Java programming language primitive type - <code>int</code>. 
+	    Java programming language primitive type - <code>int</code>.
 	    JNI type <datalink id="jint"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JLONG" num="105">
-	    Java programming language primitive type - <code>long</code>. 
+	    Java programming language primitive type - <code>long</code>.
 	    JNI type <datalink id="jlong"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JFLOAT" num="106">
-	    Java programming language primitive type - <code>float</code>. 
+	    Java programming language primitive type - <code>float</code>.
 	    JNI type <datalink id="jfloat"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JDOUBLE" num="107">
-	    Java programming language primitive type - <code>double</code>. 
+	    Java programming language primitive type - <code>double</code>.
 	    JNI type <datalink id="jdouble"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JBOOLEAN" num="108">
-	    Java programming language primitive type - <code>boolean</code>. 
+	    Java programming language primitive type - <code>boolean</code>.
 	    JNI type <datalink id="jboolean"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JOBJECT" num="109">
-	    Java programming language object type - <code>java.lang.Object</code>. 
+	    Java programming language object type - <code>java.lang.Object</code>.
 	    JNI type <datalink id="jobject"></datalink>.
 	    Returned values are JNI local references and must be managed.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JTHREAD" num="110">
-	    Java programming language object type - <code>java.lang.Thread</code>. 
+	    Java programming language object type - <code>java.lang.Thread</code>.
 	    <jvmti/> type <datalink id="jthread"></datalink>.
 	    Returned values are JNI local references and must be managed.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JCLASS" num="111">
-	    Java programming language object type - <code>java.lang.Class</code>. 
+	    Java programming language object type - <code>java.lang.Class</code>.
 	    JNI type <datalink id="jclass"></datalink>.
 	    Returned values are JNI local references and must be managed.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JVALUE" num="112">
-	    Union of all Java programming language primitive and object types - 
+	    Union of all Java programming language primitive and object types -
 	    JNI type <datalink id="jvalue"></datalink>.
 	    Returned values which represent object types are JNI local references and must be managed.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JFIELDID" num="113">
-	    Java programming language field identifier - 
+	    Java programming language field identifier -
 	    JNI type <datalink id="jfieldID"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_JMETHODID" num="114">
-	    Java programming language method identifier - 
+	    Java programming language method identifier -
 	    JNI type <datalink id="jmethodID"></datalink>.
 	  </constant>
 	  <constant id="JVMTI_TYPE_CCHAR" num="115">
@@ -9757,7 +9757,7 @@
 	      <struct>jvmtiParamInfo</struct>
 	    </allocfieldbuf>
 	    <description>
-	      Array of 
+	      Array of
 	      <fieldlink id="param_count" struct="jvmtiExtensionFunctionInfo"></fieldlink>
 	      parameters (<code>jvmtiEnv *jvmti_env</code> excluded)
 	    </description>
@@ -9840,7 +9840,7 @@
 	      <struct>jvmtiParamInfo</struct>
 	    </allocfieldbuf>
 	    <description>
-	      Array of 
+	      Array of
 	      <fieldlink id="param_count" struct="jvmtiExtensionEventInfo"></fieldlink>
 	      parameters (<code>jvmtiEnv *jvmti_env</code> excluded)
 	    </description>
@@ -9876,7 +9876,7 @@
 	  <synopsis>Extension Event</synopsis>
 	<description>
 	  This is the implementation-specific event.
-          The event handler is set with 
+          The event handler is set with
           <functionlink id="SetExtensionEventCallback"/>.
           <p/>
           Event handlers for extension events must be declared varargs to match this definition.
@@ -9927,9 +9927,9 @@
 	    <jint/>
 	      <description>
 		Identifies which callback to set.
-		This index is the 
+		This index is the
 		<fieldlink id="extension_event_index" struct="jvmtiExtensionEventInfo"></fieldlink>
-		field of 
+		field of
 		<datalink id="jvmtiExtensionEventInfo"/>.
 	      </description>
 	  </param>
@@ -9939,18 +9939,18 @@
 	      <nullok>disable the event</nullok>
 	    </ptrtype>
 	    <description>
-	      If <code>callback</code> is non-<code>NULL</code>, 
+	      If <code>callback</code> is non-<code>NULL</code>,
 	      set <code>callback</code> to be the event callback function
 	      and enable the event.
 	    </description>
 	  </param>
 	</parameters>
 	<errors>
-        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT"> 
+        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
             <paramlink id="extension_event_index"/> is not an
-            <fieldlink id="extension_event_index" 
+            <fieldlink id="extension_event_index"
                        struct="jvmtiExtensionEventInfo"/>
-            returned by 
+            returned by
             <functionlink id="GetExtensionEvents"/>
         </error>
 	</errors>
@@ -9962,30 +9962,30 @@
 
     <intro>
       The capabilities functions allow you to change the
-      functionality available to <jvmti/>--that is, 
-      which <jvmti/> 
+      functionality available to <jvmti/>--that is,
+      which <jvmti/>
       functions can be called, what events can be generated,
       and what functionality these events and functions can
       provide.
       <p/>
-        The "Capabilities" section of each function and event describe which 
+        The "Capabilities" section of each function and event describe which
         capabilities, if any, they are associated with. "Required Functionality"
         means it is available for use and no capabilities must be added to use it.
         "Optional Functionality" means the agent must possess the capability
-        before it can be used.  
+        before it can be used.
         To possess a capability, the agent must
         <functionlink id="AddCapabilities">add the capability</functionlink>.
         "Optional Features" describe capabilities which,
         if added, extend the feature set.
         <p/>
-        The potentially available capabilities of each <jvmti/> implementation are different.  
+        The potentially available capabilities of each <jvmti/> implementation are different.
         Depending on the implementation, a capability:
         <ul>
           <li>may never be added</li>
           <li>may be added in either the <code>OnLoad</code> or live phase in any environment</li>
           <li>may be added only during the <code>OnLoad</code> phase</li>
           <li>may be possessed by only one environment at a time</li>
-          <li>may be possessed by only one environment at a time, 
+          <li>may be possessed by only one environment at a time,
               and only during the <code>OnLoad</code> phase</li>
           <li>and so on ...</li>
         </ul>
@@ -9993,24 +9993,24 @@
       time, and/or memory footprint.  Note that the overhead of using a capability
       is completely different than the overhead of possessing a capability.
       Take single stepping as an example. When single stepping is on (that
-      is, when the event is enabled and thus actively sending events) 
-      the overhead of sending and processing an event 
-      on each instruction is huge in any implementation. 
-      However, the overhead of possessing the capability may be small or large, 
+      is, when the event is enabled and thus actively sending events)
+      the overhead of sending and processing an event
+      on each instruction is huge in any implementation.
+      However, the overhead of possessing the capability may be small or large,
       depending on the implementation.  Also, when and if a capability is potentially
       available depends on the implementation.  Some examples:
       <ul>
-	<li>One VM might perform all execution by compiling bytecodes into 
+	<li>One VM might perform all execution by compiling bytecodes into
 	  native code and be unable to generate single step instructions.
 	  In this implementation the capability can not be added.</li>
 	<li>Another VM may be able to switch execution to a single stepping
-	  interpreter at any time.  In this implementation, having the capability has no 
+	  interpreter at any time.  In this implementation, having the capability has no
 	  overhead and could be added at any time.</li>
 	<li>Yet another VM might be able to choose a bytecode compiling or single stepping capable interpreted
 	  execution engine at start up, but be unable to switch between them.
-	  In this implementation the capability would need to be added 
+	  In this implementation the capability would need to be added
           during the <code>OnLoad</code> phase (before bytecode
-	  execution begins) and would have a large impact on execution speed 
+	  execution begins) and would have a large impact on execution speed
 	  even if single stepping was never used.</li>
 	<li>Still another VM might be able to add an "is single stepping on" check
 	  into compiled bytecodes or a generated interpreter.  Again in this implementation
@@ -10019,30 +10019,30 @@
       </ul>
       <p/>
       Each <jvmti/> <internallink id="environments">environment</internallink>
-      has its own set of capabilities.  
+      has its own set of capabilities.
       Initially, that set is empty.
       Any desired capability must be added.
-      If possible, capabilities should be added during the <code>OnLoad</code> phase.  For most 
-      virtual machines certain capabilities require special set up for 
+      If possible, capabilities should be added during the <code>OnLoad</code> phase.  For most
+      virtual machines certain capabilities require special set up for
       the virtual machine and this set up must happen
-      during the <code>OnLoad</code> phase, before the virtual machine begins execution. 
+      during the <code>OnLoad</code> phase, before the virtual machine begins execution.
       Once a capability is added, it can
       only be removed if explicitly relinquished by the environment.
       <p/>
-      The agent can, 
+      The agent can,
       <functionlink id="GetPotentialCapabilities">determine what
 	capabilities this VM can potentially provide</functionlink>,
       <functionlink id="AddCapabilities">add the capabilities
 	to be used</functionlink>,
       <functionlink id="RelinquishCapabilities">release capabilities
 	which are no longer needed</functionlink>, and
-      <functionlink id="GetCapabilities">examine the currently available 
+      <functionlink id="GetCapabilities">examine the currently available
 	capabilities</functionlink>.
     </intro>
 
     <intro id="capabilityExamples" label="Capability Examples">
       For example, a freshly started agent (in the <code>OnLoad</code> function)
-      wants to enable all possible capabilities.  
+      wants to enable all possible capabilities.
       Note that, in general, this is not advisable as the agent may suffer
       a performance penalty for functionality it is not using.
       The code might look like this in C:
@@ -10055,9 +10055,9 @@
 	   err = (*jvmti)-&gt;AddCapabilities(jvmti, &amp;capa);
       </example>
       For example, if an  agent wants to check if it can get
-      the bytecodes of a method (that is, it wants to check 
-      if it previously added this capability and has not 
-      relinquished it), the code might 
+      the bytecodes of a method (that is, it wants to check
+      if it previously added this capability and has not
+      relinquished it), the code might
       look like this in C:
       <example>
 	jvmtiCapabilities capa;
@@ -10065,13 +10065,13 @@
 
 	err = (*jvmti)-&gt;GetCapabilities(jvmti, &amp;capa);
 	if (err == JVMTI_ERROR_NONE) {
-   	   if (capa.can_get_bytecodes) { ... } } 
+   	   if (capa.can_get_bytecodes) { ... } }
       </example>
     </intro>
 
     <capabilitiestypedef id="jvmtiCapabilities" label="The Capabilities Structure">
       <description>
-        The functions in this category use this capabilities structure 
+        The functions in this category use this capabilities structure
         which contains boolean flags corresponding to each capability:
       </description>
       <capabilityfield id="can_tag_objects">
@@ -10099,14 +10099,14 @@
       </capabilityfield>
       <capabilityfield id="can_get_synthetic_attribute">
 	<description>
-	  Can test if a field or method is synthetic - 
+	  Can test if a field or method is synthetic -
           <functionlink id="IsFieldSynthetic"></functionlink> and
           <functionlink id="IsMethodSynthetic"></functionlink>
 	</description>
       </capabilityfield>
       <capabilityfield id="can_get_owned_monitor_info">
 	<description>
-	  Can get information about ownership of monitors - 
+	  Can get information about ownership of monitors -
           <functionlink id="GetOwnedMonitorInfo"></functionlink>
 	</description>
       </capabilityfield>
@@ -10167,19 +10167,19 @@
       </capabilityfield>
       <capabilityfield id="can_generate_exception_events">
 	<description>
-	  Can get <eventlink id="Exception">exception thrown</eventlink> and 
+	  Can get <eventlink id="Exception">exception thrown</eventlink> and
             <eventlink id="ExceptionCatch">exception catch</eventlink> events
 	</description>
       </capabilityfield>
       <capabilityfield id="can_generate_frame_pop_events">
 	<description>
-	  Can <functionlink id="NotifyFramePop">set</functionlink> and thus get 
+	  Can <functionlink id="NotifyFramePop">set</functionlink> and thus get
             <eventlink id="FramePop"></eventlink> events
 	</description>
       </capabilityfield>
       <capabilityfield id="can_generate_breakpoint_events">
 	<description>
-	  Can <functionlink id="SetBreakpoint">set</functionlink> and thus get 
+	  Can <functionlink id="SetBreakpoint">set</functionlink> and thus get
             <eventlink id="Breakpoint"></eventlink> events
 	</description>
       </capabilityfield>
@@ -10206,65 +10206,65 @@
 	  thread CPU time
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_method_entry_events" 
-		       disp1="can_generate" disp2="_method_entry_events" 
+      <capabilityfield id="can_generate_method_entry_events"
+		       disp1="can_generate" disp2="_method_entry_events"
 		       >
 	<description>
 	  Can generate method entry events on entering a method
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_method_exit_events" 
-		       disp1="can_generate" disp2="_method_exit_events" 
+      <capabilityfield id="can_generate_method_exit_events"
+		       disp1="can_generate" disp2="_method_exit_events"
 		       >
 	<description>
 	  Can generate method exit events on leaving a method
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_all_class_hook_events" 
-		       disp1="can_generate" disp2="_all_class_hook_events" 
+      <capabilityfield id="can_generate_all_class_hook_events"
+		       disp1="can_generate" disp2="_all_class_hook_events"
 		       >
 	<description>
 	  Can generate ClassFileLoadHook events for every loaded class.
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_compiled_method_load_events" 
-		       disp1="can_generate" disp2="_compiled_method_load_events" 
+      <capabilityfield id="can_generate_compiled_method_load_events"
+		       disp1="can_generate" disp2="_compiled_method_load_events"
 		       >
 	<description>
 	  Can generate events when a method is compiled or unloaded
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_monitor_events" 
-		       disp1="can_generate" disp2="_monitor_events" 
+      <capabilityfield id="can_generate_monitor_events"
+		       disp1="can_generate" disp2="_monitor_events"
 		       >
 	<description>
 	  Can generate events on monitor activity
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_vm_object_alloc_events" 
-		       disp1="can_generate" disp2="_vm_object_alloc_events" 
+      <capabilityfield id="can_generate_vm_object_alloc_events"
+		       disp1="can_generate" disp2="_vm_object_alloc_events"
 		       >
 	<description>
 	  Can generate events on VM allocation of an object
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_native_method_bind_events" 
-		       disp1="can_generate" disp2="_native_method_bind_events" 
+      <capabilityfield id="can_generate_native_method_bind_events"
+		       disp1="can_generate" disp2="_native_method_bind_events"
 		       >
 	<description>
 	  Can generate events when a native method is bound to its
 	  implementation
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_garbage_collection_events" 
-		       disp1="can_generate" disp2="_garbage_collection_events" 
+      <capabilityfield id="can_generate_garbage_collection_events"
+		       disp1="can_generate" disp2="_garbage_collection_events"
 		       >
 	<description>
 	  Can generate events when garbage collection begins or ends
 	</description>
       </capabilityfield>
-      <capabilityfield id="can_generate_object_free_events" 
-		       disp1="can_generate" disp2="_object_free_events" 
+      <capabilityfield id="can_generate_object_free_events"
+		       disp1="can_generate" disp2="_object_free_events"
 		       >
 	<description>
 	  Can generate events when the garbage collector frees an object
@@ -10298,16 +10298,16 @@
       <capabilityfield id="can_retransform_classes" since="1.1">
 	<description>
 	  Can retransform classes with <functionlink id="RetransformClasses"/>.
-          In addition to the restrictions imposed by the specific 
+          In addition to the restrictions imposed by the specific
           implementation on this capability (see the
           <internallink id="capability">Capability</internallink> section),
-          this capability must be set before the 
+          this capability must be set before the
           <eventlink id="ClassFileLoadHook"/> event is enabled for the
           first time in this environment.
-          An environment that possesses this capability at the time that 
+          An environment that possesses this capability at the time that
           <code>ClassFileLoadHook</code> is enabled for the first time is
           said to be <i>retransformation capable</i>.
-          An environment that does not possess this capability at the time that 
+          An environment that does not possess this capability at the time that
           <code>ClassFileLoadHook</code> is enabled for the first time is
           said to be <i>retransformation incapable</i>.
 	</description>
@@ -10322,7 +10322,7 @@
       </capabilityfield>
       <capabilityfield id="can_generate_resource_exhaustion_heap_events" since="1.1">
 	<description>
-          Can generate events when the VM is unable to allocate memory from 
+          Can generate events when the VM is unable to allocate memory from
           the <tm>Java</tm> platform heap.
           See <eventlink id="ResourceExhausted"/>.
 	</description>
@@ -10355,11 +10355,11 @@
     <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
       <synopsis>Get Potential Capabilities</synopsis>
       <description>
-        Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/> 
+        Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
         features that can potentially be possessed by this environment
 	at this time.
 	The returned capabilities differ from the complete set of capabilities
-	implemented by the VM in two cases: another environment possesses 
+	implemented by the VM in two cases: another environment possesses
 	capabilities that can only be possessed by one environment, or the
 	current <functionlink id="GetPhase">phase</functionlink> is live,
 	and certain capabilities can only be added during the <code>OnLoad</code> phase.
@@ -10402,7 +10402,7 @@
 	  conditional implementations would be used or are even a good idea.
 	  The thought is that release documentation for the implementation
 	  would be the best means of exposing this information.
-	  Unless new arguments are presented, I intend to remove this 
+	  Unless new arguments are presented, I intend to remove this
 	  function in the next revision.
 	</issue>
         <p/>
@@ -10412,15 +10412,15 @@
         <paramlink id="capabilities_ptr"></paramlink>.
         The returned estimates are in percentage of additional overhead, thus
         a time impact of 100 mean the application might run
-        at half the speed.  
+        at half the speed.
         The estimates are very rough approximations and are not guaranteed.
         Note also, that the estimates are of the impact of having the
         capability available--when and if it is used the impact may be
         much greater.
-        Estimates can be for a single capability or for a set of 
+        Estimates can be for a single capability or for a set of
         capabilities.  Note that the costs are not necessarily additive,
-        adding support for one capability might make another available 
-        for free or conversely having two capabilities at once may 
+        adding support for one capability might make another available
+        for free or conversely having two capabilities at once may
         have multiplicative impact.
         Estimates are relative to the current set of capabilities -
         that is, how much more impact given the currently possessed capabilities.
@@ -10460,7 +10460,7 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_NOT_AVAILABLE"> 
+        <error id="JVMTI_ERROR_NOT_AVAILABLE">
           The desired capabilities are not even potentially available.
         </error>
       </errors>
@@ -10470,7 +10470,7 @@
     <function id="AddCapabilities" jkernel="yes" phase="onload" num="142">
       <synopsis>Add Capabilities</synopsis>
       <description>
-        Set new capabilities by adding the capabilities 
+        Set new capabilities by adding the capabilities
         whose values are set to one (<code>1</code>) in
         <code>*</code><paramlink id="capabilities_ptr"></paramlink>.
         All previous capabilities are retained.
@@ -10493,7 +10493,7 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_NOT_AVAILABLE"> 
+        <error id="JVMTI_ERROR_NOT_AVAILABLE">
           The desired capabilities are not even potentially available.
         </error>
       </errors>
@@ -10547,7 +10547,7 @@
     <function id="GetCapabilities" jkernel="yes" phase="any" num="89">
       <synopsis>Get Capabilities</synopsis>
         <description>
-          Returns via <paramlink id="capabilities_ptr"></paramlink> the optional <jvmti/> 
+          Returns via <paramlink id="capabilities_ptr"></paramlink> the optional <jvmti/>
           features which this environment currently possesses.
           Each possessed capability is indicated by a one (<code>1</code>) in the
           corresponding field of the <internallink id="jvmtiCapabilities">capabilities
@@ -10578,16 +10578,16 @@
     </function>
 
   </category>
-  
-  
+
+
   <category id="timers" label="Timers">
 
       <intro>
 	These functions provide timing information.
-	The resolution at which the time is updated is not specified. 
-	They provides nanosecond precision, but not necessarily nanosecond accuracy. 
+	The resolution at which the time is updated is not specified.
+	They provides nanosecond precision, but not necessarily nanosecond accuracy.
 	Details about the timers, such as their maximum values, can be accessed with
-	the timer information functions.  
+	the timer information functions.
       </intro>
 
       <typedef id="jvmtiTimerInfo" label="Timer Info">
@@ -10621,7 +10621,7 @@
 	  <enum>jvmtiTimerKind</enum>
 	  <description>
 	    The kind of timer.
-            On a platform that does not distinguish between user and system time, <datalink 
+            On a platform that does not distinguish between user and system time, <datalink
                  id="JVMTI_TIMER_TOTAL_CPU"><code>JVMTI_TIMER_TOTAL_CPU</code></datalink>
             is returned.
 	  </description>
@@ -10659,12 +10659,12 @@
     <function id="GetCurrentThreadCpuTimerInfo" callbacksafe="safe"  impl="innative notrace" phase="start" num="134">
       <synopsis>Get Current Thread CPU Timer Information</synopsis>
       <description>
-	Get information about the 
-        <functionlink id="GetCurrentThreadCpuTime"/> timer. 
-	The fields of the <datalink id="jvmtiTimerInfo"/> structure 
+	Get information about the
+        <functionlink id="GetCurrentThreadCpuTime"/> timer.
+	The fields of the <datalink id="jvmtiTimerInfo"/> structure
 	are filled in with details about the timer.
         This information is specific to the platform and the implementation of
-        <functionlink id="GetCurrentThreadCpuTime"/> and thus 
+        <functionlink id="GetCurrentThreadCpuTime"/> and thus
         does not vary by thread nor does it vary
         during a particular invocation of the VM.
         <p/>
@@ -10696,15 +10696,15 @@
     <function id="GetCurrentThreadCpuTime" callbacksafe="safe" impl="innative notrace" phase="start" num="135">
       <synopsis>Get Current Thread CPU Time</synopsis>
       <description>
-            Return the CPU time utilized by the current thread.  
+            Return the CPU time utilized by the current thread.
             <p/>
             Note that the <functionlink id="GetThreadCpuTime"/>
             function provides CPU time for any thread, including
-            the current thread. <code>GetCurrentThreadCpuTime</code> 
+            the current thread. <code>GetCurrentThreadCpuTime</code>
             exists to support platforms which cannot
-            supply CPU time for threads other than the current 
+            supply CPU time for threads other than the current
             thread or which have more accurate information for
-            the current thread (see 
+            the current thread (see
             <functionlink id="GetCurrentThreadCpuTimerInfo"/> vs
             <functionlink id="GetThreadCpuTimerInfo"/>).
             On many platforms this call will be equivalent to:
@@ -10717,13 +10717,13 @@
 	<required id="can_get_current_thread_cpu_time">
 	    Can get current thread CPU time.
             <p/>
-	    If this capability is enabled after threads have started, 
+	    If this capability is enabled after threads have started,
 	    the implementation may choose any time up
-	    to and including the time that the capability is enabled 
+	    to and including the time that the capability is enabled
 	    as the point where CPU time collection starts.
             <p/>
-            This capability must be potentially available on any 
-            platform where 
+            This capability must be potentially available on any
+            platform where
             <internallink id="jvmtiCapabilities.can_get_thread_cpu_time"><code>can_get_thread_cpu_time</code></internallink>
             is potentially available.
 	</required>
@@ -10733,7 +10733,7 @@
 	  <outptr><jlong/></outptr>
 	  <description>
 	    On return, points to the CPU time used by this thread
-	    in nanoseconds.  
+	    in nanoseconds.
             This is an unsigned value.  If tested or printed as a jlong (signed value)
             it may appear to be a negative number.
 	  </description>
@@ -10746,12 +10746,12 @@
     <function id="GetThreadCpuTimerInfo" num="136">
       <synopsis>Get Thread CPU Timer Information</synopsis>
       <description>
-	Get information about the 
-        <functionlink id="GetThreadCpuTime"/> timer. 
-	The fields of the <datalink id="jvmtiTimerInfo"/> structure 
+	Get information about the
+        <functionlink id="GetThreadCpuTime"/> timer.
+	The fields of the <datalink id="jvmtiTimerInfo"/> structure
 	are filled in with details about the timer.
         This information is specific to the platform and the implementation of
-        <functionlink id="GetThreadCpuTime"/> and thus 
+        <functionlink id="GetThreadCpuTime"/> and thus
         does not vary by thread nor does it vary
         during a particular invocation of the VM.
         <p/>
@@ -10783,19 +10783,19 @@
     <function id="GetThreadCpuTime" num="137">
       <synopsis>Get Thread CPU Time</synopsis>
       <description>
-          Return the CPU time utilized by the specified thread. 
+          Return the CPU time utilized by the specified thread.
           <p/>
 	  Get information about this timer with
-          <functionlink id="GetThreadCpuTimerInfo"/>. 
+          <functionlink id="GetThreadCpuTimerInfo"/>.
       </description>
       <origin>new</origin>
       <capabilities>
 	<required id="can_get_thread_cpu_time">
 	    Can get thread CPU time.
             <p/>
-	    If this capability is enabled after threads have started, 
+	    If this capability is enabled after threads have started,
 	    the implementation may choose any time up
-	    to and including the time that the capability is enabled 
+	    to and including the time that the capability is enabled
 	    as the point where CPU time collection starts.
 	</required>
       </capabilities>
@@ -10810,7 +10810,7 @@
 	  <outptr><jlong/></outptr>
 	  <description>
 	    On return, points to the CPU time used by the specified thread
-	    in nanoseconds.  
+	    in nanoseconds.
             This is an unsigned value.  If tested or printed as a jlong (signed value)
             it may appear to be a negative number.
 	  </description>
@@ -10823,9 +10823,9 @@
     <function id="GetTimerInfo" phase="any" callbacksafe="safe" num="138">
       <synopsis>Get Timer Information</synopsis>
       <description>
-	Get information about the 
-        <functionlink id="GetTime"/> timer. 
-	The fields of the <datalink id="jvmtiTimerInfo"/> structure 
+	Get information about the
+        <functionlink id="GetTime"/> timer.
+	The fields of the <datalink id="jvmtiTimerInfo"/> structure
 	are filled in with details about the timer.
         This information will not change during a particular invocation of the VM.
       </description>
@@ -10848,7 +10848,7 @@
     <function id="GetTime" phase="any" callbacksafe="safe" num="139">
       <synopsis>Get Time</synopsis>
       <description>
-          Return the current value of the system timer, in nanoseconds. 
+          Return the current value of the system timer, in nanoseconds.
           <p/>
           The value returned represents nanoseconds since some fixed but
           arbitrary time (perhaps in the future, so values may be
@@ -10857,7 +10857,7 @@
           how frequently values change.
           <p/>
 	  Get information about this timer with
-          <functionlink id="GetTimerInfo"/>. 
+          <functionlink id="GetTimerInfo"/>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -10866,7 +10866,7 @@
         <param id="nanos_ptr">
 	  <outptr><jlong/></outptr>
 	  <description>
-	    On return, points to the time in nanoseconds.  
+	    On return, points to the time in nanoseconds.
             This is an unsigned value.  If tested or printed as a jlong (signed value)
             it may appear to be a negative number.
 	  </description>
@@ -10881,7 +10881,7 @@
       <description>
           Returns the number of processors available to the Java virtual machine.
           <p/>
-          This value may change during a particular invocation of the virtual machine. 
+          This value may change during a particular invocation of the virtual machine.
           Applications that are sensitive to the number of available processors should
           therefore occasionally poll this property.
       </description>
@@ -10893,7 +10893,7 @@
 	  <outptr><jint/></outptr>
 	  <description>
 	    On return, points to the maximum number of processors available to the
-            virtual machine; never smaller than one.  
+            virtual machine; never smaller than one.
 	  </description>
 	</param>
       </parameters>
@@ -10914,18 +10914,18 @@
     <function id="AddToBootstrapClassLoaderSearch" jkernel="yes" phase="onload" num="149">
       <synopsis>Add To Bootstrap Class Loader Search</synopsis>
       <description>
-          This function can be used to cause instrumentation classes to be defined by the 
+          This function can be used to cause instrumentation classes to be defined by the
           bootstrap class loader. See <vmspec chapter="5.3.1"/>.
           After the bootstrap
-	  class loader unsuccessfully searches for a class, the specified platform-dependent 
-	  search path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in 
-	  the <paramlink id="segment"/>. This function may be called multiple times to add multiple segments, 
+	  class loader unsuccessfully searches for a class, the specified platform-dependent
+	  search path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in
+	  the <paramlink id="segment"/>. This function may be called multiple times to add multiple segments,
 	  the segments will be searched in the order that this function was called.
 	  <p/>
-	  In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent 
+	  In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent
 	  search path segment to be searched after the bootstrap class loader unsuccessfully searches
 	  for a class. The segment is typically a directory or JAR file.
-	  <p/>	  
+	  <p/>
 	  In the live phase the <paramlink id="segment"/> may be used to specify any platform-dependent
 	  path to a <externallink id="docs/technotes/guides/jar/jar.html">
 	  JAR file</externallink>. The agent should take care that the JAR file does not
@@ -10953,7 +10953,7 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">   
+        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
           <paramlink id="segment"/> is an invalid path. In the live phase, anything other than an
            existing JAR file is an invalid path.
         </error>
@@ -10965,15 +10965,15 @@
       <description>
 	  This function can be used to cause instrumentation classes to be
 	  defined by the system class loader. See <vmspec chapter="5.3.2"/>.
-	  After the class loader unsuccessfully searches for a class, the specified platform-dependent search 
-	  path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in the 
-	  <paramlink id="segment"/>. This function may be called multiple times to add multiple segments, the 
+	  After the class loader unsuccessfully searches for a class, the specified platform-dependent search
+	  path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in the
+	  <paramlink id="segment"/>. This function may be called multiple times to add multiple segments, the
 	  segments will be searched in the order that this function was called.
 	  <p/>
-	  In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent 
+	  In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent
 	  search path segment to be searched after the system class loader unsuccessfully searches
 	  for a class. The segment is typically a directory or JAR file.
-	  <p/>	  
+	  <p/>
 	  In the live phase the <paramlink id="segment"/> is a platform-dependent path to a
 	  <externallink id="docs/technotes/guides/jar/jar.html">JAR file</externallink> to be
 	  searched after the system class loader unsuccessfully searches for a class. The agent should
@@ -10981,9 +10981,9 @@
           defined by the system class loader for the purposes of instrumentation.
           <p/>
 	  In the live phase the system class loader supports adding a JAR file to be searched if
-          the system class loader implements a method name <code>appendToClassPathForInstrumentation</code> 
-	  which takes a single parameter of type <code>java.lang.String</code>. The method is not required 
-	  to have <code>public</code> access. 
+          the system class loader implements a method name <code>appendToClassPathForInstrumentation</code>
+	  which takes a single parameter of type <code>java.lang.String</code>. The method is not required
+	  to have <code>public</code> access.
 	  <p/>
           <vmspec/> specifies that a subsequent attempt to resolve a symbolic
           reference that the Java virtual machine has previously unsuccessfully attempted
@@ -11012,7 +11012,7 @@
         </error>
 	<error id="JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED">
 	  Operation not supported by the system class loader.
-	</error>                                                                                         
+	</error>
       </errors>
     </function>
 
@@ -11028,7 +11028,7 @@
     <function id="GetSystemProperties" phase="onload" num="130">
       <synopsis>Get System Properties</synopsis>
       <description>
-        The list of VM system property keys which may be used with 
+        The list of VM system property keys which may be used with
 	<functionlink id="GetSystemProperty"/> is returned.
         It is strongly recommended that virtual machines provide the
         following property keys:
@@ -11043,15 +11043,15 @@
         Provides access to system properties defined by and used
         by the VM.
         Properties set on the command-line are included.
-	This allows getting and setting of these properties 
+	This allows getting and setting of these properties
         before the VM even begins executing bytecodes.
-	Since this is a VM view of system properties, the set of available 
+	Since this is a VM view of system properties, the set of available
         properties will usually be different than that
 	in <code>java.lang.System.getProperties</code>.
-        JNI method invocation may be used to access 
+        JNI method invocation may be used to access
         <code>java.lang.System.getProperties</code>.
         <p/>
-        The set of properties may grow during execution.	  
+        The set of properties may grow during execution.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -11066,7 +11066,7 @@
         <param id="property_ptr">
 	  <allocallocbuf outcount="count_ptr"><char/></allocallocbuf>
 	  <description>
-	    On return, points to an array of property keys, encoded as 
+	    On return, points to an array of property keys, encoded as
 	    <internallink id="mUTF">modified UTF-8</internallink> strings.
 	  </description>
 	</param>
@@ -11078,25 +11078,25 @@
     <function id="GetSystemProperty" phase="onload" num="131">
       <synopsis>Get System Property</synopsis>
       <description>
-        Return a VM system property value given the property key.  
+        Return a VM system property value given the property key.
         <p/>
 	The function <functionlink id="GetSystemProperties"/>
 	returns the set of property keys which may be used.
         The properties which can be retrieved may grow during
 	execution.
         <p/>
-	Since this is a VM view of system properties, the values 
-        of properties may differ from that returned by 
+	Since this is a VM view of system properties, the values
+        of properties may differ from that returned by
 	<code>java.lang.System.getProperty(String)</code>.
-        A typical VM might copy the values of the VM system 
+        A typical VM might copy the values of the VM system
         properties into the <code>Properties</code> held by
 	<code>java.lang.System</code> during the initialization
         of that class. Thereafter any changes to the VM system
-        properties (with <functionlink id="SetSystemProperty"/>) 
+        properties (with <functionlink id="SetSystemProperty"/>)
         or the <code>java.lang.System</code> system properties
         (with <code>java.lang.System.setProperty(String,String)</code>)
         would cause the values to diverge.
-        JNI method invocation may be used to access 
+        JNI method invocation may be used to access
         <code>java.lang.System.getProperty(String)</code>.
       </description>
       <origin>new</origin>
@@ -11119,7 +11119,7 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_NOT_AVAILABLE"> 
+        <error id="JVMTI_ERROR_NOT_AVAILABLE">
           This property is not available.
 	  Use <functionlink id="GetSystemProperties"/> to find available properties.
         </error>
@@ -11129,7 +11129,7 @@
     <function id="SetSystemProperty" phase="onloadOnly" num="132">
       <synopsis>Set System Property</synopsis>
       <description>
-        Set a VM system property value.  
+        Set a VM system property value.
         <p/>
 	The function <functionlink id="GetSystemProperties"/>
 	returns the set of property keys, some of these may be settable.
@@ -11161,7 +11161,7 @@
 	</param>
       </parameters>
       <errors>
-        <error id="JVMTI_ERROR_NOT_AVAILABLE"> 
+        <error id="JVMTI_ERROR_NOT_AVAILABLE">
           This property is not available or is not writeable.
         </error>
       </errors>
@@ -11177,7 +11177,7 @@
     <function id="GetPhase" jkernel="yes" phase="any" num="133">
       <synopsis>Get Phase</synopsis>
       <description>
-          Return the current phase of VM execution.  
+          Return the current phase of VM execution.
           The phases proceed in sequence:
           <constants id="jvmtiPhase" label="Phases of execution" kind="enum">
             <constant id="JVMTI_PHASE_ONLOAD" num="1">
@@ -11193,7 +11193,7 @@
               <code>VMStart</code> event.
             </constant>
             <constant id="JVMTI_PHASE_START" num="6">
-              Start phase: when the <eventlink id="VMStart"><code>VMStart</code></eventlink> event 
+              Start phase: when the <eventlink id="VMStart"><code>VMStart</code></eventlink> event
               is sent and until the <code>VMInit</code> event is sent.
             </constant>
             <constant id="JVMTI_PHASE_LIVE" num="4">
@@ -11222,8 +11222,8 @@
           <p/>
           Most <jvmti/> events are sent only in the live phase.
           The following events operate in others phases:
-          <eventphaselist phase="start"/>          
-          <eventphaselist phase="any"/>          
+          <eventphaselist phase="start"/>
+          <eventphaselist phase="any"/>
       </description>
       <origin>new</origin>
       <capabilities>
@@ -11245,7 +11245,7 @@
       <description>
         Shutdown a <jvmti/> connection created with JNI <code>GetEnv</code>
         (see <internallink id="environments"><jvmti/> Environments</internallink>).
-        Dispose of any resources held by the environment.  
+        Dispose of any resources held by the environment.
         <issue>
 	    What resources are reclaimed? What is undone?
 	    Breakpoints,watchpoints removed?
@@ -11255,7 +11255,7 @@
         Memory allocated by this environment via calls to <jvmti/> functions
         is not released, this can be done explicitly by the agent
         by calling <functionlink id="Deallocate"/>.
-        Raw monitors created by this environment are not destroyed, 
+        Raw monitors created by this environment are not destroyed,
         this can be done explicitly by the agent
         by calling <functionlink id="DestroyRawMonitor"/>.
         The state of threads waiting on raw monitors created by this environment
@@ -11294,7 +11294,7 @@
         This value is <code>NULL</code> unless set with this function.
 	Agents can allocate memory in which they store environment specific
         information. By setting environment-local storage it can then be
-	accessed with 
+	accessed with
 	<functionlink id="GetEnvironmentLocalStorage"></functionlink>.
 	<p/>
         Called by the agent to set the value of the <jvmti/>
@@ -11307,10 +11307,10 @@
       </capabilities>
       <parameters>
         <param id="data">
-	  <inbuf> 
-	    <void/> 
-	    <nullok>value is set to <code>NULL</code></nullok> 
-	  </inbuf> 
+	  <inbuf>
+	    <void/>
+	    <nullok>value is set to <code>NULL</code></nullok>
+	  </inbuf>
 	  <description>
 	    The value to be entered into the environment-local storage.
 	  </description>
@@ -11324,7 +11324,7 @@
       <synopsis>Get Environment Local Storage</synopsis>
       <description>
         Called by the agent to get the value of the <jvmti/> environment-local
-        storage. 
+        storage.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -11333,10 +11333,10 @@
         <param id="data_ptr">
 	  <agentbuf><void/></agentbuf>
 	  <description>
-	    Pointer through which the value of the environment local 
+	    Pointer through which the value of the environment local
 	    storage is returned.
 	    If environment-local storage has not been set with
-	    <functionlink id="SetEnvironmentLocalStorage"></functionlink> returned 
+	    <functionlink id="SetEnvironmentLocalStorage"></functionlink> returned
 	    pointer is <code>NULL</code>.
 	  </description>
 	</param>
@@ -11349,7 +11349,7 @@
       <synopsis>Get Version Number</synopsis>
       <description>
         Return the <jvmti/> version via <code>version_ptr</code>.
-        The return value is the version identifier. 
+        The return value is the version identifier.
         The version identifier includes major, minor and micro
         version as well as the interface type.
 	<constants id="jvmtiVersionInterfaceTypes" label="Version Interface Types" kind="bits">
@@ -11362,10 +11362,10 @@
 	</constants>
 	<constants id="jvmtiVersionMasks" label="Version Masks" kind="bits">
 	  <constant id="JVMTI_VERSION_MASK_INTERFACE_TYPE" num="0x70000000">
-	    Mask to extract interface type.  
+	    Mask to extract interface type.
 	    The value of the version returned by this function masked with
 	    <code>JVMTI_VERSION_MASK_INTERFACE_TYPE</code> is always
-            <code>JVMTI_VERSION_INTERFACE_JVMTI</code> 
+            <code>JVMTI_VERSION_INTERFACE_JVMTI</code>
             since this is a <jvmti/> function.
 	  </constant>
 	  <constant id="JVMTI_VERSION_MASK_MAJOR" num="0x0FFF0000">
@@ -11409,11 +11409,11 @@
     <function id="GetErrorName" phase="any" num="128">
       <synopsis>Get Error Name</synopsis>
       <description>
-        Return the symbolic name for an 
-          <internallink id="ErrorSection">error code</internallink>.  
-        <p/>
-	For example 
-        <code>GetErrorName(env, JVMTI_ERROR_NONE, &amp;err_name)</code> 
+        Return the symbolic name for an
+          <internallink id="ErrorSection">error code</internallink>.
+        <p/>
+	For example
+        <code>GetErrorName(env, JVMTI_ERROR_NONE, &amp;err_name)</code>
         would return in <code>err_name</code> the string
         <code>"JVMTI_ERROR_NONE"</code>.
       </description>
@@ -11459,7 +11459,7 @@
 	  </constant>
         </constants>
 	Control verbose output.
-	This is the output which typically is sent to <code>stderr</code>. 
+	This is the output which typically is sent to <code>stderr</code>.
       </description>
       <origin>new</origin>
       <capabilities>
@@ -11488,18 +11488,18 @@
       <description>
         Although the greatest functionality is achieved with location information
         referencing the virtual machine bytecode index, the definition of
-        <code>jlocation</code> has intentionally been left unconstrained to allow VM 
+        <code>jlocation</code> has intentionally been left unconstrained to allow VM
         implementations that do not have this information.
         <p/>
         This function describes the representation of <code>jlocation</code> used in this VM.
-        If the returned format is <datalink id="JVMTI_JLOCATION_JVMBCI"></datalink>, 
+        If the returned format is <datalink id="JVMTI_JLOCATION_JVMBCI"></datalink>,
         <code>jlocation</code>s can
         be used as in indices into the array returned by
-        <functionlink id="GetBytecodes"></functionlink>.  
+        <functionlink id="GetBytecodes"></functionlink>.
 	<constants id="jvmtiJlocationFormat" label="JLocation Format Enumeration" kind="enum">
 	  <constant id="JVMTI_JLOCATION_JVMBCI" num="1">
-	    <code>jlocation</code> values represent virtual machine 
-	    bytecode indices--that is, offsets into the 
+	    <code>jlocation</code> values represent virtual machine
+	    bytecode indices--that is, offsets into the
 	    virtual machine code for a method.
 	  </constant>
 	  <constant id="JVMTI_JLOCATION_MACHINEPC" num="2">
@@ -11534,16 +11534,16 @@
   <intro>
     Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
     <p/>
-    It is the responsibility of the agent to call <jvmti/> functions with 
+    It is the responsibility of the agent to call <jvmti/> functions with
     valid parameters and in the proper context (calling thread is attached,
-    phase is correct, etc.).  
-    Detecting some error conditions may be difficult, inefficient, or 
+    phase is correct, etc.).
+    Detecting some error conditions may be difficult, inefficient, or
     impossible for an implementation.
-    The errors listed in 
+    The errors listed in
     <internallink id="reqerrors">Function Specific Required Errors</internallink>
     must be detected by the implementation.
     All other errors represent the recommended response to the error
-    condition. 
+    condition.
   </intro>
 
   <errorcategory id="universal-error" label="Universal Errors">
@@ -11559,7 +11559,7 @@
       Pointer is unexpectedly <code>NULL</code>.
     </errorid>
     <errorid id="JVMTI_ERROR_OUT_OF_MEMORY" num="110">
-      The function attempted to allocate memory and no more memory was 
+      The function attempted to allocate memory and no more memory was
       available for allocation.
     </errorid>
     <errorid id="JVMTI_ERROR_ACCESS_DENIED" num="111">
@@ -11651,7 +11651,7 @@
     <intro>
       The following errors are returned by some <jvmti/> functions.
       They are returned in the event of invalid parameters passed by the
-      agent or usage in an invalid context.  
+      agent or usage in an invalid context.
       An implementation is not required to detect these errors.
     </intro>
 
@@ -11726,7 +11726,7 @@
       declared in the old class version.
     </errorid>
     <errorid id="JVMTI_ERROR_NAMES_DONT_MATCH" num="69">
-      The class name defined in the new class file is 
+      The class name defined in the new class file is
       different from the name in the old class object.
     </errorid>
     <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED" num="70">
@@ -11745,33 +11745,33 @@
     programs.
     <p/>
     To handle events, designate a set of callback functions with
-    <functionlink id="SetEventCallbacks"></functionlink>. 
-    For each event the corresponding callback function will be 
+    <functionlink id="SetEventCallbacks"></functionlink>.
+    For each event the corresponding callback function will be
     called.
     Arguments to the callback function provide additional
-    information about the event. 
+    information about the event.
     <p/>
-    The callback function is usually called from within an application 
-    thread. The <jvmti/> implementation does not 
+    The callback function is usually called from within an application
+    thread. The <jvmti/> implementation does not
     queue events in any way. This means
-    that event callback functions must be written 
-    carefully. Here are some general guidelines. See 
+    that event callback functions must be written
+    carefully. Here are some general guidelines. See
     the individual event descriptions for further
     suggestions.
     <p/>
     <ul>
-      <li>Any exception thrown during the execution of an event callback can 
+      <li>Any exception thrown during the execution of an event callback can
 	overwrite any current pending exception in the current application thread.
 	Care must be taken to preserve a pending exception
 	when an event callback makes a JNI call that might generate an exception.
       </li>
       <li>Event callback functions must be re-entrant. The <jvmti/> implementation does
-	not queue events. If an agent needs to process events one at a time, it 
-	can use a raw monitor inside the 
+	not queue events. If an agent needs to process events one at a time, it
+	can use a raw monitor inside the
 	event callback functions to serialize event processing.
       </li>
       <li>Event callback functions that execute JNI's FindClass function to load
-        classes need to note that FindClass locates the class loader associated 
+        classes need to note that FindClass locates the class loader associated
         with the current native method. For the purposes of class loading, an
         event callback that includes a JNI environment as a parameter to the
         callback will treated as if it is a native call, where the native method
@@ -11779,8 +11779,8 @@
       </li>
     </ul>
     <p/>
-    Some <jvmti/> events identify objects with JNI references. 
-    All references 
+    Some <jvmti/> events identify objects with JNI references.
+    All references
     in <jvmti/> events are JNI local references and will become invalid
     after the event callback returns.
     Unless stated otherwise, memory referenced by pointers sent in event
@@ -11791,13 +11791,13 @@
     Events are sent at the time they occur.
     The specification for each event includes the set of
     <functionlink id="GetPhase">phases</functionlink> in which it can be sent;
-    if an event triggering activity occurs during another phase, no event 
-    is sent. 
+    if an event triggering activity occurs during another phase, no event
+    is sent.
     <p/>
     A thread that generates an event does not change its execution status
     (for example, the event does not cause the thread to be suspended).
     If an agent wishes the event to result in suspension, then the agent
-    is responsible for explicitly suspending the thread with 
+    is responsible for explicitly suspending the thread with
     <functionlink id="SuspendThread"></functionlink>.
     <p/>
     If an event is enabled in multiple environments, the event will be sent
@@ -11810,26 +11810,26 @@
       <ul>
 	<li>
 	  If the event requires a capability, that capability must
-	  be added with 
+	  be added with
 	  <functionlink id="AddCapabilities"></functionlink>.
 	</li>
 	<li>
-	  A callback for the event must be set with 
+	  A callback for the event must be set with
 	  <functionlink id="SetEventCallbacks"></functionlink>.
 	</li>
 	<li>
 	  The event must be enabled with
-	  <functionlink id="SetEventNotificationMode"></functionlink>. 
+	  <functionlink id="SetEventNotificationMode"></functionlink>.
 	</li>
       </ul>
   </intro>
 
   <intro label="Multiple Co-located Events" id="eventorder">
-    In many situations it is possible for multiple events to occur 
-    at the same location in one thread. When this happens, all the events 
+    In many situations it is possible for multiple events to occur
+    at the same location in one thread. When this happens, all the events
     are reported through the event callbacks in the order specified in this section.
     <p/>
-    If the current location is at the entry point of a method, the 
+    If the current location is at the entry point of a method, the
     <eventlink id="MethodEntry"></eventlink> event is reported before
     any other event at the current location in the same thread.
     <p/>
@@ -11839,39 +11839,39 @@
     <code>exceptionCatch</code> event is reported before
     any other event at the current location in the same thread.
     <p/>
-    If a <code>singleStep</code> event or 
-    <code>breakpoint</code> event is triggered at the 
-    current location, the event is defined to occur 
-    immediately before the code at the current location is executed. 
-    These events are reported before any events which are triggered 
-    by the execution of code at the current location in the same 
-    thread (specifically: 
+    If a <code>singleStep</code> event or
+    <code>breakpoint</code> event is triggered at the
+    current location, the event is defined to occur
+    immediately before the code at the current location is executed.
+    These events are reported before any events which are triggered
+    by the execution of code at the current location in the same
+    thread (specifically:
     <code>exception</code>,
     <code>fieldAccess</code>, and
     <code>fieldModification</code>).
-    If both a step and breakpoint event are triggered for the same thread and 
+    If both a step and breakpoint event are triggered for the same thread and
     location, the step event is reported before the breakpoint event.
     <p/>
     If the current location is the exit point of a method (that is, the last
-    location before returning to the caller), the 
-    <eventlink id="MethodExit"></eventlink> event and 
+    location before returning to the caller), the
+    <eventlink id="MethodExit"></eventlink> event and
     the <eventlink id="FramePop"></eventlink> event (if requested)
     are reported after all other events at the current location in the same
-    thread. There is no specified ordering of these two events 
+    thread. There is no specified ordering of these two events
     with respect to each other.
     <p/>
     Co-located events can be triggered during the processing of some other
     event by the agent at the same location in the same thread.
-    If such an event, of type <i>y</i>, is triggered during the processing of 
-    an event of type <i>x</i>, and if <i>x</i> 
-    precedes <i>y</i> in the ordering specified above, the co-located event 
+    If such an event, of type <i>y</i>, is triggered during the processing of
+    an event of type <i>x</i>, and if <i>x</i>
+    precedes <i>y</i> in the ordering specified above, the co-located event
     <i>y</i> is reported for the current thread and location. If <i>x</i> does not precede
     <i>y</i>, <i>y</i> is not reported for the current thread and location.
-    For example, if a breakpoint is set at the current location 
+    For example, if a breakpoint is set at the current location
     during the processing of <eventlink id="SingleStep"></eventlink>,
-    that breakpoint will be reported before the thread moves off the current 
+    that breakpoint will be reported before the thread moves off the current
     location.
-    <p/>The following events are never considered to be co-located with 
+    <p/>The following events are never considered to be co-located with
     other events.
     <ul>
       <li><eventlink id="VMStart"></eventlink></li>
@@ -11887,7 +11887,7 @@
   <intro label="Event Callbacks" id="jvmtiEventCallbacks">
       The event callback structure below is used to specify the handler function
       for events.  It is set with the
-      <functionlink id="SetEventCallbacks"></functionlink> function. 
+      <functionlink id="SetEventCallbacks"></functionlink> function.
   </intro>
 
   <event label="Single Step"
@@ -11895,13 +11895,13 @@
     <description>
       Single step events allow the agent to trace thread execution
       at the finest granularity allowed by the VM. A single step event is
-      generated whenever a thread reaches a new location. 
-      Typically, single step events represent the completion of one VM 
-      instruction as defined in <vmspec/>. However, some implementations 
-      may define locations differently. In any case the 
+      generated whenever a thread reaches a new location.
+      Typically, single step events represent the completion of one VM
+      instruction as defined in <vmspec/>. However, some implementations
+      may define locations differently. In any case the
       <code>method</code> and <code>location</code>
       parameters  uniquely identify the current location and allow
-      the mapping to source file and line number when that information is 
+      the mapping to source file and line number when that information is
       available.
       <p/>
       No single step events are generated from within native methods.
@@ -11910,7 +11910,7 @@
     <capabilities>
       <required id="can_generate_single_step_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -11953,14 +11953,14 @@
       designated as a breakpoint with <functionlink id="SetBreakpoint"></functionlink>.
       The <code>method</code> and <code>location</code>
       parameters uniquely identify the current location and allow
-      the mapping to source file and line number when that information is 
+      the mapping to source file and line number when that information is
       available.
     </description>
     <origin>jvmdi</origin>
     <capabilities>
       <required id="can_generate_breakpoint_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12000,18 +12000,18 @@
 	 id="FieldAccess" const="JVMTI_EVENT_FIELD_ACCESS" filtered="thread" num="63">
     <description>
       Field access events are generated whenever a thread accesses
-      a field that was designated as a watchpoint 
+      a field that was designated as a watchpoint
       with <functionlink id="SetFieldAccessWatch"></functionlink>.
-      The <code>method</code> and <code>location</code> 
+      The <code>method</code> and <code>location</code>
       parameters uniquely identify the current location and allow
-      the mapping to source file and line number when that information is 
-      available. 
+      the mapping to source file and line number when that information is
+      available.
     </description>
     <origin>jvmdi</origin>
     <capabilities>
       <required id="can_generate_field_access_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12070,18 +12070,18 @@
 	 id="FieldModification" const="JVMTI_EVENT_FIELD_MODIFICATION" filtered="thread" num="64">
     <description>
       Field modification events are generated whenever a thread modifies
-      a field that was designated as a watchpoint 
+      a field that was designated as a watchpoint
       with <functionlink id="SetFieldModificationWatch"></functionlink>.
-      The <code>method</code> and <code>location</code> 
+      The <code>method</code> and <code>location</code>
       parameters uniquely identify the current location and allow
-      the mapping to source file and line number when that information is 
-      available. 
+      the mapping to source file and line number when that information is
+      available.
     </description>
     <origin>jvmdi</origin>
     <capabilities>
       <required id="can_generate_field_modification_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12151,25 +12151,25 @@
   <event label="Frame Pop"
 	 id="FramePop" const="JVMTI_EVENT_FRAME_POP" filtered="thread" num="61">
     <description>
-      Frame pop events are generated upon exit from a single method 
+      Frame pop events are generated upon exit from a single method
       in a single frame as specified
       in a call to <functionlink id="NotifyFramePop"></functionlink>.
       This is true whether termination is caused by
       executing its return instruction
-      or by throwing an exception to its caller 
+      or by throwing an exception to its caller
       (see <paramlink id="was_popped_by_exception"></paramlink>).
-      However, frame pops caused by the <functionlink id="PopFrame"/> 
+      However, frame pops caused by the <functionlink id="PopFrame"/>
       function are not reported.
       <p/>
       The location reported by <functionlink id="GetFrameLocation"></functionlink>
-      identifies the executable location in the returning method, 
-      immediately prior to the return. 
+      identifies the executable location in the returning method,
+      immediately prior to the return.
     </description>
     <origin>jvmdi</origin>
     <capabilities>
       <required id="can_generate_frame_pop_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12209,24 +12209,24 @@
   <event label="Method Entry"
 	 id="MethodEntry" const="JVMTI_EVENT_METHOD_ENTRY" filtered="thread" num="65">
     <description>
-      Method entry events are generated upon entry of Java 
+      Method entry events are generated upon entry of Java
       programming language methods (including native methods).
       <p/>
       The location reported by <functionlink id="GetFrameLocation"></functionlink>
       identifies the initial executable location in
-      the method. 
+      the method.
       <p/>
       Enabling method
       entry or exit events will significantly degrade performance on many platforms and is thus
       not advised for performance critical usage (such as profiling).
-      <internallink id="bci">Bytecode instrumentation</internallink> should be 
+      <internallink id="bci">Bytecode instrumentation</internallink> should be
       used in these cases.
     </description>
     <origin>jvmdi</origin>
     <capabilities>
       <required id="can_generate_method_entry_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12259,25 +12259,25 @@
   <event label="Method Exit"
 	 id="MethodExit" const="JVMTI_EVENT_METHOD_EXIT" filtered="thread" num="66">
     <description>
-      Method exit events are generated upon exit from Java 
+      Method exit events are generated upon exit from Java
       programming language methods (including native methods).
       This is true whether termination is caused by
       executing its return instruction
-      or by throwing an exception to its caller 
+      or by throwing an exception to its caller
       (see <paramlink id="was_popped_by_exception"></paramlink>).
       <p/>
       The <code>method</code> field uniquely identifies the
-      method being entered or exited. The <code>frame</code> field provides 
+      method being entered or exited. The <code>frame</code> field provides
       access to the stack frame for the method.
       <p/>
       The location reported by <functionlink id="GetFrameLocation"></functionlink>
-      identifies the executable location in the returning method 
-      immediately prior to the return. 
+      identifies the executable location in the returning method
+      immediately prior to the return.
       <p/>
         Enabling method
 	entry or exit events will significantly degrade performance on many platforms and is thus
 	not advised for performance critical usage (such as profiling).
-        <internallink id="bci">Bytecode instrumentation</internallink> should be 
+        <internallink id="bci">Bytecode instrumentation</internallink> should be
         used in these cases.
     </description>
     <origin>jvmdi</origin>
@@ -12322,7 +12322,7 @@
 	<jvalue/>
 	<description>
 	  The return value of the method being exited.
-	  Undefined and should not be used if 
+	  Undefined and should not be used if
 	  <paramlink id="was_popped_by_exception"></paramlink>
 	  is true.
 	</description>
@@ -12333,18 +12333,18 @@
   <event label="Native Method Bind" phase="any"
 	 id="NativeMethodBind" const="JVMTI_EVENT_NATIVE_METHOD_BIND" num="67">
     <description>
-      A Native Method Bind event is sent when a VM binds a 
+      A Native Method Bind event is sent when a VM binds a
       Java programming language native method
-      to the address of a function that implements the native method. 
+      to the address of a function that implements the native method.
       This will occur when the native method is called for the first time
       and also occurs when the JNI function <code>RegisterNatives</code> is called.
       This event allows the bind to be redirected to an agent-specified
-      proxy function. 
+      proxy function.
       This event is not sent when the native method is unbound.
-      Typically, this proxy function will need to be specific to a 
+      Typically, this proxy function will need to be specific to a
       particular method or, to handle the general case, automatically
-      generated assembly code, since after instrumentation code is 
-      executed the function at the original binding 
+      generated assembly code, since after instrumentation code is
+      executed the function at the original binding
       address will usually be invoked.
       The original binding can be restored or the redirection changed
       by use of the JNI function <code>RegisterNatives</code>.
@@ -12363,7 +12363,7 @@
         </outptr>
           <description>
             The JNI environment of the event (current) thread
-	    Will be <code>NULL</code> if sent during the primordial 
+	    Will be <code>NULL</code> if sent during the primordial
             <functionlink id="GetPhase">phase</functionlink>.
           </description>
       </param>
@@ -12407,7 +12407,7 @@
 	 id="Exception" const="JVMTI_EVENT_EXCEPTION" filtered="thread" num="58">
     <description>
       Exception events are generated whenever an exception is first detected
-      in a Java programming language method. 
+      in a Java programming language method.
       Where "exception" means any <code>java.lang.Throwable</code>.
       The exception may have been thrown by a Java programming language or native
       method, but in the case of native methods, the event is not generated
@@ -12416,20 +12416,20 @@
       no exception event is generated.
       <p/>
       The <code>method</code> and <code>location</code>
-      parameters  uniquely identify the current location 
+      parameters  uniquely identify the current location
       (where the exception was detected) and allow
-      the mapping to source file and line number when that information is 
+      the mapping to source file and line number when that information is
       available. The <code>exception</code> field identifies the thrown
       exception object. The <code>catch_method</code>
       and <code>catch_location</code> identify the location of the catch clause,
       if any, that handles the thrown exception. If there is no such catch clause,
       each field is set to 0. There is no guarantee that the thread will ever
       reach this catch clause. If there are native methods on the call stack
-      between the throw location and the catch clause, the exception may 
+      between the throw location and the catch clause, the exception may
       be reset by one of those native methods.
       Similarly, exceptions that are reported as uncaught (<code>catch_klass</code>
       et al. set to 0) may in fact be caught by native code.
-      Agents can check for these occurrences by monitoring 
+      Agents can check for these occurrences by monitoring
       <eventlink id="ExceptionCatch"></eventlink> events.
       Note that finally clauses are implemented as catch and re-throw. Therefore they
       will be reported in the catch location.
@@ -12438,7 +12438,7 @@
     <capabilities>
       <required id="can_generate_exception_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12505,18 +12505,18 @@
       Where "exception" means any <code>java.lang.Throwable</code>.
       If the exception is caught in a Java programming language method, the event is generated
       when the catch clause is reached. If the exception is caught in a native
-      method, the event is generated as soon as control is returned to a Java programming language 
+      method, the event is generated as soon as control is returned to a Java programming language
       method. Exception catch events are generated for any exception for which
       a throw was detected in a Java programming language method.
       Note that finally clauses are implemented as catch and re-throw. Therefore they
       will generate exception catch events.
       <p/>
       The <code>method</code> and <code>location</code>
-      parameters uniquely identify the current location 
-      and allow the mapping to source file and line number when that information is 
-      available. For exceptions caught in a Java programming language method, the 
+      parameters uniquely identify the current location
+      and allow the mapping to source file and line number when that information is
+      available. For exceptions caught in a Java programming language method, the
       <code>exception</code> object identifies the exception object. Exceptions
-      caught in native methods are not necessarily available by the time the 
+      caught in native methods are not necessarily available by the time the
       exception catch is reported, so the <code>exception</code> field is set
       to <code>NULL</code>.
     </description>
@@ -12524,7 +12524,7 @@
     <capabilities>
       <required id="can_generate_exception_events"></required>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12570,11 +12570,11 @@
 	 id="ThreadStart" const="JVMTI_EVENT_THREAD_START" num="52" phase="start">
     <description>
       Thread start events are generated by a new thread before its initial
-      method executes. 
+      method executes.
       <p/>
       A thread may be listed in the array returned by
       <functionlink id="GetAllThreads"></functionlink>
-      before its thread start event is generated. 
+      before its thread start event is generated.
       It is possible for other events to be generated
       on a thread before its thread start event.
       <p/>
@@ -12583,7 +12583,7 @@
     <origin>jvmdi</origin>
     <capabilities>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12602,14 +12602,14 @@
   </event>
 
   <event label="Thread End"
-	 id="ThreadEnd" const="JVMTI_EVENT_THREAD_END" filtered="thread" num="53" phase="start"> 
+	 id="ThreadEnd" const="JVMTI_EVENT_THREAD_END" filtered="thread" num="53" phase="start">
     <description>
       Thread end events are generated by a terminating thread
-      after its initial method has finished execution. 
+      after its initial method has finished execution.
       <p/>
       A thread may be listed in the array returned by
       <functionlink id="GetAllThreads"></functionlink>
-      after its thread end event is generated. 
+      after its thread end event is generated.
       No events are generated on a thread
       after its thread end event.
       <p/>
@@ -12618,7 +12618,7 @@
     <origin>jvmdi</origin>
     <capabilities>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12641,15 +12641,15 @@
     <description>
       A class load event is generated when a class is first loaded. The order
       of class load events generated by a particular thread are guaranteed
-      to match the order of class loading within that thread. 
+      to match the order of class loading within that thread.
       Array class creation does not generate a class load event.
-      The creation of a primitive class (for example, java.lang.Integer.TYPE) 
+      The creation of a primitive class (for example, java.lang.Integer.TYPE)
       does not generate a class load event.
       <p/>
       This event is sent at an early stage in loading the class. As
       a result the class should be used carefully.  Note, for example,
       that methods and fields are not yet loaded, so queries for methods,
-      fields, subclasses, and so on will not give correct results. 
+      fields, subclasses, and so on will not give correct results.
       See "Loading of Classes and Interfaces" in the <i>Java Language
       Specification</i>.  For most
       purposes the <eventlink id="ClassPrepare"></eventlink> event will
@@ -12658,7 +12658,7 @@
     <origin>jvmdi</origin>
     <capabilities>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12687,7 +12687,7 @@
 	 id="ClassUnload" const="JVMTI_EVENT_CLASS_UNLOAD" num="57">
     <description>
       A class unload event is generated when the class is about to be unloaded.
-      Class unload events take place during garbage collection and must be 
+      Class unload events take place during garbage collection and must be
       handled extremely carefully. The garbage collector holds many locks
       and has suspended all other threads, so the event handler cannot depend
       on the ability to acquire any locks. The class unload event handler should
@@ -12704,7 +12704,7 @@
     <origin>jvmdi</origin>
     <capabilities>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12733,16 +12733,16 @@
 	 id="ClassPrepare" const="JVMTI_EVENT_CLASS_PREPARE" filtered="thread" phase="start" num="56">
     <description>
       A class prepare event is generated when class preparation is complete.
-      At this point, class fields, methods, and implemented interfaces are 
-      available, and no code from the class has been executed. Since array 
-      classes never have fields or methods, class prepare events are not 
-      generated for them. Class prepare events are not generated for 
-      primitive classes (for example, <code>java.lang.Integer.TYPE</code>). 
+      At this point, class fields, methods, and implemented interfaces are
+      available, and no code from the class has been executed. Since array
+      classes never have fields or methods, class prepare events are not
+      generated for them. Class prepare events are not generated for
+      primitive classes (for example, <code>java.lang.Integer.TYPE</code>).
     </description>
     <origin>jvmdi</origin>
     <capabilities>
     </capabilities>
-    <parameters> 
+    <parameters>
       <param id="jni_env">
         <outptr>
           <struct>JNIEnv</struct>
@@ -12771,14 +12771,14 @@
     <description>
       This event is sent when the VM obtains class file data,
       but before it constructs
-      the in-memory representation for that class. 
-      This event is also sent when the class is being modified by the 
+      the in-memory representation for that class.
+      This event is also sent when the class is being modified by the
       <functionlink id="RetransformClasses"/> function or
       the <functionlink id="RedefineClasses"/> function,
       called in any <jvmti/> environment.
       The agent can instrument
       the existing class file data sent by the VM to include profiling/debugging hooks.
-      See the description of 
+      See the description of
       <internallink id="bci">bytecode instrumentation</internallink>
       for usage information.
       <p/>
@@ -12788,28 +12788,28 @@
     <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events">
     <code>can_generate_all_class_hook_events</code></internallink>
     are enabled then this event may be sent in the primordial phase.
-    Otherwise, this event may be sent before the VM is initialized (the start 
+    Otherwise, this event may be sent before the VM is initialized (the start
     <functionlink id="GetPhase">phase</functionlink>).
     Some classes might not be compatible
     with the function (eg. ROMized classes or implementation defined classes) and this event will
     not be generated for these classes.
     <p/>
-    The agent must allocate the space for the modified 
+    The agent must allocate the space for the modified
     class file data buffer
-    using the memory allocation function 
+    using the memory allocation function
     <functionlink id="Allocate"></functionlink> because the
     VM is responsible for freeing the new class file data buffer
     using <functionlink id="Deallocate"></functionlink>.
     <p/>
-    If the agent wishes to modify the class file, it must set 
+    If the agent wishes to modify the class file, it must set
     <code>new_class_data</code> to point
     to the newly instrumented class file data buffer and set
-    <code>new_class_data_len</code> to the length of that 
+    <code>new_class_data_len</code> to the length of that
     buffer before returning
     from this call.  If no modification is desired, the agent simply
     does not set <code>new_class_data</code>.  If multiple agents
     have enabled this event the results are chained. That is, if
-    <code>new_class_data</code> has been set, it becomes the 
+    <code>new_class_data</code> has been set, it becomes the
     <code>class_data</code> for the next agent.
     <p/>
     When handling a class load in the live phase, then the
@@ -12827,13 +12827,13 @@
       <li><fieldlink id="can_retransform_classes"
                      struct="jvmtiCapabilities">retransformation
                                                 incapable</fieldlink>
-          environments, in the 
+          environments, in the
           order in which they were created
       </li>
       <li><fieldlink id="can_retransform_classes"
                      struct="jvmtiCapabilities">retransformation
                                                 capable</fieldlink>
-          environments, in the 
+          environments, in the
           order in which they were created
       </li>
     </ul>
@@ -12869,7 +12869,7 @@
       <param id="loader">
 	<jobject/>
 	  <description>
-	    The class loader loading the class.  
+	    The class loader loading the class.
             <code>NULL</code> if the bootstrap class loader.
 	  </description>
       </param>
@@ -12972,7 +12972,7 @@
       with other events, but
       the preceding events should be handled carefully, if at all, because the
       VM has not completed its initialization. The thread start event for the
-      main application thread is guaranteed not to occur until after the 
+      main application thread is guaranteed not to occur until after the
       handler for the VM initialization event returns.
       <p/>
       In the case of VM start-up failure, this event will not be sent.
@@ -13001,7 +13001,7 @@
   <event label="VM Death Event"
 	 id="VMDeath" const="JVMTI_EVENT_VM_DEATH" num="51">
     <description>
-      The VM death event notifies the agent of the termination of the VM. 
+      The VM death event notifies the agent of the termination of the VM.
       No events will occur after the VMDeath event.
       <p/>
       In the case of VM start-up failure, this event will not be sent.
@@ -13032,7 +13032,7 @@
       followed by a new <code>CompiledMethodLoad</code> event.
       Note that a single method may have multiple compiled forms, and that
       this event will be sent for each form.
-      Note also that several methods may be inlined into a single 
+      Note also that several methods may be inlined into a single
       address range, and that this event will be sent for each method.
       <p/>
       These events can be sent after their initial occurrence with
@@ -13049,7 +13049,7 @@
       <field id="location">
 	<jlocation/>
 	<description>
-	  Corresponding location. See 
+	  Corresponding location. See
 	  <functionlink id="GetJLocationFormat"></functionlink>
 	  for the meaning of location.
 	</description>
@@ -13095,7 +13095,7 @@
 	<vmbuf><struct>jvmtiAddrLocationMap</struct></vmbuf>
 	<description>
 	  Map from native addresses to location.
-	  The native address range of each entry is from 
+	  The native address range of each entry is from
 	  <fieldlink id="start_address" struct="jvmtiAddrLocationMap"></fieldlink>
 	  to <code>start_address-1</code> of the next entry.
 	  <code>NULL</code> if mapping information cannot be supplied.
@@ -13104,10 +13104,10 @@
       <param id="compile_info">
 	<vmbuf><void/></vmbuf>
 	<description>
-	  VM-specific compilation information.  
+	  VM-specific compilation information.
 	  The referenced compile information is managed by the VM
 	  and must not depend on the agent for collection.
-	  A VM implementation defines the content and lifetime 
+	  A VM implementation defines the content and lifetime
 	  of the information.
 	</description>
       </param>
@@ -13119,9 +13119,9 @@
     <description>
       Sent when a compiled method is unloaded from memory.
       This event might not be sent on the thread which performed the unload.
-      This event may be sent sometime after the unload occurs, but 
+      This event may be sent sometime after the unload occurs, but
       will be sent before the memory is reused
-      by a newly generated compiled method. This event may be sent after 
+      by a newly generated compiled method. This event may be sent after
       the class is unloaded.
     </description>
     <origin>jvmpi</origin>
@@ -13139,7 +13139,7 @@
 	<jmethodID class="klass"/>
 	  <description>
 	    Compiled method being unloaded.
-	    For identification of the compiled method only -- the class 
+	    For identification of the compiled method only -- the class
 	    may be unloaded and therefore the method should not be used
 	    as an argument to further JNI or <jvmti/> functions.
 	  </description>
@@ -13148,7 +13148,7 @@
 	<vmbuf><void/></vmbuf>
 	<description>
 	  Address where compiled method code was loaded.
-          For identification of the compiled method only -- 
+          For identification of the compiled method only --
           the space may have been reclaimed.
 	</description>
       </param>
@@ -13236,7 +13236,7 @@
       <param id="thread">
 	<jthread/>
 	  <description>
-	    JNI local reference to the thread 
+	    JNI local reference to the thread
 	    attempting to enter the monitor
 	  </description>
       </param>
@@ -13367,28 +13367,28 @@
          since="1.1">
     <description>
       Sent when a VM resource needed by a running application has been exhausted.
-      Except as required by the optional capabilities, the set of resources 
+      Except as required by the optional capabilities, the set of resources
       which report exhaustion is implementation dependent.
       <p/>
       The following bit flags define the properties of the resource exhaustion:
-      <constants id="jvmtiResourceExhaustionFlags" 
-                 label="Resource Exhaustion Flags" 
-                 kind="bits" 
+      <constants id="jvmtiResourceExhaustionFlags"
+                 label="Resource Exhaustion Flags"
+                 kind="bits"
                  since="1.1">
         <constant id="JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR" num="0x0001">
           After this event returns, the VM will throw a
           <code>java.lang.OutOfMemoryError</code>.
-        </constant>	  
+        </constant>
         <constant id="JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP" num="0x0002">
-	  The VM was unable to allocate memory from the <tm>Java</tm> 
+	  The VM was unable to allocate memory from the <tm>Java</tm>
           platform <i>heap</i>.
           The <i>heap</i> is the runtime
           data area from which memory for all class instances and
           arrays are allocated.
-        </constant>	  
+        </constant>
         <constant id="JVMTI_RESOURCE_EXHAUSTED_THREADS" num="0x0004">
 	  The VM was unable to create a thread.
-        </constant>	  
+        </constant>
       </constants>
     </description>
     <origin>new</origin>
@@ -13398,7 +13398,7 @@
         <internallink id="JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP">heap</internallink>.
       </capability>
       <capability id="can_generate_resource_exhaustion_threads_events">
-        Can generate events when the VM is unable to 
+        Can generate events when the VM is unable to
         <internallink id="JVMTI_RESOURCE_EXHAUSTED_THREADS">create
         a thread</internallink>.
       </capability>
@@ -13416,8 +13416,8 @@
 	<jint/>
         <description>
 	  Flags defining the properties of the of resource exhaustion
-	  as specified by the 
-          <internallink id="jvmtiResourceExhaustionFlags">Resource 
+	  as specified by the
+          <internallink id="jvmtiResourceExhaustionFlags">Resource
           Exhaustion Flags</internallink>.
 	  </description>
 	</param>
@@ -13440,16 +13440,16 @@
   <event label="VM Object Allocation"
 	 id="VMObjectAlloc" const="JVMTI_EVENT_VM_OBJECT_ALLOC" num="84">
     <description>
-      Sent when a method causes the virtual machine to allocate an 
+      Sent when a method causes the virtual machine to allocate an
       Object visible to Java programming language code and the
       allocation is not detectable by other intrumentation mechanisms.
       Generally object allocation should be detected by instrumenting
       the bytecodes of allocating methods.
       Object allocation generated in native code by JNI function
-      calls should be detected using 
+      calls should be detected using
       <internallink id="jniIntercept">JNI function interception</internallink>.
-      Some methods might not have associated bytecodes and are not 
-      native methods, they instead are executed directly by the 
+      Some methods might not have associated bytecodes and are not
+      native methods, they instead are executed directly by the
       VM. These methods should send this event.
       Virtual machines which are incapable of bytecode instrumentation
       for some or all of their methods can send this event.
@@ -13539,7 +13539,7 @@
   <event label="Garbage Collection Start"
 	 id="GarbageCollectionStart" const="JVMTI_EVENT_GARBAGE_COLLECTION_START" num="81">
     <description>
-      A Garbage Collection Start event is sent when a 
+      A Garbage Collection Start event is sent when a
       garbage collection pause begins.
       Only stop-the-world collections are reported--that is, collections during
       which all threads cease to modify the state of the Java virtual machine.
@@ -13550,8 +13550,8 @@
       specifically allow such use (see the raw monitor, memory management,
       and environment local storage functions).
       <p/>
-      This event is always sent as a matched pair with 
-      <eventlink id="GarbageCollectionFinish"/> 
+      This event is always sent as a matched pair with
+      <eventlink id="GarbageCollectionFinish"/>
       (assuming both events are enabled) and no garbage collection
       events will occur between them.
     </description>
@@ -13580,11 +13580,11 @@
       and the handler for the Garbage Collection Finish event simply
       notifies the raw monitor
       <p/>
-      This event is always sent as a matched pair with 
+      This event is always sent as a matched pair with
       <eventlink id="GarbageCollectionStart"/> (assuming both events are enabled).
       <issue>
 	The most important use of this event is to provide timing information,
-	and thus additional information is not required.  However,  
+	and thus additional information is not required.  However,
 	information about the collection which is "free" should be included -
         what that information is needs to be determined.
       </issue>
@@ -13613,7 +13613,7 @@
 	  </ul>
 	</issue>
 	<issue>
-	  Though this seemed trivial to implement.  
+	  Though this seemed trivial to implement.
           In the RI it appears this will be quite complex.
 	</issue>
     </description>
@@ -13659,54 +13659,54 @@
     </basetype>
     <basetype id="jint">
       <description>
-	Holds a Java programming language <code>int</code>. 
+	Holds a Java programming language <code>int</code>.
 	Signed 32 bits.
       </description>
     </basetype>
     <basetype id="jlong">
       <description>
-	Holds a Java programming language <code>long</code>. 
+	Holds a Java programming language <code>long</code>.
 	Signed 64 bits.
       </description>
     </basetype>
     <basetype id="jfloat">
       <description>
-	Holds a Java programming language <code>float</code>. 
+	Holds a Java programming language <code>float</code>.
 	32 bits.
       </description>
     </basetype>
     <basetype id="jdouble">
       <description>
-	Holds a Java programming language <code>double</code>. 
+	Holds a Java programming language <code>double</code>.
 	64 bits.
       </description>
     </basetype>
     <basetype id="jobject">
       <description>
-	Holds a Java programming language object. 
+	Holds a Java programming language object.
       </description>
     </basetype>
     <basetype id="jclass">
       <description>
-	Holds a Java programming language class. 
+	Holds a Java programming language class.
       </description>
     </basetype>
     <basetype id="jvalue">
       <description>
-	Is a union of all primitive types and <code>jobject</code>.  Thus, holds any Java 
-	programming language value. 
+	Is a union of all primitive types and <code>jobject</code>.  Thus, holds any Java
+	programming language value.
       </description>
     </basetype>
     <basetype id="jfieldID">
       <description>
-	Identifies a Java programming language field. 
+	Identifies a Java programming language field.
         <code>jfieldID</code>s returned by <jvmti/> functions and events may be
         safely stored.
       </description>
     </basetype>
     <basetype id="jmethodID">
       <description>
-	Identifies a Java programming language method, initializer, or constructor. 
+	Identifies a Java programming language method, initializer, or constructor.
         <code>jmethodID</code>s returned by <jvmti/> functions and events may be
         safely stored.  However, if the class is unloaded, they become invalid
         and must not be used.
@@ -13715,7 +13715,7 @@
     <basetype id="JNIEnv">
       <description>
 	Pointer to the JNI function table.  Pointer to this (<code>JNIEnv *</code>)
-	is a JNI environment. 
+	is a JNI environment.
       </description>
     </basetype>
   </basetypes>
@@ -13723,9 +13723,9 @@
   <basetypes id="jvmtiTypes" label="JVM Tool Interface Base Types">
     <basetype id="jvmtiEnv">
       <description>
-	The <jvmti/> <internallink id="environments">environment</internallink> pointer. 
+	The <jvmti/> <internallink id="environments">environment</internallink> pointer.
         See the <internallink id="FunctionSection">Function Section</internallink>.
-        <code>jvmtiEnv</code> points to the 
+        <code>jvmtiEnv</code> points to the
         <internallink id="FunctionTable">function table</internallink> pointer.
       </description>
     </basetype>
@@ -13744,8 +13744,8 @@
     <basetype id="jlocation">
       <definition>typedef jlong jlocation;</definition>
       <description>
-	A 64 bit value, representing a monotonically increasing 
-	executable position within a method. 
+	A 64 bit value, representing a monotonically increasing
+	executable position within a method.
         <code>-1</code> indicates a native method.
 	See <functionlink id="GetJLocationFormat"></functionlink> for the format on a
 	given VM.
@@ -13763,10 +13763,10 @@
 	Holds an error return code.
 	See the <internallink id="ErrorSection">Error section</internallink> for possible values.
 	<example>
-typedef enum { 
-    JVMTI_ERROR_NONE = 0,  
+typedef enum {
+    JVMTI_ERROR_NONE = 0,
     JVMTI_ERROR_INVALID_THREAD = 10,
-      ... 
+      ...
 } jvmtiError;
 </example>
       </description>
@@ -13775,13 +13775,13 @@
       <description>
         An identifier for an event type.
 	See the <internallink id="EventSection">Event section</internallink> for possible values.
-        It is guaranteed that future versions of this specification will 
+        It is guaranteed that future versions of this specification will
         never assign zero as an event type identifier.
 <example>
-typedef enum { 
-    JVMTI_EVENT_SINGLE_STEP = 1, 
-    JVMTI_EVENT_BREAKPOINT = 2, 
-      ... 
+typedef enum {
+    JVMTI_EVENT_SINGLE_STEP = 1,
+    JVMTI_EVENT_BREAKPOINT = 2,
+      ...
 } jvmtiEvent;
 </example>
       </description>
@@ -13793,16 +13793,16 @@
 typedef struct {
     jvmtiEventVMInit VMInit;
     jvmtiEventVMDeath VMDeath;
-      ... 
+      ...
 } jvmtiEventCallbacks;
 </example>
-        See <internallink id="jvmtiEventCallbacks">event callbacks</internallink> 
+        See <internallink id="jvmtiEventCallbacks">event callbacks</internallink>
         for the complete structure.
         <p/>
         Where, for example, the VM initialization callback is defined:
 <example>
 typedef void (JNICALL *jvmtiEventVMInit)
-    (jvmtiEnv *jvmti_env, 
+    (jvmtiEnv *jvmti_env,
      JNIEnv* jni_env,
      jthread thread);
 </example>
@@ -13813,8 +13813,8 @@
       <definition>typedef struct JNINativeInterface_ jniNativeInterface;</definition>
       <description>
 	Typedef for the JNI function table <code>JNINativeInterface</code>
-	defined in the 
-	<externallink id="docs/technotes/guides/jni/spec/functions.html#interface_function_table">
+	defined in the
+	<externallink id="jni/functions.html#interface-function-table">
           JNI Specification</externallink>.
 	The JNI reference implementation defines this with an underscore.
       </description>
@@ -13826,13 +13826,13 @@
 <issuessection label="Issues">
   <intro id="suspendRequired" label="Resolved Issue: Suspend - Required or Automatic">
     JVMDI requires that the agent suspend threads before calling
-    certain sensitive functions.  JVMPI requires garbage collection to be 
-    disabled before calling certain sensitive functions. 
+    certain sensitive functions.  JVMPI requires garbage collection to be
+    disabled before calling certain sensitive functions.
     It was suggested that rather than have this requirement, that
     VM place itself in a suitable state before performing an
     operation.  This makes considerable sense since each VM
     knows its requirements and can most easily arrange a
-    safe state.  
+    safe state.
     <p/>
     The ability to externally suspend/resume threads will, of
     course, remain.  The ability to enable/disable garbage collection will not.
@@ -13840,19 +13840,19 @@
     This issue is resolved--suspend will not
     be required.  The spec has been updated to reflect this.
   </intro>
-  
+
   <intro id="stackSampling" label="Resolved Issue: Call Stack Sampling">
     There are a variety of approaches to sampling call stacks.
     The biggest bifurcation is between VM controlled and agent
-    controlled.  
+    controlled.
     <p/>
     This issue is resolved--agent controlled
     sampling will be the approach.
   </intro>
-  
+
   <intro id="threadRepresentation" label="Resolved Issue: Thread Representation">
     JVMDI represents threads as jthread.  JVMPI primarily
-    uses JNIEnv* to represent threads.  
+    uses JNIEnv* to represent threads.
     <p/>
     The Expert Group has chosen jthread as the representation
     for threads in <jvmti/>.
@@ -13863,26 +13863,26 @@
 
   <intro id="design" label="Resolved Issue: Method Representation">
     The JNI spec allows an implementation to depend on jclass/jmethodID
-    pairs, rather than simply a jmethodID, to reference a method.  
-    JVMDI, for consistency, choose the same representation.  
+    pairs, rather than simply a jmethodID, to reference a method.
+    JVMDI, for consistency, choose the same representation.
     JVMPI, however, specifies that a jmethodID alone maps to a
     method.  Both of the Sun <tm>J2SE</tm> virtual machines (Classic and <tm>HotSpot</tm>) store
     pointers in jmethodIDs, and as a result, a jmethodID is sufficient.
     In fact, any JVM implementation that supports JVMPI must have
-    such a representation.  
+    such a representation.
     <jvmti/> will use jmethodID as a unique representation of a method
     (no jclass is used).
-    There should be efficiency gains, particularly in 
+    There should be efficiency gains, particularly in
     functionality like stack dumping, to this representation.
     <p/>
     Note that fields were not used in JVMPI and that the access profile
-    of fields differs from methods--for implementation efficiency 
-    reasons, a jclass/jfieldID pair will still be needed for field 
+    of fields differs from methods--for implementation efficiency
+    reasons, a jclass/jfieldID pair will still be needed for field
     reference.
   </intro>
 
   <intro id="localReferenceIssue" label="Resolved Issue: Local References">
-    Functions return local references. 
+    Functions return local references.
   </intro>
 
   <intro id="frameRep" label="Resolved Issue: Representation of frames">
@@ -13900,37 +13900,37 @@
   </intro>
 
   <intro id="taghint" label="Proposal: add tag hint function">
-    A hint of the percentage of objects that will be tagged would 
+    A hint of the percentage of objects that will be tagged would
     help the VM pick a good implementation.
   </intro>
 
   <intro id="moreMonitorQueries" label="Request: More Monitor Quires">
-  How difficult or easy would be to extend the monitor_info category to include 
+  How difficult or easy would be to extend the monitor_info category to include
     <pre>
-  - current number of monitors 
-  - enumeration of monitors 
-  - enumeration of threads waiting on a given monitor 
+  - current number of monitors
+  - enumeration of monitors
+  - enumeration of threads waiting on a given monitor
     </pre>
-  The reason for my question is the fact that current get_monitor_info support 
-  requires the agent to specify a given thread to get the info which is probably 
-  OK in the profiling/debugging space, while in the monitoring space the agent 
-  could be watching the monitor list and then decide which thread to ask for 
-  the info. You might ask why is this important for monitoring .... I think it 
+  The reason for my question is the fact that current get_monitor_info support
+  requires the agent to specify a given thread to get the info which is probably
+  OK in the profiling/debugging space, while in the monitoring space the agent
+  could be watching the monitor list and then decide which thread to ask for
+  the info. You might ask why is this important for monitoring .... I think it
   can aid in the detection/prediction of application contention caused by hot-locks.
   </intro>
 </issuessection>
 
 <changehistory id="ChangeHistory" update="09/05/07">
   <intro>
-    The <jvmti/> specification is an evolving document with major, minor, 
+    The <jvmti/> specification is an evolving document with major, minor,
     and micro version numbers.
     A released version of the specification is uniquely identified
     by its major and minor version.
-    The functions, events, and capabilities in this specification 
+    The functions, events, and capabilities in this specification
     indicate a "Since" value which is the major and minor version in
     which it was introduced.
-    The version of the specification implemented by the VM can 
-    be retrieved at runtime with the <functionlink id="GetVersionNumber"/> 
+    The version of the specification implemented by the VM can
+    be retrieved at runtime with the <functionlink id="GetVersionNumber"/>
     function.
   </intro>
   <change date="14 Nov 2002">
@@ -14024,9 +14024,9 @@
     get/set annotation, iterate live objects/heap.
     Add heap profiling functions place holder added:
     heap roots.
-    Heap profiling event added: object free. 
-    Heap profiling event redesigned: vm object allocation. 
-    Heap profiling event placeholders added: garbage collection start/finish. 
+    Heap profiling event added: object free.
+    Heap profiling event redesigned: vm object allocation.
+    Heap profiling event placeholders added: garbage collection start/finish.
     Native method bind event added.
   </change>
   <change date="19 Dec 2002">
@@ -14158,7 +14158,7 @@
       One character XML fix.
   </change>
   <change date="13 Mar 2003" version="v49">
-      Change function parameter names to be consistent with 
+      Change function parameter names to be consistent with
       event parameters (fooBarBaz becomes foo_bar_baz).
   </change>
   <change date="14 Mar 2003" version="v50">
@@ -14215,8 +14215,8 @@
   </change>
   <change date="14 May 2003" version="v63">
       Define the data type <code>jvmtiEventCallbacks</code>.
-      Zero length allocations return NULL.  
-      Keep SetAllocationHooks in JVMDI, but remove from <jvmti/>.  
+      Zero length allocations return NULL.
+      Keep SetAllocationHooks in JVMDI, but remove from <jvmti/>.
       Add JVMTI_THREAD_STATUS_FLAG_INTERRUPTED.
   </change>
   <change date="15 May 2003" version="v64">
@@ -14234,7 +14234,7 @@
   </change>
   <change date="17 June 2003" version="v68">
       Changes per June 11th Expert Group meeting --
-      Overhaul Heap functionality: single callback, 
+      Overhaul Heap functionality: single callback,
       remove GetHeapRoots, add reachable iterators,
       and rename "annotation" to "tag".
       NULL thread parameter on most functions is current
@@ -14250,8 +14250,8 @@
       Clean up issues sections.
       Rename GetClassName back to GetClassSignature and
       fix description.
-      Add generic signature to GetClassSignature, 
-      GetFieldSignature, GetMethodSignature, and 
+      Add generic signature to GetClassSignature,
+      GetFieldSignature, GetMethodSignature, and
       GetLocalVariableTable.
       Elide EstimateCostOfCapabilities.
       Clarify that the system property functions operate
@@ -14338,7 +14338,7 @@
       Split can_get_source_info into can_get_source_file_name, can_get_line_numbers,
       and can_get_source_debug_extension.
       PopFrame cannot have a native calling method.
-      Removed incorrect statement in GetClassloaderClasses 
+      Removed incorrect statement in GetClassloaderClasses
       (see <vmspec chapter="4.4"/>).
   </change>
   <change date="24 July 2003" version="v79">
@@ -14370,7 +14370,7 @@
       Rename JVMTI_REFERENCE_ARRAY to JVMTI_REFERENCE_ARRAY_ELEMENT.
   </change>
   <change date="28 July 2003" version="v85">
-      Steal java.lang.Runtime.availableProcessors() wording for 
+      Steal java.lang.Runtime.availableProcessors() wording for
       AvailableProcessors().
       Guarantee that zero will never be an event ID.
       Remove some issues which are no longer issues.
@@ -14395,7 +14395,7 @@
       Remove the ClassUnload event.
   </change>
   <change date="8 August 2003" version="0.2.89">
-      Heap reference iterator callbacks return an enum that 
+      Heap reference iterator callbacks return an enum that
       allows outgoing object references to be ignored.
       Allow JNIEnv as a param type to extension events/functions.
   </change>
@@ -14403,23 +14403,23 @@
       Fix a typo.
   </change>
   <change date="2 September 2003" version="0.2.91">
-      Remove all metadata functions: GetClassMetadata, 
+      Remove all metadata functions: GetClassMetadata,
       GetFieldMetadata, and GetMethodMetadata.
   </change>
   <change date="1 October 2003" version="0.2.92">
-      Mark the functions Allocate. Deallocate, RawMonitor*, 
-      SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage 
+      Mark the functions Allocate. Deallocate, RawMonitor*,
+      SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage
       as safe for use in heap callbacks and GC events.
   </change>
   <change date="24 November 2003" version="0.2.93">
-      Add pass through opaque user data pointer to heap iterate 
+      Add pass through opaque user data pointer to heap iterate
       functions and callbacks.
       In the CompiledMethodUnload event, send the code address.
       Add GarbageCollectionOccurred event.
       Add constant pool reference kind.
       Mark the functions CreateRawMonitor and DestroyRawMonitor
       as safe for use in heap callbacks and GC events.
-      Clarify: VMDeath, GetCurrentThreadCpuTimerInfo, 
+      Clarify: VMDeath, GetCurrentThreadCpuTimerInfo,
       GetThreadCpuTimerInfo, IterateOverReachableObjects,
       IterateOverObjectsReachableFromObject, GetTime and
       JVMTI_ERROR_NULL_POINTER.
@@ -14434,8 +14434,8 @@
       SetEventNotificationMode, add: error attempted inappropriate
       thread level control.
       Remove jvmtiExceptionHandlerEntry.
-      Fix handling of native methods on the stack -- 
-      location_ptr param of GetFrameLocation, remove 
+      Fix handling of native methods on the stack --
+      location_ptr param of GetFrameLocation, remove
       JVMTI_ERROR_OPAQUE_FRAME from GetFrameLocation,
       jvmtiFrameInfo.location, and jlocation.
       Remove typo (from JVMPI) implying that the MonitorWaited
@@ -14456,7 +14456,7 @@
   <change date="12 February 2004" version="0.2.102">
       Remove MonitorContendedExit.
       Added JNIEnv parameter to VMObjectAlloc.
-      Clarified definition of class_tag and referrer_index 
+      Clarified definition of class_tag and referrer_index
       parameters to heap callbacks.
   </change>
   <change date="16 Febuary 2004" version="0.2.103">
@@ -14483,13 +14483,13 @@
       Require NotifyFramePop to act on suspended threads.
   </change>
   <change date="24 Febuary 2004" version="0.3.10">
-      Add capabilities 
+      Add capabilities
         (<internallink id="jvmtiCapabilities.can_redefine_any_class"
          ><code>can_redefine_any_class</code></internallink>
-      and 
+      and
          <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events"
-         ><code>can_generate_all_class_hook_events</code></internallink>) 
-      and an error (<errorlink id="JVMTI_ERROR_UNMODIFIABLE_CLASS"></errorlink>) 
+         ><code>can_generate_all_class_hook_events</code></internallink>)
+      and an error (<errorlink id="JVMTI_ERROR_UNMODIFIABLE_CLASS"></errorlink>)
       which allow some classes to be unmodifiable.
   </change>
   <change date="28 Febuary 2004" version="0.3.11">
@@ -14573,11 +14573,11 @@
       Bump major.minor version numbers to "1.0".
   </change>
   <change date="2 June 2004" version="1.0.33">
-      Clarify interaction between ForceGarbageCollection 
+      Clarify interaction between ForceGarbageCollection
       and ObjectFree.
   </change>
   <change date="6 June 2004" version="1.0.34">
-      Restrict AddToBootstrapClassLoaderSearch and 
+      Restrict AddToBootstrapClassLoaderSearch and
       SetSystemProperty to the OnLoad phase only.
   </change>
   <change date="11 June 2004" version="1.0.35">
@@ -14604,8 +14604,8 @@
       Add "since" version marker.
       Add AddToSystemClassLoaderSearch.
       Allow AddToBootstrapClassLoaderSearch be used in live phase.
-      Fix historic rubbish in the descriptions of the heap_object_callback 
-      parameter of IterateOverHeap and IterateOverInstancesOfClass functions; 
+      Fix historic rubbish in the descriptions of the heap_object_callback
+      parameter of IterateOverHeap and IterateOverInstancesOfClass functions;
       disallow NULL for this parameter.
       Clarify, correct and make consistent: wording about current thread,
       opaque frames and insufficient number of frames in PopFrame.
@@ -14629,19 +14629,19 @@
   </change>
   <change date="29 April 2005" version="1.1.51">
       Allow agents be started in the live phase.
-      Added paragraph about deploying agents.  
+      Added paragraph about deploying agents.
   </change>
   <change date="30 April 2005" version="1.1.52">
       Add specification description to SetNativeMethodPrefix(es).
-      Better define the conditions on GetConstantPool.  
+      Better define the conditions on GetConstantPool.
   </change>
   <change date="30 April 2005" version="1.1.53">
       Break out the GetClassVersionNumber function from GetConstantPool.
-      Clean-up the references to the VM Spec.  
+      Clean-up the references to the VM Spec.
   </change>
   <change date="1 May 2005" version="1.1.54">
       Allow SetNativeMethodPrefix(es) in any phase.
-      Add clarifications about the impact of redefinition on GetConstantPool.  
+      Add clarifications about the impact of redefinition on GetConstantPool.
   </change>
   <change date="2 May 2005" version="1.1.56">
       Various clarifications to SetNativeMethodPrefix(es).
@@ -14655,7 +14655,7 @@
   <change date="8 May 2005" version="1.1.59">
       Add <functionlink id="RetransformClasses"/>.
       Revamp the bytecode instrumentation documentation.
-      Change <functionlink id="IsMethodObsolete"/> to no longer 
+      Change <functionlink id="IsMethodObsolete"/> to no longer
       require the can_redefine_classes capability.
   </change>
   <change date="11 May 2005" version="1.1.63">
@@ -14668,7 +14668,7 @@
   <change date="4 June 2005" version="1.1.67">
       Add new heap functionity which supports reporting primitive values,
       allows setting the referrer tag, and has more powerful filtering:
-      FollowReferences, IterateThroughHeap, and their associated 
+      FollowReferences, IterateThroughHeap, and their associated
       callbacks, structs, enums, and constants.
   </change>
   <change date="4 June 2005" version="1.1.68">
@@ -14737,10 +14737,10 @@
       Better phrasing.
   </change>
   <change date="16 March 2006" version="1.1.88">
-      Match the referrer_index for static fields in Object Reference Callback 
+      Match the referrer_index for static fields in Object Reference Callback
       with the Reference Implementation (and all other known implementations);
       that is, make it match the definition for instance fields.
-      In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover 
+      In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover
       an invalid thread in the list; and specify that not started threads
       return empty stacks.
   </change>
@@ -14756,10 +14756,10 @@
   </change>
   <change date="1 May 2006" version="1.1.93">
       Changed spec to return -1 for monitor stack depth for the
-      implementation which can not determine stack depth. 
+      implementation which can not determine stack depth.
   </change>
   <change date="3 May 2006" version="1.1.94">
-      Corrections for readability and accuracy courtesy of Alan Pratt of IBM. 
+      Corrections for readability and accuracy courtesy of Alan Pratt of IBM.
       List the object relationships reported in FollowReferences.
   </change>
   <change date="5 May 2006" version="1.1.95">
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1095,8 +1095,11 @@
 #undef min
 #endif
 
-#define max(a,b) Do_not_use_max_use_MAX2_instead
-#define min(a,b) Do_not_use_min_use_MIN2_instead
+// The following defines serve the purpose of preventing use of accidentally
+// included min max macros from compiling, while continuing to allow innocent
+// min and max identifiers in the code to compile as intended.
+#define max max
+#define min min
 
 // It is necessary to use templates here. Having normal overloaded
 // functions does not work because it is necessary to provide both 32-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/arraycopy/TestACSameSrcDst.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2017, Red Hat, Inc. All rights reserved.
+ * 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 8179678
+ * @summary ArrayCopy with same src and dst can cause incorrect execution or compiler crash
+ *
+ * @run main/othervm -XX:CompileCommand=compileonly,TestACSameSrcDst::test* TestACSameSrcDst
+ *
+ */
+
+public class TestACSameSrcDst {
+
+    static int test1(int[] src, int[] dst) {
+        System.arraycopy(src, 5, dst, 0, 10);
+         // this shouldn't be transformed to src[5] because the copy
+         // can modify src[5] if src and dst are the same.
+        return dst[0];
+    }
+
+    static int test2(int[] src) {
+        System.arraycopy(src, 0, src, 0, 10);
+        // same source and destination. If load from destination is
+        // transformed to load of source, the compiler performs that
+        // optimization in an infinite loop.
+        return src[0];
+    }
+
+    static int test3() {
+        int[] src = new int[15];
+        src[5] = 0x42;
+        System.arraycopy(src, 5, src, 0, 10);
+        // That load can't bypass the arraycopy
+        return src[0];
+    }
+
+    static int test4() {
+        int[] src = new int[15];
+        System.arraycopy(src, 0, src, 5, 10);
+        return src[0];
+    }
+
+    // The dst[0] load can't bypass the arraycopy. After ArrayCopyNode
+    // is expanded, C2 looks for a stub call on the control paths of
+    // the array copy subgraph to decide whether the load's memory
+    // input can bypass the arraycopy. This test verifies the case of
+    // a source array that's not declared as an array.
+    static int test5(Object src, int l, boolean flag) {
+        int[] dst = new int[10];
+        if (flag) {
+            dst[0] = 0x42;
+            System.arraycopy(src, 0, dst, 0, l);
+            return dst[0];
+        }
+        return 0;
+    }
+
+    public static void main(String[] args) {
+        int[] array = new int[15];
+        for (int i = 0; i < 20000; i++) {
+            int res;
+            for (int j = 0; j < array.length; j++) {
+                array[j] = j;
+            }
+            int expected = array[5];
+            res = test1(array, array);
+            if (res != expected) {
+                throw new RuntimeException("bad result: " + res + " != " + expected);
+            }
+            test2(array);
+            res = test3();
+            if (res != 0x42) {
+                throw new RuntimeException("bad result: " + res + " != " + 0x42);
+            }
+            test4();
+            for (int j = 0; j < array.length; j++) {
+                array[j] = j;
+            }
+            res = test5(array, 10, (i%2) == 0);
+            if (res != 0) {
+                throw new RuntimeException("bad result: " + res + " != " + 0);
+            }
+        }
+    }
+}
--- a/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/test/compiler/c2/cr8004867/TestIntUnsafeCAS.java	Tue Jun 27 16:00:14 2017 -0400
@@ -773,221 +773,221 @@
 
   static void test_ci(int[] a) {
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -1, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i), -1, -123);
     }
   }
   static void test_vi(int[] a, int b, int old) {
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, b);
     }
   }
   static void test_cp(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[i]);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, b[i]);
     }
   }
   static void test_2ci(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(i), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i), 123, -103);
     }
   }
   static void test_2vi(int[] a, int[] b, int c, int d) {
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(i), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(i), -103, d);
     }
   }
   static void test_ci_neg(int[] a, int old) {
     for (int i = ARRLEN-1; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, -123);
     }
   }
   static void test_vi_neg(int[] a, int b, int old) {
     for (int i = ARRLEN-1; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, b);
     }
   }
   static void test_cp_neg(int[] a, int[] b) {
     for (int i = ARRLEN-1; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[i]);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, b[i]);
     }
   }
   static void test_2ci_neg(int[] a, int[] b) {
     for (int i = ARRLEN-1; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(i), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i), 123, -103);
     }
   }
   static void test_2vi_neg(int[] a, int[] b, int c, int d) {
     for (int i = ARRLEN-1; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(i), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(i), -103, d);
     }
   }
   static void test_ci_oppos(int[] a, int old) {
     int limit = ARRLEN-1;
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(limit-i), old, -123);
+      unsafe.compareAndSetInt(a, byte_offset(limit-i), old, -123);
     }
   }
   static void test_vi_oppos(int[] a, int b, int old) {
     int limit = ARRLEN-1;
     for (int i = limit; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(limit-i), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(limit-i), old, b);
     }
   }
   static void test_cp_oppos(int[] a, int[] b) {
     int limit = ARRLEN-1;
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, b[limit-i]);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, b[limit-i]);
     }
   }
   static void test_2ci_oppos(int[] a, int[] b) {
     int limit = ARRLEN-1;
     for (int i = 0; i < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(limit-i), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(limit-i), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i), 123, -103);
     }
   }
   static void test_2vi_oppos(int[] a, int[] b, int c, int d) {
     int limit = ARRLEN-1;
     for (int i = limit; i >= 0; i-=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(limit-i), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(limit-i), -103, d);
     }
   }
   static void test_ci_off(int[] a, int old) {
     for (int i = 0; i < ARRLEN-OFFSET; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), old, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), old, -123);
     }
   }
   static void test_vi_off(int[] a, int b, int old) {
     for (int i = 0; i < ARRLEN-OFFSET; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), old, b);
     }
   }
   static void test_cp_off(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-OFFSET; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), -123, b[i+OFFSET]);
+      unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), -123, b[i+OFFSET]);
     }
   }
   static void test_2ci_off(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-OFFSET; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i+OFFSET), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i+OFFSET), 123, -103);
     }
   }
   static void test_2vi_off(int[] a, int[] b, int c, int d) {
     for (int i = 0; i < ARRLEN-OFFSET; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+OFFSET), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(i+OFFSET), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i+OFFSET), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(i+OFFSET), -103, d);
     }
   }
   static void test_ci_inv(int[] a, int k, int old) {
     for (int i = 0; i < ARRLEN-k; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+k), old, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i+k), old, -123);
     }
   }
   static void test_vi_inv(int[] a, int b, int k, int old) {
     for (int i = 0; i < ARRLEN-k; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+k), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(i+k), old, b);
     }
   }
   static void test_cp_inv(int[] a, int[] b, int k) {
     for (int i = 0; i < ARRLEN-k; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+k), -123, b[i+k]);
+      unsafe.compareAndSetInt(a, byte_offset(i+k), -123, b[i+k]);
     }
   }
   static void test_2ci_inv(int[] a, int[] b, int k) {
     for (int i = 0; i < ARRLEN-k; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+k), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i+k), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(i+k), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i+k), 123, -103);
     }
   }
   static void test_2vi_inv(int[] a, int[] b, int c, int d, int k) {
     for (int i = 0; i < ARRLEN-k; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+k), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(i+k), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i+k), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(i+k), -103, d);
     }
   }
   static void test_ci_scl(int[] a, int old) {
     for (int i = 0; i*SCALE < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), old, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i*SCALE), old, -123);
     }
   }
   static void test_vi_scl(int[] a, int b, int old) {
     for (int i = 0; i*SCALE < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), old, b);
+      unsafe.compareAndSetInt(a, byte_offset(i*SCALE), old, b);
     }
   }
   static void test_cp_scl(int[] a, int[] b) {
     for (int i = 0; i*SCALE < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), -123, b[i*SCALE]);
+      unsafe.compareAndSetInt(a, byte_offset(i*SCALE), -123, b[i*SCALE]);
     }
   }
   static void test_2ci_scl(int[] a, int[] b) {
     for (int i = 0; i*SCALE < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), 123, -123);
-      unsafe.compareAndSwapInt(b, byte_offset(i*SCALE), 123, -103);
+      unsafe.compareAndSetInt(a, byte_offset(i*SCALE), 123, -123);
+      unsafe.compareAndSetInt(b, byte_offset(i*SCALE), 123, -103);
     }
   }
   static void test_2vi_scl(int[] a, int[] b, int c, int d) {
     for (int i = 0; i*SCALE < ARRLEN; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i*SCALE), -123, c);
-      unsafe.compareAndSwapInt(b, byte_offset(i*SCALE), -103, d);
+      unsafe.compareAndSetInt(a, byte_offset(i*SCALE), -123, c);
+      unsafe.compareAndSetInt(b, byte_offset(i*SCALE), -103, d);
     }
   }
   static void test_cp_alndst(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+ALIGN_OFF), -1, b[i]);
+      unsafe.compareAndSetInt(a, byte_offset(i+ALIGN_OFF), -1, b[i]);
     }
   }
   static void test_cp_alnsrc(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) {
       int old = unsafe.getIntVolatile(a, byte_offset(i));
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, b[i+ALIGN_OFF]);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, b[i+ALIGN_OFF]);
     }
   }
   static void test_2ci_aln(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+ALIGN_OFF), -1, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i+ALIGN_OFF), -1, -123);
       int old = unsafe.getIntVolatile(b, byte_offset(i));
-      unsafe.compareAndSwapInt(b, byte_offset(i), old, -103);
+      unsafe.compareAndSetInt(b, byte_offset(i), old, -103);
     }
   }
   static void test_2vi_aln(int[] a, int[] b, int c, int d) {
     for (int i = 0; i < ARRLEN-ALIGN_OFF; i+=1) {
       int old = unsafe.getIntVolatile(a, byte_offset(i));
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, c);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, c);
       old = unsafe.getIntVolatile(b, byte_offset(i+ALIGN_OFF));
-      unsafe.compareAndSwapInt(b, byte_offset(i+ALIGN_OFF), old, d);
+      unsafe.compareAndSetInt(b, byte_offset(i+ALIGN_OFF), old, d);
     }
   }
   static void test_cp_unalndst(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+UNALIGN_OFF), -1, b[i]);
+      unsafe.compareAndSetInt(a, byte_offset(i+UNALIGN_OFF), -1, b[i]);
     }
   }
   static void test_cp_unalnsrc(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) {
       int old = unsafe.getIntVolatile(a, byte_offset(i));
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, b[i+UNALIGN_OFF]);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, b[i+UNALIGN_OFF]);
     }
   }
   static void test_2ci_unaln(int[] a, int[] b) {
     for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) {
-      unsafe.compareAndSwapInt(a, byte_offset(i+UNALIGN_OFF), -1, -123);
+      unsafe.compareAndSetInt(a, byte_offset(i+UNALIGN_OFF), -1, -123);
       int old = unsafe.getIntVolatile(b, byte_offset(i));
-      unsafe.compareAndSwapInt(b, byte_offset(i), old, -103);
+      unsafe.compareAndSetInt(b, byte_offset(i), old, -103);
     }
   }
   static void test_2vi_unaln(int[] a, int[] b, int c, int d) {
     for (int i = 0; i < ARRLEN-UNALIGN_OFF; i+=1) {
       int old = unsafe.getIntVolatile(a, byte_offset(i));
-      unsafe.compareAndSwapInt(a, byte_offset(i), old, c);
+      unsafe.compareAndSetInt(a, byte_offset(i), old, c);
       old = unsafe.getIntVolatile(b, byte_offset(i+UNALIGN_OFF));
-      unsafe.compareAndSwapInt(b, byte_offset(i+UNALIGN_OFF), old, d);
+      unsafe.compareAndSetInt(b, byte_offset(i+UNALIGN_OFF), old, d);
     }
   }
 
--- a/hotspot/test/compiler/profiling/UnsafeAccess.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/hotspot/test/compiler/profiling/UnsafeAccess.java	Tue Jun 27 16:00:14 2017 -0400
@@ -64,7 +64,7 @@
     static Object helperUnsafeLoadStore(Object o, boolean isObjArray) {
         if (isObjArray) {
             Object o1 = U.getObject(o, off);
-            U.compareAndSwapObject(o, off, o1, new Object());
+            U.compareAndSetObject(o, off, o1, new Object());
         }
         return o;
     }
--- a/jaxp/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -426,3 +426,7 @@
 c27321c889cf4c8e465a61b84572c00ef7ee6004 jdk-9+171
 bd4b2c8835f35760a51c1475b03a16cc20c62973 jdk-10+10
 eedb6e54c8bd6197ecba5fc0d8568bac8ae852dd jdk-9+172
+95bab8bf9201ae8bfdf28e164bf33b78e49477e7 jdk-10+11
+9788347e0629d0cb3a0e55a903494ff741d4fa15 jdk-9+173
+b9c0b105002272d7414c8b34af9aded151f9cad6 jdk-9+174
+ff293e39e83366c40a5687dacd1ccb2305ed2c1e jdk-10+12
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReferenceType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -262,6 +261,7 @@
    * @deprecated use getFirstCommonSuperclass(ReferenceType t) which has
    *             slightly changed semantics.
    */
+  @Deprecated
   public ReferenceType firstCommonSuperclass(ReferenceType t) {
     if (this.equals(Type.NULL)) return t;
     if (t.equals(Type.NULL)) return this;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltSets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltSets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,7 +22,7 @@
  */
 package com.sun.org.apache.xalan.internal.lib;
 
-import com.sun.org.apache.xml.internal.utils.DOMHelper;
+import com.sun.org.apache.xml.internal.utils.DOM2Helper;
 import com.sun.org.apache.xpath.internal.NodeSet;
 import java.util.HashMap;
 import java.util.Map;
@@ -72,8 +72,8 @@
     for (int i = 0; i < nl1.getLength(); i++)
     {
       Node testNode = nl1.item(i);
-      if (DOMHelper.isNodeAfter(testNode, endNode)
-          && !DOMHelper.isNodeTheSame(testNode, endNode))
+      if (DOM2Helper.isNodeAfter(testNode, endNode)
+          && !DOM2Helper.isNodeTheSame(testNode, endNode))
         leadNodes.addElement(testNode);
     }
     return leadNodes;
@@ -107,8 +107,8 @@
     for (int i = 0; i < nl1.getLength(); i++)
     {
       Node testNode = nl1.item(i);
-      if (DOMHelper.isNodeAfter(startNode, testNode)
-          && !DOMHelper.isNodeTheSame(startNode, testNode))
+      if (DOM2Helper.isNodeAfter(startNode, testNode)
+          && !DOM2Helper.isNodeTheSame(startNode, testNode))
         trailNodes.addElement(testNode);
     }
     return trailNodes;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1426,24 +1422,4 @@
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
 
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1426,24 +1422,4 @@
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
 
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1015,7 +1011,7 @@
      "\uC2DC\uC2A4\uD15C \uC18D\uC131 org.xml.sax.parser\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
 
     { ER_PARSER_ARG_CANNOT_BE_NULL,
-     "\uAD6C\uBB38\uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
+     "\uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC778\uC218\uB294 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
 
     { ER_FEATURE,
      "\uAE30\uB2A5: {0}"},
@@ -1252,7 +1248,7 @@
       "\uD2B9\uC218 \uCDA9\uB3CC\uC774 \uBC1C\uACAC\uB428: {0}. \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uC11C \uBC1C\uACAC\uB41C \uB9C8\uC9C0\uB9C9 \uD56D\uBAA9\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."},
 
     { WG_PARSING_AND_PREPARING,
-      "========= \uAD6C\uBB38\uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="},
+      "========= \uAD6C\uBB38 \uBD84\uC11D \uD6C4 {0} \uC900\uBE44 \uC911 =========="},
 
     { WG_ATTR_TEMPLATE,
      "\uC18D\uC131 \uD15C\uD50C\uB9AC\uD2B8, {0}"},
@@ -1357,7 +1353,7 @@
   { "optionOUT",  "   [-OUT outputFileName]"},
   { "optionLXCIN", "   [-LXCIN compiledStylesheetFileNameIn]"},
   { "optionLXCOUT", "   [-LXCOUT compiledStylesheetFileNameOutOut]"},
-  { "optionPARSER", "   [-PARSER \uAD6C\uBB38\uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"},
+  { "optionPARSER", "   [-PARSER \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC5F0\uACB0\uC758 \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984]"},
   {  "optionE", "   [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"},
   {  "optionV",  "   [-E(\uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uD655\uC7A5 \uC548\uD568)]"},
   {  "optionQC", "   [-QC(\uC790\uB3D9 \uD328\uD134 \uCDA9\uB3CC \uACBD\uACE0)]"},
@@ -1378,9 +1374,9 @@
   {  "optionHTML", "   [-HTML(HTML \uD3EC\uB9F7\uD130 \uC0AC\uC6A9)]"},
   {  "optionPARAM", "   [-PARAM \uC774\uB984 \uD45C\uD604\uC2DD(\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uB9E4\uAC1C\uBCC0\uC218 \uC124\uC815)]"},
   {  "noParsermsg1", "XSL \uD504\uB85C\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."},
-  {  "noParsermsg2", "** \uAD6C\uBB38\uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
+  {  "noParsermsg2", "** \uAD6C\uBB38 \uBD84\uC11D\uAE30\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C **"},
   { "noParsermsg3",  "\uD074\uB798\uC2A4 \uACBD\uB85C\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624."},
-  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38\uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
+  { "noParsermsg4", "IBM\uC758 Java\uC6A9 XML \uAD6C\uBB38 \uBD84\uC11D\uAE30\uAC00 \uC5C6\uC744 \uACBD\uC6B0 \uB2E4\uC74C \uC704\uCE58\uC5D0\uC11C \uB2E4\uC6B4\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."},
   { "noParsermsg5", "IBM AlphaWorks: http://www.alphaworks.ibm.com/formula/xml"},
   { "optionURIRESOLVER", "   [-URIRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(URI \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 URIResolver)]"},
   { "optionENTITYRESOLVER",  "   [-ENTITYRESOLVER \uC804\uCCB4 \uD074\uB798\uC2A4 \uC774\uB984(\uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uC5D0 \uC0AC\uC6A9\uD560 EntityResolver)]"},
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -482,7 +478,7 @@
   {"ER0000" , "{0}" },
 
     { ER_NO_CURLYBRACE,
-      "Fel: Uttryck f\u00E5r inte inneh\u00E5lla '{'"},
+      "Fel: Uttryck kan inte inneh\u00E5lla '{'"},
 
     { ER_ILLEGAL_ATTRIBUTE ,
      "{0} har ett otill\u00E5tet attribut: {1}"},
@@ -1426,24 +1422,4 @@
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
 
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -22,9 +21,6 @@
 package com.sun.org.apache.xalan.internal.res;
 
 import java.util.ListResourceBundle;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
 
 /**
  * Set up error messages.
@@ -1425,25 +1421,4 @@
 
   /** String for use when formatting of the error string failed.   */
   public static final String FORMAT_FAILED = "FORMAT_FAILED";
-
-  /** General error string.   */
-  public static final String ERROR_STRING = "#error";
-
-  /** String to prepend to error messages.  */
-  public static final String ERROR_HEADER = "Error: ";
-
-  /** String to prepend to warning messages.    */
-  public static final String WARNING_HEADER = "Warning: ";
-
-  /** String to specify the XSLT module.  */
-  public static final String XSL_HEADER = "XSLT ";
-
-  /** String to specify the XML parser module.  */
-  public static final String XML_HEADER = "XML ";
-
-  /** I don't think this is used any more.
-   * @deprecated  */
-  public static final String QUERY_HEADER = "PATTERN ";
-
-
-    }
+}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/ForwardPositionIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -60,6 +59,7 @@
  * @deprecated This class exists only for backwards compatibility with old
  *             translets.  New code should not reference it.
  */
+@Deprecated
 public final class ForwardPositionIterator extends DTMAxisIteratorBase {
 
     private DTMAxisIterator _source;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -115,6 +115,7 @@
      * Merge the current value's nodeset set by lookupKey() with _nodes.
      * @deprecated
      */
+    @Deprecated
     public void merge(KeyIndex other) {
         if (other == null) return;
 
@@ -136,6 +137,7 @@
      * key() function.
      * @deprecated
      */
+    @Deprecated
     public void lookupId(Object value) {
         // Clear _nodes array
         _nodes = null;
@@ -205,6 +207,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public void lookupKey(Object value) {
         IntegerArray nodes = _index.get(value);
         _nodes = (nodes != null) ? (IntegerArray) nodes.clone() : null;
@@ -217,6 +220,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public int next() {
         if (_nodes == null) return DTMAxisIterator.END;
 
@@ -313,6 +317,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public DTMAxisIterator reset() {
         _position = 0;
         return this;
@@ -324,6 +329,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public int getLast() {
         return (_nodes == null) ? 0 : _nodes.cardinality();
     }
@@ -334,6 +340,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public int getPosition() {
         return _position;
     }
@@ -344,6 +351,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public void setMark() {
         _markedPosition = _position;
     }
@@ -354,6 +362,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public void gotoMark() {
         _position = _markedPosition;
     }
@@ -365,6 +374,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public DTMAxisIterator setStartNode(int start) {
         if (start == DTMAxisIterator.END) {
             _nodes = null;
@@ -382,6 +392,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public int getStartNode() {
         return 0;
     }
@@ -392,6 +403,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public boolean isReverse() {
         return(false);
     }
@@ -402,6 +414,7 @@
      * <b>deprecated.</b></em></p>
      * @deprecated
      */
+    @Deprecated
     public DTMAxisIterator cloneIterator() {
         KeyIndex other = new KeyIndex(0);
         other._index = _index;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -49,6 +48,7 @@
      * @deprecated This field continues to exist for binary compatibility.
      *             New code should not refer to it.
      */
+    @Deprecated
     private static final Collator DEFAULT_COLLATOR = Collator.getInstance();
 
     /**
@@ -56,6 +56,7 @@
      * @deprecated This field continues to exist for binary compatibility.
      *             New code should not refer to it.
      */
+    @Deprecated
     protected Collator _collator = DEFAULT_COLLATOR;
     protected Collator[] _collators;
 
@@ -64,6 +65,7 @@
      * @deprecated This field continues to exist for binary compatibility.
      *             New code should not refer to it.
      */
+    @Deprecated
     protected Locale _locale;
 
     protected CollatorFactory _collatorFactory;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -55,6 +54,7 @@
      * @deprecated This constructor is no longer used in generated code.  It
      *             exists only for backwards compatibility.
      */
+     @Deprecated
      public NodeSortRecordFactory(DOM dom, String className, Translet translet,
                  String order[], String type[])
          throws TransletException
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -100,6 +100,7 @@
      * @deprecated This method exists only for backwards compatibility with old
      *             translets.  New code should not reference it.
      */
+    @Deprecated
     public static int positionF(DTMAxisIterator iterator) {
         return iterator.isReverse()
                      ? iterator.getLast() - iterator.getPosition() + 1
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttrImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -516,6 +515,7 @@
      * @deprecated Previous working draft of DOM Level 2. New method
      *             is <tt>getOwnerElement()</tt>.
      */
+    @Deprecated
     public Element getElement() {
         // if we have an owner, ownerNode is our ownerElement, otherwise it's
         // our ownerDocument and we don't have an ownerElement
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -832,6 +832,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public void setEncoding(String value) {
         setXmlEncoding(value);
     }
@@ -849,6 +850,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public String getEncoding() {
         return getXmlEncoding();
     }
@@ -890,6 +892,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public void setVersion(String value) {
         setXmlVersion(value);
     }
@@ -908,6 +911,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public String getVersion() {
         return getXmlVersion();
     }
@@ -932,6 +936,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public void setStandalone(boolean value) {
         setXmlStandalone(value);
     }
@@ -950,6 +955,7 @@
      * compatibility with older applications. New applications
      * should never call this method.
      */
+    @Deprecated
     public boolean getStandalone() {
         return getXmlStandalone();
     }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -369,6 +369,7 @@
      * Creates an element node with a URI in the table and type information.
      * @deprecated
      */
+    @Deprecated
     public int createDeferredElement(String elementURI, String elementName,
                                       Object type) {
 
@@ -389,6 +390,7 @@
      * Creates an element node in the table.
      * @deprecated
      */
+    @Deprecated
     public int createDeferredElement(String elementName) {
         return createDeferredElement(null, elementName);
     }
@@ -474,6 +476,7 @@
      * Sets an attribute on an element node.
      * @deprecated
      */
+    @Deprecated
     public int setDeferredAttribute(int elementNodeIndex,
                                     String attrName, String attrURI,
                                     String attrValue, boolean specified) {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NodeImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
  /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -763,6 +763,7 @@
      * @since DOM Level 3
      * @deprecated
      */
+    @Deprecated
     public short compareTreePosition(Node other) {
         // Questions of clarification for this method - to be answered by the
         // DOM WG.   Current assumptions listed - LM
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLCatalogResolver.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xerces.internal.util;
-
-import java.io.IOException;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.ext.EntityResolver2;
-
-import org.w3c.dom.ls.LSInput;
-import org.w3c.dom.ls.LSResourceResolver;
-
-import javax.xml.parsers.SAXParserFactory;
-
-import com.sun.org.apache.xerces.internal.dom.DOMInputImpl;
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-
-import com.sun.org.apache.xerces.internal.xni.XNIException;
-import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
-
-import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
-import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader;
-
-/**
- * <p>The catalog resolver handles the resolution of external
- * identifiers and URI references through XML catalogs. This
- * component supports XML catalogs defined by the
- * <a href="http://www.oasis-open.org/committees/entity/spec.html">
- * OASIS XML Catalogs Specification</a>. It encapsulates the
- * <a href="http://xml.apache.org/commons/">XML Commons</a> resolver.
- * An instance of this class may be registered on the parser
- * as a SAX entity resolver, as a DOM LSResourceResolver or
- * as an XNI entity resolver by setting the property
- * (http://apache.org/xml/properties/internal/entity-resolver).</p>
- *
- * <p>It is intended that this class may be used standalone to perform
- * catalog resolution outside of a parsing context. It may be shared
- * between several parsers and the application.</p>
- *
- * @deprecated This class and the JDK internal Catalog API in package
- * {@code com.sun.org.apache.xml.internal.resolver}
- * is encapsulated in JDK 9. The entire implementation under the package is now
- * deprecated and subject to removal in a future release. Users of the API should
- * migrate to the {@linkplain javax.xml.catalog new public API}.
- * <p>
- * The new Catalog API is supported throughout the JDK XML Processors, which allows
- * the use of Catalog by simply setting a path to a Catalog file as a property.
- *
- * @author Michael Glavassevich, IBM
- *
- */
-@Deprecated(since="9", forRemoval=true)
-public class XMLCatalogResolver
-    implements XMLEntityResolver, EntityResolver2, LSResourceResolver {
-
-    /** Internal catalog manager for Apache catalogs. **/
-    private CatalogManager fResolverCatalogManager = null;
-
-    /** Internal catalog structure. **/
-    private Catalog fCatalog = null;
-
-    /** An array of catalog URIs. **/
-    private String [] fCatalogsList = null;
-
-    /**
-     * Indicates whether the list of catalogs has
-     * changed since it was processed.
-     */
-    private boolean fCatalogsChanged = true;
-
-    /** Application specified prefer public setting. **/
-    private boolean fPreferPublic = true;
-
-    /**
-     * Indicates whether the application desires that
-     * the parser or some other component performing catalog
-     * resolution should use the literal system identifier
-     * instead of the expanded system identifier.
-     */
-    private boolean fUseLiteralSystemId = true;
-
-    /**
-     * <p>Constructs a catalog resolver with a default configuration.</p>
-     */
-    public XMLCatalogResolver () {
-        this(null, true);
-    }
-
-    /**
-     * <p>Constructs a catalog resolver with the given
-     * list of entry files.</p>
-     *
-     * @param catalogs an ordered array list of absolute URIs
-     */
-    public XMLCatalogResolver (String [] catalogs) {
-        this(catalogs, true);
-    }
-
-    /**
-     * <p>Constructs a catalog resolver with the given
-     * list of entry files and the preference for whether
-     * system or public matches are preferred.</p>
-     *
-     * @param catalogs an ordered array list of absolute URIs
-     * @param preferPublic the prefer public setting
-     */
-    public XMLCatalogResolver (String [] catalogs, boolean preferPublic) {
-        init(catalogs, preferPublic);
-    }
-
-    /**
-     * <p>Returns the initial list of catalog entry files.</p>
-     *
-     * @return the initial list of catalog entry files
-     */
-    public final synchronized String [] getCatalogList () {
-        return (fCatalogsList != null)
-            ? (String[]) fCatalogsList.clone() : null;
-    }
-
-    /**
-     * <p>Sets the initial list of catalog entry files.
-     * If there were any catalog mappings cached from
-     * the previous list they will be replaced by catalog
-     * mappings from the new list the next time the catalog
-     * is queried.</p>
-     *
-     * @param catalogs an ordered array list of absolute URIs
-     */
-    public final synchronized void setCatalogList (String [] catalogs) {
-        fCatalogsChanged = true;
-        fCatalogsList = (catalogs != null)
-            ? (String[]) catalogs.clone() : null;
-    }
-
-    /**
-     * <p>Forces the cache of catalog mappings to be cleared.</p>
-     */
-    public final synchronized void clear () {
-        fCatalog = null;
-    }
-
-    /**
-     * <p>Returns the preference for whether system or public
-     * matches are preferred. This is used in the absence
-     * of any occurence of the <code>prefer</code> attribute
-     * on the <code>catalog</code> entry of a catalog. If this
-     * property has not yet been explicitly set its value is
-     * <code>true</code>.</p>
-     *
-     * @return the prefer public setting
-     */
-    public final boolean getPreferPublic () {
-        return fPreferPublic;
-    }
-
-    /**
-     * <p>Sets the preference for whether system or public
-     * matches are preferred. This is used in the absence
-     * of any occurence of the <code>prefer</code> attribute
-     * on the <code>catalog</code> entry of a catalog.</p>
-     *
-     * @param preferPublic the prefer public setting
-     */
-    public final void setPreferPublic (boolean preferPublic) {
-        fPreferPublic = preferPublic;
-        fResolverCatalogManager.setPreferPublic(preferPublic);
-    }
-
-    /**
-     * <p>Returns the preference for whether the literal system
-     * identifier should be used when resolving system
-     * identifiers when both it and the expanded system
-     * identifier are available. If this property has not yet
-     * been explicitly set its value is <code>true</code>.</p>
-     *
-     * @return the preference for using literal system identifers
-     * for catalog resolution
-     *
-     * @see #setUseLiteralSystemId
-     */
-    public final boolean getUseLiteralSystemId () {
-        return fUseLiteralSystemId;
-    }
-
-    /**
-     * <p>Sets the preference for whether the literal system
-     * identifier should be used when resolving system
-     * identifiers when both it and the expanded system
-     * identifier are available.</p>
-     *
-     * <p>The literal system identifier is the URI as it was
-     * provided before absolutization. It may be embedded within
-     * an entity. It may be provided externally or it may be the
-     * result of redirection. For example, redirection may
-     * have come from the protocol level through HTTP or from
-     * an application's entity resolver.</p>
-     *
-     * <p>The expanded system identifier is an absolute URI
-     * which is the result of resolving the literal system
-     * identifier against a base URI.</p>
-     *
-     * @param useLiteralSystemId the preference for using
-     * literal system identifers for catalog resolution
-     */
-    public final void setUseLiteralSystemId (boolean useLiteralSystemId) {
-        fUseLiteralSystemId = useLiteralSystemId;
-    }
-
-    /**
-     * <p>Resolves an external entity. If the entity cannot be
-     * resolved, this method should return <code>null</code>. This
-     * method returns an input source if an entry was found in the
-     * catalog for the given external identifier. It should be
-     * overrided if other behaviour is required.</p>
-     *
-     * @param publicId the public identifier, or <code>null</code> if none was supplied
-     * @param systemId the system identifier
-     *
-     * @throws SAXException any SAX exception, possibly wrapping another exception
-     * @throws IOException thrown if some i/o error occurs
-     */
-    public InputSource resolveEntity(String publicId, String systemId)
-         throws SAXException, IOException {
-
-        String resolvedId = null;
-        if (publicId != null && systemId != null) {
-            resolvedId = resolvePublic(publicId, systemId);
-        }
-        else if (systemId != null) {
-            resolvedId = resolveSystem(systemId);
-        }
-
-        if (resolvedId != null) {
-            InputSource source = new InputSource(resolvedId);
-            source.setPublicId(publicId);
-            return source;
-        }
-        return null;
-    }
-
-     /**
-      * <p>Resolves an external entity. If the entity cannot be
-      * resolved, this method should return <code>null</code>. This
-      * method returns an input source if an entry was found in the
-      * catalog for the given external identifier. It should be
-      * overrided if other behaviour is required.</p>
-      *
-      * @param name the identifier of the external entity
-      * @param publicId the public identifier, or <code>null</code> if none was supplied
-      * @param baseURI the URI with respect to which relative systemIDs are interpreted.
-      * @param systemId the system identifier
-      *
-      * @throws SAXException any SAX exception, possibly wrapping another exception
-      * @throws IOException thrown if some i/o error occurs
-      */
-     public InputSource resolveEntity(String name, String publicId,
-         String baseURI, String systemId) throws SAXException, IOException {
-
-         String resolvedId = null;
-
-         if (!getUseLiteralSystemId() && baseURI != null) {
-             // Attempt to resolve the system identifier against the base URI.
-             try {
-                 URI uri = new URI(new URI(baseURI), systemId);
-                 systemId = uri.toString();
-             }
-             // Ignore the exception. Fallback to the literal system identifier.
-             catch (URI.MalformedURIException ex) {}
-         }
-
-         if (publicId != null && systemId != null) {
-             resolvedId = resolvePublic(publicId, systemId);
-         }
-         else if (systemId != null) {
-             resolvedId = resolveSystem(systemId);
-         }
-
-         if (resolvedId != null) {
-             InputSource source = new InputSource(resolvedId);
-             source.setPublicId(publicId);
-             return source;
-         }
-         return null;
-    }
-
-     /**
-      * <p>Locates an external subset for documents which do not explicitly
-      * provide one. This method always returns <code>null</code>. It
-      * should be overrided if other behaviour is required.</p>
-      *
-      * @param name the identifier of the document root element
-      * @param baseURI the document's base URI
-      *
-      * @throws SAXException any SAX exception, possibly wrapping another exception
-      * @throws IOException thrown if some i/o error occurs
-      */
-     public InputSource getExternalSubset(String name, String baseURI)
-         throws SAXException, IOException {
-         return null;
-     }
-
-    /**
-     * <p>Resolves a resource using the catalog. This method interprets that
-     * the namespace URI corresponds to uri entries in the catalog.
-     * Where both a namespace and an external identifier exist, the namespace
-     * takes precedence.</p>
-     *
-     * @param type the type of the resource being resolved
-     * @param namespaceURI the namespace of the resource being resolved,
-     * or <code>null</code> if none was supplied
-     * @param publicId the public identifier of the resource being resolved,
-     * or <code>null</code> if none was supplied
-     * @param systemId the system identifier of the resource being resolved,
-     * or <code>null</code> if none was supplied
-     * @param baseURI the absolute base URI of the resource being parsed,
-     * or <code>null</code> if there is no base URI
-     */
-    public LSInput resolveResource(String type, String namespaceURI,
-        String publicId, String systemId, String baseURI) {
-
-        String resolvedId = null;
-
-        try {
-            // The namespace is useful for resolving namespace aware
-            // grammars such as XML schema. Let it take precedence over
-            // the external identifier if one exists.
-            if (namespaceURI != null) {
-                resolvedId = resolveURI(namespaceURI);
-            }
-
-            if (!getUseLiteralSystemId() && baseURI != null) {
-                // Attempt to resolve the system identifier against the base URI.
-                try {
-                    URI uri = new URI(new URI(baseURI), systemId);
-                    systemId = uri.toString();
-                }
-                // Ignore the exception. Fallback to the literal system identifier.
-                catch (URI.MalformedURIException ex) {}
-            }
-
-            // Resolve against an external identifier if one exists. This
-            // is useful for resolving DTD external subsets and other
-            // external entities. For XML schemas if there was no namespace
-            // mapping we might be able to resolve a system identifier
-            // specified as a location hint.
-            if (resolvedId == null) {
-                if (publicId != null && systemId != null) {
-                    resolvedId = resolvePublic(publicId, systemId);
-                }
-                else if (systemId != null) {
-                    resolvedId = resolveSystem(systemId);
-                }
-            }
-        }
-        // Ignore IOException. It cannot be thrown from this method.
-        catch (IOException ex) {}
-
-        if (resolvedId != null) {
-            return new DOMInputImpl(publicId, resolvedId, baseURI);
-        }
-        return null;
-    }
-
-
-    /**
-     * <p>Resolves an external entity. If the entity cannot be
-     * resolved, this method should return <code>null</code>. This
-     * method only calls <code>resolveIdentifier</code> and returns
-     * an input source if an entry was found in the catalog. It
-     * should be overrided if other behaviour is required.</p>
-     *
-     * @param resourceIdentifier location of the XML resource to resolve
-     *
-     * @throws XNIException thrown on general error
-     * @throws IOException thrown if some i/o error occurs
-     */
-    public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier)
-        throws XNIException, IOException {
-
-        String resolvedId = resolveIdentifier(resourceIdentifier);
-        if (resolvedId != null) {
-            return new XMLInputSource(resourceIdentifier.getPublicId(),
-                    resolvedId, resourceIdentifier.getBaseSystemId(), false);
-        }
-        return null;
-    }
-
-    /**
-     * <p>Resolves an identifier using the catalog. This method interprets that
-     * the namespace of the identifier corresponds to uri entries in the catalog.
-     * Where both a namespace and an external identifier exist, the namespace
-     * takes precedence.</p>
-     *
-     * @param resourceIdentifier the identifier to resolve
-     *
-     * @throws XNIException thrown on general error
-     * @throws IOException thrown if some i/o error occurs
-     */
-    public String resolveIdentifier(XMLResourceIdentifier resourceIdentifier)
-        throws IOException, XNIException {
-
-        String resolvedId = null;
-
-        // The namespace is useful for resolving namespace aware
-        // grammars such as XML schema. Let it take precedence over
-        // the external identifier if one exists.
-        String namespace = resourceIdentifier.getNamespace();
-        if (namespace != null) {
-            resolvedId = resolveURI(namespace);
-        }
-
-        // Resolve against an external identifier if one exists. This
-        // is useful for resolving DTD external subsets and other
-        // external entities. For XML schemas if there was no namespace
-        // mapping we might be able to resolve a system identifier
-        // specified as a location hint.
-        if (resolvedId == null) {
-            String publicId = resourceIdentifier.getPublicId();
-            String systemId = getUseLiteralSystemId()
-                ? resourceIdentifier.getLiteralSystemId()
-                : resourceIdentifier.getExpandedSystemId();
-            if (publicId != null && systemId != null) {
-                resolvedId = resolvePublic(publicId, systemId);
-            }
-            else if (systemId != null) {
-                resolvedId = resolveSystem(systemId);
-            }
-        }
-        return resolvedId;
-    }
-
-    /**
-     * <p>Returns the URI mapping in the catalog for the given
-     * external identifier or <code>null</code> if no mapping
-     * exists. If the system identifier is an URN in the
-     * <code>publicid</code> namespace it is converted into
-     * a public identifier by URN "unwrapping" as specified
-     * in the XML Catalogs specification.</p>
-     *
-     * @param systemId the system identifier to locate in the catalog
-     *
-     * @return the mapped URI or <code>null</code> if no mapping
-     * was found in the catalog
-     *
-     * @throws IOException if an i/o error occurred while reading
-     * the catalog
-     */
-    public final synchronized String resolveSystem (String systemId)
-        throws IOException {
-
-        if (fCatalogsChanged) {
-            parseCatalogs();
-            fCatalogsChanged = false;
-        }
-        return (fCatalog != null)
-            ? fCatalog.resolveSystem(systemId) : null;
-    }
-
-    /**
-     * <p>Returns the URI mapping in the catalog for the given
-     * external identifier or <code>null</code> if no mapping
-     * exists. Public identifiers are normalized before
-     * comparison.</p>
-     *
-     * @param publicId the public identifier to locate in the catalog
-     * @param systemId the system identifier to locate in the catalog
-     *
-     * @return the mapped URI or <code>null</code> if no mapping
-     * was found in the catalog
-     *
-     * @throws IOException if an i/o error occurred while reading
-     * the catalog
-     */
-    public final synchronized String resolvePublic (String publicId, String systemId)
-        throws IOException {
-
-        if (fCatalogsChanged) {
-            parseCatalogs();
-            fCatalogsChanged = false;
-        }
-        return (fCatalog != null)
-            ? fCatalog.resolvePublic(publicId, systemId) : null;
-    }
-
-    /**
-     * <p>Returns the URI mapping in the catalog for the given URI
-     * reference or <code>null</code> if no mapping exists.
-     * URI comparison is case sensitive. If the URI reference
-     * is an URN in the <code>publicid</code> namespace
-     * it is converted into a public identifier by URN "unwrapping"
-     * as specified in the XML Catalogs specification and then
-     * resolution is performed following the semantics of
-     * external identifier resolution.</p>
-     *
-     * @param uri the URI to locate in the catalog
-     *
-     * @return the mapped URI or <code>null</code> if no mapping
-     * was found in the catalog
-     *
-     * @throws IOException if an i/o error occurred while reading
-     * the catalog
-     */
-    public final synchronized String resolveURI (String uri)
-        throws IOException {
-
-        if (fCatalogsChanged) {
-            parseCatalogs();
-            fCatalogsChanged = false;
-        }
-        return (fCatalog != null)
-            ? fCatalog.resolveURI(uri) : null;
-    }
-
-    /**
-     * Initialization. Create a CatalogManager and set all
-     * the properties upfront. This prevents JVM wide system properties
-     * or a property file somewhere in the environment from affecting
-     * the behaviour of this catalog resolver.
-     */
-    private void init (String [] catalogs, boolean preferPublic) {
-        fCatalogsList = (catalogs != null) ? (String[]) catalogs.clone() : null;
-        fPreferPublic = preferPublic;
-        fResolverCatalogManager = new CatalogManager();
-        fResolverCatalogManager.setAllowOasisXMLCatalogPI(false);
-        fResolverCatalogManager.setCatalogClassName("com.sun.org.apache.xml.internal.resolver.Catalog");
-        fResolverCatalogManager.setCatalogFiles("");
-        fResolverCatalogManager.setIgnoreMissingProperties(true);
-        fResolverCatalogManager.setPreferPublic(fPreferPublic);
-        fResolverCatalogManager.setRelativeCatalogs(false);
-        fResolverCatalogManager.setUseStaticCatalog(false);
-        fResolverCatalogManager.setVerbosity(0);
-    }
-
-    /**
-     * Instruct the <code>Catalog</code> to parse each of the
-     * catalogs in the list. Only the first catalog will actually be
-     * parsed immediately. The others will be queued and read if
-     * they are needed later.
-     */
-    private void parseCatalogs () throws IOException {
-        if (fCatalogsList != null) {
-            fCatalog = new Catalog(fResolverCatalogManager);
-            attachReaderToCatalog(fCatalog);
-            for (int i = 0; i < fCatalogsList.length; ++i) {
-                String catalog = fCatalogsList[i];
-                if (catalog != null && catalog.length() > 0) {
-                    fCatalog.parseCatalog(catalog);
-                }
-            }
-        }
-        else {
-            fCatalog = null;
-        }
-    }
-
-    /**
-     * Attaches the reader to the catalog.
-     */
-    private void attachReaderToCatalog (Catalog catalog) {
-
-        SAXParserFactory spf = new SAXParserFactoryImpl();
-        spf.setNamespaceAware(true);
-        spf.setValidating(false);
-
-        SAXCatalogReader saxReader = new SAXCatalogReader(spf);
-        saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName, "catalog",
-            "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
-        catalog.addReader("application/xml", saxReader);
-    }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ItemPSVI.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ItemPSVI.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -116,6 +115,7 @@
      *
      * @deprecated Use getSchemaValue().getNormalizedValue() instead
      */
+    @Deprecated
     public String getSchemaNormalizedValue();
 
     /**
@@ -127,6 +127,7 @@
      *
      * @deprecated Use getSchemaValue().getActualValue() instead
      */
+    @Deprecated
     public Object getActualNormalizedValue()
                                    throws XSException;
 
@@ -146,6 +147,7 @@
      *
      *  @deprecated Use getSchemaValue().getActualValueType() instead
      */
+    @Deprecated
     public short getActualNormalizedValueType()
                                    throws XSException;
 
@@ -182,6 +184,7 @@
      *
      *  @deprecated Use getSchemaValue().getListValueTypes() instead
      */
+    @Deprecated
     public ShortList getItemValueTypes()
                                    throws XSException;
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeDeclaration.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeDeclaration.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -55,6 +54,7 @@
      *
      * @deprecated Use getValueConstraintValue().getNormalizedValue() instead
      */
+    @Deprecated
     public String getConstraintValue();
 
     /**
@@ -67,6 +67,7 @@
      *
      *  @deprecated Use getValueConstraintValue().getActualValue() instead
      */
+    @Deprecated
     public Object getActualVC()
                                                         throws XSException;
 
@@ -86,6 +87,7 @@
      *
      *  @deprecated Use getValueConstraintValue().getActualValueType() instead
      */
+    @Deprecated
     public short getActualVCType()
                                                         throws XSException;
 
@@ -104,6 +106,7 @@
      *
      *  @deprecated Use getValueConstraintValue().getListValueTypes() instead
      */
+    @Deprecated
     public ShortList getItemValueTypes()
                                                         throws XSException;
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeUse.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSAttributeUse.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -48,6 +47,7 @@
      *
      * @deprecated Use getValueConstraintValue().getNormalizedValue() instead
      */
+    @Deprecated
     public String getConstraintValue();
 
     /**
@@ -60,6 +60,7 @@
      *
      * @deprecated Use getValueConstraintValue().getActualValue() instead
      */
+    @Deprecated
     public Object getActualVC()
                                        throws XSException;
 
@@ -79,6 +80,7 @@
      *
      * @deprecated Use getValueConstraintValue().getActualValueType() instead
      */
+    @Deprecated
     public short getActualVCType()
                                        throws XSException;
 
@@ -97,6 +99,7 @@
      *
      * @deprecated Use getValueConstraintValue().getListValueTypes() instead
      */
+    @Deprecated
     public ShortList getItemValueTypes()
                                        throws XSException;
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSElementDeclaration.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSElementDeclaration.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -56,6 +55,7 @@
      *
      * @deprecated Use getValueConstraintValue().getNormalizedValue() instead
      */
+    @Deprecated
     public String getConstraintValue();
 
     /**
@@ -68,6 +68,7 @@
      *
      * @deprecated Use getValueConstraintValue().getActualValue() instead
      */
+    @Deprecated
     public Object getActualVC()
                                             throws XSException;
 
@@ -87,6 +88,7 @@
      *
      * @deprecated Use getValueConstraintValue().getActualValueType() instead
      */
+    @Deprecated
     public short getActualVCType()
                                             throws XSException;
 
@@ -105,6 +107,7 @@
      *
      * @deprecated Use getValueConstraintValue().getListValueTypes() instead
      */
+    @Deprecated
     public ShortList getItemValueTypes()
                                             throws XSException;
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CoroutineParser.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -45,6 +44,7 @@
  * coroutine protocol was not being used and was complicating design.
  * See {@link IncrementalSAXSource}.
  * */
+@Deprecated
 public interface CoroutineParser {
 
     /** @return the coroutine ID number for this CoroutineParser object.
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/Catalog.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2258 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver;
-
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
-import com.sun.org.apache.xml.internal.resolver.helpers.FileURL;
-import com.sun.org.apache.xml.internal.resolver.helpers.PublicId;
-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.TR9401CatalogReader;
-import java.io.DataInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Vector;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Represents OASIS Open Catalog files.
- *
- * <p>This class implements the semantics of OASIS Open Catalog files
- * (defined by
- * <a href="http://www.oasis-open.org/html/a401.htm">OASIS Technical
- * Resolution 9401:1997 (Amendment 2 to TR 9401)</a>).</p>
- *
- * <p>The primary purpose of the Catalog is to associate resources in the
- * document with local system identifiers. Some entities
- * (document types, XML entities, and notations) have names and all of them
- * can have either public or system identifiers or both. (In XML, only a
- * notation can have a public identifier without a system identifier, but
- * the methods implemented in this class obey the Catalog semantics
- * from the SGML
- * days when system identifiers were optional.)</p>
- *
- * <p>The system identifiers returned by the resolution methods in this
- * class are valid, i.e. usable by, and in fact constructed by, the
- * <tt>java.net.URL</tt> class. Unfortunately, this class seems to behave in
- * somewhat non-standard ways and the system identifiers returned may
- * not be directly usable in a browser or filesystem context.
- *
- * <p>This class recognizes all of the Catalog entries defined in
- * TR9401:1997:</p>
- *
- * <ul>
- * <li><b>BASE</b>
- * changes the base URI for resolving relative system identifiers. The
- * initial base URI is the URI of the location of the catalog (which is,
- * in turn, relative to the location of the current working directory
- * at startup, as returned by the <tt>user.dir</tt> system property).</li>
- * <li><b>CATALOG</b>
- * processes other catalog files. An included catalog occurs logically
- * at the end of the including catalog.</li>
- * <li><b>DELEGATE_PUBLIC</b>
- * specifies alternate catalogs for some public identifiers. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>DELEGATE_SYSTEM</b>
- * specifies alternate catalogs for some system identifiers. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>DELEGATE_URI</b>
- * specifies alternate catalogs for some URIs. The delegated
- * catalogs are not loaded until they are needed, but they are cached
- * once loaded.</li>
- * <li><b>REWRITE_SYSTEM</b>
- * specifies alternate prefix for a system identifier.</li>
- * <li><b>REWRITE_URI</b>
- * specifies alternate prefix for a URI.</li>
- * <li><b>SYSTEM_SUFFIX</b>
- * maps any system identifier that ends with a particular suffix to another
- * system identifier.</li>
- * <li><b>URI_SUFFIX</b>
- * maps any URI that ends with a particular suffix to another URI.</li>
- * <li><b>DOCTYPE</b>
- * associates the names of root elements with URIs. (In other words, an XML
- * processor might infer the doctype of an XML document that does not include
- * a doctype declaration by looking for the DOCTYPE entry in the
- * catalog which matches the name of the root element of the document.)</li>
- * <li><b>DOCUMENT</b>
- * provides a default document.</li>
- * <li><b>DTDDECL</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>ENTITY</b>
- * associates entity names with URIs.</li>
- * <li><b>LINKTYPE</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>NOTATION</b>
- * associates notation names with URIs.</li>
- * <li><b>OVERRIDE</b>
- * changes the override behavior. Initial behavior is set by the
- * system property <tt>xml.catalog.override</tt>. The default initial
- * behavior is 'YES', that is, entries in the catalog override
- * system identifiers specified in the document.</li>
- * <li><b>PUBLIC</b>
- * maps a public identifier to a system identifier.</li>
- * <li><b>SGMLDECL</b>
- * recognized and silently ignored. Not relevant for XML.</li>
- * <li><b>SYSTEM</b>
- * maps a system identifier to another system identifier.</li>
- * <li><b>URI</b>
- * maps a URI to another URI.</li>
- * </ul>
- *
- * <p>Note that BASE entries are treated as described by RFC2396. In
- * particular, this has the counter-intuitive property that after a BASE
- * entry identifing "http://example.com/a/b/c" as the base URI,
- * the relative URI "foo" is resolved to the absolute URI
- * "http://example.com/a/b/foo". You must provide the trailing slash if
- * you do not want the final component of the path to be discarded as a
- * filename would in a URI for a resource: "http://example.com/a/b/c/".
- * </p>
- *
- * <p>Note that subordinate catalogs (all catalogs except the first,
- * including CATALOG and DELEGATE* catalogs) are only loaded if and when
- * they are required.</p>
- *
- * <p>This class relies on classes which implement the CatalogReader
- * interface to actually load catalog files. This allows the catalog
- * semantics to be implemented for TR9401 text-based catalogs, XML
- * catalogs, or any number of other storage formats.</p>
- *
- * <p>Additional catalogs may also be loaded with the
- * {@link #parseCatalog} method.</p>
- *
- * <p><b>Change Log:</b></p>
- * <dl>
- * <dt>2.0</dt>
- * <dd><p>Rewrite to use CatalogReaders.</p></dd>
- * <dt>1.1</dt>
- * <dd><p>Allow quoted components in <tt>xml.catalog.files</tt>
- * so that URLs containing colons can be used on Unix.
- * The string passed to <tt>xml.catalog.files</tt> can now have the form:</p>
- * <pre>
- * unquoted-path-with-no-sep-chars:"double-quoted path with or without sep chars":'single-quoted path with or without sep chars'
- * </pre>
- * <p>(Where ":" is the separater character in this example.)</p>
- * <p>If an unquoted path contains an embedded double or single quote
- * character, no special processig is performed on that character. No
- * path can contain separater characters, double, and single quotes
- * simultaneously.</p>
- * <p>Fix bug in calculation of BASE entries: if
- * a catalog contains multiple BASE entries, each is relative to the preceding
- * base, not the default base URI of the catalog.</p>
- * </dd>
- * <dt>1.0.1</dt>
- * <dd><p>Fixed a bug in the calculation of the list of subordinate catalogs.
- * This bug caused an infinite loop where parsing would alternately process
- * two catalogs indefinitely.</p>
- * </dd>
- * </dl>
- *
- * @see CatalogReader
- * @see CatalogEntry
- * @deprecated The JDK internal Catalog API in package
- * {@code com.sun.org.apache.xml.internal.resolver}
- * is encapsulated in JDK 9. The entire implementation under the package is now
- * deprecated and subject to removal in a future release. Users of the API
- * should migrate to the {@linkplain javax.xml.catalog new public API}.
- * <p>
- * The new Catalog API is supported throughout the JDK XML Processors, which allows
- * the use of Catalog by simply setting a path to a Catalog file as a property.
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- *
- * <p>Derived from public domain code originally published by Arbortext,
- * Inc.</p>
- */
-@Deprecated(since="9", forRemoval=true)
-public class Catalog {
-  /** The BASE Catalog Entry type. */
-  public static final int BASE     = CatalogEntry.addEntryType("BASE", 1);
-
-  /** The CATALOG Catalog Entry type. */
-  public static final int CATALOG  = CatalogEntry.addEntryType("CATALOG", 1);
-
-  /** The DOCUMENT Catalog Entry type. */
-  public static final int DOCUMENT = CatalogEntry.addEntryType("DOCUMENT", 1);
-
-  /** The OVERRIDE Catalog Entry type. */
-  public static final int OVERRIDE = CatalogEntry.addEntryType("OVERRIDE", 1);
-
-  /** The SGMLDECL Catalog Entry type. */
-  public static final int SGMLDECL = CatalogEntry.addEntryType("SGMLDECL", 1);
-
-  /** The DELEGATE_PUBLIC Catalog Entry type. */
-  public static final int DELEGATE_PUBLIC = CatalogEntry.addEntryType("DELEGATE_PUBLIC", 2);
-
-  /** The DELEGATE_SYSTEM Catalog Entry type. */
-  public static final int DELEGATE_SYSTEM = CatalogEntry.addEntryType("DELEGATE_SYSTEM", 2);
-
-  /** The DELEGATE_URI Catalog Entry type. */
-  public static final int DELEGATE_URI = CatalogEntry.addEntryType("DELEGATE_URI", 2);
-
-  /** The DOCTYPE Catalog Entry type. */
-  public static final int DOCTYPE  = CatalogEntry.addEntryType("DOCTYPE", 2);
-
-  /** The DTDDECL Catalog Entry type. */
-  public static final int DTDDECL  = CatalogEntry.addEntryType("DTDDECL", 2);
-
-  /** The ENTITY Catalog Entry type. */
-  public static final int ENTITY   = CatalogEntry.addEntryType("ENTITY", 2);
-
-  /** The LINKTYPE Catalog Entry type. */
-  public static final int LINKTYPE = CatalogEntry.addEntryType("LINKTYPE", 2);
-
-  /** The NOTATION Catalog Entry type. */
-  public static final int NOTATION = CatalogEntry.addEntryType("NOTATION", 2);
-
-  /** The PUBLIC Catalog Entry type. */
-  public static final int PUBLIC   = CatalogEntry.addEntryType("PUBLIC", 2);
-
-  /** The SYSTEM Catalog Entry type. */
-  public static final int SYSTEM   = CatalogEntry.addEntryType("SYSTEM", 2);
-
-  /** The URI Catalog Entry type. */
-  public static final int URI      = CatalogEntry.addEntryType("URI", 2);
-
-  /** The REWRITE_SYSTEM Catalog Entry type. */
-  public static final int REWRITE_SYSTEM = CatalogEntry.addEntryType("REWRITE_SYSTEM", 2);
-
-  /** The REWRITE_URI Catalog Entry type. */
-  public static final int REWRITE_URI = CatalogEntry.addEntryType("REWRITE_URI", 2);
-  /** The SYSTEM_SUFFIX Catalog Entry type. */
-  public static final int SYSTEM_SUFFIX = CatalogEntry.addEntryType("SYSTEM_SUFFIX", 2);
-  /** The URI_SUFFIX Catalog Entry type. */
-  public static final int URI_SUFFIX = CatalogEntry.addEntryType("URI_SUFFIX", 2);
-
-  /**
-   * The base URI for relative system identifiers in the catalog.
-   * This may be changed by BASE entries in the catalog.
-   */
-  protected URL base;
-
-  /** The base URI of the Catalog file currently being parsed. */
-  protected URL catalogCwd;
-
-  /** The catalog entries currently known to the system. */
-  protected Vector catalogEntries = new Vector();
-
-  /** The default initial override setting. */
-  protected boolean default_override = true;
-
-  /** The catalog manager in use for this instance. */
-  protected CatalogManager catalogManager = CatalogManager.getStaticManager();
-
-  /**
-   * A vector of catalog files to be loaded.
-   *
-   * <p>This list is initially established by
-   * <code>loadSystemCatalogs</code> when
-   * it parses the system catalog list, but CATALOG entries may
-   * contribute to it during the course of parsing.</p>
-   *
-   * @see #loadSystemCatalogs
-   * @see #localCatalogFiles
-   */
-  protected Vector catalogFiles = new Vector();
-
-  /**
-   * A vector of catalog files constructed during processing of
-   * CATALOG entries in the current catalog.
-   *
-   * <p>This two-level system is actually necessary to correctly implement
-   * the semantics of the CATALOG entry. If one catalog file includes
-   * another with a CATALOG entry, the included catalog logically
-   * occurs <i>at the end</i> of the including catalog, and after any
-   * preceding CATALOG entries. In other words, the CATALOG entry
-   * cannot insert anything into the middle of a catalog file.</p>
-   *
-   * <p>When processing reaches the end of each catalog files, any
-   * elements on this vector are added to the front of the
-   * <code>catalogFiles</code> vector.</p>
-   *
-   * @see #catalogFiles
-   */
-  protected Vector localCatalogFiles = new Vector();
-
-  /**
-   * A vector of Catalogs.
-   *
-   * <p>The semantics of Catalog resolution are such that each
-   * catalog is effectively a list of Catalogs (in other words,
-   * a recursive list of Catalog instances).</p>
-   *
-   * <p>Catalogs that are processed as the result of CATALOG or
-   * DELEGATE* entries are subordinate to the catalog that contained
-   * them, but they may in turn have subordinate catalogs.</p>
-   *
-   * <p>Catalogs are only loaded when they are needed, so this vector
-   * initially contains a list of Catalog filenames (URLs). If, during
-   * processing, one of these catalogs has to be loaded, the resulting
-   * Catalog object is placed in the vector, effectively caching it
-   * for the next query.</p>
-   */
-  protected Vector catalogs = new Vector();
-
-  /**
-   * A vector of DELEGATE* Catalog entries constructed during
-   * processing of the Catalog.
-   *
-   * <p>This two-level system has two purposes; first, it allows
-   * us to sort the DELEGATE* entries by the length of the partial
-   * public identifier so that a linear search encounters them in
-   * the correct order and second, it puts them all at the end of
-   * the Catalog.</p>
-   *
-   * <p>When processing reaches the end of each catalog file, any
-   * elements on this vector are added to the end of the
-   * <code>catalogEntries</code> vector. This assures that matching
-   * PUBLIC keywords are encountered before DELEGATE* entries.</p>
-   */
-  protected Vector localDelegate = new Vector();
-
-  /**
-   * A hash of CatalogReaders.
-   *
-   * <p>This hash maps MIME types to elements in the readerArr
-   * vector. This allows the Catalog to quickly locate the reader
-   * for a particular MIME type.</p>
-   */
-  protected Map<String, Integer> readerMap = new HashMap<>();
-
-  /**
-   * A vector of CatalogReaders.
-   *
-   * <p>This vector contains all of the readers in the order that they
-   * were added. In the event that a catalog is read from a file, where
-   * the MIME type is unknown, each reader is attempted in turn until
-   * one succeeds.</p>
-   */
-  protected Vector readerArr = new Vector();
-
-  /**
-   * Constructs an empty Catalog.
-   *
-   * <p>The constructor interrogates the relevant system properties
-   * using the default (static) CatalogManager
-   * and initializes the catalog data structures.</p>
-   */
-  public Catalog() {
-    // nop;
-  }
-
-  /**
-   * Constructs an empty Catalog with a specific CatalogManager.
-   *
-   * <p>The constructor interrogates the relevant system properties
-   * using the specified Catalog Manager
-   * and initializes the catalog data structures.</p>
-   */
-  public Catalog(CatalogManager manager) {
-    catalogManager = manager;
-  }
-
-  /**
-   * Return the CatalogManager used by this catalog.
-   *
-   */
-  public CatalogManager getCatalogManager() {
-    return catalogManager;
-  }
-
-  /**
-   * Establish the CatalogManager used by this catalog.
-   *
-   */
-  public void setCatalogManager(CatalogManager manager) {
-    catalogManager = manager;
-  }
-
-  /**
-   * Setup readers.
-   */
-  public void setupReaders() {
-    SAXParserFactory spf = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-    spf.setNamespaceAware(true);
-    spf.setValidating(false);
-
-    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
-
-    saxReader.setCatalogParser(null, "XMLCatalog",
-                               "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");
-
-    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
-                               "catalog",
-                               "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
-
-    addReader("application/xml", saxReader);
-
-    TR9401CatalogReader textReader = new TR9401CatalogReader();
-    addReader("text/plain", textReader);
-  }
-
-  /**
-   * Add a new CatalogReader to the Catalog.
-   *
-   * <p>This method allows you to add a new CatalogReader to the
-   * catalog. The reader will be associated with the specified mimeType.
-   * You can only have one reader per mimeType.</p>
-   *
-   * <p>In the absence of a mimeType (e.g., when reading a catalog
-   * directly from a file on the local system), the readers are attempted
-   * in the order that you add them to the Catalog.</p>
-   *
-   * <p>Note that subordinate catalogs (created by CATALOG or
-   * DELEGATE* entries) get a copy of the set of readers present in
-   * the primary catalog when they are created. Readers added subsequently
-   * will not be available. For this reason, it is best to add all
-   * of the readers before the first call to parse a catalog.</p>
-   *
-   * @param mimeType The MIME type associated with this reader.
-   * @param reader The CatalogReader to use.
-   */
-  public void addReader(String mimeType, CatalogReader reader) {
-    if (readerMap.containsKey(mimeType)) {
-      Integer pos = readerMap.get(mimeType);
-      readerArr.set(pos, reader);
-    } else {
-      readerArr.add(reader);
-      Integer pos = readerArr.size()-1;
-      readerMap.put(mimeType, pos);
-    }
-  }
-
-  /**
-   * Copies the reader list from the current Catalog to a new Catalog.
-   *
-   * <p>This method is used internally when constructing a new catalog.
-   * It copies the current reader associations over to the new catalog.
-   * </p>
-   *
-   * @param newCatalog The new Catalog.
-   */
-  protected void copyReaders(Catalog newCatalog) {
-    // Have to copy the readers in the right order...convert hash to arr
-    Vector mapArr = new Vector(readerMap.size());
-
-    // Pad the mapArr out to the right length
-    for (int count = 0; count < readerMap.size(); count++) {
-      mapArr.add(null);
-    }
-
-    for (Map.Entry<String, Integer> entry : readerMap.entrySet()) {
-        mapArr.set(entry.getValue().intValue(), entry.getKey());
-    }
-
-    for (int count = 0; count < mapArr.size(); count++) {
-      String mimeType = (String) mapArr.get(count);
-      Integer pos = readerMap.get(mimeType);
-      newCatalog.addReader(mimeType,
-                           (CatalogReader)
-                           readerArr.get(pos.intValue()));
-    }
-  }
-
-  /**
-   * Create a new Catalog object.
-   *
-   * <p>This method constructs a new instance of the running Catalog
-   * class (which might be a subtype of com.sun.org.apache.xml.internal.resolver.Catalog).
-   * All new catalogs are managed by the same CatalogManager.
-   * </p>
-   *
-   * <p>N.B. All Catalog subtypes should call newCatalog() to construct
-   * a new Catalog. Do not simply use "new Subclass()" since that will
-   * confuse future subclasses.</p>
-   */
-  protected Catalog newCatalog() {
-    String catalogClass = this.getClass().getName();
-
-    try {
-      Catalog c = (Catalog) (Class.forName(catalogClass).newInstance());
-      c.setCatalogManager(catalogManager);
-      copyReaders(c);
-      return c;
-    } catch (ClassNotFoundException cnfe) {
-      catalogManager.debug.message(1, "Class Not Found Exception: " + catalogClass);
-    } catch (IllegalAccessException iae) {
-      catalogManager.debug.message(1, "Illegal Access Exception: " + catalogClass);
-    } catch (InstantiationException ie) {
-      catalogManager.debug.message(1, "Instantiation Exception: " + catalogClass);
-    } catch (ClassCastException cce) {
-      catalogManager.debug.message(1, "Class Cast Exception: " + catalogClass);
-    } catch (Exception e) {
-      catalogManager.debug.message(1, "Other Exception: " + catalogClass);
-    }
-
-    Catalog c = new Catalog();
-    c.setCatalogManager(catalogManager);
-    copyReaders(c);
-    return c;
-  }
-
-  /**
-   * Returns the current base URI.
-   */
-  public String getCurrentBase() {
-    return base.toString();
-  }
-
-  /**
-   * Returns the default override setting associated with this
-   * catalog.
-   *
-   * <p>All catalog files loaded by this catalog will have the
-   * initial override setting specified by this default.</p>
-   */
-  public String getDefaultOverride() {
-    if (default_override) {
-      return "yes";
-    } else {
-      return "no";
-    }
-  }
-
-  /**
-   * Load the system catalog files.
-   *
-   * <p>The method adds all of the
-   * catalogs specified in the <tt>xml.catalog.files</tt> property
-   * to the Catalog list.</p>
-   *
-   * @throws MalformedURLException  One of the system catalogs is
-   * identified with a filename that is not a valid URL.
-   * @throws IOException One of the system catalogs cannot be read.
-   */
-  public void loadSystemCatalogs()
-    throws MalformedURLException, IOException {
-
-    Vector catalogs = catalogManager.getCatalogFiles();
-    if (catalogs != null) {
-      for (int count = 0; count < catalogs.size(); count++) {
-        catalogFiles.addElement(catalogs.elementAt(count));
-      }
-    }
-
-    if (catalogFiles.size() > 0) {
-      // This is a little odd. The parseCatalog() method expects
-      // a filename, but it adds that name to the end of the
-      // catalogFiles vector, and then processes that vector.
-      // This allows the system to handle CATALOG entries
-      // correctly.
-      //
-      // In this init case, we take the last element off the
-      // catalogFiles vector and pass it to parseCatalog. This
-      // will "do the right thing" in the init case, and allow
-      // parseCatalog() to do the right thing in the non-init
-      // case. Honest.
-      //
-      String catfile = (String) catalogFiles.lastElement();
-      catalogFiles.removeElement(catfile);
-      parseCatalog(catfile);
-    }
-  }
-
-  /**
-   * Parse a catalog file, augmenting internal data structures.
-   *
-   * @param fileName The filename of the catalog file to process
-   *
-   * @throws MalformedURLException The fileName cannot be turned into
-   * a valid URL.
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(String fileName)
-    throws MalformedURLException, IOException {
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse catalog: " + fileName);
-
-    // Put the file into the list of catalogs to process...
-    // In all cases except the case when initCatalog() is the
-    // caller, this will be the only catalog initially in the list...
-    catalogFiles.addElement(fileName);
-
-    // Now process all the pending catalogs...
-    parsePendingCatalogs();
-  }
-
-  /**
-   * Parse a catalog file, augmenting internal data structures.
-   *
-   * <p>Catalogs retrieved over the net may have an associated MIME type.
-   * The MIME type can be used to select an appropriate reader.</p>
-   *
-   * @param mimeType The MIME type of the catalog file.
-   * @param is The InputStream from which the catalog should be read
-   *
-   * @throws CatalogException Failed to load catalog
-   * mimeType.
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(String mimeType, InputStream is)
-    throws IOException, CatalogException {
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse " + mimeType + " catalog on input stream");
-
-    CatalogReader reader = null;
-
-    if (readerMap.containsKey(mimeType)) {
-      int arrayPos = ((Integer) readerMap.get(mimeType)).intValue();
-      reader = (CatalogReader) readerArr.get(arrayPos);
-    }
-
-    if (reader == null) {
-      String msg = "No CatalogReader for MIME type: " + mimeType;
-      catalogManager.debug.message(2, msg);
-      throw new CatalogException(CatalogException.UNPARSEABLE, msg);
-    }
-
-    reader.readCatalog(this, is);
-
-    // Now process all the pending catalogs...
-    parsePendingCatalogs();
-  }
-
-  /**
-   * Parse a catalog document, augmenting internal data structures.
-   *
-   * <p>This method supports catalog files stored in jar files: e.g.,
-   * jar:file:///path/to/filename.jar!/path/to/catalog.xml". That URI
-   * doesn't survive transmogrification through the URI processing that
-   * the parseCatalog(String) performs and passing it as an input stream
-   * doesn't set the base URI appropriately.</p>
-   *
-   * <p>Written by Stefan Wachter (2002-09-26)</p>
-   *
-   * @param aUrl The URL of the catalog document to process
-   *
-   * @throws IOException Error reading catalog file.
-   */
-  public synchronized void parseCatalog(URL aUrl) throws IOException {
-    catalogCwd = aUrl;
-    base = aUrl;
-
-    default_override = catalogManager.getPreferPublic();
-    catalogManager.debug.message(4, "Parse catalog: " + aUrl.toString());
-
-    DataInputStream inStream = null;
-    boolean parsed = false;
-
-    for (int count = 0; !parsed && count < readerArr.size(); count++) {
-      CatalogReader reader = (CatalogReader) readerArr.get(count);
-
-      try {
-        inStream = new DataInputStream(aUrl.openStream());
-      } catch (FileNotFoundException fnfe) {
-        // No catalog; give up!
-        break;
-      }
-
-      try {
-        reader.readCatalog(this, inStream);
-        parsed=true;
-      } catch (CatalogException ce) {
-        if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
-          // give up!
-          break;
-        } else {
-          // try again!
-        }
-      }
-
-      try {
-        inStream.close();
-      } catch (IOException e) {
-        //nop
-      }
-    }
-
-    if (parsed) parsePendingCatalogs();
-  }
-
-  /**
-   * Parse all of the pending catalogs.
-   *
-   * <p>Catalogs may refer to other catalogs, this method parses
-   * all of the currently pending catalog files.</p>
-   */
-  protected synchronized void parsePendingCatalogs()
-    throws MalformedURLException, IOException {
-
-    if (!localCatalogFiles.isEmpty()) {
-      // Move all the localCatalogFiles into the front of
-      // the catalogFiles queue
-      Vector newQueue = new Vector();
-      Enumeration q = localCatalogFiles.elements();
-      while (q.hasMoreElements()) {
-        newQueue.addElement(q.nextElement());
-      }
-
-      // Put the rest of the catalogs on the end of the new list
-      for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
-        String catfile = (String) catalogFiles.elementAt(curCat);
-        newQueue.addElement(catfile);
-      }
-
-      catalogFiles = newQueue;
-      localCatalogFiles.clear();
-    }
-
-    // Suppose there are no catalog files to process, but the
-    // single catalog already parsed included some delegate
-    // entries? Make sure they don't get lost.
-    if (catalogFiles.isEmpty() && !localDelegate.isEmpty()) {
-      Enumeration e = localDelegate.elements();
-      while (e.hasMoreElements()) {
-        catalogEntries.addElement(e.nextElement());
-      }
-      localDelegate.clear();
-    }
-
-    // Now process all the files on the catalogFiles vector. This
-    // vector can grow during processing if CATALOG entries are
-    // encountered in the catalog
-    while (!catalogFiles.isEmpty()) {
-      String catfile = (String) catalogFiles.elementAt(0);
-      try {
-        catalogFiles.remove(0);
-      } catch (ArrayIndexOutOfBoundsException e) {
-        // can't happen
-      }
-
-      if (catalogEntries.size() == 0 && catalogs.size() == 0) {
-        // We haven't parsed any catalogs yet, let this
-        // catalog be the first...
-        try {
-          parseCatalogFile(catfile);
-        } catch (CatalogException ce) {
-          System.out.println("FIXME: " + ce.toString());
-        }
-      } else {
-        // This is a subordinate catalog. We save its name,
-        // but don't bother to load it unless it's necessary.
-        catalogs.addElement(catfile);
-      }
-
-      if (!localCatalogFiles.isEmpty()) {
-        // Move all the localCatalogFiles into the front of
-        // the catalogFiles queue
-        Vector newQueue = new Vector();
-        Enumeration q = localCatalogFiles.elements();
-        while (q.hasMoreElements()) {
-          newQueue.addElement(q.nextElement());
-        }
-
-        // Put the rest of the catalogs on the end of the new list
-        for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
-          catfile = (String) catalogFiles.elementAt(curCat);
-          newQueue.addElement(catfile);
-        }
-
-        catalogFiles = newQueue;
-        localCatalogFiles.clear();
-      }
-
-      if (!localDelegate.isEmpty()) {
-        Enumeration e = localDelegate.elements();
-        while (e.hasMoreElements()) {
-          catalogEntries.addElement(e.nextElement());
-        }
-        localDelegate.clear();
-      }
-    }
-
-    // We've parsed them all, reinit the vector...
-    catalogFiles.clear();
-  }
-
-  /**
-   * Parse a single catalog file, augmenting internal data structures.
-   *
-   * @param fileName The filename of the catalog file to process
-   *
-   * @throws MalformedURLException The fileName cannot be turned into
-   * a valid URL.
-   * @throws IOException Error reading catalog file.
-   */
-  protected synchronized void parseCatalogFile(String fileName)
-    throws MalformedURLException, IOException, CatalogException {
-
-    CatalogEntry entry;
-
-    // The base-base is the cwd. If the catalog file is specified
-    // with a relative path, this assures that it gets resolved
-    // properly...
-    try {
-      // tack on a basename because URLs point to files not dirs
-      catalogCwd = FileURL.makeURL("basename");
-    } catch (MalformedURLException e) {
-      catalogManager.debug.message(1, "Malformed URL on cwd", "user.dir");
-      catalogCwd = null;
-    }
-
-    // The initial base URI is the location of the catalog file
-    try {
-      base = new URL(catalogCwd, fixSlashes(fileName));
-    } catch (MalformedURLException e) {
-      try {
-        base = new URL("file:" + fixSlashes(fileName));
-      } catch (MalformedURLException e2) {
-        catalogManager.debug.message(1, "Malformed URL on catalog filename",
-                      fixSlashes(fileName));
-        base = null;
-      }
-    }
-
-    catalogManager.debug.message(2, "Loading catalog", fileName);
-    catalogManager.debug.message(4, "Default BASE", base.toString());
-
-    fileName = base.toString();
-
-    DataInputStream inStream = null;
-    boolean parsed = false;
-    boolean notFound = false;
-
-    for (int count = 0; !parsed && count < readerArr.size(); count++) {
-      CatalogReader reader = (CatalogReader) readerArr.get(count);
-
-      try {
-        notFound = false;
-        inStream = new DataInputStream(base.openStream());
-      } catch (FileNotFoundException fnfe) {
-        // No catalog; give up!
-        notFound = true;
-        break;
-      }
-
-      try {
-        reader.readCatalog(this, inStream);
-        parsed = true;
-      } catch (CatalogException ce) {
-        if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
-          // give up!
-          break;
-        } else {
-          // try again!
-        }
-      }
-
-      try {
-        inStream.close();
-      } catch (IOException e) {
-        //nop
-      }
-    }
-
-    if (!parsed) {
-      if (notFound) {
-        catalogManager.debug.message(3, "Catalog does not exist", fileName);
-      } else {
-        catalogManager.debug.message(1, "Failed to parse catalog", fileName);
-      }
-    }
-  }
-
-  /**
-   * Cleanup and process a Catalog entry.
-   *
-   * <p>This method processes each Catalog entry, changing mapped
-   * relative system identifiers into absolute ones (based on the current
-   * base URI), and maintaining other information about the current
-   * catalog.</p>
-   *
-   * @param entry The CatalogEntry to process.
-   */
-  public void addEntry(CatalogEntry entry) {
-    int type = entry.getEntryType();
-
-    if (type == BASE) {
-      String value = entry.getEntryArg(0);
-      URL newbase = null;
-
-      if (base == null) {
-        catalogManager.debug.message(5, "BASE CUR", "null");
-      } else {
-        catalogManager.debug.message(5, "BASE CUR", base.toString());
-      }
-      catalogManager.debug.message(4, "BASE STR", value);
-
-      try {
-        value = fixSlashes(value);
-        newbase = new URL(base, value);
-      } catch (MalformedURLException e) {
-        try {
-          newbase = new URL("file:" + value);
-        } catch (MalformedURLException e2) {
-          catalogManager.debug.message(1, "Malformed URL on base", value);
-          newbase = null;
-        }
-      }
-
-      if (newbase != null) {
-        base = newbase;
-      }
-
-      catalogManager.debug.message(5, "BASE NEW", base.toString());
-    } else if (type == CATALOG) {
-      String fsi = makeAbsolute(entry.getEntryArg(0));
-
-      catalogManager.debug.message(4, "CATALOG", fsi);
-
-      localCatalogFiles.addElement(fsi);
-    } else if (type == PUBLIC) {
-      String publicid = PublicId.normalize(entry.getEntryArg(0));
-      String systemid = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, publicid);
-      entry.setEntryArg(1, systemid);
-
-      catalogManager.debug.message(4, "PUBLIC", publicid, systemid);
-
-      catalogEntries.addElement(entry);
-    } else if (type == SYSTEM) {
-      String systemid = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "SYSTEM", systemid, fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == URI) {
-      String uri = normalizeURI(entry.getEntryArg(0));
-      String altURI = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, altURI);
-
-      catalogManager.debug.message(4, "URI", uri, altURI);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DOCUMENT) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(0)));
-      entry.setEntryArg(0, fsi);
-
-      catalogManager.debug.message(4, "DOCUMENT", fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == OVERRIDE) {
-      catalogManager.debug.message(4, "OVERRIDE", entry.getEntryArg(0));
-
-      catalogEntries.addElement(entry);
-    } else if (type == SGMLDECL) {
-      // meaningless in XML
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(0)));
-      entry.setEntryArg(0, fsi);
-
-      catalogManager.debug.message(4, "SGMLDECL", fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DELEGATE_PUBLIC) {
-      String ppi = PublicId.normalize(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, ppi);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_PUBLIC", ppi, fsi);
-
-      addDelegate(entry);
-    } else if (type == DELEGATE_SYSTEM) {
-      String psi = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, psi);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_SYSTEM", psi, fsi);
-
-      addDelegate(entry);
-    } else if (type == DELEGATE_URI) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DELEGATE_URI", pui, fsi);
-
-      addDelegate(entry);
-    } else if (type == REWRITE_SYSTEM) {
-      String psi = normalizeURI(entry.getEntryArg(0));
-      String rpx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, psi);
-      entry.setEntryArg(1, rpx);
-
-      catalogManager.debug.message(4, "REWRITE_SYSTEM", psi, rpx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == REWRITE_URI) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String upx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, upx);
-
-      catalogManager.debug.message(4, "REWRITE_URI", pui, upx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == SYSTEM_SUFFIX) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String upx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, upx);
-
-      catalogManager.debug.message(4, "SYSTEM_SUFFIX", pui, upx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == URI_SUFFIX) {
-      String pui = normalizeURI(entry.getEntryArg(0));
-      String upx = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(0, pui);
-      entry.setEntryArg(1, upx);
-
-      catalogManager.debug.message(4, "URI_SUFFIX", pui, upx);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DOCTYPE) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DOCTYPE", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == DTDDECL) {
-      // meaningless in XML
-      String fpi = PublicId.normalize(entry.getEntryArg(0));
-      entry.setEntryArg(0, fpi);
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "DTDDECL", fpi, fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == ENTITY) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "ENTITY", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == LINKTYPE) {
-      // meaningless in XML
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "LINKTYPE", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else if (type == NOTATION) {
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "NOTATION", entry.getEntryArg(0), fsi);
-
-      catalogEntries.addElement(entry);
-    } else {
-      catalogEntries.addElement(entry);
-    }
-  }
-
-  /**
-   * Handle unknown CatalogEntry types.
-   *
-   * <p>This method exists to allow subclasses to deal with unknown
-   * entry types.</p>
-   */
-  public void unknownEntry(Vector strings) {
-    if (strings != null && strings.size() > 0) {
-      String keyword = (String) strings.elementAt(0);
-      catalogManager.debug.message(2, "Unrecognized token parsing catalog", keyword);
-    }
-  }
-
-  /**
-   * Parse all subordinate catalogs.
-   *
-   * <p>This method recursively parses all of the subordinate catalogs.
-   * If this method does not throw an exception, you can be confident that
-   * no subsequent call to any resolve*() method will either, with two
-   * possible exceptions:</p>
-   *
-   * <ol>
-   * <li><p>Delegated catalogs are re-parsed each time they are needed
-   * (because a variable list of them may be needed in each case,
-   * depending on the length of the matching partial public identifier).</p>
-   * <p>But they are parsed by this method, so as long as they don't
-   * change or disappear while the program is running, they shouldn't
-   * generate errors later if they don't generate errors now.</p>
-   * <li><p>If you add new catalogs with <code>parseCatalog</code>, they
-   * won't be loaded until they are needed or until you call
-   * <code>parseAllCatalogs</code> again.</p>
-   * </ol>
-   *
-   * <p>On the other hand, if you don't call this method, you may
-   * successfully parse documents without having to load all possible
-   * catalogs.</p>
-   *
-   * @throws MalformedURLException The filename (URL) for a
-   * subordinate or delegated catalog is not a valid URL.
-   * @throws IOException Error reading some subordinate or delegated
-   * catalog file.
-   */
-  public void parseAllCatalogs()
-    throws MalformedURLException, IOException {
-
-    // Parse all the subordinate catalogs
-    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-      Catalog c = null;
-
-      try {
-        c = (Catalog) catalogs.elementAt(catPos);
-      } catch (ClassCastException e) {
-        String catfile = (String) catalogs.elementAt(catPos);
-        c = newCatalog();
-
-        c.parseCatalog(catfile);
-        catalogs.setElementAt(c, catPos);
-        c.parseAllCatalogs();
-      }
-    }
-
-    // Parse all the DELEGATE catalogs
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == DELEGATE_PUBLIC
-          || e.getEntryType() == DELEGATE_SYSTEM
-          || e.getEntryType() == DELEGATE_URI) {
-        Catalog dcat = newCatalog();
-        dcat.parseCatalog(e.getEntryArg(1));
-      }
-    }
-  }
-
-
-  /**
-   * Return the applicable DOCTYPE system identifier.
-   *
-   * @param entityName The name of the entity (element) for which
-   * a doctype is required.
-   * @param publicId The nominal public identifier for the doctype
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the doctype
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the doctype.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveDoctype(String entityName,
-                               String publicId,
-                               String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveDoctype("
-                  +entityName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-        catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-        systemId = null;
-      } else {
-        publicId = systemId;
-        systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(DOCTYPE,
-                                    entityName,
-                                    publicId,
-                                    systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // If there's a DOCTYPE entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-        over = e.getEntryArg(0).equalsIgnoreCase("YES");
-        continue;
-      }
-
-      if (e.getEntryType() == DOCTYPE
-          && e.getEntryArg(0).equals(entityName)) {
-        if (over || systemId == null) {
-          return e.getEntryArg(1);
-        }
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(DOCTYPE,
-                                      entityName,
-                                      publicId,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable DOCUMENT entry.
-   *
-   * @return The system identifier to use for the doctype.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveDocument()
-    throws MalformedURLException, IOException {
-    // If there's a DOCUMENT entry, return it
-
-    catalogManager.debug.message(3, "resolveDocument");
-
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == DOCUMENT) {
-        return e.getEntryArg(0);
-      }
-    }
-
-    return resolveSubordinateCatalogs(DOCUMENT,
-                                      null, null, null);
-  }
-
-  /**
-   * Return the applicable ENTITY system identifier.
-   *
-   * @param entityName The name of the entity for which
-   * a system identifier is required.
-   * @param publicId The nominal public identifier for the entity
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the entity
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the entity.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveEntity(String entityName,
-                              String publicId,
-                              String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveEntity("
-                  +entityName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-        catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-        systemId = null;
-      } else {
-        publicId = systemId;
-        systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(ENTITY,
-                                    entityName,
-                                    publicId,
-                                    systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // If there's a ENTITY entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-        over = e.getEntryArg(0).equalsIgnoreCase("YES");
-        continue;
-      }
-
-      if (e.getEntryType() == ENTITY
-          && e.getEntryArg(0).equals(entityName)) {
-        if (over || systemId == null) {
-          return e.getEntryArg(1);
-        }
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(ENTITY,
-                                      entityName,
-                                      publicId,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable NOTATION system identifier.
-   *
-   * @param notationName The name of the notation for which
-   * a doctype is required.
-   * @param publicId The nominal public identifier for the notation
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the notation
-   * (as provided in the source document).
-   *
-   * @return The system identifier to use for the notation.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveNotation(String notationName,
-                                String publicId,
-                                String systemId)
-    throws MalformedURLException, IOException {
-    String resolved = null;
-
-    catalogManager.debug.message(3, "resolveNotation("
-                  +notationName+","+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-        catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-        systemId = null;
-      } else {
-        publicId = systemId;
-        systemId = null;
-      }
-    }
-
-    if (systemId != null) {
-      // If there's a SYSTEM entry in this catalog, use it
-      resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    if (publicId != null) {
-      // If there's a PUBLIC entry in this catalog, use it
-      resolved = resolveLocalPublic(NOTATION,
-                                    notationName,
-                                    publicId,
-                                    systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // If there's a NOTATION entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-        over = e.getEntryArg(0).equalsIgnoreCase("YES");
-        continue;
-      }
-
-      if (e.getEntryType() == NOTATION
-          && e.getEntryArg(0).equals(notationName)) {
-        if (over || systemId == null) {
-          return e.getEntryArg(1);
-        }
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(NOTATION,
-                                      notationName,
-                                      publicId,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or
-   * public identifiers. If
-   * no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * null is returned.</p>
-   *
-   * @param publicId The public identifier to locate in the catalog.
-   * Public identifiers are normalized before comparison.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  public String resolvePublic(String publicId, String systemId)
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolvePublic("+publicId+","+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (publicId != null && publicId.startsWith("urn:publicid:")) {
-      publicId = PublicId.decodeURN(publicId);
-    }
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      if (publicId != null && !publicId.equals(systemId)) {
-        catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
-        systemId = null;
-      } else {
-        publicId = systemId;
-        systemId = null;
-      }
-    }
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // If there's a PUBLIC entry in this catalog, use it
-    String resolved = resolveLocalPublic(PUBLIC,
-                                         null,
-                                         publicId,
-                                         systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(PUBLIC,
-                                      null,
-                                      publicId,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or public identifiers.
-   * If no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * delegated Catalogs are interrogated.</p>
-   *
-   * <p>There are four possible cases:</p>
-   *
-   * <ul>
-   * <li>If the system identifier provided matches a SYSTEM entry
-   * in the current catalog, the SYSTEM entry is returned.
-   * <li>If the system identifier is not null, the PUBLIC entries
-   * that were encountered when OVERRIDE YES was in effect are
-   * interrogated and the first matching entry is returned.</li>
-   * <li>If the system identifier is null, then all of the PUBLIC
-   * entries are interrogated and the first matching entry
-   * is returned. This may not be the same as the preceding case, if
-   * some PUBLIC entries are encountered when OVERRIDE NO is in effect. In
-   * XML, the only place where a public identifier may occur without
-   * a system identifier is in a notation declaration.</li>
-   * <li>Finally, if the public identifier matches one of the partial
-   * public identifiers specified in a DELEGATE* entry in
-   * the Catalog, the delegated catalog is interrogated. The first
-   * time that the delegated catalog is required, it will be
-   * retrieved and parsed. It is subsequently cached.
-   * </li>
-   * </ul>
-   *
-   * @param entityType The CatalogEntry type for which this query is
-   * being conducted. This is necessary in order to do the approprate
-   * query on a delegated catalog.
-   * @param entityName The name of the entity being searched for, if
-   * appropriate.
-   * @param publicId The public identifier of the entity in question.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * delegated catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading delegated catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  protected synchronized String resolveLocalPublic(int entityType,
-                                                   String entityName,
-                                                   String publicId,
-                                                   String systemId)
-    throws MalformedURLException, IOException {
-
-    // Always normalize the public identifier before attempting a match
-    publicId = PublicId.normalize(publicId);
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // If there's a PUBLIC entry in this catalog, use it
-    boolean over = default_override;
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-        over = e.getEntryArg(0).equalsIgnoreCase("YES");
-        continue;
-      }
-
-      if (e.getEntryType() == PUBLIC
-          && e.getEntryArg(0).equals(publicId)) {
-        if (over || systemId == null) {
-          return e.getEntryArg(1);
-        }
-      }
-    }
-
-    // If there's a DELEGATE_PUBLIC entry in this catalog, use it
-    over = default_override;
-    en = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == OVERRIDE) {
-        over = e.getEntryArg(0).equalsIgnoreCase("YES");
-        continue;
-      }
-
-      if (e.getEntryType() == DELEGATE_PUBLIC
-          && (over || systemId == null)) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= publicId.length()
-            && p.equals(publicId.substring(0, p.length()))) {
-          // delegate this match to the other catalog
-
-          delCats.addElement(e.getEntryArg(1));
-        }
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-        catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-        while (enCats.hasMoreElements()) {
-          String delegatedCatalog = (String) enCats.nextElement();
-          catalogManager.debug.message(2, "\t" + delegatedCatalog);
-        }
-      }
-
-      Catalog dcat = newCatalog();
-
-      enCats = delCats.elements();
-      while (enCats.hasMoreElements()) {
-        String delegatedCatalog = (String) enCats.nextElement();
-        dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolvePublic(publicId, null);
-    }
-
-    // Nada!
-    return null;
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier.
-   *
-   * <p>If a SYSTEM entry exists in the Catalog
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * <p>On Windows-based operating systems, the comparison between
-   * the system identifier provided and the SYSTEM entries in the
-   * Catalog is case-insensitive.</p>
-   *
-   * @param systemId The system ID to locate in the catalog.
-   *
-   * @return The resolved system identifier.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolveSystem("+systemId+")");
-
-    systemId = normalizeURI(systemId);
-
-    if (systemId != null && systemId.startsWith("urn:publicid:")) {
-      systemId = PublicId.decodeURN(systemId);
-      return resolvePublic(systemId, null);
-    }
-
-    // If there's a SYSTEM entry in this catalog, use it
-    if (systemId != null) {
-      String resolved = resolveLocalSystem(systemId);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(SYSTEM,
-                                      null,
-                                      null,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier in this
-   * catalog.
-   *
-   * <p>If a SYSTEM entry exists in the catalog file
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * @param systemId The system ID to locate in the catalog
-   *
-   * @return The mapped system identifier or null
-   */
-  protected String resolveLocalSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    String osname = SecuritySupport.getSystemProperty("os.name");
-    boolean windows = (osname.indexOf("Windows") >= 0);
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == SYSTEM
-          && (e.getEntryArg(0).equals(systemId)
-              || (windows
-                  && e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
-        return e.getEntryArg(1);
-      }
-    }
-
-    // If there's a REWRITE_SYSTEM entry in this catalog, use it
-    en = catalogEntries.elements();
-    String startString = null;
-    String prefix = null;
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == REWRITE_SYSTEM) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= systemId.length()
-            && p.equals(systemId.substring(0, p.length()))) {
-          // Is this the longest prefix?
-          if (startString == null
-              || p.length() > startString.length()) {
-            startString = p;
-            prefix = e.getEntryArg(1);
-          }
-        }
-      }
-    }
-
-    if (prefix != null) {
-      // return the systemId with the new prefix
-      return prefix + systemId.substring(startString.length());
-    }
-
-    // If there's a SYSTEM_SUFFIX entry in this catalog, use it
-    en = catalogEntries.elements();
-    String suffixString = null;
-    String suffixURI = null;
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == SYSTEM_SUFFIX) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= systemId.length()
-            && systemId.endsWith(p)) {
-          // Is this the longest prefix?
-          if (suffixString == null
-              || p.length() > suffixString.length()) {
-            suffixString = p;
-            suffixURI = e.getEntryArg(1);
-          }
-        }
-      }
-    }
-
-    if (suffixURI != null) {
-      // return the systemId for the suffix
-      return suffixURI;
-    }
-
-    // If there's a DELEGATE_SYSTEM entry in this catalog, use it
-    en = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == DELEGATE_SYSTEM) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= systemId.length()
-            && p.equals(systemId.substring(0, p.length()))) {
-          // delegate this match to the other catalog
-
-          delCats.addElement(e.getEntryArg(1));
-        }
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-        catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-        while (enCats.hasMoreElements()) {
-          String delegatedCatalog = (String) enCats.nextElement();
-          catalogManager.debug.message(2, "\t" + delegatedCatalog);
-        }
-      }
-
-      Catalog dcat = newCatalog();
-
-      enCats = delCats.elements();
-      while (enCats.hasMoreElements()) {
-        String delegatedCatalog = (String) enCats.nextElement();
-        dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolveSystem(systemId);
-    }
-
-    return null;
-  }
-
-  /**
-   * Return the applicable URI.
-   *
-   * <p>If a URI entry exists in the Catalog
-   * for the URI specified, return the mapped value.</p>
-   *
-   * <p>URI comparison is case sensitive.</p>
-   *
-   * @param uri The URI to locate in the catalog.
-   *
-   * @return The resolved URI.
-   *
-   * @throws MalformedURLException The system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveURI(String uri)
-    throws MalformedURLException, IOException {
-
-    catalogManager.debug.message(3, "resolveURI("+uri+")");
-
-    uri = normalizeURI(uri);
-
-    if (uri != null && uri.startsWith("urn:publicid:")) {
-      uri = PublicId.decodeURN(uri);
-      return resolvePublic(uri, null);
-    }
-
-    // If there's a URI entry in this catalog, use it
-    if (uri != null) {
-      String resolved = resolveLocalURI(uri);
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(URI,
-                                      null,
-                                      null,
-                                      uri);
-  }
-
-  /**
-   * Return the applicable URI in this catalog.
-   *
-   * <p>If a URI entry exists in the catalog file
-   * for the URI specified, return the mapped value.</p>
-   *
-   * @param uri The URI to locate in the catalog
-   *
-   * @return The mapped URI or null
-   */
-  protected String resolveLocalURI(String uri)
-    throws MalformedURLException, IOException {
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == URI
-          && (e.getEntryArg(0).equals(uri))) {
-        return e.getEntryArg(1);
-      }
-    }
-
-    // If there's a REWRITE_URI entry in this catalog, use it
-    en = catalogEntries.elements();
-    String startString = null;
-    String prefix = null;
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == REWRITE_URI) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= uri.length()
-            && p.equals(uri.substring(0, p.length()))) {
-          // Is this the longest prefix?
-          if (startString == null
-              || p.length() > startString.length()) {
-            startString = p;
-            prefix = e.getEntryArg(1);
-          }
-        }
-      }
-    }
-
-    if (prefix != null) {
-      // return the uri with the new prefix
-      return prefix + uri.substring(startString.length());
-    }
-
-    // If there's a URI_SUFFIX entry in this catalog, use it
-    en = catalogEntries.elements();
-    String suffixString = null;
-    String suffixURI = null;
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == URI_SUFFIX) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= uri.length()
-            && uri.endsWith(p)) {
-          // Is this the longest prefix?
-          if (suffixString == null
-              || p.length() > suffixString.length()) {
-            suffixString = p;
-            suffixURI = e.getEntryArg(1);
-          }
-        }
-      }
-    }
-
-    if (suffixURI != null) {
-      // return the uri for the suffix
-      return suffixURI;
-    }
-
-    // If there's a DELEGATE_URI entry in this catalog, use it
-    en = catalogEntries.elements();
-    Vector delCats = new Vector();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-
-      if (e.getEntryType() == DELEGATE_URI) {
-        String p = (String) e.getEntryArg(0);
-        if (p.length() <= uri.length()
-            && p.equals(uri.substring(0, p.length()))) {
-          // delegate this match to the other catalog
-
-          delCats.addElement(e.getEntryArg(1));
-        }
-      }
-    }
-
-    if (delCats.size() > 0) {
-      Enumeration enCats = delCats.elements();
-
-      if (catalogManager.debug.getDebug() > 1) {
-        catalogManager.debug.message(2, "Switching to delegated catalog(s):");
-        while (enCats.hasMoreElements()) {
-          String delegatedCatalog = (String) enCats.nextElement();
-          catalogManager.debug.message(2, "\t" + delegatedCatalog);
-        }
-      }
-
-      Catalog dcat = newCatalog();
-
-      enCats = delCats.elements();
-      while (enCats.hasMoreElements()) {
-        String delegatedCatalog = (String) enCats.nextElement();
-        dcat.parseCatalog(delegatedCatalog);
-      }
-
-      return dcat.resolveURI(uri);
-    }
-
-    return null;
-  }
-
-  /**
-   * Search the subordinate catalogs, in order, looking for a match.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given entity type with the given
-   * name, public, and system identifiers. In some contexts, these
-   * may be null.</p>
-   *
-   * @param entityType The CatalogEntry type for which this query is
-   * being conducted. This is necessary in order to do the approprate
-   * query on a subordinate catalog.
-   * @param entityName The name of the entity being searched for, if
-   * appropriate.
-   * @param publicId The public identifier of the entity in question
-   * (as provided in the source document).
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document). This parameter is
-   * overloaded for the URI entry type.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * delegated catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading delegated catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  protected synchronized String resolveSubordinateCatalogs(int entityType,
-                                                           String entityName,
-                                                           String publicId,
-                                                           String systemId)
-    throws MalformedURLException, IOException {
-
-    for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-      Catalog c = null;
-
-      try {
-        c = (Catalog) catalogs.elementAt(catPos);
-      } catch (ClassCastException e) {
-        String catfile = (String) catalogs.elementAt(catPos);
-        c = newCatalog();
-
-        try {
-          c.parseCatalog(catfile);
-        } catch (MalformedURLException mue) {
-          catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
-        } catch (FileNotFoundException fnfe) {
-          catalogManager.debug.message(1, "Failed to load catalog, file not found",
-                        catfile);
-        } catch (IOException ioe) {
-          catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
-        }
-
-        catalogs.setElementAt(c, catPos);
-      }
-
-      String resolved = null;
-
-      // Ok, now what are we supposed to call here?
-      if (entityType == DOCTYPE) {
-        resolved = c.resolveDoctype(entityName,
-                                    publicId,
-                                    systemId);
-      } else if (entityType == DOCUMENT) {
-        resolved = c.resolveDocument();
-      } else if (entityType == ENTITY) {
-        resolved = c.resolveEntity(entityName,
-                                   publicId,
-                                   systemId);
-      } else if (entityType == NOTATION) {
-        resolved = c.resolveNotation(entityName,
-                                     publicId,
-                                     systemId);
-      } else if (entityType == PUBLIC) {
-        resolved = c.resolvePublic(publicId, systemId);
-      } else if (entityType == SYSTEM) {
-        resolved = c.resolveSystem(systemId);
-      } else if (entityType == URI) {
-        resolved = c.resolveURI(systemId);
-      }
-
-      if (resolved != null) {
-        return resolved;
-      }
-    }
-
-    return null;
-  }
-
-  // -----------------------------------------------------------------
-
-  /**
-   * Replace backslashes with forward slashes. (URLs always use
-   * forward slashes.)
-   *
-   * @param sysid The input system identifier.
-   * @return The same system identifier with backslashes turned into
-   * forward slashes.
-   */
-  protected String fixSlashes (String sysid) {
-    return sysid.replace('\\', '/');
-  }
-
-  /**
-   * Construct an absolute URI from a relative one, using the current
-   * base URI.
-   *
-   * @param sysid The (possibly relative) system identifier
-   * @return The system identifier made absolute with respect to the
-   * current {@link #base}.
-   */
-  protected String makeAbsolute(String sysid) {
-    URL local = null;
-
-    sysid = fixSlashes(sysid);
-
-    try {
-      local = new URL(base, sysid);
-    } catch (MalformedURLException e) {
-      catalogManager.debug.message(1, "Malformed URL on system identifier", sysid);
-    }
-
-    if (local != null) {
-      return local.toString();
-    } else {
-      return sysid;
-    }
-  }
-
-
-    /**
-     * Perform character normalization on a URI reference.
-     *
-     * @param uriref The URI reference
-     * @return The normalized URI reference.
-     */
-    protected String normalizeURI(String uriref) {
-        if (uriref == null) {
-            return null;
-        }
-        final int length = uriref.length();
-        for (int i = 0; i < length; ++i) {
-            char c = uriref.charAt(i);
-            if ((c <= 0x20)    // ctrl
-                    || (c > 0x7F)  // high ascii
-                    || (c == 0x22) // "
-                    || (c == 0x3C) // <
-                    || (c == 0x3E) // >
-                    || (c == 0x5C) // \
-                    || (c == 0x5E) // ^
-                    || (c == 0x60) // `
-                    || (c == 0x7B) // {
-                    || (c == 0x7C) // |
-                    || (c == 0x7D) // }
-                    || (c == 0x7F)) {
-                return normalizeURI(uriref, i);
-            }
-        }
-        return uriref;
-    }
-
-    /**
-     * Perform character normalization on a URI reference.
-     *
-     * @param uriref The URI reference
-     * @param index The index of the first character which requires escaping.
-     * @return The normalized URI reference.
-     */
-    private String normalizeURI(String uriref, int index) {
-        final StringBuilder buffer = new StringBuilder();
-        for (int i = 0; i < index; ++i) {
-            buffer.append(uriref.charAt(i));
-        }
-        final byte[] bytes;
-        try {
-            bytes = uriref.substring(index).getBytes("UTF-8");
-        }
-        catch (UnsupportedEncodingException uee) {
-            // this can't happen
-            catalogManager.debug.message(1, "UTF-8 is an unsupported encoding!?");
-            return uriref;
-        }
-        for (int count = 0; count < bytes.length; ++count) {
-            int ch = bytes[count] & 0xFF;
-            if ((ch <= 0x20)    // ctrl
-                    || (ch > 0x7F)  // high ascii
-                    || (ch == 0x22) // "
-                    || (ch == 0x3C) // <
-                    || (ch == 0x3E) // >
-                    || (ch == 0x5C) // \
-                    || (ch == 0x5E) // ^
-                    || (ch == 0x60) // `
-                    || (ch == 0x7B) // {
-                    || (ch == 0x7C) // |
-                    || (ch == 0x7D) // }
-                    || (ch == 0x7F)) {
-                writeEncodedByte(ch, buffer);
-            }
-            else {
-                buffer.append((char) bytes[count]);
-            }
-        }
-        return buffer.toString();
-    }
-
-    /**
-     * Perform %-encoding on a single byte.
-     *
-     * @param b The 8-bit integer that represents the byte. (Bytes are signed
-     *          but encoding needs to look at the bytes unsigned.)
-     * @return The %-encoded string for the byte in question.
-     */
-    protected String encodedByte(int b) {
-        StringBuilder buffer = new StringBuilder(3);
-        writeEncodedByte(b, buffer);
-        return buffer.toString();
-    }
-
-    /**
-     * Perform %-encoding on a single byte.
-     *
-     * @param b The 8-bit integer that represents the byte. (Bytes are signed
-     *          but encoding needs to look at the bytes unsigned.)
-     * @param buffer The target for the %-encoded string for the byte in question.
-     */
-    private void writeEncodedByte(int b, StringBuilder buffer) {
-        String hex = Integer.toHexString(b).toUpperCase(Locale.ENGLISH);
-        if (hex.length() < 2) {
-            buffer.append("%0");
-            buffer.append(hex);
-        }
-        else {
-            buffer.append('%');
-            buffer.append(hex);
-        }
-    }
-
-  // -----------------------------------------------------------------
-
-  /**
-   * Add to the current list of delegated catalogs.
-   *
-   * <p>This method always constructs the {@link #localDelegate}
-   * vector so that it is ordered by length of partial
-   * public identifier.</p>
-   *
-   * @param entry The DELEGATE catalog entry
-   */
-  protected void addDelegate(CatalogEntry entry) {
-    int pos = 0;
-    String partial = entry.getEntryArg(0);
-
-    Enumeration local = localDelegate.elements();
-    while (local.hasMoreElements()) {
-      CatalogEntry dpe = (CatalogEntry) local.nextElement();
-      String dp = dpe.getEntryArg(0);
-      if (dp.equals(partial)) {
-        // we already have this prefix
-        return;
-      }
-      if (dp.length() > partial.length()) {
-        pos++;
-      }
-      if (dp.length() < partial.length()) {
-        break;
-      }
-    }
-
-    // now insert partial into the vector at [pos]
-    if (localDelegate.size() == 0) {
-      localDelegate.addElement(entry);
-    } else {
-      localDelegate.insertElementAt(entry, pos);
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver;
-
-import java.util.Map;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Represents a Catalog entry.
- *
- * <p>Instances of this class represent individual entries
- * in a Catalog.</p>
- *
- * <p>Each catalog entry has a unique name and is associated with
- * an arbitrary number of arguments (all strings). For example, the
- * TR9401 catalog entry "PUBLIC" has two arguments, a public identifier
- * and a system identifier. Each entry has a unique numeric type,
- * assigned automatically when the entry type is created.</p>
- *
- * <p>The number and type of catalog entries is maintained
- * <em>statically</em>. Catalog classes, or their subclasses, can add
- * new entry types, but all Catalog objects share the same global pool
- * of types.</p>
- *
- * <p>Initially there are no valid entries.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class CatalogEntry {
-  /** The nextEntry is the ordinal number of the next entry type. */
-  static AtomicInteger nextEntry = new AtomicInteger(0);
-
-  /**
-   * The entryTypes vector maps catalog entry names
-   * (e.g., 'BASE' or 'SYSTEM') to their type (1, 2, etc.).
-   * Names are case sensitive.
-   */
-  static final Map<String, Integer> entryTypes = new ConcurrentHashMap<>();
-
-  /** The entryTypes vector maps catalog entry types to the
-      number of arguments they're required to have. */
-  static final Vector entryArgs = new Vector();
-
-  /**
-   * Adds a new catalog entry type.
-   *
-   * @param name The name of the catalog entry type. This must be
-   * unique among all types and is case-sensitive. (Adding a duplicate
-   * name effectively replaces the old type with the new type.)
-   * @param numArgs The number of arguments that this entry type
-   * is required to have. There is no provision for variable numbers
-   * of arguments.
-   * @return The type for the new entry.
-   */
-  static int addEntryType(String name, int numArgs) {
-    final int index = nextEntry.getAndIncrement();
-    entryTypes.put(name, index);
-    entryArgs.add(index, numArgs);
-
-    return index;
-  }
-
-  /**
-   * Lookup an entry type
-   *
-   * @param name The name of the catalog entry type.
-   * @return The type of the catalog entry with the specified name.
-   * @throws InvalidCatalogEntryTypeException if no entry has the
-   * specified name.
-   */
-  public static int getEntryType(String name)
-    throws CatalogException {
-    if (!entryTypes.containsKey(name)) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    Integer iType = entryTypes.get(name);
-
-    if (iType == null) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    return iType;
-  }
-
-  /**
-   * Find out how many arguments an entry is required to have.
-   *
-   * @param name The name of the catalog entry type.
-   * @return The number of arguments that entry type is required to have.
-   * @throws InvalidCatalogEntryTypeException if no entry has the
-   * specified name.
-   */
-  public static int getEntryArgCount(String name)
-    throws CatalogException {
-    return getEntryArgCount(getEntryType(name));
-  }
-
-  /**
-   * Find out how many arguments an entry is required to have.
-   *
-   * @param type A valid catalog entry type.
-   * @return The number of arguments that entry type is required to have.
-   * @throws InvalidCatalogEntryTypeException if the type is invalid.
-   */
-  public static int getEntryArgCount(int type)
-    throws CatalogException {
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      return iArgs.intValue();
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-  }
-
-  /** The entry type of this entry */
-  protected int entryType = 0;
-
-  /** The arguments associated with this entry */
-  protected Vector args = null;
-
-  /**
-   * Null constructor; something for subclasses to call.
-   */
-  public CatalogEntry() {}
-
-  /**
-   * Construct a catalog entry of the specified type.
-   *
-   * @param name The name of the entry type
-   * @param args A String Vector of arguments
-   * @throws InvalidCatalogEntryTypeException if no such entry type
-   * exists.
-   * @throws InvalidCatalogEntryException if the wrong number of arguments
-   * is passed.
-   */
-  public CatalogEntry(String name, Vector args)
-    throws CatalogException {
-    Integer iType = entryTypes.get(name);
-
-    if (iType == null) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    int type = iType;
-
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      if (iArgs.intValue() != args.size()) {
-        throw new CatalogException(CatalogException.INVALID_ENTRY);
-      }
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    entryType = type;
-    this.args = args;
-  }
-
-  /**
-   * Construct a catalog entry of the specified type.
-   *
-   * @param type The entry type
-   * @param args A String Vector of arguments
-   * @throws InvalidCatalogEntryTypeException if no such entry type
-   * exists.
-   * @throws InvalidCatalogEntryException if the wrong number of arguments
-   * is passed.
-   */
-  public CatalogEntry(int type, Vector args)
-    throws CatalogException {
-    try {
-      Integer iArgs = (Integer) entryArgs.get(type);
-      if (iArgs.intValue() != args.size()) {
-        throw new CatalogException(CatalogException.INVALID_ENTRY);
-      }
-    } catch (ArrayIndexOutOfBoundsException e) {
-      throw new CatalogException(CatalogException.INVALID_ENTRY_TYPE);
-    }
-
-    entryType = type;
-    this.args = args;
-  }
-
-  /**
-   * Get the entry type.
-   *
-   * @return The entry type of the CatalogEntry
-   */
-  public int getEntryType() {
-    return entryType;
-  }
-
-  /**
-   * Get an entry argument.
-   *
-   * @param argNum The argument number (arguments are numbered from 0).
-   * @return The specified argument or null if an invalid argNum is
-   * provided.
-   */
-  public String getEntryArg(int argNum) {
-    try {
-      String arg = (String) args.get(argNum);
-      return arg;
-    } catch (ArrayIndexOutOfBoundsException e) {
-      return null;
-    }
-  }
-
-  /**
-   * Set an entry argument.
-   *
-   * <p>Catalogs sometimes need to adjust the catlog entry parameters,
-   * for example to make a relative URI absolute with respect to the
-   * current base URI. But in general, this function should only be
-   * called shortly after object creation to do some sort of cleanup.
-   * Catalog entries should not mutate over time.</p>
-   *
-   * @param argNum The argument number (arguments are numbered from 0).
-   * @throws ArrayIndexOutOfBoundsException if an invalid argument
-   * number is provided.
-   */
-  public void setEntryArg(int argNum, String newspec)
-    throws ArrayIndexOutOfBoundsException {
-    args.set(argNum, newspec);
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogException.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver;
-
-/**
- * Signal Catalog exception.
- *
- * <p>This exception is thrown if an error occurs loading a
- * catalog file.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class CatalogException extends Exception {
-
-  private static final long serialVersionUID = 4007157171817798450L;
-
-  /** A wrapper around another exception */
-  public static final int WRAPPER = 1;
-  /** An invalid entry */
-  public static final int INVALID_ENTRY = 2;
-  /** An invalid entry type */
-  public static final int INVALID_ENTRY_TYPE = 3;
-  /** Could not instantiate an XML parser */
-  public static final int NO_XML_PARSER = 4;
-  /** Unknown XML format */
-  public static final int UNKNOWN_FORMAT = 5;
-  /** Unparseable XML catalog (not XML)*/
-  public static final int UNPARSEABLE = 6;
-  /** XML but parse failed */
-  public static final int PARSE_FAILED = 7;
-  /** Text catalog ended in mid-comment */
-  public static final int UNENDED_COMMENT = 8;
-
-  /**
-   * The embedded exception if tunnelling, or null.
-   */
-  private final Exception exception;
-  private final int exceptionType;
-
-  /**
-   * Create a new CatalogException.
-   *
-   * @param type The exception type
-   * @param message The error or warning message.
-   */
-  public CatalogException (int type, String message) {
-    super(message);
-    this.exceptionType = type;
-    this.exception = null;
-  }
-
-  /**
-   * Create a new CatalogException.
-   *
-   * @param type The exception type
-   */
-  public CatalogException (int type) {
-    super("Catalog Exception " + type);
-    this.exceptionType = type;
-    this.exception = null;
-  }
-
-  /**
-   * Create a new CatalogException wrapping an existing exception.
-   *
-   * <p>The existing exception will be embedded in the new
-   * one, and its message will become the default message for
-   * the CatalogException.</p>
-   *
-   * @param e The exception to be wrapped in a CatalogException.
-   */
-  public CatalogException (Exception e) {
-    super();
-    this.exceptionType = WRAPPER;
-    this.exception = e;
-  }
-
-  /**
-   * Create a new CatalogException from an existing exception.
-   *
-   * <p>The existing exception will be embedded in the new
-   * one, but the new exception will have its own message.</p>
-   *
-   * @param message The detail message.
-   * @param e The exception to be wrapped in a CatalogException.
-   */
-  public CatalogException (String message, Exception e) {
-    super(message);
-    this.exceptionType = WRAPPER;
-    this.exception = e;
-  }
-
-  /**
-   * Return a detail message for this exception.
-   *
-   * <p>If there is an embedded exception, and if the CatalogException
-   * has no detail message of its own, this method will return
-   * the detail message from the embedded exception.</p>
-   *
-   * @return The error or warning message.
-   */
-  public String getMessage ()
-  {
-    String message = super.getMessage();
-
-    if (message == null && exception != null) {
-      return exception.getMessage();
-    } else {
-      return message;
-    }
-  }
-
-  /**
-   * Return the embedded exception, if any.
-   *
-   * @return The embedded exception, or null if there is none.
-   */
-  public Exception getException ()
-  {
-    return exception;
-  }
-
-  /**
-   * Return the exception type
-   *
-   * @return The exception type
-   */
-  public int getExceptionType ()
-  {
-    return exceptionType;
-  }
-
-  /**
-   * Override toString to pick up any embedded exception.
-   *
-   * @return A string representation of this exception.
-   */
-  public String toString ()
-  {
-    if (exception != null) {
-      return exception.toString();
-    } else {
-      return super.toString();
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/CatalogManager.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,870 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver;
-
-import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
-import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver;
-import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.MissingResourceException;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import sun.reflect.misc.ReflectUtil;
-
-/**
- * CatalogManager provides an interface to the catalog properties.
- *
- * <p>Properties can come from two places: from system properties or
- * from a <i>CatalogManager.properties</i> file. This class provides a transparent
- * interface to both, with system properties preferred over property file values.</p>
- *
- * <p>The following table summarizes the properties:</p>
- *
- * <table border="1">
- * <thead>
- * <tr>
- * <td>System Property</td>
- * <td>CatalogManager.properties<br/>Property</td>
- * <td>Description</td>
- * </tr>
- * </thead>
- * <tbody>
- * <tr>
- * <td>xml.catalog.ignoreMissing</td>
- * <td>&#160;</td>
- * <td>If true, a missing <i>CatalogManager.properties</i> file or missing properties
- * within that file will not generate warning messages. See also the
- * <i>ignoreMissingProperties</i> method.</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.files</td>
- * <td>catalogs</td>
- * <td>The <emph>semicolon-delimited</emph> list of catalog files.</td>
- * </tr>
- *
- * <tr>
- * <td>&#160;</td>
- * <td>relative-catalogs</td>
- * <td>If false, relative catalog URIs are made absolute with respect to the base URI of
- * the <i>CatalogManager.properties</i> file. This setting only applies to catalog
- * URIs obtained from the <i>catalogs</i> property <emph>in the</emph>
- * <i>CatalogManager.properties</i> file</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.verbosity</td>
- * <td>verbosity</td>
- * <td>If non-zero, the Catalog classes will print informative and debugging messages.
- * The higher the number, the more messages.</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.prefer</td>
- * <td>prefer</td>
- * <td>Which identifier is preferred, "public" or "system"?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.staticCatalog</td>
- * <td>static-catalog</td>
- * <td>Should a single catalog be constructed for all parsing, or should a different
- * catalog be created for each parser?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.allowPI</td>
- * <td>allow-oasis-xml-catalog-pi</td>
- * <td>If the source document contains "oasis-xml-catalog" processing instructions,
- * should they be used?</td>
- * </tr>
- *
- * <tr>
- * <td>xml.catalog.className</td>
- * <td>catalog-class-name</td>
- * <td>If you're using the convenience classes
- * <tt>com.sun.org.apache.xml.internal.resolver.tools.*</tt>), this setting
- * allows you to specify an alternate class name to use for the underlying
- * catalog.</td>
- * </tr>
- * </tbody>
- * </table>
- *
- * @see Catalog
- * @deprecated The JDK internal Catalog API in package
- * {@code com.sun.org.apache.xml.internal.resolver}
- * is encapsulated in JDK 9. The entire implementation under the package is now
- * deprecated and subject to removal in a future release. Users of the API
- * should migrate to the {@linkplain javax.xml.catalog new public API}.
- * <p>
- * The new Catalog API is supported throughout the JDK XML Processors, which allows
- * the use of Catalog by simply setting a path to a Catalog file as a property.
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-@Deprecated(since="9", forRemoval=true)
-public class CatalogManager {
-    private static final String pFiles         = "xml.catalog.files";
-    private static final String pVerbosity     = "xml.catalog.verbosity";
-    private static final String pPrefer        = "xml.catalog.prefer";
-    private static final String pStatic        = "xml.catalog.staticCatalog";
-    private static final String pAllowPI       = "xml.catalog.allowPI";
-    private static final String pClassname     = "xml.catalog.className";
-    private static final String pIgnoreMissing = "xml.catalog.ignoreMissing";
-
-    /** A static CatalogManager instance for sharing */
-    private static final CatalogManager staticManager = new CatalogManager();
-
-    /** The bootstrap resolver to use when loading XML Catalogs. */
-    private BootstrapResolver bResolver = new BootstrapResolver();
-
-    /** Flag to ignore missing property files and/or properties */
-    private boolean ignoreMissingProperties
-    = (SecuritySupport.getSystemProperty(pIgnoreMissing) != null
-    || SecuritySupport.getSystemProperty(pFiles) != null);
-
-    /** Holds the resources after they are loaded from the file. */
-    private ResourceBundle resources;
-
-    /** The name of the CatalogManager properties file. */
-    private String propertyFile = "CatalogManager.properties";
-
-    /** The location of the propertyFile */
-    private URL propertyFileURI = null;
-
-    /** Default catalog files list. */
-    private String defaultCatalogFiles = "./xcatalog";
-
-    /** Current catalog files list. */
-    private String catalogFiles = null;
-
-    /** Did the catalogFiles come from the properties file? */
-    private boolean fromPropertiesFile = false;
-
-    /** Default verbosity level if there is no property setting for it. */
-    private int defaultVerbosity = 1;
-
-    /** Current verbosity level. */
-    private Integer verbosity = null;
-
-    /** Default preference setting. */
-    private boolean defaultPreferPublic = true;
-
-    /** Current preference setting. */
-    private Boolean preferPublic = null;
-
-    /** Default setting of the static catalog flag. */
-    private boolean defaultUseStaticCatalog = true;
-
-    /** Current setting of the static catalog flag. */
-    private Boolean useStaticCatalog = null;
-
-    /** The static catalog used by this manager. */
-    private static volatile Catalog staticCatalog = null;
-
-    /** Default setting of the oasisXMLCatalogPI flag. */
-    private boolean defaultOasisXMLCatalogPI = true;
-
-    /** Current setting of the oasisXMLCatalogPI flag. */
-    private Boolean oasisXMLCatalogPI = null;
-
-    /** Default setting of the relativeCatalogs flag. */
-    private boolean defaultRelativeCatalogs = true;
-
-    /** Current setting of the relativeCatalogs flag. */
-    private Boolean relativeCatalogs = null;
-
-    /** Current catalog class name. */
-    private String catalogClassName = null;
-    /**
-     * Indicates whether implementation parts should use
-     *   service loader (or similar).
-     * Note the default value (false) is the safe option..
-     */
-    private boolean useServicesMechanism;
-
-    /** The manager's debug object. Used for printing debugging messages.
-     *
-     * <p>This field is public so that objects that have access to this
-     * CatalogManager can use this debug object.</p>
-     */
-    public Debug debug = null;
-
-    /** Constructor. */
-    public CatalogManager() {
-        init();
-    }
-
-    /** Constructor that specifies an explicit property file. */
-    public CatalogManager(String propertyFile) {
-        this.propertyFile = propertyFile;
-        init();
-  }
-
-  private void init() {
-        debug = new Debug();
-    // Note that we don't setDebug() here; we do that lazily. Either the
-    // user will set it explicitly, or we'll do it automagically if they
-    // read from the propertyFile for some other reason. That way, there's
-    // no attempt to read from the file before the caller has had a chance
-    // to avoid it.
-    if (System.getSecurityManager() == null) {
-        useServicesMechanism = true;
-    }
-        // Make sure verbosity is set by xml.catalog.verbosity sysprop
-        // setting, if defined.
-        queryVerbosityFromSysProp();
-    }
-
-    /** Set the bootstrap resolver
-     * @param resolver the bootstrap resolver
-     */
-    public void setBootstrapResolver(BootstrapResolver resolver) {
-        bResolver = resolver;
-    }
-
-    /** Get the bootstrap resolver
-     * @return the bootstrap resolver
-     */
-    public BootstrapResolver getBootstrapResolver() {
-        return bResolver;
-    }
-
-    /** Query system property for verbosity level. */
-    private void queryVerbosityFromSysProp() {
-        String verbStr = SecuritySupport.getSystemProperty(pVerbosity);
-        if (verbStr != null) {
-            try {
-                int verb = Integer.parseInt(verbStr.trim());
-                verbosity = new Integer(verb);
-                debug.setDebug(verb);
-            } catch (Exception e) {
-                System.err.println("Cannot parse verbosity: \"" + verbStr + "\"");
-            }
-        }
-    }
-
-    /**
-     * Load the properties from the propertyFile and build the
-     * resources from it.
-     */
-    private synchronized void readProperties() {
-        try {
-            propertyFileURI = CatalogManager.class.getResource("/"+propertyFile);
-            InputStream in =
-                    CatalogManager.class.getResourceAsStream("/"+propertyFile);
-            if (in==null) {
-                if (!ignoreMissingProperties) {
-                    System.err.println("Cannot find "+propertyFile);
-                    // there's no reason to give this warning more than once
-                    ignoreMissingProperties = true;
-                }
-                return;
-            }
-            resources = new PropertyResourceBundle(in);
-        } catch (MissingResourceException mre) {
-            if (!ignoreMissingProperties) {
-                System.err.println("Cannot read "+propertyFile);
-            }
-        } catch (java.io.IOException e) {
-            if (!ignoreMissingProperties) {
-                System.err.println("Failure trying to read "+propertyFile);
-            }
-        }
-
-        // This is a bit of a hack. After we've successfully read the properties,
-        // use them to set the default debug level, if the user hasn't already set
-        // the default debug level.
-        if (verbosity == null) {
-            try {
-                String verbStr = resources.getString("verbosity");
-                int verb = Integer.parseInt(verbStr.trim());
-                debug.setDebug(verb);
-                verbosity = new Integer(verb);
-            } catch (Exception e) {
-                // nop
-            }
-        }
-    }
-
-    /**
-     * Allow access to the static CatalogManager
-     */
-    public static CatalogManager getStaticManager() {
-        return staticManager;
-    }
-
-    /**
-     * How are missing properties handled?
-     *
-     * <p>If true, missing or unreadable property files will
-     * not be reported. Otherwise, a message will be sent to System.err.
-     * </p>
-     */
-    public boolean getIgnoreMissingProperties() {
-        return ignoreMissingProperties;
-    }
-
-    /**
-     * How should missing properties be handled?
-     *
-     * <p>If ignore is true, missing or unreadable property files will
-     * not be reported. Otherwise, a message will be sent to System.err.
-     * </p>
-     */
-    public void setIgnoreMissingProperties(boolean ignore) {
-        ignoreMissingProperties = ignore;
-    }
-
-    /**
-     * How are missing properties handled?
-     *
-     * <p>If ignore is true, missing or unreadable property files will
-     * not be reported. Otherwise, a message will be sent to System.err.
-     * </p>
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public void ignoreMissingProperties(boolean ignore) {
-        setIgnoreMissingProperties(ignore);
-    }
-
-    /**
-     * Obtain the verbosity setting from the properties.
-     *
-     * @return The verbosity level from the propertyFile or the
-     * defaultVerbosity.
-     */
-    private int queryVerbosity () {
-        String defaultVerbStr = Integer.toString(defaultVerbosity);
-
-        String verbStr = SecuritySupport.getSystemProperty(pVerbosity);
-
-        if (verbStr == null) {
-            if (resources==null) readProperties();
-            if (resources != null) {
-                try {
-                    verbStr = resources.getString("verbosity");
-                } catch (MissingResourceException e) {
-                    verbStr = defaultVerbStr;
-                }
-            } else {
-                verbStr = defaultVerbStr;
-            }
-        }
-
-        int verb = defaultVerbosity;
-
-        try {
-            verb = Integer.parseInt(verbStr.trim());
-        } catch (Exception e) {
-            System.err.println("Cannot parse verbosity: \"" + verbStr + "\"");
-        }
-
-        // This is a bit of a hack. After we've successfully got the verbosity,
-        // we have to use it to set the default debug level,
-        // if the user hasn't already set the default debug level.
-        if (verbosity == null) {
-            debug.setDebug(verb);
-            verbosity = new Integer(verb);
-        }
-
-        return verb;
-    }
-
-    /**
-     * What is the current verbosity?
-     */
-    public int getVerbosity() {
-        if (verbosity == null) {
-            verbosity = new Integer(queryVerbosity());
-        }
-
-        return verbosity.intValue();
-    }
-
-    /**
-     * Set the current verbosity.
-     */
-    public void setVerbosity (int verbosity) {
-        this.verbosity = new Integer(verbosity);
-        debug.setDebug(verbosity);
-    }
-
-    /**
-     * What is the current verbosity?
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public int verbosity () {
-        return getVerbosity();
-    }
-
-    /**
-     * Obtain the relativeCatalogs setting from the properties.
-     *
-     * @return The relativeCatalogs setting from the propertyFile or the
-     * defaultRelativeCatalogs.
-     */
-    private boolean queryRelativeCatalogs () {
-        if (resources==null) readProperties();
-
-        if (resources==null) return defaultRelativeCatalogs;
-
-        try {
-            String allow = resources.getString("relative-catalogs");
-            return (allow.equalsIgnoreCase("true")
-                    || allow.equalsIgnoreCase("yes")
-                    || allow.equalsIgnoreCase("1"));
-        } catch (MissingResourceException e) {
-            return defaultRelativeCatalogs;
-        }
-    }
-
-    /**
-     * Get the relativeCatalogs setting.
-     *
-     * <p>This property is used when the catalogFiles property is
-     * interrogated. If true, then relative catalog entry file names
-     * are returned. If false, relative catalog entry file names are
-     * made absolute with respect to the properties file before returning
-     * them.</p>
-     *
-     * <p>This property <emph>only applies</emph> when the catalog files
-     * come from a properties file. If they come from a system property or
-     * the default list, they are never considered relative. (What would
-     * they be relative to?)</p>
-     *
-     * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-     * true, anything else is false.</p>
-     *
-     * @return The relativeCatalogs setting from the propertyFile or the
-     * defaultRelativeCatalogs.
-     */
-    public boolean getRelativeCatalogs () {
-        if (relativeCatalogs == null) {
-            relativeCatalogs = queryRelativeCatalogs() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        return relativeCatalogs.booleanValue();
-    }
-
-    /**
-     * Set the relativeCatalogs setting.
-     *
-     * @see #getRelativeCatalogs()
-     */
-    public void setRelativeCatalogs (boolean relative) {
-        relativeCatalogs = relative ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    /**
-     * Get the relativeCatalogs setting.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public boolean relativeCatalogs () {
-        return getRelativeCatalogs();
-    }
-
-    /**
-     * Obtain the list of catalog files from the properties.
-     *
-     * @return A semicolon delimited list of catlog file URIs
-     */
-    private String queryCatalogFiles () {
-        String catalogList = SecuritySupport.getSystemProperty(pFiles);
-        fromPropertiesFile = false;
-
-        if (catalogList == null) {
-            if (resources == null) readProperties();
-            if (resources != null) {
-                try {
-                    catalogList = resources.getString("catalogs");
-                    fromPropertiesFile = true;
-                } catch (MissingResourceException e) {
-                    System.err.println(propertyFile + ": catalogs not found.");
-                    catalogList = null;
-                }
-            }
-        }
-
-        if (catalogList == null) {
-            catalogList = defaultCatalogFiles;
-        }
-
-        return catalogList;
-    }
-
-    /**
-     * Return the current list of catalog files.
-     *
-     * @return A vector of the catalog file names or null if no catalogs
-     * are available in the properties.
-     */
-    public Vector getCatalogFiles() {
-        if (catalogFiles == null) {
-            catalogFiles = queryCatalogFiles();
-        }
-
-        StringTokenizer files = new StringTokenizer(catalogFiles, ";");
-        Vector catalogs = new Vector();
-        while (files.hasMoreTokens()) {
-            String catalogFile = files.nextToken();
-            URL absURI = null;
-
-            if (fromPropertiesFile && !relativeCatalogs()) {
-                try {
-                    absURI = new URL(propertyFileURI, catalogFile);
-                    catalogFile = absURI.toString();
-                } catch (MalformedURLException mue) {
-                    absURI = null;
-                }
-            }
-
-            catalogs.add(catalogFile);
-        }
-
-        return catalogs;
-    }
-
-    /**
-     * Set the list of catalog files.
-     */
-    public void setCatalogFiles(String fileList) {
-        catalogFiles = fileList;
-        fromPropertiesFile = false;
-    }
-
-    /**
-     * Return the current list of catalog files.
-     *
-     * @return A vector of the catalog file names or null if no catalogs
-     * are available in the properties.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public Vector catalogFiles() {
-        return getCatalogFiles();
-    }
-
-    /**
-     * Obtain the preferPublic setting from the properties.
-     *
-     * <p>In the properties, a value of 'public' is true,
-     * anything else is false.</p>
-     *
-     * @return True if prefer is public or the
-     * defaultPreferSetting.
-     */
-    private boolean queryPreferPublic () {
-        String prefer = SecuritySupport.getSystemProperty(pPrefer);
-
-        if (prefer == null) {
-            if (resources==null) readProperties();
-            if (resources==null) return defaultPreferPublic;
-            try {
-                prefer = resources.getString("prefer");
-            } catch (MissingResourceException e) {
-                return defaultPreferPublic;
-            }
-        }
-
-        if (prefer == null) {
-            return defaultPreferPublic;
-        }
-
-        return (prefer.equalsIgnoreCase("public"));
-    }
-
-    /**
-     * Return the current prefer public setting.
-     *
-     * @return True if public identifiers are preferred.
-     */
-    public boolean getPreferPublic () {
-        if (preferPublic == null) {
-            preferPublic = queryPreferPublic() ? Boolean.TRUE : Boolean.FALSE;
-        }
-        return preferPublic.booleanValue();
-    }
-
-    /**
-     * Set the prefer public setting.
-     */
-    public void setPreferPublic (boolean preferPublic) {
-        this.preferPublic = preferPublic ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    /**
-     * Return the current prefer public setting.
-     *
-     * @return True if public identifiers are preferred.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public boolean preferPublic () {
-        return getPreferPublic();
-    }
-
-    /**
-     * Obtain the static-catalog setting from the properties.
-     *
-     * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-     * true, anything else is false.</p>
-     *
-     * @return The static-catalog setting from the propertyFile or the
-     * defaultUseStaticCatalog.
-     */
-    private boolean queryUseStaticCatalog () {
-        String staticCatalog = SecuritySupport.getSystemProperty(pStatic);
-
-        if (staticCatalog == null) {
-            if (resources==null) readProperties();
-            if (resources==null) return defaultUseStaticCatalog;
-            try {
-                staticCatalog = resources.getString("static-catalog");
-            } catch (MissingResourceException e) {
-                return defaultUseStaticCatalog;
-            }
-        }
-
-        if (staticCatalog == null) {
-            return defaultUseStaticCatalog;
-        }
-
-        return (staticCatalog.equalsIgnoreCase("true")
-                || staticCatalog.equalsIgnoreCase("yes")
-                || staticCatalog.equalsIgnoreCase("1"));
-    }
-
-    /**
-     * Get the current use static catalog setting.
-     */
-    public boolean getUseStaticCatalog() {
-        if (useStaticCatalog == null) {
-            useStaticCatalog = queryUseStaticCatalog() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        return useStaticCatalog.booleanValue();
-    }
-
-    /**
-     * Set the use static catalog setting.
-     */
-    public void setUseStaticCatalog(boolean useStatic) {
-        useStaticCatalog = useStatic ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    /**
-     * Get the current use static catalog setting.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public boolean staticCatalog() {
-        return getUseStaticCatalog();
-    }
-
-    /**
-     * Get a new catalog instance.
-     *
-     * This method always returns a new instance of the underlying catalog class.
-     */
-    public Catalog getPrivateCatalog() {
-        Catalog catalog = staticCatalog;
-
-        if (useStaticCatalog == null) {
-            useStaticCatalog = getUseStaticCatalog() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        if (catalog == null || !useStaticCatalog.booleanValue()) {
-
-            try {
-                String catalogClassName = getCatalogClassName();
-
-                if (catalogClassName == null) {
-                    catalog = new Catalog();
-                } else {
-                    try {
-                        catalog = (Catalog) ReflectUtil.forName(catalogClassName).newInstance();
-                    } catch (ClassNotFoundException cnfe) {
-                        debug.message(1,"Catalog class named '"
-                                + catalogClassName
-                                + "' could not be found. Using default.");
-                        catalog = new Catalog();
-                    } catch (ClassCastException cnfe) {
-                        debug.message(1,"Class named '"
-                                + catalogClassName
-                                + "' is not a Catalog. Using default.");
-                        catalog = new Catalog();
-                    }
-                }
-
-                catalog.setCatalogManager(this);
-                catalog.setupReaders();
-                catalog.loadSystemCatalogs();
-            } catch (Exception ex) {
-                ex.printStackTrace();
-            }
-
-            if (useStaticCatalog.booleanValue()) {
-                staticCatalog = catalog;
-            }
-        }
-
-        return catalog;
-    }
-
-    /**
-     * Get a catalog instance.
-     *
-     * If this manager uses static catalogs, the same static catalog will
-     * always be returned. Otherwise a new catalog will be returned.
-     */
-    public Catalog getCatalog() {
-        Catalog catalog = staticCatalog;
-
-        if (useStaticCatalog == null) {
-            useStaticCatalog = getUseStaticCatalog() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        if (catalog == null || !useStaticCatalog.booleanValue()) {
-            catalog = getPrivateCatalog();
-            if (useStaticCatalog.booleanValue()) {
-                staticCatalog = catalog;
-            }
-        }
-
-        return catalog;
-    }
-
-    /**
-     * <p>Obtain the oasisXMLCatalogPI setting from the properties.</p>
-     *
-     * <p>In the properties, a value of 'yes', 'true', or '1' is considered
-     * true, anything else is false.</p>
-     *
-     * @return The oasisXMLCatalogPI setting from the propertyFile or the
-     * defaultOasisXMLCatalogPI.
-     */
-    public boolean queryAllowOasisXMLCatalogPI () {
-        String allow = SecuritySupport.getSystemProperty(pAllowPI);
-
-        if (allow == null) {
-            if (resources==null) readProperties();
-            if (resources==null) return defaultOasisXMLCatalogPI;
-            try {
-                allow = resources.getString("allow-oasis-xml-catalog-pi");
-            } catch (MissingResourceException e) {
-                return defaultOasisXMLCatalogPI;
-            }
-        }
-
-        if (allow == null) {
-            return defaultOasisXMLCatalogPI;
-        }
-
-        return (allow.equalsIgnoreCase("true")
-                || allow.equalsIgnoreCase("yes")
-                || allow.equalsIgnoreCase("1"));
-    }
-
-    /**
-     * Get the current XML Catalog PI setting.
-     */
-    public boolean getAllowOasisXMLCatalogPI () {
-        if (oasisXMLCatalogPI == null) {
-            oasisXMLCatalogPI = queryAllowOasisXMLCatalogPI() ? Boolean.TRUE : Boolean.FALSE;
-        }
-
-        return oasisXMLCatalogPI.booleanValue();
-    }
-
-    public boolean useServicesMechanism() {
-        return useServicesMechanism;
-    }
-    /**
-     * Set the XML Catalog PI setting
-     */
-    public void setAllowOasisXMLCatalogPI(boolean allowPI) {
-        oasisXMLCatalogPI = allowPI ? Boolean.TRUE : Boolean.FALSE;
-    }
-
-    /**
-     * Get the current XML Catalog PI setting.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public boolean allowOasisXMLCatalogPI() {
-        return getAllowOasisXMLCatalogPI();
-    }
-
-    /**
-     * Obtain the Catalog class name setting from the properties.
-     *
-     */
-    public String queryCatalogClassName () {
-        String className = SecuritySupport.getSystemProperty(pClassname);
-
-        if (className == null) {
-            if (resources==null) readProperties();
-            if (resources==null) return null;
-            try {
-                return resources.getString("catalog-class-name");
-            } catch (MissingResourceException e) {
-                return null;
-            }
-        }
-
-        return className;
-    }
-
-    /**
-     * Get the current Catalog class name.
-     */
-    public String getCatalogClassName() {
-        if (catalogClassName == null) {
-            catalogClassName = queryCatalogClassName();
-        }
-
-        return catalogClassName;
-    }
-
-    /**
-     * Set the Catalog class name.
-     */
-    public void setCatalogClassName(String className) {
-        catalogClassName = className;
-    }
-
-    /**
-     * Get the current Catalog class name.
-     *
-     * @deprecated No longer static; use get/set methods.
-     */
-    public String catalogClassName() {
-        return getCatalogClassName();
-    }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/Resolver.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,697 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.FileNotFoundException;
-import java.util.Enumeration;
-import java.util.Vector;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.MalformedURLException;
-import javax.xml.parsers.SAXParserFactory;
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
-import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader;
-import com.sun.org.apache.xml.internal.resolver.readers.TR9401CatalogReader;
-
-/**
- * An extension to OASIS Open Catalog files, this class supports
- * suffix-based matching and an external RFC2483 resolver.
- *
- * @see Catalog
- * @deprecated The JDK internal Catalog API in package
- * {@code com.sun.org.apache.xml.internal.resolver}
- * is encapsulated in JDK 9. The entire implementation under the package is now
- * deprecated and subject to removal in a future release. Users of the API
- * should migrate to the {@linkplain javax.xml.catalog new public API}.
- * <p>
- * The new Catalog API is supported throughout the JDK XML Processors, which allows
- * the use of Catalog by simply setting a path to a Catalog file as a property.
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-@Deprecated(since="9", forRemoval=true)
-public class Resolver extends Catalog {
-  /**
-   * The URISUFFIX Catalog Entry type.
-   *
-   * <p>URI suffix entries match URIs that end in a specified suffix.</p>
-   */
-  public static final int URISUFFIX = CatalogEntry.addEntryType("URISUFFIX", 2);
-
-  /**
-   * The SYSTEMSUFFIX Catalog Entry type.
-   *
-   * <p>System suffix entries match system identifiers that end in a
-   * specified suffix.</p>
-   */
-  public static final int SYSTEMSUFFIX = CatalogEntry.addEntryType("SYSTEMSUFFIX", 2);
-
-  /**
-   * The RESOLVER Catalog Entry type.
-   *
-   * <p>A hook for providing support for web-based backup resolvers.</p>
-   */
-  public static final int RESOLVER = CatalogEntry.addEntryType("RESOLVER", 1);
-
-  /**
-   * The SYSTEMREVERSE Catalog Entry type.
-   *
-   * <p>This is a bit of a hack. There's no actual SYSTEMREVERSE entry,
-   * but this entry type is used to indicate that a reverse lookup is
-   * being performed. (This allows the Resolver to implement
-   * RFC2483 I2N and I2NS.)
-   */
-  public static final int SYSTEMREVERSE
-    = CatalogEntry.addEntryType("SYSTEMREVERSE", 1);
-
-  /**
-   * Setup readers.
-   */
-  public void setupReaders() {
-    SAXParserFactory spf = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-    spf.setNamespaceAware(true);
-    spf.setValidating(false);
-
-    SAXCatalogReader saxReader = new SAXCatalogReader(spf);
-
-    saxReader.setCatalogParser(null, "XCatalog",
-                               "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");
-
-    saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
-                               "catalog",
-                               "com.sun.org.apache.xml.internal.resolver.readers.ExtendedXMLCatalogReader");
-
-    addReader("application/xml", saxReader);
-
-    TR9401CatalogReader textReader = new TR9401CatalogReader();
-    addReader("text/plain", textReader);
-  }
-
-  /**
-   * Cleanup and process a Catalog entry.
-   *
-   * <p>This method processes each Catalog entry, changing mapped
-   * relative system identifiers into absolute ones (based on the current
-   * base URI), and maintaining other information about the current
-   * catalog.</p>
-   *
-   * @param entry The CatalogEntry to process.
-   */
-  public void addEntry(CatalogEntry entry) {
-    int type = entry.getEntryType();
-
-    if (type == URISUFFIX) {
-      String suffix = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "URISUFFIX", suffix, fsi);
-    } else if (type == SYSTEMSUFFIX) {
-      String suffix = normalizeURI(entry.getEntryArg(0));
-      String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
-
-      entry.setEntryArg(1, fsi);
-
-      catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi);
-    }
-
-    super.addEntry(entry);
-  }
-
-  /**
-   * Return the applicable URI.
-   *
-   * <p>If a URI entry exists in the Catalog
-   * for the URI specified, return the mapped value.</p>
-   *
-   * <p>In the Resolver (as opposed to the Catalog) class, if the
-   * URI isn't found by the usual algorithm, URISUFFIX entries are
-   * considered.</p>
-   *
-   * <p>URI comparison is case sensitive.</p>
-   *
-   * @param uri The URI to locate in the catalog.
-   *
-   * @return The resolved URI.
-   *
-   * @throws MalformedURLException The system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveURI(String uri)
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolveURI(uri);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-        resolved = resolveExternalSystem(uri, e.getEntryArg(0));
-        if (resolved != null) {
-          return resolved;
-        }
-      } else if (e.getEntryType() == URISUFFIX) {
-        String suffix = e.getEntryArg(0);
-        String result = e.getEntryArg(1);
-
-        if (suffix.length() <= uri.length()
-            && uri.substring(uri.length()-suffix.length()).equals(suffix)) {
-          return result;
-        }
-      }
-    }
-
-    // Otherwise, look in the subordinate catalogs
-    return resolveSubordinateCatalogs(Catalog.URI,
-                                      null,
-                                      null,
-                                      uri);
-  }
-
-  /**
-   * Return the applicable SYSTEM system identifier, resorting
-   * to external RESOLVERs if necessary.
-   *
-   * <p>If a SYSTEM entry exists in the Catalog
-   * for the system ID specified, return the mapped value.</p>
-   *
-   * <p>In the Resolver (as opposed to the Catalog) class, if the
-   * URI isn't found by the usual algorithm, SYSTEMSUFFIX entries are
-   * considered.</p>
-   *
-   * <p>On Windows-based operating systems, the comparison between
-   * the system identifier provided and the SYSTEM entries in the
-   * Catalog is case-insensitive.</p>
-   *
-   * @param systemId The system ID to locate in the catalog.
-   *
-   * @return The system identifier to use for systemId.
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   */
-  public String resolveSystem(String systemId)
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolveSystem(systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-        resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
-        if (resolved != null) {
-          return resolved;
-        }
-      } else if (e.getEntryType() == SYSTEMSUFFIX) {
-        String suffix = e.getEntryArg(0);
-        String result = e.getEntryArg(1);
-
-        if (suffix.length() <= systemId.length()
-            && systemId.substring(systemId.length()-suffix.length()).equals(suffix)) {
-          return result;
-        }
-      }
-    }
-
-    return resolveSubordinateCatalogs(Catalog.SYSTEM,
-                                      null,
-                                      null,
-                                      systemId);
-  }
-
-  /**
-   * Return the applicable PUBLIC or SYSTEM identifier, resorting
-   * to external resolvers if necessary.
-   *
-   * <p>This method searches the Catalog and returns the system
-   * identifier specified for the given system or
-   * public identifiers. If
-   * no appropriate PUBLIC or SYSTEM entry is found in the Catalog,
-   * null is returned.</p>
-   *
-   * <p>Note that a system or public identifier in the current catalog
-   * (or subordinate catalogs) will be used in preference to an
-   * external resolver. Further, if a systemId is present, the external
-   * resolver(s) will be queried for that before the publicId.</p>
-   *
-   * @param publicId The public identifier to locate in the catalog.
-   * Public identifiers are normalized before comparison.
-   * @param systemId The nominal system identifier for the entity
-   * in question (as provided in the source document).
-   *
-   * @throws MalformedURLException The formal system identifier of a
-   * subordinate catalog cannot be turned into a valid URL.
-   * @throws IOException Error reading subordinate catalog file.
-   *
-   * @return The system identifier to use.
-   * Note that the nominal system identifier is not returned if a
-   * match is not found in the catalog, instead null is returned
-   * to indicate that no match was found.
-   */
-  public String resolvePublic(String publicId, String systemId)
-    throws MalformedURLException, IOException {
-
-    String resolved = super.resolvePublic(publicId, systemId);
-    if (resolved != null) {
-      return resolved;
-    }
-
-    Enumeration en = catalogEntries.elements();
-    while (en.hasMoreElements()) {
-      CatalogEntry e = (CatalogEntry) en.nextElement();
-      if (e.getEntryType() == RESOLVER) {
-        if (systemId != null) {
-          resolved = resolveExternalSystem(systemId,
-                                           e.getEntryArg(0));
-          if (resolved != null) {
-            return resolved;
-          }
-        }
-        resolved = resolveExternalPublic(publicId, e.getEntryArg(0));
-        if (resolved != null) {
-          return resolved;
-        }
-      }
-    }
-
-    return resolveSubordinateCatalogs(Catalog.PUBLIC,
-                                      null,
-                                      publicId,
-                                      systemId);
-  }
-
-    /**
-     * Query an external RFC2483 resolver for a system identifier.
-     *
-     * @param systemId The system ID to locate.
-     * @param resolver The name of the resolver to use.
-     *
-     * @return The system identifier to use for the systemId.
-     */
-    protected String resolveExternalSystem(String systemId, String resolver)
-        throws MalformedURLException, IOException {
-        Resolver r = queryResolver(resolver, "i2l", systemId, null);
-        if (r != null) {
-            return r.resolveSystem(systemId);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Query an external RFC2483 resolver for a public identifier.
-     *
-     * @param publicId The system ID to locate.
-     * @param resolver The name of the resolver to use.
-     *
-     * @return The system identifier to use for the systemId.
-     */
-    protected String resolveExternalPublic(String publicId, String resolver)
-        throws MalformedURLException, IOException {
-        Resolver r = queryResolver(resolver, "fpi2l", publicId, null);
-        if (r != null) {
-            return r.resolvePublic(publicId, null);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Query an external RFC2483 resolver.
-     *
-     * @param resolver The URL of the RFC2483 resolver.
-     * @param command The command to send the resolver.
-     * @param arg1 The first argument to the resolver.
-     * @param arg2 The second argument to the resolver, usually null.
-     *
-     * @return The Resolver constructed.
-     */
-    protected Resolver queryResolver(String resolver,
-                                     String command,
-                                     String arg1,
-                                     String arg2) {
-        InputStream iStream = null;
-        String RFC2483 = resolver + "?command=" + command
-            + "&format=tr9401&uri=" + arg1
-            + "&uri2=" + arg2;
-        String line = null;
-
-        try {
-            URL url = new URL(RFC2483);
-
-            URLConnection urlCon = url.openConnection();
-
-            urlCon.setUseCaches(false);
-
-            Resolver r = (Resolver) newCatalog();
-
-            String cType = urlCon.getContentType();
-
-            // I don't care about the character set or subtype
-            if (cType.indexOf(";") > 0) {
-                cType = cType.substring(0, cType.indexOf(";"));
-            }
-
-            r.parseCatalog(cType, urlCon.getInputStream());
-
-            return r;
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.UNPARSEABLE) {
-            catalogManager.debug.message(1, "Unparseable catalog: " + RFC2483);
-          } else if (cex.getExceptionType()
-                     == CatalogException.UNKNOWN_FORMAT) {
-            catalogManager.debug.message(1, "Unknown catalog format: " + RFC2483);
-          }
-          return null;
-        } catch (MalformedURLException mue) {
-            catalogManager.debug.message(1, "Malformed resolver URL: " + RFC2483);
-            return null;
-        } catch (IOException ie) {
-            catalogManager.debug.message(1, "I/O Exception opening resolver: " + RFC2483);
-            return null;
-        }
-    }
-
-    /**
-     * Append two vectors, returning the result.
-     *
-     * @param vec The first vector
-     * @param appvec The vector to be appended
-     * @return The vector vec, with appvec's elements appended to it
-     */
-    private Vector appendVector(Vector vec, Vector appvec) {
-        if (appvec != null) {
-            for (int count = 0; count < appvec.size(); count++) {
-                vec.addElement(appvec.elementAt(count));
-            }
-        }
-        return vec;
-    }
-
-    /**
-     * Find the URNs for a given system identifier in all catalogs.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A vector of URNs that map to the systemId.
-     */
-    public Vector resolveAllSystemReverse(String systemId)
-        throws MalformedURLException, IOException {
-        Vector resolved = new Vector();
-
-        // If there's a SYSTEM entry in this catalog, use it
-        if (systemId != null) {
-            Vector localResolved = resolveLocalSystemReverse(systemId);
-            resolved = appendVector(resolved, localResolved);
-        }
-
-        // Otherwise, look in the subordinate catalogs
-        Vector subResolved = resolveAllSubordinateCatalogs(SYSTEMREVERSE,
-                                                           null,
-                                                           null,
-                                                           systemId);
-
-        return appendVector(resolved, subResolved);
-    }
-
-    /**
-     * Find the URN for a given system identifier.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A (single) URN that maps to the systemId.
-     */
-    public String resolveSystemReverse(String systemId)
-        throws MalformedURLException, IOException {
-        Vector resolved = resolveAllSystemReverse(systemId);
-        if (resolved != null && resolved.size() > 0) {
-            return (String) resolved.elementAt(0);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Return the applicable SYSTEM system identifiers.
-     *
-     * <p>If one or more SYSTEM entries exists in the Catalog
-     * for the system ID specified, return the mapped values.</p>
-     *
-     * <p>The caller is responsible for doing any necessary
-     * normalization of the system identifier before calling
-     * this method. For example, a relative system identifier in
-     * a document might be converted to an absolute system identifier
-     * before attempting to resolve it.</p>
-     *
-     * <p>Note that this function will force all subordinate catalogs
-     * to be loaded.</p>
-     *
-     * <p>On Windows-based operating systems, the comparison between
-     * the system identifier provided and the SYSTEM entries in the
-     * Catalog is case-insensitive.</p>
-     *
-     * @param systemId The system ID to locate in the catalog.
-     *
-     * @return The system identifier to use for the notation.
-     *
-     * @throws MalformedURLException The formal system identifier of a
-     * subordinate catalog cannot be turned into a valid URL.
-     * @throws IOException Error reading subordinate catalog file.
-     */
-    public Vector resolveAllSystem(String systemId)
-        throws MalformedURLException, IOException {
-        Vector resolutions = new Vector();
-
-        // If there are SYSTEM entries in this catalog, start with them
-        if (systemId != null) {
-            Vector localResolutions = resolveAllLocalSystem(systemId);
-            resolutions = appendVector(resolutions, localResolutions);
-        }
-
-        // Then look in the subordinate catalogs
-        Vector subResolutions = resolveAllSubordinateCatalogs(SYSTEM,
-                                                              null,
-                                                              null,
-                                                              systemId);
-        resolutions = appendVector(resolutions, subResolutions);
-
-        if (resolutions.size() > 0) {
-            return resolutions;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Return all applicable SYSTEM system identifiers in this
-     * catalog.
-     *
-     * <p>If one or more SYSTEM entries exists in the catalog file
-     * for the system ID specified, return the mapped values.</p>
-     *
-     * @param systemId The system ID to locate in the catalog
-     *
-     * @return A vector of the mapped system identifiers or null
-     */
-    private Vector resolveAllLocalSystem(String systemId) {
-        Vector map = new Vector();
-        String osname = SecuritySupport.getSystemProperty("os.name");
-        boolean windows = (osname.indexOf("Windows") >= 0);
-        Enumeration en = catalogEntries.elements();
-        while (en.hasMoreElements()) {
-            CatalogEntry e = (CatalogEntry) en.nextElement();
-            if (e.getEntryType() == SYSTEM
-                && (e.getEntryArg(0).equals(systemId)
-                    || (windows
-                        && e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
-                map.addElement(e.getEntryArg(1));
-            }
-        }
-        if (map.size() == 0) {
-            return null;
-        } else {
-            return map;
-        }
-    }
-
-    /**
-     * Find the URNs for a given system identifier in the current catalog.
-     *
-     * @param systemId The system ID to locate.
-     *
-     * @return A vector of URNs that map to the systemId.
-     */
-    private Vector resolveLocalSystemReverse(String systemId) {
-        Vector map = new Vector();
-        String osname = SecuritySupport.getSystemProperty("os.name");
-        boolean windows = (osname.indexOf("Windows") >= 0);
-        Enumeration en = catalogEntries.elements();
-        while (en.hasMoreElements()) {
-            CatalogEntry e = (CatalogEntry) en.nextElement();
-            if (e.getEntryType() == SYSTEM
-                && (e.getEntryArg(1).equals(systemId)
-                    || (windows
-                        && e.getEntryArg(1).equalsIgnoreCase(systemId)))) {
-                map.addElement(e.getEntryArg(0));
-            }
-        }
-        if (map.size() == 0) {
-            return null;
-        } else {
-            return map;
-        }
-    }
-
-    /**
-     * Search the subordinate catalogs, in order, looking for all
-     * match.
-     *
-     * <p>This method searches the Catalog and returns all of the system
-     * identifiers specified for the given entity type with the given
-     * name, public, and system identifiers. In some contexts, these
-     * may be null.</p>
-     *
-     * @param entityType The CatalogEntry type for which this query is
-     * being conducted. This is necessary in order to do the approprate
-     * query on a subordinate catalog.
-     * @param entityName The name of the entity being searched for, if
-     * appropriate.
-     * @param publicId The public identifier of the entity in question
-     * (as provided in the source document).
-     * @param systemId The nominal system identifier for the entity
-     * in question (as provided in the source document).
-     *
-     * @throws MalformedURLException The formal system identifier of a
-     * delegated catalog cannot be turned into a valid URL.
-     * @throws IOException Error reading delegated catalog file.
-     *
-     * @return The system identifier to use.
-     * Note that the nominal system identifier is not returned if a
-     * match is not found in the catalog, instead null is returned
-     * to indicate that no match was found.
-     */
-    private synchronized Vector resolveAllSubordinateCatalogs(int entityType,
-                                              String entityName,
-                                              String publicId,
-                                              String systemId)
-        throws MalformedURLException, IOException {
-
-        Vector resolutions = new Vector();
-
-        for (int catPos = 0; catPos < catalogs.size(); catPos++) {
-            Resolver c = null;
-
-            try {
-                c = (Resolver) catalogs.elementAt(catPos);
-            } catch (ClassCastException e) {
-                String catfile = (String) catalogs.elementAt(catPos);
-                c = (Resolver) newCatalog();
-
-                try {
-                    c.parseCatalog(catfile);
-                } catch (MalformedURLException mue) {
-                    catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
-                } catch (FileNotFoundException fnfe) {
-                    catalogManager.debug.message(1, "Failed to load catalog, file not found",
-                          catfile);
-                } catch (IOException ioe) {
-                    catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
-                }
-
-                catalogs.setElementAt(c, catPos);
-            }
-
-            String resolved = null;
-
-            // Ok, now what are we supposed to call here?
-            if (entityType == DOCTYPE) {
-                resolved = c.resolveDoctype(entityName,
-                                            publicId,
-                                            systemId);
-                if (resolved != null) {
-                    // Only find one DOCTYPE resolution
-                    resolutions.addElement(resolved);
-                    return resolutions;
-                }
-            } else if (entityType == DOCUMENT) {
-                resolved = c.resolveDocument();
-                if (resolved != null) {
-                    // Only find one DOCUMENT resolution
-                    resolutions.addElement(resolved);
-                    return resolutions;
-                }
-            } else if (entityType == ENTITY) {
-                resolved = c.resolveEntity(entityName,
-                                           publicId,
-                                           systemId);
-                if (resolved != null) {
-                    // Only find one ENTITY resolution
-                    resolutions.addElement(resolved);
-                    return resolutions;
-                }
-            } else if (entityType == NOTATION) {
-                resolved = c.resolveNotation(entityName,
-                                             publicId,
-                                             systemId);
-                if (resolved != null) {
-                    // Only find one NOTATION resolution
-                    resolutions.addElement(resolved);
-                    return resolutions;
-                }
-            } else if (entityType == PUBLIC) {
-                resolved = c.resolvePublic(publicId, systemId);
-                if (resolved != null) {
-                    // Only find one PUBLIC resolution
-                    resolutions.addElement(resolved);
-                    return resolutions;
-                }
-            } else if (entityType == SYSTEM) {
-                Vector localResolutions = c.resolveAllSystem(systemId);
-                resolutions = appendVector(resolutions, localResolutions);
-                break;
-            } else if (entityType == SYSTEMREVERSE) {
-                Vector localResolutions = c.resolveAllSystemReverse(systemId);
-                resolutions = appendVector(resolutions, localResolutions);
-            }
-        }
-
-        if (resolutions != null) {
-            return resolutions;
-        } else {
-            return null;
-        }
-    }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/BootstrapResolver.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.helpers;
-
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.sax.SAXSource;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-/**
- * A simple bootstrapping resolver.
- *
- * <p>This class is used as the entity resolver when reading XML Catalogs.
- * It searches for the OASIS XML Catalog DTD, Relax NG Grammar and W3C XML Schema
- * as resources (e.g., in the resolver jar file).</p>
- *
- * <p>If you have your own DTDs or schemas, you can extend this class and
- * set the BootstrapResolver in your CatalogManager.</p>
- *
- * @see com.sun.org.apache.xml.internal.resolver.CatalogManager
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class BootstrapResolver implements EntityResolver, URIResolver {
-  /** URI of the W3C XML Schema for OASIS XML Catalog files. */
-  public static final String xmlCatalogXSD = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.xsd";
-
-  /** URI of the RELAX NG Grammar for OASIS XML Catalog files. */
-  public static final String xmlCatalogRNG = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.rng";
-
-  /** Public identifier for OASIS XML Catalog files. */
-  public static final String xmlCatalogPubId = "-//OASIS//DTD XML Catalogs V1.0//EN";
-
-  /** System identifier for OASIS XML Catalog files. */
-  public static final String xmlCatalogSysId = "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";
-
-  /** Public identifier for legacy Apache XCatalog files.  There is no official system identifier for XCatalog files. */
-  public static final String xCatalogPubId = "-//DTD XCatalog//EN";
-
-  /** Private hash used for public identifiers. */
-  private final Map<String, String> publicMap = new HashMap<>();
-
-  /** Private hash used for system identifiers. */
-  private final Map<String, String> systemMap = new HashMap<>();
-
-  /** Private hash used for URIs. */
-  private final Map<String, String> uriMap = new HashMap<>();
-
-  /** Constructor. */
-  public BootstrapResolver() {
-    URL url = this.getClass().getResource("/com/sun/org/apache/xml/internal/resolver/etc/catalog.dtd");
-    if (url != null) {
-      publicMap.put(xmlCatalogPubId, url.toString());
-      systemMap.put(xmlCatalogSysId, url.toString());
-    }
-
-    url = this.getClass().getResource("/com/sun/org/apache/xml/internal/resolver/etc/catalog.rng");
-    if (url != null) {
-      uriMap.put(xmlCatalogRNG, url.toString());
-    }
-
-    url = this.getClass().getResource("/com/sun/org/apache/xml/internal/resolver/etc/catalog.xsd");
-    if (url != null) {
-      uriMap.put(xmlCatalogXSD, url.toString());
-    }
-
-    url = this.getClass().getResource("/com/sun/org/apache/xml/internal/resolver/etc/xcatalog.dtd");
-    if (url != null) {
-      publicMap.put(xCatalogPubId, url.toString());
-    }
-  }
-
-  /** SAX resolveEntity API. */
-  public InputSource resolveEntity (String publicId, String systemId) {
-    String resolved = null;
-
-    if (systemId != null && systemMap.containsKey(systemId)) {
-      resolved = systemMap.get(systemId);
-    } else if (publicId != null && publicMap.containsKey(publicId)) {
-      resolved = publicMap.get(publicId);
-    }
-
-    if (resolved != null) {
-      try {
-        InputSource iSource = new InputSource(resolved);
-        iSource.setPublicId(publicId);
-
-        // Ideally this method would not attempt to open the
-        // InputStream, but there is a bug (in Xerces, at least)
-        // that causes the parser to mistakenly open the wrong
-        // system identifier if the returned InputSource does
-        // not have a byteStream.
-        //
-        // It could be argued that we still shouldn't do this here,
-        // but since the purpose of calling the entityResolver is
-        // almost certainly to open the input stream, it seems to
-        // do little harm.
-        //
-        URL url = new URL(resolved);
-        InputStream iStream = url.openStream();
-        iSource.setByteStream(iStream);
-
-        return iSource;
-      } catch (Exception e) {
-        // FIXME: silently fail?
-        return null;
-      }
-    }
-
-    return null;
-  }
-
-  /** Transformer resolve API. */
-  public Source resolve(String href, String base)
-    throws TransformerException {
-
-    String uri = href;
-    String fragment = null;
-    int hashPos = href.indexOf("#");
-    if (hashPos >= 0) {
-      uri = href.substring(0, hashPos);
-      fragment = href.substring(hashPos+1);
-    }
-
-    String result = null;
-    if (href != null && uriMap.containsKey(href)) {
-      result = uriMap.get(href);
-    }
-
-    if (result == null) {
-      try {
-        URL url = null;
-
-        if (base==null) {
-          url = new URL(uri);
-          result = url.toString();
-        } else {
-          URL baseURL = new URL(base);
-          url = (href.length()==0 ? baseURL : new URL(baseURL, uri));
-          result = url.toString();
-        }
-      } catch (java.net.MalformedURLException mue) {
-        // try to make an absolute URI from the current base
-        String absBase = makeAbsolute(base);
-        if (!absBase.equals(base)) {
-          // don't bother if the absBase isn't different!
-          return resolve(href, absBase);
-        } else {
-          throw new TransformerException("Malformed URL "
-                                         + href + "(base " + base + ")",
-                                         mue);
-        }
-      }
-    }
-
-    SAXSource source = new SAXSource();
-    source.setInputSource(new InputSource(result));
-    return source;
-  }
-
-  /** Attempt to construct an absolute URI */
-  private String makeAbsolute(String uri) {
-    if (uri == null) {
-      uri = "";
-    }
-
-    try {
-      URL url = new URL(uri);
-      return url.toString();
-    } catch (MalformedURLException mue) {
-      try {
-        URL fileURL = FileURL.makeURL(uri);
-        return fileURL.toString();
-      } catch (MalformedURLException mue2) {
-        // bail
-        return uri;
-      }
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/Debug.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.helpers;
-
-/**
- * Static debugging/messaging class for Catalogs.
- *
- * <p>This class defines a set of static methods that can be called
- * to produce debugging messages. Messages have an associated "debug
- * level" and messages below the current setting are not displayed.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class Debug {
-  /** The internal debug level. */
-  protected int debug = 0;
-
-  /** Constructor */
-  public Debug() {
-    // nop
-  }
-
-  /** Set the debug level for future messages. */
-  public void setDebug(int newDebug) {
-    debug = newDebug;
-  }
-
-  /** Get the current debug level. */
-  public int getDebug() {
-    return debug;
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message"</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   */
-  public void message(int level, String message) {
-    if (debug >= level) {
-      System.out.println(message);
-    }
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message: spec"</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   * @param spec An argument to the message.
-   */
-  public void message(int level, String message, String spec) {
-    if (debug >= level) {
-      System.out.println(message + ": " + spec);
-    }
-  }
-
-  /**
-   * Print debug message (if the debug level is high enough).
-   *
-   * <p>Prints "the message: spec1" and "spec2" indented on the next line.</p>
-   *
-   * @param level The debug level of this message. This message
-   * will only be
-   * displayed if the current debug level is at least equal to this
-   * value.
-   * @param message The text of the message.
-   * @param spec1 An argument to the message.
-   * @param spec2 Another argument to the message.
-   */
-  public void message(int level, String message,
-                             String spec1, String spec2) {
-    if (debug >= level) {
-      System.out.println(message + ": " + spec1);
-      System.out.println("\t" + spec2);
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/FileURL.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.helpers;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.io.File;
-
-/**
- * Static method for dealing with file: URLs.
- *
- * <p>This class defines a static method that can be used to construct
- * an appropriate file: URL from parts. It's defined here so that it
- * can be reused throught the resolver.</p>
- *
- * <p>(Yes, I'd rather have called this class FileUR<b>I</b>, but
- * given that a jave.net.URL is returned, it seemed...even more
- * confusing.)</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-public abstract class FileURL {
-  protected FileURL() { }
-
-  /**
-   * Construct a file: URL for a path name.
-   *
-   * <p>URLs in the file: scheme can be constructed for paths on
-   * the local file system. Several possibilities need to be considered:
-   * </p>
-   *
-   * <ul>
-   * <li>If the path does not begin with a slash, then it is assumed
-   * to reside in the users current working directory
-   * (System.getProperty("user.dir")).</li>
-   * <li>On Windows machines, the current working directory uses
-   * backslashes (\\, instead of /).</li>
-   * <li>If the current working directory is "/", don't add an extra
-   * slash before the base name.</li>
-   * </ul>
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param pathname The path name component for which to construct a URL.
-   *
-   * @return The appropriate file: URL.
-   *
-   * @throws MalformedURLException if the pathname can't be turned into
-   *         a proper URL.
-   */
-  public static URL makeURL(String pathname) throws MalformedURLException {
-    /*if (pathname.startsWith("/")) {
-      return new URL("file://" + pathname);
-    }
-
-    String userdir = System.getProperty("user.dir");
-    userdir.replace('\\', '/');
-
-    if (userdir.endsWith("/")) {
-      return new URL("file:///" + userdir + pathname);
-    } else {
-      return new URL("file:///" + userdir + "/" + pathname);
-    }
-     */
-      File file = new File(pathname);
-      return file.toURI().toURL();
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/Namespaces.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.helpers;
-
-import org.w3c.dom.*;
-
-/**
- * Static Namespace query methods.
- *
- * <p>This class defines a set of static methods that can be called
- * to analyze the namespace properties of DOM nodes.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class Namespaces {
-    /**
-     * Returns the "prefix" part of a QName or the empty string (not
-     * null) if the name has no prefix.
-     *
-     * @param element The QName of an element.
-     * @return The prefix part of the element name.
-     */
-    public static String getPrefix(Element element) {
-        String name = element.getTagName();
-        String prefix = "";
-
-        final int indexOfColon = name.indexOf(':');
-        if (indexOfColon > 0) {
-            prefix = name.substring(0, indexOfColon);
-        }
-
-        return prefix;
-    }
-
-    /**
-     * Returns the "localname" part of a QName, which is the whole
-     * name if it has no prefix.
-     *
-     * @param element The QName of an element.
-     * @return The local part of a QName.
-     */
-    public static String getLocalName(Element element) {
-        String name = element.getTagName();
-
-        final int indexOfColon = name.indexOf(':');
-        if (indexOfColon > 0) {
-            name = name.substring(indexOfColon + 1);
-        }
-
-        return name;
-    }
-
-    /**
-     * Returns the namespace URI for the specified prefix at the
-     * specified context node.
-     *
-     * @param node The context node.
-     * @param prefix The prefix.
-     * @return The namespace URI associated with the prefix, or
-     * null if no namespace declaration exists for the prefix.
-     */
-    public static String getNamespaceURI(Node node, String prefix) {
-        if (node == null || node.getNodeType() != Node.ELEMENT_NODE) {
-            return null;
-        }
-
-        if (prefix.length() == 0) {
-            if (((Element) node).hasAttribute("xmlns")) {
-                return ((Element) node).getAttribute("xmlns");
-            }
-        } else {
-            String nsattr = "xmlns:" + prefix;
-            if (((Element) node).hasAttribute(nsattr)) {
-                return ((Element) node).getAttribute(nsattr);
-            }
-        }
-
-        return getNamespaceURI(node.getParentNode(), prefix);
-    }
-
-    /**
-     * Returns the namespace URI for the namespace to which the
-     * element belongs.
-     *
-     * @param element The element.
-     * @return The namespace URI associated with the namespace of the
-     * element, or null if no namespace declaration exists for it.
-     */
-    public static String getNamespaceURI(Element element) {
-        String prefix = getPrefix(element);
-        return getNamespaceURI(element, prefix);
-    }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/helpers/PublicId.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.helpers;
-
-/**
- * Static methods for dealing with public identifiers.
- *
- * <p>This class defines a set of static methods that can be called
- * to handle public identifiers.</p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public abstract class PublicId {
-
-  protected PublicId() {}
-
-  /**
-   * Normalize a public identifier.
-   *
-   * <p>Public identifiers must be normalized according to the following
-   * rules before comparisons between them can be made:</p>
-   *
-   * <ul>
-   * <li>Whitespace characters are normalized to spaces (e.g., line feeds,
-   * tabs, etc. become spaces).</li>
-   * <li>Leading and trailing whitespace is removed.</li>
-   * <li>Multiple internal whitespaces are normalized to a single
-   * space.</li>
-   * </ul>
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param publicId The unnormalized public identifier.
-   *
-   * @return The normalized identifier.
-   */
-  public static String normalize(String publicId) {
-      String normal = publicId.replace('\t', ' ');
-      normal = normal.replace('\r', ' ');
-      normal = normal.replace('\n', ' ');
-      normal = normal.trim();
-
-      int pos;
-
-      while ((pos = normal.indexOf("  ")) >= 0) {
-          normal = normal.substring(0, pos) + normal.substring(pos+1);
-      }
-      return normal;
-  }
-
-  /**
-   * Encode a public identifier as a "publicid" URN.
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param publicId The unnormalized public identifier.
-   *
-   * @return The normalized identifier.
-   */
-  public static String encodeURN(String publicId) {
-      String urn = PublicId.normalize(publicId);
-
-      urn = PublicId.stringReplace(urn, "%", "%25");
-      urn = PublicId.stringReplace(urn, ";", "%3B");
-      urn = PublicId.stringReplace(urn, "'", "%27");
-      urn = PublicId.stringReplace(urn, "?", "%3F");
-      urn = PublicId.stringReplace(urn, "#", "%23");
-      urn = PublicId.stringReplace(urn, "+", "%2B");
-      urn = PublicId.stringReplace(urn, " ", "+");
-      urn = PublicId.stringReplace(urn, "::", ";");
-      urn = PublicId.stringReplace(urn, ":", "%3A");
-      urn = PublicId.stringReplace(urn, "//", ":");
-      urn = PublicId.stringReplace(urn, "/", "%2F");
-
-      StringBuilder buffer = new StringBuilder(13 + urn.length());
-      buffer.append("urn:publicid:");
-      buffer.append(urn);
-      return buffer.toString();
-  }
-
-  /**
-   * Decode a "publicid" URN into a public identifier.
-   *
-   * <p>This method is declared static so that other classes
-   * can use it directly.</p>
-   *
-   * @param urn The urn:publicid: URN
-   *
-   * @return The normalized identifier.
-   */
-  public static String decodeURN(String urn) {
-      String publicId;
-      if (urn.startsWith("urn:publicid:")) {
-          publicId = urn.substring(13);
-      }
-      else {
-          return urn;
-      }
-
-      final boolean hasEscape = (publicId.indexOf('%') >= 0);
-      if (hasEscape) {
-          publicId = PublicId.stringReplace(publicId, "%2F", "/");
-      }
-      publicId = PublicId.stringReplace(publicId, ":", "//");
-      if (hasEscape) {
-          publicId = PublicId.stringReplace(publicId, "%3A", ":");
-      }
-      publicId = PublicId.stringReplace(publicId, ";", "::");
-      publicId = PublicId.stringReplace(publicId, "+", " ");
-      if (hasEscape) {
-          publicId = PublicId.stringReplace(publicId, "%2B", "+");
-          publicId = PublicId.stringReplace(publicId, "%23", "#");
-          publicId = PublicId.stringReplace(publicId, "%3F", "?");
-          publicId = PublicId.stringReplace(publicId, "%27", "'");
-          publicId = PublicId.stringReplace(publicId, "%3B", ";");
-          publicId = PublicId.stringReplace(publicId, "%25", "%");
-      }
-
-      return publicId;
-  }
-
-  /**
-   * Replace one string with another.
-   */
-  private static String stringReplace(String str,
-          String oldStr,
-          String newStr) {
-      int pos = str.indexOf(oldStr);
-      if (pos >= 0) {
-          final StringBuilder buffer = new StringBuilder();
-          final int oldStrLength = oldStr.length();
-          int start = 0;
-          do {
-              for (int i = start; i < pos; ++i) {
-                  buffer.append(str.charAt(i));
-              }
-              buffer.append(newStr);
-              start = pos + oldStrLength;
-              pos = str.indexOf(oldStr, start);
-          }
-          while (pos >= 0);
-          final int strLength = str.length();
-          for (int i = start; i < strLength; ++i) {
-              buffer.append(str.charAt(i));
-          }
-          return buffer.toString();
-      }
-      return str;
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/CatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-
-import java.io.InputStream;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-
-/**
- * The CatalogReader interface.
- *
- * <p>The Catalog class requires that classes implement this interface
- * in order to be used to read catalogs. Examples of CatalogReaders
- * include the TextCatalogReader, the SAXCatalogReader, and the
- * DOMCatalogReader.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public interface CatalogReader {
-    /**
-     * Read a catalog from a file.
-     *
-     * <p>This class reads a catalog from a URL.</p>
-     *
-     * @param catalog The catalog for which this reader is called.
-     * @param fileUrl The URL of a document to be read.
-     * @throws MalformedURLException if the specified URL cannot be
-     * turned into a URL object.
-     * @throws IOException if the URL cannot be read.
-     * @throws UnknownCatalogFormatException if the catalog format is
-     * not recognized.
-     * @throws UnparseableCatalogException if the catalog cannot be parsed.
-     * (For example, if it is supposed to be XML and isn't well-formed.)
-     */
-    public void readCatalog(Catalog catalog, String fileUrl)
-      throws MalformedURLException, IOException, CatalogException;
-
-    /**
-     * Read a catalog from an input stream.
-     *
-     * <p>This class reads a catalog from an input stream.</p>
-     *
-     * @param catalog The catalog for which this reader is called.
-     * @param is The input stream that is to be read.
-     * @throws IOException if the URL cannot be read.
-     * @throws UnknownCatalogFormatException if the catalog format is
-     * not recognized.
-     * @throws UnparseableCatalogException if the catalog cannot be parsed.
-     * (For example, if it is supposed to be XML and isn't well-formed.)
-     */
-    public void readCatalog(Catalog catalog, InputStream is)
-        throws IOException, CatalogException;
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import org.w3c.dom.Node;
-
-/**
- * The DOMCatalogParser interface.
- *
- * <p>This interface must be implemented in order for a class to
- * participate as a parser for the DOMCatalogReader.
- *
- * @see Catalog
- * @see DOMCatalogReader
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public interface DOMCatalogParser {
-    /**
-     * Parse a DOM node as a catalog entry.
-     *
-     * <p>This method is expected to analyze the specified node and
-     * construct appropriate catalog entry(ies) from it.</p>
-     *
-     * @param catalog The catalog for which this node is being considered.
-     * @param node The DOM Node from the catalog.
-     */
-    public void parseCatalogEntry(Catalog catalog, Node node);
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-import sun.reflect.misc.ReflectUtil;
-
-/**
- * A DOM-based CatalogReader.
- *
- * <p>This class is used to read XML Catalogs using the DOM. This reader
- * has an advantage over the SAX-based reader that it can analyze the
- * DOM tree rather than simply a series of SAX events. It has the disadvantage
- * that it requires all of the code necessary to build and walk a DOM
- * tree.</p>
- *
- * <p>Since the choice of CatalogReaders (in the InputStream case) can only
- * be made on the basis of MIME type, the following problem occurs: only
- * one CatalogReader can exist for all XML mime types. In order to get
- * around this problem, the DOMCatalogReader relies on a set of external
- * CatalogParsers to actually build the catalog.</p>
- *
- * <p>The selection of CatalogParsers is made on the basis of the QName
- * of the root element of the document.</p>
- *
- *
- * @see Catalog
- * @see CatalogReader
- * @see SAXCatalogReader
- * @see TextCatalogReader
- * @see DOMCatalogParser
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class DOMCatalogReader implements CatalogReader {
-  /**
-   * Mapping table from QNames to CatalogParser classes.
-   *
-   * <p>Each key in this hash table has the form "elementname"
-   * or "{namespaceuri}elementname". The former is used if the
-   * namespace URI is null.</p>
-   */
-  protected Map<String, String> namespaceMap = new HashMap<>();
-
-  /**
-   * Add a new parser to the reader.
-   *
-   * <p>This method associates the specified parserClass with the
-   * namespaceURI/rootElement names specified.</p>
-   *
-   * @param namespaceURI The namespace URI. <em>Not</em> the prefix.
-   * @param rootElement The name of the root element.
-   * @param parserClass The name of the parserClass to instantiate
-   * for this kind of catalog.
-   */
-  public void setCatalogParser(String namespaceURI,
-                               String rootElement,
-                               String parserClass) {
-    if (namespaceURI == null) {
-      namespaceMap.put(rootElement, parserClass);
-    } else {
-      namespaceMap.put("{"+namespaceURI+"}"+rootElement, parserClass);
-    }
-  }
-
-  /**
-   * Get the name of the parser class for a given catalog type.
-   *
-   * <p>This method returns the parserClass associated with the
-   * namespaceURI/rootElement names specified.</p>
-   *
-   * @param namespaceURI The namespace URI. <em>Not</em> the prefix.
-   * @param rootElement The name of the root element.
-   * @return The parser class.
-   */
-  public String getCatalogParser(String namespaceURI,
-                                 String rootElement) {
-    if (namespaceURI == null) {
-      return namespaceMap.get(rootElement);
-    } else {
-      return namespaceMap.get("{"+namespaceURI+"}"+rootElement);
-    }
-  }
-
-  /**
-   * Null constructor; something for subclasses to call.
-   */
-  public DOMCatalogReader() { }
-
-  /**
-   * Read a catalog from an input stream.
-   *
-   * <p>This class reads a catalog from an input stream:</p>
-   *
-   * <ul>
-   * <li>Based on the QName of the root element, it determines which
-   * parser to instantiate for this catalog.</li>
-   * <li>It constructs a DOM Document from the catalog and</li>
-   * <li>For each child of the root node, it calls the parser's
-   * parseCatalogEntry method. This method is expected to make
-   * appropriate calls back into the catalog to add entries for the
-   * entries in the catalog. It is free to do this in whatever manner
-   * is appropriate (perhaps using just the node passed in, perhaps
-   * wandering arbitrarily throughout the tree).</li>
-   * </ul>
-   *
-   * @param catalog The catalog for which this reader is called.
-   * @param is The input stream that is to be read.
-   * @throws IOException if the URL cannot be read.
-   * @throws UnknownCatalogFormatException if the catalog format is
-   * not recognized.
-   * @throws UnparseableCatalogException if the catalog cannot be parsed.
-   * (For example, if it is supposed to be XML and isn't well-formed or
-   * if the parser class cannot be instantiated.)
-   */
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws IOException, CatalogException {
-
-    DocumentBuilderFactory factory = null;
-    DocumentBuilder builder = null;
-
-    factory = DocumentBuilderFactory.newInstance();
-    factory.setNamespaceAware(false);
-    factory.setValidating(false);
-    try {
-      builder = factory.newDocumentBuilder();
-    } catch (ParserConfigurationException pce) {
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    }
-
-    Document doc = null;
-
-    try {
-      doc = builder.parse(is);
-    } catch (SAXException se) {
-      throw new CatalogException(CatalogException.UNKNOWN_FORMAT);
-    }
-
-    Element root = doc.getDocumentElement();
-
-    String namespaceURI = Namespaces.getNamespaceURI(root);
-    String localName    = Namespaces.getLocalName(root);
-
-    String domParserClass = getCatalogParser(namespaceURI,
-                                             localName);
-
-    if (domParserClass == null) {
-      if (namespaceURI == null) {
-        catalog.getCatalogManager().debug.message(1, "No Catalog parser for "
-                                                  + localName);
-      } else {
-        catalog.getCatalogManager().debug.message(1, "No Catalog parser for "
-                                                  + "{" + namespaceURI + "}"
-                                                  + localName);
-      }
-      return;
-    }
-
-    DOMCatalogParser domParser = null;
-
-    try {
-      domParser = (DOMCatalogParser) ReflectUtil.forName(domParserClass).newInstance();
-    } catch (ClassNotFoundException cnfe) {
-      catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (InstantiationException ie) {
-      catalog.getCatalogManager().debug.message(1, "Cannot instantiate XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (IllegalAccessException iae) {
-      catalog.getCatalogManager().debug.message(1, "Cannot access XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    } catch (ClassCastException cce ) {
-      catalog.getCatalogManager().debug.message(1, "Cannot cast XML Catalog Parser class", domParserClass);
-      throw new CatalogException(CatalogException.UNPARSEABLE);
-    }
-
-    Node node = root.getFirstChild();
-    while (node != null) {
-      domParser.parseCatalogEntry(catalog, node);
-      node = node.getNextSibling();
-    }
-  }
-
-  /**
-   * Read the catalog behind the specified URL.
-   *
-   * @see #readCatalog(Catalog, InputStream)
-   *
-   * @param catalog The catalog for which we are reading.
-   * @param fileUrl The URL of the document that should be read.
-   *
-   * @throws MalformedURLException if the specified URL cannot be
-   * turned into a URL object.
-   * @throws IOException if the URL cannot be read.
-   * @throws UnknownCatalogFormatException if the catalog format is
-   * not recognized.
-   * @throws UnparseableCatalogException if the catalog cannot be parsed.
-   * (For example, if it is supposed to be XML and isn't well-formed.)
-   */
-  public void readCatalog(Catalog catalog, String fileUrl)
-    throws MalformedURLException, IOException, CatalogException {
-    URL url = new URL(fileUrl);
-    URLConnection urlCon = url.openConnection();
-    readCatalog(catalog, urlCon.getInputStream());
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/ExtendedXMLCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import java.util.Vector;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.Resolver;
-import com.sun.org.apache.xml.internal.resolver.CatalogEntry;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-
-import org.xml.sax.*;
-import org.w3c.dom.*;
-
-/**
- * Parse Extended OASIS Entity Resolution Technical Committee
- * XML Catalog files.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class ExtendedXMLCatalogReader extends OASISXMLCatalogReader {
-  /** The namespace name of extended catalog elements */
-  public static final String extendedNamespaceName = "http://nwalsh.com/xcatalog/1.0";
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-                            String localName,
-                            String qName,
-                            Attributes atts)
-    throws SAXException {
-
-    // Check before calling the super because super will report our
-    // namespace as an extension namespace, but that doesn't count
-    // for this element.
-    boolean inExtension = inExtensionNamespace();
-
-    super.startElement(namespaceURI, localName, qName, atts);
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (namespaceURI != null && extendedNamespaceName.equals(namespaceURI)
-        && !inExtension) {
-      // This is an Extended XML Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-        String baseURI = atts.getValue("xml:base");
-        entryType = Catalog.BASE;
-        entryArgs.add(baseURI);
-        baseURIStack.push(baseURI);
-
-        debug.message(4, "xml:base", baseURI);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (base)", localName);
-          }
-        }
-
-        entryType = -1;
-        entryArgs = new Vector();
-      } else {
-        baseURIStack.push(baseURIStack.peek());
-      }
-
-      if (localName.equals("uriSuffix")) {
-        if (checkAttributes(atts, "suffix", "uri")) {
-          entryType = Resolver.URISUFFIX;
-          entryArgs.add(atts.getValue("suffix"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "uriSuffix",
-                        atts.getValue("suffix"),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("systemSuffix")) {
-        if (checkAttributes(atts, "suffix", "uri")) {
-          entryType = Resolver.SYSTEMSUFFIX;
-          entryArgs.add(atts.getValue("suffix"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "systemSuffix",
-                        atts.getValue("suffix"),
-                        atts.getValue("uri"));
-        }
-      } else {
-        // This is equivalent to an invalid catalog entry type
-        debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry", localName);
-          }
-        }
-      }
-    }
-  }
-
-  /** The SAX <code>endElement</code> method does nothing. */
-  public void endElement (String namespaceURI,
-                          String localName,
-                          String qName)
-    throws SAXException {
-
-    super.endElement(namespaceURI, localName, qName);
-
-    // Check after popping the stack so we don't erroneously think we
-    // are our own extension namespace...
-    boolean inExtension = inExtensionNamespace();
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (namespaceURI != null
-        && (extendedNamespaceName.equals(namespaceURI))
-        && !inExtension) {
-
-      String popURI = (String) baseURIStack.pop();
-      String baseURI = (String) baseURIStack.peek();
-
-      if (!baseURI.equals(popURI)) {
-        entryType = Catalog.BASE;
-        entryArgs.add(baseURI);
-
-        debug.message(4, "(reset) xml:base", baseURI);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (rbase)", localName);
-          }
-        }
-      }
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/OASISXMLCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,546 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogEntry;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.helpers.PublicId;
-import java.util.Enumeration;
-import java.util.Stack;
-import java.util.Vector;
-import javax.xml.parsers.SAXParserFactory;
-import org.w3c.dom.*;
-import org.xml.sax.*;
-
-/**
- * Parse OASIS Entity Resolution Technical Committee
- * XML Catalog files.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class OASISXMLCatalogReader extends SAXCatalogReader implements SAXCatalogParser {
-  /** The catalog object needs to be stored by the object so that
-   * SAX callbacks can use it.
-   */
-  protected Catalog catalog = null;
-
-  /** The namespace name of OASIS ERTC catalogs */
-  public static final String namespaceName = "urn:oasis:names:tc:entity:xmlns:xml:catalog";
-
-  /** The namespace name of OASIS ERTC TR9401 catalog extension */
-  public static final String tr9401NamespaceName = "urn:oasis:names:tc:entity:xmlns:tr9401:catalog";
-
-  protected Stack baseURIStack = new Stack();
-  protected Stack overrideStack = new Stack();
-  protected Stack namespaceStack = new Stack();
-
-  /** Set the current catalog. */
-  public void setCatalog (Catalog catalog) {
-    this.catalog = catalog;
-    debug = catalog.getCatalogManager().debug;
-  }
-
-  /** Get the current catalog. */
-  public Catalog getCatalog () {
-    return catalog;
-  }
-
-  /** Default constructor */
-  public OASISXMLCatalogReader() {
-    super();
-  }
-
-  /** Constructor allowing for providing custom SAX parser factory */
-  public OASISXMLCatalogReader(SAXParserFactory parserFactory, Catalog catalog) {
-    super(parserFactory);
-    setCatalog(catalog);
-  }
-
-  /**
-   * Are we in an extension namespace?
-   *
-   * @return true if the current stack of open namespaces includes
-   *               an extension namespace.
-   */
-  protected boolean inExtensionNamespace() {
-    boolean inExtension = false;
-
-    Enumeration elements = namespaceStack.elements();
-    while (!inExtension && elements.hasMoreElements()) {
-      String ns = (String) elements.nextElement();
-      if (ns == null) {
-        inExtension = true;
-      } else {
-        inExtension = (!ns.equals(tr9401NamespaceName)
-                       && !ns.equals(namespaceName));
-      }
-    }
-
-    return inExtension;
-  }
-
-  // ----------------------------------------------------------------------
-  // Implement the SAX ContentHandler interface
-
-  /** The SAX <code>setDocumentLocator</code> method does nothing. */
-  public void setDocumentLocator (Locator locator) {
-    return;
-  }
-
-  /** The SAX <code>startDocument</code> */
-  public void startDocument ()
-    throws SAXException {
-    baseURIStack.push(catalog.getCurrentBase());
-    overrideStack.push(catalog.getDefaultOverride());
-    return;
-  }
-
-  /** The SAX <code>endDocument</code> method does nothing. */
-  public void endDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-                            String localName,
-                            String qName,
-                            Attributes atts)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    namespaceStack.push(namespaceURI);
-
-    boolean inExtension = inExtensionNamespace();
-
-    if (namespaceURI != null && namespaceName.equals(namespaceURI)
-        && !inExtension) {
-      // This is an XML Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-        String baseURI = atts.getValue("xml:base");
-        entryType = Catalog.BASE;
-        entryArgs.add(baseURI);
-        baseURIStack.push(baseURI);
-
-        debug.message(4, "xml:base", baseURI);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (base)", localName);
-          }
-        }
-
-        entryType = -1;
-        entryArgs = new Vector();
-
-      } else {
-        baseURIStack.push(baseURIStack.peek());
-      }
-
-      if ((localName.equals("catalog") || localName.equals("group"))
-          && atts.getValue("prefer") != null) {
-        String override = atts.getValue("prefer");
-
-        if (override.equals("public")) {
-          override = "yes";
-        } else if (override.equals("system")) {
-          override = "no";
-        } else {
-          debug.message(1,
-                        "Invalid prefer: must be 'system' or 'public'",
-                        localName);
-          override = catalog.getDefaultOverride();
-        }
-
-        entryType = Catalog.OVERRIDE;
-        entryArgs.add(override);
-        overrideStack.push(override);
-
-        debug.message(4, "override", override);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (override)", localName);
-          }
-        }
-
-        entryType = -1;
-        entryArgs = new Vector();
-
-      } else {
-        overrideStack.push(overrideStack.peek());
-      }
-
-      if (localName.equals("delegatePublic")) {
-        if (checkAttributes(atts, "publicIdStartString", "catalog")) {
-          entryType = Catalog.DELEGATE_PUBLIC;
-          entryArgs.add(atts.getValue("publicIdStartString"));
-          entryArgs.add(atts.getValue("catalog"));
-
-          debug.message(4, "delegatePublic",
-                        PublicId.normalize(atts.getValue("publicIdStartString")),
-                        atts.getValue("catalog"));
-        }
-      } else if (localName.equals("delegateSystem")) {
-        if (checkAttributes(atts, "systemIdStartString", "catalog")) {
-          entryType = Catalog.DELEGATE_SYSTEM;
-          entryArgs.add(atts.getValue("systemIdStartString"));
-          entryArgs.add(atts.getValue("catalog"));
-
-          debug.message(4, "delegateSystem",
-                        atts.getValue("systemIdStartString"),
-                        atts.getValue("catalog"));
-        }
-      } else if (localName.equals("delegateURI")) {
-        if (checkAttributes(atts, "uriStartString", "catalog")) {
-          entryType = Catalog.DELEGATE_URI;
-          entryArgs.add(atts.getValue("uriStartString"));
-          entryArgs.add(atts.getValue("catalog"));
-
-          debug.message(4, "delegateURI",
-                        atts.getValue("uriStartString"),
-                        atts.getValue("catalog"));
-        }
-      } else if (localName.equals("rewriteSystem")) {
-        if (checkAttributes(atts, "systemIdStartString", "rewritePrefix")) {
-          entryType = Catalog.REWRITE_SYSTEM;
-          entryArgs.add(atts.getValue("systemIdStartString"));
-          entryArgs.add(atts.getValue("rewritePrefix"));
-
-          debug.message(4, "rewriteSystem",
-                        atts.getValue("systemIdStartString"),
-                        atts.getValue("rewritePrefix"));
-        }
-      } else if (localName.equals("systemSuffix")) {
-        if (checkAttributes(atts, "systemIdSuffix", "uri")) {
-          entryType = Catalog.SYSTEM_SUFFIX;
-          entryArgs.add(atts.getValue("systemIdSuffix"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "systemSuffix",
-                        atts.getValue("systemIdSuffix"),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("rewriteURI")) {
-        if (checkAttributes(atts, "uriStartString", "rewritePrefix")) {
-          entryType = Catalog.REWRITE_URI;
-          entryArgs.add(atts.getValue("uriStartString"));
-          entryArgs.add(atts.getValue("rewritePrefix"));
-
-          debug.message(4, "rewriteURI",
-                        atts.getValue("uriStartString"),
-                        atts.getValue("rewritePrefix"));
-        }
-      } else if (localName.equals("uriSuffix")) {
-        if (checkAttributes(atts, "uriSuffix", "uri")) {
-          entryType = Catalog.URI_SUFFIX;
-          entryArgs.add(atts.getValue("uriSuffix"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "uriSuffix",
-                        atts.getValue("uriSuffix"),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("nextCatalog")) {
-        if (checkAttributes(atts, "catalog")) {
-          entryType = Catalog.CATALOG;
-          entryArgs.add(atts.getValue("catalog"));
-
-          debug.message(4, "nextCatalog", atts.getValue("catalog"));
-        }
-      } else if (localName.equals("public")) {
-        if (checkAttributes(atts, "publicId", "uri")) {
-          entryType = Catalog.PUBLIC;
-          entryArgs.add(atts.getValue("publicId"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "public",
-                        PublicId.normalize(atts.getValue("publicId")),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("system")) {
-        if (checkAttributes(atts, "systemId", "uri")) {
-          entryType = Catalog.SYSTEM;
-          entryArgs.add(atts.getValue("systemId"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "system",
-                        atts.getValue("systemId"),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("uri")) {
-        if (checkAttributes(atts, "name", "uri")) {
-          entryType = Catalog.URI;
-          entryArgs.add(atts.getValue("name"));
-          entryArgs.add(atts.getValue("uri"));
-
-          debug.message(4, "uri",
-                        atts.getValue("name"),
-                        atts.getValue("uri"));
-        }
-      } else if (localName.equals("catalog")) {
-        // nop, start of catalog
-      } else if (localName.equals("group")) {
-        // nop, a group
-      } else {
-        // This is equivalent to an invalid catalog entry type
-        debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry", localName);
-          }
-        }
-      }
-    }
-
-    if (namespaceURI != null && tr9401NamespaceName.equals(namespaceURI)
-        && !inExtension) {
-      // This is a TR9401 Catalog entry
-
-      if (atts.getValue("xml:base") != null) {
-        String baseURI = atts.getValue("xml:base");
-        entryType = Catalog.BASE;
-        entryArgs.add(baseURI);
-        baseURIStack.push(baseURI);
-
-        debug.message(4, "xml:base", baseURI);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (base)", localName);
-          }
-        }
-
-        entryType = -1;
-        entryArgs = new Vector();
-
-      } else {
-        baseURIStack.push(baseURIStack.peek());
-      }
-
-      if (localName.equals("doctype")) {
-        entryType = Catalog.DOCTYPE;
-        entryArgs.add(atts.getValue("name"));
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("document")) {
-        entryType = Catalog.DOCUMENT;
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("dtddecl")) {
-        entryType = Catalog.DTDDECL;
-        entryArgs.add(atts.getValue("publicId"));
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("entity")) {
-        entryType = Catalog.ENTITY;
-        entryArgs.add(atts.getValue("name"));
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("linktype")) {
-        entryType = Catalog.LINKTYPE;
-        entryArgs.add(atts.getValue("name"));
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("notation")) {
-        entryType = Catalog.NOTATION;
-        entryArgs.add(atts.getValue("name"));
-        entryArgs.add(atts.getValue("uri"));
-      } else if (localName.equals("sgmldecl")) {
-        entryType = Catalog.SGMLDECL;
-        entryArgs.add(atts.getValue("uri"));
-      } else {
-        // This is equivalent to an invalid catalog entry type
-        debug.message(1, "Invalid catalog entry type", localName);
-      }
-
-      if (entryType >= 0) {
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry", localName);
-          }
-        }
-      }
-    }
-  }
-
-  public boolean checkAttributes (Attributes atts, String attName) {
-    if (atts.getValue(attName) == null) {
-      debug.message(1, "Error: required attribute " + attName + " missing.");
-      return false;
-    } else {
-      return true;
-    }
-  }
-
-  public boolean checkAttributes (Attributes atts,
-                                  String attName1,
-                                  String attName2) {
-    return checkAttributes(atts, attName1)
-      && checkAttributes(atts, attName2);
-  }
-
-  /** The SAX <code>endElement</code> */
-  public void endElement (String namespaceURI,
-                          String localName,
-                          String qName)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    boolean inExtension = inExtensionNamespace();
-
-    if (namespaceURI != null
-        && !inExtension
-        && (namespaceName.equals(namespaceURI)
-            || tr9401NamespaceName.equals(namespaceURI))) {
-
-      String popURI = (String) baseURIStack.pop();
-      String baseURI = (String) baseURIStack.peek();
-
-      if (!baseURI.equals(popURI)) {
-        entryType = Catalog.BASE;
-        entryArgs.add(baseURI);
-
-        debug.message(4, "(reset) xml:base", baseURI);
-
-        try {
-          CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-          catalog.addEntry(ce);
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            debug.message(1, "Invalid catalog entry type", localName);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            debug.message(1, "Invalid catalog entry (rbase)", localName);
-          }
-        }
-      }
-    }
-
-    if (namespaceURI != null && namespaceName.equals(namespaceURI)
-        && !inExtension) {
-      if (localName.equals("catalog") || localName.equals("group")) {
-        String popOverride = (String) overrideStack.pop();
-        String override = (String) overrideStack.peek();
-
-        if (!override.equals(popOverride)) {
-          entryType = Catalog.OVERRIDE;
-          entryArgs.add(override);
-          overrideStack.push(override);
-
-          debug.message(4, "(reset) override", override);
-
-          try {
-            CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-            catalog.addEntry(ce);
-          } catch (CatalogException cex) {
-            if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-              debug.message(1, "Invalid catalog entry type", localName);
-            } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-              debug.message(1, "Invalid catalog entry (roverride)", localName);
-            }
-          }
-        }
-      }
-    }
-
-    namespaceStack.pop();
-
-    return;
-  }
-
-  /** The SAX <code>characters</code> method does nothing. */
-  public void characters (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>ignorableWhitespace</code> method does nothing. */
-  public void ignorableWhitespace (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>processingInstruction</code> method does nothing. */
-  public void processingInstruction (String target, String data)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>skippedEntity</code> method does nothing. */
-  public void skippedEntity (String name)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>startPrefixMapping</code> method does nothing. */
-  public void startPrefixMapping(String prefix, String uri)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>endPrefixMapping</code> method does nothing. */
-  public void endPrefixMapping(String prefix)
-    throws SAXException {
-    return;
-  }
-
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import org.xml.sax.*;
-
-/**
- * The SAXCatalogParser interface.
- *
- * <p>This interface must be implemented in order for a class to
- * participate as a parser for the SAXCatalogReader.
- *
- * @see Catalog
- * @see SAXCatalogReader
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public interface SAXCatalogParser extends ContentHandler, DocumentHandler {
-    /** Set the Catalog for which parsing is being performed. */
-    public void setCatalog(Catalog catalog);
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +0,0 @@
-/*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import org.xml.sax.AttributeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.Parser;
-import org.xml.sax.SAXException;
-import sun.reflect.misc.ReflectUtil;
-
-/**
- * A SAX-based CatalogReader.
- *
- * <p>This class is used to read XML Catalogs using the SAX. This reader
- * has an advantage over the DOM-based reader in that it functions on
- * the stream of SAX events. It has the disadvantage
- * that it cannot look around in the tree.</p>
- *
- * <p>Since the choice of CatalogReaders (in the InputStream case) can only
- * be made on the basis of MIME type, the following problem occurs: only
- * one CatalogReader can exist for all XML mime types. In order to get
- * around this problem, the SAXCatalogReader relies on a set of external
- * CatalogParsers to actually build the catalog.</p>
- *
- * <p>The selection of CatalogParsers is made on the basis of the QName
- * of the root element of the document.</p>
- *
- * @see Catalog
- * @see CatalogReader
- * @see SAXCatalogReader
- * @see TextCatalogReader
- * @see DOMCatalogParser
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class SAXCatalogReader implements CatalogReader, ContentHandler, DocumentHandler {
-    /** The SAX Parser Factory */
-    protected SAXParserFactory parserFactory = null;
-
-    /** The SAX Parser Class */
-    protected String parserClass = null;
-
-    /**
-     * Mapping table from QNames to CatalogParser classes.
-     *
-     * <p>Each key in this hash table has the form "elementname"
-     * or "{namespaceuri}elementname". The former is used if the
-     * namespace URI is null.</p>
-     */
-    protected Map<String, String> namespaceMap = new HashMap<>();
-
-    /** The parser in use for the current catalog. */
-    private SAXCatalogParser saxParser = null;
-
-    /** Set if something goes horribly wrong. It allows the class to
-     * ignore the rest of the events that are received.
-     */
-    private boolean abandonHope = false;
-
-    /** The Catalog that we're working for. */
-    private Catalog catalog;
-
-    /** Set the XML SAX Parser Factory.
-     */
-    public void setParserFactory(SAXParserFactory parserFactory) {
-        this.parserFactory = parserFactory;
-    }
-
-    /** Set the XML SAX Parser Class
-     */
-    public void setParserClass(String parserClass) {
-        this.parserClass = parserClass;
-    }
-
-    /** Get the parser factory currently in use. */
-    public SAXParserFactory getParserFactory() {
-        return parserFactory;
-    }
-
-    /** Get the parser class currently in use. */
-    public String getParserClass() {
-        return parserClass;
-    }
-
-    /** The debug class to use for this reader.
-     *
-     * This is a bit of a hack. Anyway, whenever we read for a catalog,
-     * we extract the debug object
-     * from the catalog's manager so that we can use it to print messages.
-     *
-     * In production, we don't really expect any messages so it doesn't
-     * really matter. But it's still a bit of a hack.
-     */
-    protected Debug debug = CatalogManager.getStaticManager().debug;
-
-    /** The constructor */
-    public SAXCatalogReader() {
-        parserFactory = null;
-        parserClass = null;
-    }
-
-    /** The constructor */
-    public SAXCatalogReader(SAXParserFactory parserFactory) {
-        this.parserFactory = parserFactory;
-    }
-
-    /** The constructor */
-    public SAXCatalogReader(String parserClass) {
-        this.parserClass = parserClass;
-    }
-
-    /**
-     * Set the SAXCatalogParser class for the given namespace/root
-     * element type.
-     */
-    public void setCatalogParser(String namespaceURI,
-            String rootElement,
-            String parserClass) {
-        namespaceURI = namespaceURI != null ? namespaceURI.trim() : "";
-        namespaceMap.put("{"+namespaceURI+"}"+rootElement, parserClass);
-    }
-
-    /**
-     * Get the SAXCatalogParser class for the given namespace/root
-     * element type.
-     */
-    public String getCatalogParser(String namespaceURI,
-            String rootElement) {
-        namespaceURI = namespaceURI != null ? namespaceURI.trim() : "";
-        return namespaceMap.get("{"+namespaceURI+"}"+rootElement);
-    }
-
-    /**
-     * Parse an XML Catalog file.
-     *
-     * @param catalog The catalog to which this catalog file belongs
-     * @param fileUrl The URL or filename of the catalog file to process
-     *
-     * @throws MalformedURLException Improper fileUrl
-     * @throws IOException Error reading catalog file
-     */
-    public void readCatalog(Catalog catalog, String fileUrl)
-            throws MalformedURLException, IOException,
-            CatalogException {
-
-        URL url = null;
-
-        try {
-            url = new URL(fileUrl);
-        } catch (MalformedURLException e) {
-            url = new URL("file:///" + fileUrl);
-        }
-
-        debug = catalog.getCatalogManager().debug;
-
-        try {
-            URLConnection urlCon = url.openConnection();
-            readCatalog(catalog, urlCon.getInputStream());
-        } catch (FileNotFoundException e) {
-            catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
-                    url.toString());
-        }
-    }
-
-    /**
-     * Parse an XML Catalog stream.
-     *
-     * @param catalog The catalog to which this catalog file belongs
-     * @param is The input stream from which the catalog will be read
-     *
-     * @throws MalformedURLException Improper fileUrl
-     * @throws IOException Error reading catalog file
-     * @throws CatalogException A Catalog exception
-     */
-    public void readCatalog(Catalog catalog, InputStream is)
-            throws IOException, CatalogException {
-
-        // Create an instance of the parser
-        if (parserFactory == null && parserClass == null) {
-            debug.message(1, "Cannot read SAX catalog without a parser");
-            throw new CatalogException(CatalogException.UNPARSEABLE);
-        }
-
-        debug = catalog.getCatalogManager().debug;
-        EntityResolver bResolver = catalog.getCatalogManager().getBootstrapResolver();
-
-        this.catalog = catalog;
-
-        try {
-            if (parserFactory != null) {
-                SAXParser parser = parserFactory.newSAXParser();
-                SAXParserHandler spHandler = new SAXParserHandler();
-                spHandler.setContentHandler(this);
-                if (bResolver != null) {
-                    spHandler.setEntityResolver(bResolver);
-                }
-                parser.parse(new InputSource(is), spHandler);
-            } else {
-                Class<?> c =  ReflectUtil.forName(parserClass);
-                if (!Parser.class.isAssignableFrom(c)) {
-                    throw new ClassCastException(parserClass
-                                + " cannot be cast to "
-                                + Parser.class.getName());
-                }
-                Parser parser = (Parser) c.newInstance();
-                parser.setDocumentHandler(this);
-                if (bResolver != null) {
-                    parser.setEntityResolver(bResolver);
-                }
-                parser.parse(new InputSource(is));
-            }
-        } catch (ClassNotFoundException cnfe) {
-            throw new CatalogException(CatalogException.UNPARSEABLE);
-        } catch (IllegalAccessException iae) {
-            throw new CatalogException(CatalogException.UNPARSEABLE);
-        } catch (InstantiationException ie) {
-            throw new CatalogException(CatalogException.UNPARSEABLE);
-        } catch (ParserConfigurationException pce) {
-            throw new CatalogException(CatalogException.UNKNOWN_FORMAT);
-        } catch (SAXException se) {
-            Exception e = se.getException();
-            // FIXME: there must be a better way
-            UnknownHostException uhe = new UnknownHostException();
-            FileNotFoundException fnfe = new FileNotFoundException();
-            if (e != null) {
-                if (e.getClass() == uhe.getClass()) {
-                    throw new CatalogException(CatalogException.PARSE_FAILED,
-                            e.toString());
-                } else if (e.getClass() == fnfe.getClass()) {
-                    throw new CatalogException(CatalogException.PARSE_FAILED,
-                            e.toString());
-                }
-            }
-            throw new CatalogException(se);
-        }
-    }
-
-    // ----------------------------------------------------------------------
-    // Implement the SAX ContentHandler interface
-
-    /** The SAX <code>setDocumentLocator</code> method. Does nothing. */
-    public void setDocumentLocator (Locator locator) {
-        if (saxParser != null) {
-            saxParser.setDocumentLocator(locator);
-        }
-    }
-
-    /** The SAX <code>startDocument</code> method. Does nothing. */
-    public void startDocument () throws SAXException {
-        saxParser = null;
-        abandonHope = false;
-        return;
-    }
-
-    /** The SAX <code>endDocument</code> method. Does nothing. */
-    public void endDocument ()throws SAXException {
-        if (saxParser != null) {
-            saxParser.endDocument();
-        }
-    }
-
-    /**
-     * The SAX <code>startElement</code> method.
-     *
-     * <p>The catalog parser is selected based on the namespace of the
-     * first element encountered in the catalog.</p>
-     */
-    public void startElement (String name,
-            AttributeList atts)
-                    throws SAXException {
-
-        if (abandonHope) {
-            return;
-        }
-
-        if (saxParser == null) {
-            String prefix = "";
-            if (name.indexOf(':') > 0) {
-                prefix = name.substring(0, name.indexOf(':'));
-            }
-
-            String localName = name;
-            if (localName.indexOf(':') > 0) {
-                localName = localName.substring(localName.indexOf(':')+1);
-            }
-
-            String namespaceURI = null;
-            if (prefix.length() == 0) {
-                namespaceURI = atts.getValue("xmlns");
-            } else {
-                namespaceURI = atts.getValue("xmlns:" + prefix);
-            }
-
-            String saxParserClass = getCatalogParser(namespaceURI,
-                    localName);
-
-            if (saxParserClass == null) {
-                abandonHope = true;
-                if (namespaceURI == null) {
-                    debug.message(2, "No Catalog parser for " + name);
-                } else {
-                    debug.message(2, "No Catalog parser for "
-                            + "{" + namespaceURI + "}"
-                            + name);
-                }
-                return;
-            }
-
-            try {
-                saxParser = (SAXCatalogParser)
-                        ReflectUtil.forName(saxParserClass).newInstance();
-
-                saxParser.setCatalog(catalog);
-                saxParser.startDocument();
-                saxParser.startElement(name, atts);
-            } catch (ClassNotFoundException cnfe) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, cnfe.toString());
-            } catch (InstantiationException ie) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, ie.toString());
-            } catch (IllegalAccessException iae) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, iae.toString());
-            } catch (ClassCastException cce ) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, cce.toString());
-            }
-        } else {
-            saxParser.startElement(name, atts);
-        }
-    }
-
-    /**
-     * The SAX2 <code>startElement</code> method.
-     *
-     * <p>The catalog parser is selected based on the namespace of the
-     * first element encountered in the catalog.</p>
-     */
-    public void startElement (String namespaceURI,
-            String localName,
-            String qName,
-            Attributes atts)
-                    throws SAXException {
-
-        if (abandonHope) {
-            return;
-        }
-
-        if (saxParser == null) {
-            String saxParserClass = getCatalogParser(namespaceURI,
-                    localName);
-
-            if (saxParserClass == null) {
-                abandonHope = true;
-                if (namespaceURI == null) {
-                    debug.message(2, "No Catalog parser for " + localName);
-                } else {
-                    debug.message(2, "No Catalog parser for "
-                            + "{" + namespaceURI + "}"
-                            + localName);
-                }
-                return;
-            }
-
-            try {
-                saxParser = (SAXCatalogParser)
-                        ReflectUtil.forName(saxParserClass).newInstance();
-
-                saxParser.setCatalog(catalog);
-                saxParser.startDocument();
-                saxParser.startElement(namespaceURI, localName, qName, atts);
-            } catch (ClassNotFoundException cnfe) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, cnfe.toString());
-            } catch (InstantiationException ie) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, ie.toString());
-            } catch (IllegalAccessException iae) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, iae.toString());
-            } catch (ClassCastException cce ) {
-                saxParser = null;
-                abandonHope = true;
-                debug.message(2, cce.toString());
-            }
-        } else {
-            saxParser.startElement(namespaceURI, localName, qName, atts);
-        }
-    }
-
-    /** The SAX <code>endElement</code> method. Does nothing. */
-    public void endElement (String name) throws SAXException {
-        if (saxParser != null) {
-            saxParser.endElement(name);
-        }
-    }
-
-    /** The SAX2 <code>endElement</code> method. Does nothing. */
-    public void endElement (String namespaceURI,
-            String localName,
-            String qName) throws SAXException {
-        if (saxParser != null) {
-            saxParser.endElement(namespaceURI, localName, qName);
-        }
-    }
-
-    /** The SAX <code>characters</code> method. Does nothing. */
-    public void characters (char ch[], int start, int length)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.characters(ch, start, length);
-        }
-    }
-
-    /** The SAX <code>ignorableWhitespace</code> method. Does nothing. */
-    public void ignorableWhitespace (char ch[], int start, int length)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.ignorableWhitespace(ch, start, length);
-        }
-    }
-
-    /** The SAX <code>processingInstruction</code> method. Does nothing. */
-    public void processingInstruction (String target, String data)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.processingInstruction(target, data);
-        }
-    }
-
-    /** The SAX <code>startPrefixMapping</code> method. Does nothing. */
-    public void startPrefixMapping (String prefix, String uri)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.startPrefixMapping (prefix, uri);
-        }
-    }
-
-    /** The SAX <code>endPrefixMapping</code> method. Does nothing. */
-    public void endPrefixMapping (String prefix)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.endPrefixMapping (prefix);
-        }
-    }
-
-    /** The SAX <code>skippedentity</code> method. Does nothing. */
-    public void skippedEntity (String name)
-            throws SAXException {
-        if (saxParser != null) {
-            saxParser.skippedEntity(name);
-        }
-    }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/SAXParserHandler.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import java.io.IOException;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-
-/**
- * An entity-resolving DefaultHandler.
- *
- * <p>This class provides a SAXParser DefaultHandler that performs
- * entity resolution.
- * </p>
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- */
-public class SAXParserHandler extends DefaultHandler {
-  private EntityResolver er = null;
-  private ContentHandler ch = null;
-
-  public SAXParserHandler() {
-    super();
-  }
-
-  public void setEntityResolver(EntityResolver er) {
-    this.er = er;
-  }
-
-  public void setContentHandler(ContentHandler ch) {
-    this.ch = ch;
-  }
-
-  // Entity Resolver
-  public InputSource resolveEntity(String publicId, String systemId)
-    throws SAXException {
-
-    if (er != null) {
-      try {
-        return er.resolveEntity(publicId, systemId);
-      } catch (IOException e) {
-          System.out.println("resolveEntity threw IOException!");
-          return null;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  // Content Handler
-  public void characters(char[] ch, int start, int length)
-    throws SAXException {
-    if (this.ch != null) {
-      this.ch.characters(ch, start, length);
-    }
-  }
-
-  public void endDocument()
-    throws SAXException {
-    if (ch != null) {
-      ch.endDocument();
-    }
-  }
-
-  public void endElement(String namespaceURI, String localName, String qName)
-    throws SAXException {
-    if (ch != null) {
-      ch.endElement(namespaceURI, localName, qName);
-    }
-  }
-
-  public void endPrefixMapping(String prefix)
-    throws SAXException {
-    if (ch != null) {
-      ch.endPrefixMapping(prefix);
-    }
-  }
-
-  public void ignorableWhitespace(char[] ch, int start, int length)
-    throws SAXException {
-    if (this.ch != null) {
-      this.ch.ignorableWhitespace(ch, start, length);
-    }
-  }
-
-  public void processingInstruction(String target, String data)
-    throws SAXException {
-    if (ch != null) {
-      ch.processingInstruction(target, data);
-    }
-  }
-
-  public void setDocumentLocator(Locator locator) {
-    if (ch != null) {
-      ch.setDocumentLocator(locator);
-    }
-  }
-
-  public void skippedEntity(String name)
-    throws SAXException {
-    if (ch != null) {
-      ch.skippedEntity(name);
-    }
-  }
-
-  public void startDocument()
-    throws SAXException {
-    if (ch != null) {
-      ch.startDocument();
-    }
-  }
-
-  public void startElement(String namespaceURI, String localName,
-                           String qName, Attributes atts)
-    throws SAXException {
-    if (ch != null) {
-      ch.startElement(namespaceURI, localName, qName, atts);
-    }
-  }
-
-  public void startPrefixMapping(String prefix, String uri)
-    throws SAXException {
-    if (ch != null) {
-      ch.startPrefixMapping(prefix, uri);
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/TR9401CatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogEntry;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.util.Locale;
-import java.util.Vector;
-
-/**
- * Parses OASIS Open Catalog files.
- *
- * <p>This class reads OASIS Open Catalog files, returning a stream
- * of tokens.</p>
- *
- * <p>This code interrogates the following non-standard system properties:</p>
- *
- * <dl>
- * <dt><b>xml.catalog.debug</b></dt>
- * <dd><p>Sets the debug level. A value of 0 is assumed if the
- * property is not set or is not a number.</p></dd>
- * </dl>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class TR9401CatalogReader extends TextCatalogReader {
-
-  /**
-   * Start parsing an OASIS TR9401 Open Catalog file. The file is
-   * actually read and parsed
-   * as needed by <code>nextEntry</code>.
-   *
-   * <p>In a TR9401 Catalog the 'DELEGATE' entry delegates public
-   * identifiers. There is no delegate entry for system identifiers
-   * or URIs.</p>
-   *
-   * @param catalog The Catalog to populate
-   * @param is The input stream from which to read the TR9401 Catalog
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   */
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws MalformedURLException, IOException {
-
-    catfile = is;
-
-    if (catfile == null) {
-      return;
-    }
-
-    Vector unknownEntry = null;
-
-    try {
-      while (true) {
-        String token = nextToken();
-
-        if (token == null) {
-          if (unknownEntry != null) {
-            catalog.unknownEntry(unknownEntry);
-            unknownEntry = null;
-          }
-          catfile.close();
-          catfile = null;
-          return;
-        }
-
-        String entryToken = null;
-        if (caseSensitive) {
-          entryToken = token;
-        } else {
-          entryToken = token.toUpperCase(Locale.ENGLISH);
-        }
-
-        if (entryToken.equals("DELEGATE")) {
-          entryToken = "DELEGATE_PUBLIC";
-        }
-
-        try {
-          int type = CatalogEntry.getEntryType(entryToken);
-          int numArgs = CatalogEntry.getEntryArgCount(type);
-          Vector args = new Vector();
-
-          if (unknownEntry != null) {
-            catalog.unknownEntry(unknownEntry);
-            unknownEntry = null;
-          }
-
-          for (int count = 0; count < numArgs; count++) {
-            args.addElement(nextToken());
-          }
-
-          catalog.addEntry(new CatalogEntry(entryToken, args));
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            if (unknownEntry == null) {
-              unknownEntry = new Vector();
-            }
-            unknownEntry.addElement(token);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            catalog.getCatalogManager().debug.message(1, "Invalid catalog entry", token);
-            unknownEntry = null;
-          } else if (cex.getExceptionType() == CatalogException.UNENDED_COMMENT) {
-            catalog.getCatalogManager().debug.message(1, cex.getMessage());
-          }
-        }
-      }
-    } catch (CatalogException cex2) {
-      if (cex2.getExceptionType() == CatalogException.UNENDED_COMMENT) {
-        catalog.getCatalogManager().debug.message(1, cex2.getMessage());
-      }
-    }
-
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/TextCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,298 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogEntry;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Locale;
-import java.util.Stack;
-import java.util.Vector;
-
-/**
- * Parses plain text Catalog files.
- *
- * <p>This class reads plain text Open Catalog files.</p>
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class TextCatalogReader implements CatalogReader {
-  /** The input stream used to read the catalog */
-  protected InputStream catfile = null;
-
-  /**
-   * Character lookahead stack. Reading a catalog sometimes requires
-   * up to two characters of lookahead.
-   */
-  protected int[] stack = new int[3];
-
-  /**
-   * Token stack. Recognizing an unexpected catalog entry requires
-   * the ability to "push back" a token.
-   */
-  protected Stack tokenStack = new Stack();
-
-  /** The current position on the lookahead stack */
-  protected int top = -1;
-
-  /** Are keywords in the catalog case sensitive? */
-  protected boolean caseSensitive = false;
-
-  /**
-   * Construct a CatalogReader object.
-   */
-  public TextCatalogReader() { }
-
-  public void setCaseSensitive(boolean isCaseSensitive) {
-    caseSensitive = isCaseSensitive;
-  }
-
-  public boolean getCaseSensitive() {
-    return caseSensitive;
-  }
-
-  /**
-   * Start parsing a text catalog file. The file is
-   * actually read and parsed
-   * as needed by <code>nextEntry</code>.</p>
-   *
-   * @param fileUrl  The URL or filename of the catalog file to process
-   *
-   * @throws MalformedURLException Improper fileUrl
-   * @throws IOException Error reading catalog file
-   */
-  public void readCatalog(Catalog catalog, String fileUrl)
-    throws MalformedURLException, IOException {
-    URL catURL = null;
-
-    try {
-      catURL = new URL(fileUrl);
-    } catch (MalformedURLException e) {
-      catURL = new URL("file:///" + fileUrl);
-    }
-
-    URLConnection urlCon = catURL.openConnection();
-    try {
-      readCatalog(catalog, urlCon.getInputStream());
-    } catch (FileNotFoundException e) {
-      catalog.getCatalogManager().debug.message(1, "Failed to load catalog, file not found",
-                                                catURL.toString());
-    }
-  }
-
-  public void readCatalog(Catalog catalog, InputStream is)
-    throws MalformedURLException, IOException {
-
-    catfile = is;
-
-    if (catfile == null) {
-      return;
-    }
-
-    Vector unknownEntry = null;
-
-    try {
-      while (true) {
-        String token = nextToken();
-
-        if (token == null) {
-          if (unknownEntry != null) {
-            catalog.unknownEntry(unknownEntry);
-            unknownEntry = null;
-          }
-          catfile.close();
-          catfile = null;
-          return;
-        }
-
-        String entryToken = null;
-        if (caseSensitive) {
-          entryToken = token;
-        } else {
-          entryToken = token.toUpperCase(Locale.ENGLISH);
-        }
-
-        try {
-          int type = CatalogEntry.getEntryType(entryToken);
-          int numArgs = CatalogEntry.getEntryArgCount(type);
-          Vector args = new Vector();
-
-          if (unknownEntry != null) {
-            catalog.unknownEntry(unknownEntry);
-            unknownEntry = null;
-          }
-
-          for (int count = 0; count < numArgs; count++) {
-            args.addElement(nextToken());
-          }
-
-          catalog.addEntry(new CatalogEntry(entryToken, args));
-        } catch (CatalogException cex) {
-          if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-            if (unknownEntry == null) {
-              unknownEntry = new Vector();
-            }
-            unknownEntry.addElement(token);
-          } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-            catalog.getCatalogManager().debug.message(1, "Invalid catalog entry", token);
-            unknownEntry = null;
-          } else if (cex.getExceptionType() == CatalogException.UNENDED_COMMENT) {
-            catalog.getCatalogManager().debug.message(1, cex.getMessage());
-          }
-        }
-      }
-    } catch (CatalogException cex2) {
-      if (cex2.getExceptionType() == CatalogException.UNENDED_COMMENT) {
-        catalog.getCatalogManager().debug.message(1, cex2.getMessage());
-      }
-    }
-  }
-
-  /**
-     * The destructor.
-     *
-     * <p>Makes sure the catalog file is closed.</p>
-     */
-  protected void finalize() {
-    if (catfile != null) {
-      try {
-        catfile.close();
-      } catch (IOException e) {
-        // whatever...
-      }
-    }
-    catfile = null;
-  }
-
-  // -----------------------------------------------------------------
-
-    /**
-     * Return the next token in the catalog file.
-     *
-     * <p>FYI: This code does not throw any sort of exception for
-     * a file that contains an n
-     *
-     * @return The Catalog file token from the input stream.
-     * @throws IOException If an error occurs reading from the stream.
-     */
-  protected String nextToken() throws IOException, CatalogException {
-    String token = "";
-    int ch, nextch;
-
-    if (!tokenStack.empty()) {
-      return (String) tokenStack.pop();
-    }
-
-    // Skip over leading whitespace and comments
-    while (true) {
-      // skip leading whitespace
-      ch = catfile.read();
-      while (ch <= ' ') {      // all ctrls are whitespace
-        ch = catfile.read();
-        if (ch < 0) {
-          return null;
-        }
-      }
-
-      // now 'ch' is the current char from the file
-      nextch = catfile.read();
-      if (nextch < 0) {
-        return null;
-      }
-
-      if (ch == '-' && nextch == '-') {
-        // we've found a comment, skip it...
-        ch = ' ';
-        nextch = nextChar();
-        while ((ch != '-' || nextch != '-') && nextch > 0) {
-          ch = nextch;
-          nextch = nextChar();
-        }
-
-        if (nextch < 0) {
-          throw new CatalogException(CatalogException.UNENDED_COMMENT,
-                                     "Unterminated comment in catalog file; EOF treated as end-of-comment.");
-        }
-
-        // Ok, we've found the end of the comment,
-        // loop back to the top and start again...
-      } else {
-        stack[++top] = nextch;
-        stack[++top] = ch;
-        break;
-      }
-    }
-
-    ch = nextChar();
-    if (ch == '"' || ch == '\'') {
-      int quote = ch;
-      while ((ch = nextChar()) != quote) {
-        char[] chararr = new char[1];
-        chararr[0] = (char) ch;
-        String s = new String(chararr);
-        token = token.concat(s);
-      }
-      return token;
-    } else {
-      // return the next whitespace or comment delimited
-      // string
-      while (ch > ' ') {
-        nextch = nextChar();
-        if (ch == '-' && nextch == '-') {
-          stack[++top] = ch;
-          stack[++top] = nextch;
-          return token;
-        } else {
-          char[] chararr = new char[1];
-          chararr[0] = (char) ch;
-          String s = new String(chararr);
-          token = token.concat(s);
-          ch = nextch;
-        }
-      }
-      return token;
-    }
-  }
-
-  /**
-     * Return the next logical character from the input stream.
-     *
-     * @return The next (logical) character from the input stream. The
-     * character may be buffered from a previous lookahead.
-     *
-     * @throws IOException If an error occurs reading from the stream.
-     */
-  protected int nextChar() throws IOException {
-    if (top < 0) {
-      return catfile.read();
-    } else {
-      return stack[top--];
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/readers/XCatalogReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.readers;
-
-import java.util.Vector;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogEntry;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.helpers.PublicId;
-
-import org.xml.sax.*;
-
-import javax.xml.parsers.*;
-
-/**
- * Parse "XCatalog" XML Catalog files, this is the XML Catalog format
- * developed by John Cowan and supported by Apache.
- *
- * @see Catalog
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- */
-public class XCatalogReader extends SAXCatalogReader implements SAXCatalogParser {
-  /** The catalog object needs to be stored by the object so that
-   * SAX callbacks can use it.
-   */
-  protected Catalog catalog = null;
-
-  /** Set the current catalog. */
-  public void setCatalog (Catalog catalog) {
-    this.catalog = catalog;
-    debug = catalog.getCatalogManager().debug;
-  }
-
-  /** Get the current catalog. */
-  public Catalog getCatalog () {
-    return catalog;
-  }
-
-  /** Default constructor */
-  public XCatalogReader() {
-    super();
-  }
-
-  /** Constructor allowing for providing custom SAX parser factory */
-  public XCatalogReader(SAXParserFactory parserFactory, Catalog catalog) {
-    super(parserFactory);
-    setCatalog(catalog);
-  }
-
-  // ----------------------------------------------------------------------
-  // Implement the SAX ContentHandler interface
-
-  /** The SAX <code>setDocumentLocator</code> method does nothing. */
-  public void setDocumentLocator (Locator locator) {
-    return;
-  }
-
-  /** The SAX <code>startDocument</code> method does nothing. */
-  public void startDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>endDocument</code> method does nothing. */
-  public void endDocument ()
-    throws SAXException {
-    return;
-  }
-
-  /**
-   * The SAX <code>startElement</code> method recognizes elements
-   * from the plain catalog format and instantiates CatalogEntry
-   * objects for them.
-   *
-   * @param namespaceURI The namespace name of the element.
-   * @param localName The local name of the element.
-   * @param qName The QName of the element.
-   * @param atts The list of attributes on the element.
-   *
-   * @see CatalogEntry
-   */
-  public void startElement (String namespaceURI,
-                            String localName,
-                            String qName,
-                            Attributes atts)
-    throws SAXException {
-
-    int entryType = -1;
-    Vector entryArgs = new Vector();
-
-    if (localName.equals("Base")) {
-      entryType = Catalog.BASE;
-      entryArgs.add(atts.getValue("HRef"));
-
-      debug.message(4, "Base", atts.getValue("HRef"));
-    } else if (localName.equals("Delegate")) {
-      entryType = Catalog.DELEGATE_PUBLIC;
-      entryArgs.add(atts.getValue("PublicID"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      debug.message(4, "Delegate",
-                    PublicId.normalize(atts.getValue("PublicID")),
-                    atts.getValue("HRef"));
-    } else if (localName.equals("Extend")) {
-      entryType = Catalog.CATALOG;
-      entryArgs.add(atts.getValue("HRef"));
-
-      debug.message(4, "Extend", atts.getValue("HRef"));
-    } else if (localName.equals("Map")) {
-      entryType = Catalog.PUBLIC;
-      entryArgs.add(atts.getValue("PublicID"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      debug.message(4, "Map",
-                    PublicId.normalize(atts.getValue("PublicID")),
-                    atts.getValue("HRef"));
-    } else if (localName.equals("Remap")) {
-      entryType = Catalog.SYSTEM;
-      entryArgs.add(atts.getValue("SystemID"));
-      entryArgs.add(atts.getValue("HRef"));
-
-      debug.message(4, "Remap",
-                    atts.getValue("SystemID"),
-                    atts.getValue("HRef"));
-    } else if (localName.equals("XCatalog")) {
-      // nop, start of catalog
-    } else {
-      // This is equivalent to an invalid catalog entry type
-      debug.message(1, "Invalid catalog entry type", localName);
-    }
-
-    if (entryType >= 0) {
-      try {
-        CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
-        catalog.addEntry(ce);
-      } catch (CatalogException cex) {
-        if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
-          debug.message(1, "Invalid catalog entry type", localName);
-        } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
-          debug.message(1, "Invalid catalog entry", localName);
-        }
-      }
-    }
-  }
-
-  /** The SAX <code>endElement</code> method does nothing. */
-  public void endElement (String namespaceURI,
-                          String localName,
-                          String qName)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>characters</code> method does nothing. */
-  public void characters (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>ignorableWhitespace</code> method does nothing. */
-  public void ignorableWhitespace (char ch[], int start, int length)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>processingInstruction</code> method does nothing. */
-  public void processingInstruction (String target, String data)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>skippedEntity</code> method does nothing. */
-  public void skippedEntity (String name)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>startPrefixMapping</code> method does nothing. */
-  public void startPrefixMapping(String prefix, String uri)
-    throws SAXException {
-    return;
-  }
-
-  /** The SAX <code>endPrefixMapping</code> method does nothing. */
-  public void endPrefixMapping(String prefix)
-    throws SAXException {
-    return;
-  }
-
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/CatalogResolver.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,349 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.tools;
-
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.InputSource;
-import org.xml.sax.EntityResolver;
-
-import javax.xml.transform.sax.SAXSource;
-import javax.xml.transform.Source;
-import javax.xml.transform.URIResolver;
-import javax.xml.transform.TransformerException;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.helpers.FileURL;
-
-/**
- * A SAX EntityResolver/JAXP URIResolver that uses catalogs.
- *
- * <p>This class implements both a SAX EntityResolver and a JAXP URIResolver.
- * </p>
- *
- * <p>This resolver understands OASIS TR9401 catalogs, XCatalogs, and the
- * current working draft of the OASIS Entity Resolution Technical
- * Committee specification.</p>
- *
- * @see Catalog
- * @see org.xml.sax.EntityResolver
- * @see javax.xml.transform.URIResolver
- * @deprecated The JDK internal Catalog API in package
- * {@code com.sun.org.apache.xml.internal.resolver}
- * is encapsulated in JDK 9. The entire implementation under the package is now
- * deprecated and subject to removal in a future release. Users of the API
- * should migrate to the {@linkplain javax.xml.catalog new public API}.
- * <p>
- * The new Catalog API is supported throughout the JDK XML Processors, which allows
- * the use of Catalog by simply setting a path to a Catalog file as a property.
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-@Deprecated(since="9", forRemoval=true)
-public class CatalogResolver implements EntityResolver, URIResolver {
-  /** Make the parser Namespace aware? */
-  public boolean namespaceAware = true;
-
-  /** Make the parser validating? */
-  public boolean validating = false;
-
-  /** The underlying catalog */
-  private Catalog catalog = null;
-
-  /** The catalog manager */
-  private CatalogManager catalogManager = CatalogManager.getStaticManager();
-
-  /** Constructor */
-  public CatalogResolver() {
-    initializeCatalogs(false);
-  }
-
-  /** Constructor */
-  public CatalogResolver(boolean privateCatalog) {
-    initializeCatalogs(privateCatalog);
-  }
-
-  /** Constructor */
-  public CatalogResolver(CatalogManager manager) {
-    catalogManager = manager;
-    initializeCatalogs(!catalogManager.getUseStaticCatalog());
-  }
-
-  /** Initialize catalog */
-  private void initializeCatalogs(boolean privateCatalog) {
-    catalog = catalogManager.getCatalog();
-  }
-
-  /** Return the underlying catalog */
-  public Catalog getCatalog() {
-    return catalog;
-  }
-
-  /**
-   * Implements the guts of the <code>resolveEntity</code> method
-   * for the SAX interface.
-   *
-   * <p>Presented with an optional public identifier and a system
-   * identifier, this function attempts to locate a mapping in the
-   * catalogs.</p>
-   *
-   * <p>If such a mapping is found, it is returned.  If no mapping is
-   * found, null is returned.</p>
-   *
-   * @param publicId  The public identifier for the entity in question.
-   * This may be null.
-   *
-   * @param systemId  The system identifier for the entity in question.
-   * XML requires a system identifier on all external entities, so this
-   * value is always specified.
-   *
-   * @return The resolved identifier (a URI reference).
-   */
-  public String getResolvedEntity (String publicId, String systemId) {
-    String resolved = null;
-
-    if (catalog == null) {
-      catalogManager.debug.message(1, "Catalog resolution attempted with null catalog; ignored");
-      return null;
-    }
-
-    if (systemId != null) {
-      try {
-        resolved = catalog.resolveSystem(systemId);
-      } catch (MalformedURLException me) {
-        catalogManager.debug.message(1, "Malformed URL exception trying to resolve",
-                      publicId);
-        resolved = null;
-      } catch (IOException ie) {
-        catalogManager.debug.message(1, "I/O exception trying to resolve", publicId);
-        resolved = null;
-      }
-    }
-
-    if (resolved == null) {
-      if (publicId != null) {
-        try {
-          resolved = catalog.resolvePublic(publicId, systemId);
-        } catch (MalformedURLException me) {
-          catalogManager.debug.message(1, "Malformed URL exception trying to resolve",
-                        publicId);
-        } catch (IOException ie) {
-          catalogManager.debug.message(1, "I/O exception trying to resolve", publicId);
-        }
-      }
-
-      if (resolved != null) {
-        catalogManager.debug.message(2, "Resolved public", publicId, resolved);
-      }
-    } else {
-      catalogManager.debug.message(2, "Resolved system", systemId, resolved);
-    }
-
-    return resolved;
-  }
-
-  /**
-   * Implements the <code>resolveEntity</code> method
-   * for the SAX interface.
-   *
-   * <p>Presented with an optional public identifier and a system
-   * identifier, this function attempts to locate a mapping in the
-   * catalogs.</p>
-   *
-   * <p>If such a mapping is found, the resolver attempts to open
-   * the mapped value as an InputSource and return it. Exceptions are
-   * ignored and null is returned if the mapped value cannot be opened
-   * as an input source.</p>
-   *
-   * <p>If no mapping is found (or an error occurs attempting to open
-   * the mapped value as an input source), null is returned and the system
-   * will use the specified system identifier as if no entityResolver
-   * was specified.</p>
-   *
-   * @param publicId  The public identifier for the entity in question.
-   * This may be null.
-   *
-   * @param systemId  The system identifier for the entity in question.
-   * XML requires a system identifier on all external entities, so this
-   * value is always specified.
-   *
-   * @return An InputSource for the mapped identifier, or null.
-   */
-  public InputSource resolveEntity (String publicId, String systemId) {
-    String resolved = getResolvedEntity(publicId, systemId);
-
-    if (resolved != null) {
-      try {
-        InputSource iSource = new InputSource(resolved);
-        iSource.setPublicId(publicId);
-
-        // Ideally this method would not attempt to open the
-        // InputStream, but there is a bug (in Xerces, at least)
-        // that causes the parser to mistakenly open the wrong
-        // system identifier if the returned InputSource does
-        // not have a byteStream.
-        //
-        // It could be argued that we still shouldn't do this here,
-        // but since the purpose of calling the entityResolver is
-        // almost certainly to open the input stream, it seems to
-        // do little harm.
-        //
-        URL url = new URL(resolved);
-        InputStream iStream = url.openStream();
-        iSource.setByteStream(iStream);
-
-        return iSource;
-      } catch (Exception e) {
-        catalogManager.debug.message(1,
-                                     "Failed to create InputSource ("
-                                     + e.toString()
-                                     + ")", resolved);
-        return null;
-      }
-    }
-
-    return null;
-  }
-
-  /** JAXP URIResolver API */
-  public Source resolve(String href, String base)
-    throws TransformerException {
-
-    String uri = href;
-    String fragment = null;
-    int hashPos = href.indexOf("#");
-    if (hashPos >= 0) {
-      uri = href.substring(0, hashPos);
-      fragment = href.substring(hashPos+1);
-    }
-
-    String result = null;
-
-    try {
-      result = catalog.resolveURI(href);
-    } catch (Exception e) {
-      // nop;
-    }
-
-    if (result == null) {
-      try {
-        URL url = null;
-
-        if (base==null) {
-          url = new URL(uri);
-          result = url.toString();
-        } else {
-          URL baseURL = new URL(base);
-          url = (href.length()==0 ? baseURL : new URL(baseURL, uri));
-          result = url.toString();
-        }
-      } catch (java.net.MalformedURLException mue) {
-        // try to make an absolute URI from the current base
-        String absBase = makeAbsolute(base);
-        if (!absBase.equals(base)) {
-          // don't bother if the absBase isn't different!
-          return resolve(href, absBase);
-        } else {
-          throw new TransformerException("Malformed URL "
-                                         + href + "(base " + base + ")",
-                                         mue);
-        }
-      }
-    }
-
-    catalogManager.debug.message(2, "Resolved URI", href, result);
-
-    SAXSource source = new SAXSource();
-    source.setInputSource(new InputSource(result));
-    setEntityResolver(source);
-    return source;
-  }
-
-  /**
-   * <p>Establish an entityResolver for newly resolved URIs.</p>
-   *
-   * <p>This is called from the URIResolver to set an EntityResolver
-   * on the SAX parser to be used for new XML documents that are
-   * encountered as a result of the document() function, xsl:import,
-   * or xsl:include.  This is done because the XSLT processor calls
-   * out to the SAXParserFactory itself to create a new SAXParser to
-   * parse the new document.  The new parser does not automatically
-   * inherit the EntityResolver of the original (although arguably
-   * it should).  See below:</p>
-   *
-   * <tt>"If an application wants to set the ErrorHandler or
-   * EntityResolver for an XMLReader used during a transformation,
-   * it should use a URIResolver to return the SAXSource which
-   * provides (with getXMLReader) a reference to the XMLReader"</tt>
-   *
-   * <p>...quoted from page 118 of the Java API for XML
-   * Processing 1.1 specification</p>
-   *
-   */
-  private void setEntityResolver(SAXSource source) throws TransformerException {
-    XMLReader reader = source.getXMLReader();
-    if (reader == null) {
-      SAXParserFactory spFactory = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-      spFactory.setNamespaceAware(true);
-      try {
-        reader = spFactory.newSAXParser().getXMLReader();
-      }
-      catch (ParserConfigurationException ex) {
-        throw new TransformerException(ex);
-      }
-      catch (SAXException ex) {
-        throw new TransformerException(ex);
-      }
-    }
-    reader.setEntityResolver(this);
-    source.setXMLReader(reader);
-  }
-
-  /** Attempt to construct an absolute URI */
-  private String makeAbsolute(String uri) {
-    if (uri == null) {
-      uri = "";
-    }
-
-    try {
-      URL url = new URL(uri);
-      return url.toString();
-    } catch (MalformedURLException mue) {
-      try {
-        URL fileURL = FileURL.makeURL(uri);
-        return fileURL.toString();
-      } catch (MalformedURLException mue2) {
-        // bail
-        return uri;
-      }
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,434 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.tools;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.util.Locale;
-
-import org.xml.sax.Parser;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.DTDHandler;
-import org.xml.sax.DocumentHandler;
-import org.xml.sax.AttributeList;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.SAXParser;
-
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.helpers.FileURL;
-
-/**
- * A SAX Parser that performs catalog-based entity resolution.
- *
- * <p>This class implements a SAX Parser that performs entity resolution
- * using the CatalogResolver. The actual, underlying parser is obtained
- * from a SAXParserFactory.</p>
- * </p>
- *
- * @deprecated This interface has been replaced by the
- *             {@link com.sun.org.apache.xml.internal.resolver.tools.ResolvingXMLReader} for SAX2.
- * @see CatalogResolver
- * @see org.xml.sax.Parser
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-public class ResolvingParser
-  implements Parser, DTDHandler, DocumentHandler, EntityResolver {
-
-  /** Suppress explanatory message?
-   *
-   * @see #parse(InputSource)
-   */
-  private static final boolean suppressExplanation = false;
-
-  /** The underlying parser. */
-  private SAXParser saxParser = null;
-
-  /** The underlying reader. */
-  private Parser parser = null;
-
-  /** The underlying DocumentHandler. */
-  private DocumentHandler documentHandler = null;
-
-  /** The underlying DTDHandler. */
-  private DTDHandler dtdHandler = null;
-
-  /** The manager for the underlying resolver. */
-  private CatalogManager catalogManager = CatalogManager.getStaticManager();
-
-  /** The underlying catalog resolver. */
-  private CatalogResolver catalogResolver = null;
-
-  /** A separate resolver for oasis-xml-pi catalogs. */
-  private CatalogResolver piCatalogResolver = null;
-
-  /** Are we in the prolog? Is an oasis-xml-catalog PI valid now? */
-  private boolean allowXMLCatalogPI = false;
-
-  /** The base URI of the input document, if known. */
-  private URL baseURL = null;
-
-  /** Constructor. */
-  public ResolvingParser() {
-    initParser();
-  }
-
-  /** Constructor. */
-  public ResolvingParser(CatalogManager manager) {
-    catalogManager = manager;
-    initParser();
-  }
-
-  /** Initialize the parser. */
-  private void initParser() {
-    catalogResolver = new CatalogResolver(catalogManager);
-    SAXParserFactory spf = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-    spf.setNamespaceAware(true);
-    spf.setValidating(false);
-
-    try {
-      saxParser = spf.newSAXParser();
-      parser = saxParser.getParser();
-      documentHandler = null;
-      dtdHandler = null;
-    } catch (Exception ex) {
-      ex.printStackTrace();
-    }
-  }
-
-  /** Return the Catalog being used. */
-  public Catalog getCatalog() {
-    return catalogResolver.getCatalog();
-  }
-
-  /**
-   * SAX Parser API.
-   *
-   * <p>Note that the JAXP 1.1ea2 parser crashes with an InternalError if
-   * it encounters a system identifier that appears to be a relative URI
-   * that begins with a slash. For example, the declaration:</p>
-   *
-   * <pre>
-   * &lt;!DOCTYPE book SYSTEM "/path/to/dtd/on/my/system/docbookx.dtd">
-   * </pre>
-   *
-   * <p>would cause such an error. As a convenience, this method catches
-   * that error and prints an explanation. (Unfortunately, it's not possible
-   * to identify the particular system identifier that causes the problem.)
-   * </p>
-   *
-   * <p>The underlying error is forwarded after printing the explanatory
-   * message. The message is only every printed once and if
-   * <code>suppressExplanation</code> is set to <code>false</code> before
-   * parsing, it will never be printed.</p>
-   */
-  public void parse(InputSource input)
-    throws IOException,
-           SAXException {
-    setupParse(input.getSystemId());
-    try {
-      parser.parse(input);
-    } catch (InternalError ie) {
-      explain(input.getSystemId());
-      throw ie;
-    }
-  }
-
-  /** SAX Parser API.
-   *
-   * @see #parse(InputSource)
-   */
-  public void parse(String systemId)
-    throws IOException,
-           SAXException {
-    setupParse(systemId);
-    try {
-      parser.parse(systemId);
-    } catch (InternalError ie) {
-      explain(systemId);
-      throw ie;
-    }
-  }
-
-  /** SAX Parser API. */
-  public void setDocumentHandler(DocumentHandler handler) {
-    documentHandler = handler;
-  }
-
-  /** SAX Parser API. */
-  public void setDTDHandler(DTDHandler handler) {
-    dtdHandler = handler;
-  }
-
-  /**
-   * SAX Parser API.
-   *
-   * <p>The purpose of this class is to implement an entity resolver.
-   * Attempting to set a different one is pointless (and ignored).</p>
-   */
-  public void setEntityResolver(EntityResolver resolver) {
-    // nop
-  }
-
-  /** SAX Parser API. */
-  public void setErrorHandler(ErrorHandler handler) {
-    parser.setErrorHandler(handler);
-  }
-
-  /** SAX Parser API. */
-  public void setLocale(Locale locale) throws SAXException {
-    parser.setLocale(locale);
-  }
-
-  /** SAX DocumentHandler API. */
-  public void characters(char[] ch, int start, int length)
-    throws SAXException {
-    if (documentHandler != null) {
-      documentHandler.characters(ch,start,length);
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void endDocument() throws SAXException {
-    if (documentHandler != null) {
-      documentHandler.endDocument();
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void endElement(String name) throws SAXException {
-    if (documentHandler != null) {
-      documentHandler.endElement(name);
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void ignorableWhitespace(char[] ch, int start, int length)
-    throws SAXException {
-    if (documentHandler != null) {
-      documentHandler.ignorableWhitespace(ch,start,length);
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void processingInstruction(String target, String pidata)
-    throws SAXException {
-
-    if (target.equals("oasis-xml-catalog")) {
-      URL catalog = null;
-      String data = pidata;
-
-      int pos = data.indexOf("catalog=");
-      if (pos >= 0) {
-        data = data.substring(pos+8);
-        if (data.length() > 1) {
-          String quote = data.substring(0,1);
-          data = data.substring(1);
-          pos = data.indexOf(quote);
-          if (pos >= 0) {
-            data = data.substring(0, pos);
-            try {
-              if (baseURL != null) {
-                catalog = new URL(baseURL, data);
-              } else {
-                catalog = new URL(data);
-              }
-            } catch (MalformedURLException mue) {
-              // nevermind
-            }
-          }
-        }
-      }
-
-      if (allowXMLCatalogPI) {
-        if (catalogManager.getAllowOasisXMLCatalogPI()) {
-          catalogManager.debug.message(4,"oasis-xml-catalog PI", pidata);
-
-          if (catalog != null) {
-            try {
-              catalogManager.debug.message(4,"oasis-xml-catalog", catalog.toString());
-
-              if (piCatalogResolver == null) {
-                piCatalogResolver = new CatalogResolver(true);
-              }
-
-              piCatalogResolver.getCatalog().parseCatalog(catalog.toString());
-            } catch (Exception e) {
-              catalogManager.debug.message(3, "Exception parsing oasis-xml-catalog: "
-                            + catalog.toString());
-            }
-          } else {
-            catalogManager.debug.message(3, "PI oasis-xml-catalog unparseable: " + pidata);
-          }
-        } else {
-          catalogManager.debug.message(4,"PI oasis-xml-catalog ignored: " + pidata);
-        }
-      } else {
-        catalogManager.debug.message(3, "PI oasis-xml-catalog occurred in an invalid place: "
-                      + pidata);
-      }
-    } else {
-      if (documentHandler != null) {
-        documentHandler.processingInstruction(target, pidata);
-      }
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void setDocumentLocator(Locator locator) {
-    if (documentHandler != null) {
-      documentHandler.setDocumentLocator(locator);
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void startDocument() throws SAXException {
-    if (documentHandler != null) {
-      documentHandler.startDocument();
-    }
-  }
-
-  /** SAX DocumentHandler API. */
-  public void startElement(String name, AttributeList atts)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    if (documentHandler != null) {
-      documentHandler.startElement(name,atts);
-    }
-  }
-
-  /** SAX DTDHandler API. */
-  public void notationDecl (String name, String publicId, String systemId)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    if (dtdHandler != null) {
-      dtdHandler.notationDecl(name,publicId,systemId);
-    }
-  }
-
-  /** SAX DTDHandler API. */
-  public void unparsedEntityDecl (String name,
-                                  String publicId,
-                                  String systemId,
-                                  String notationName)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    if (dtdHandler != null) {
-      dtdHandler.unparsedEntityDecl (name, publicId, systemId, notationName);
-    }
-  }
-
-  /**
-   * Implements the <code>resolveEntity</code> method
-   * for the SAX interface, using an underlying CatalogResolver
-   * to do the real work.
-   */
-  public InputSource resolveEntity (String publicId, String systemId) {
-    allowXMLCatalogPI = false;
-    String resolved = catalogResolver.getResolvedEntity(publicId, systemId);
-
-    if (resolved == null && piCatalogResolver != null) {
-      resolved = piCatalogResolver.getResolvedEntity(publicId, systemId);
-    }
-
-    if (resolved != null) {
-      try {
-        InputSource iSource = new InputSource(resolved);
-        iSource.setPublicId(publicId);
-
-        // Ideally this method would not attempt to open the
-        // InputStream, but there is a bug (in Xerces, at least)
-        // that causes the parser to mistakenly open the wrong
-        // system identifier if the returned InputSource does
-        // not have a byteStream.
-        //
-        // It could be argued that we still shouldn't do this here,
-        // but since the purpose of calling the entityResolver is
-        // almost certainly to open the input stream, it seems to
-        // do little harm.
-        //
-        URL url = new URL(resolved);
-        InputStream iStream = url.openStream();
-        iSource.setByteStream(iStream);
-
-        return iSource;
-      } catch (Exception e) {
-        catalogManager.debug.message(1,
-                                     "Failed to create InputSource ("
-                                     + e.toString()
-                                     + ")", resolved);
-        return null;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  /** Setup for parsing. */
-  private void setupParse(String systemId) {
-    allowXMLCatalogPI = true;
-    parser.setEntityResolver(this);
-    parser.setDocumentHandler(this);
-    parser.setDTDHandler(this);
-
-    URL cwd = null;
-
-    try {
-      cwd = FileURL.makeURL("basename");
-    } catch (MalformedURLException mue) {
-      cwd = null;
-    }
-
-    try {
-      baseURL = new URL(systemId);
-    } catch (MalformedURLException mue) {
-      if (cwd != null) {
-        try {
-          baseURL = new URL(cwd, systemId);
-        } catch (MalformedURLException mue2) {
-          // give up
-          baseURL = null;
-        }
-      } else {
-        // give up
-        baseURL = null;
-      }
-    }
-  }
-
-  /** Provide one possible explanation for an InternalError. */
-  private void explain(String systemId) {
-    if (!suppressExplanation) {
-      System.out.println("Parser probably encountered bad URI in " + systemId);
-      System.out.println("For example, replace '/some/uri' with 'file:/some/uri'.");
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,346 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.tools;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.XMLFilterImpl;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-
-import com.sun.org.apache.xml.internal.resolver.helpers.FileURL;
-
-/**
- * A SAX XMLFilter that performs catalog-based entity resolution.
- *
- * <p>This class implements a SAX XMLFilter that performs entity resolution
- * using the CatalogResolver. The actual, underlying parser is obtained
- * from a SAXParserFactory.</p>
- * </p>
- *
- * @see CatalogResolver
- * @see org.xml.sax.XMLFilter
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-public class ResolvingXMLFilter extends XMLFilterImpl {
-  /**
-   * Suppress explanatory message?
-   *
-   * @see #parse(InputSource)
-   */
-  private static boolean suppressExplanation = false;
-
-  /** The manager for the underlying resolver. */
-  CatalogManager catalogManager = CatalogManager.getStaticManager();
-
-  /** The underlying catalog resolver. */
-  private CatalogResolver catalogResolver = null;
-
-  /** A separate resolver for oasis-xml-pi catalogs. */
-  private CatalogResolver piCatalogResolver = null;
-
-  /** Are we in the prolog? Is an oasis-xml-catalog PI valid now? */
-  private boolean allowXMLCatalogPI = false;
-
-  /** The base URI of the input document, if known. */
-  private URL baseURL = null;
-
-  /** Construct an empty XML Filter with no parent. */
-  public ResolvingXMLFilter() {
-    super();
-    catalogResolver = new CatalogResolver(catalogManager);
-  }
-
-  /** Construct an XML filter with the specified parent. */
-  public ResolvingXMLFilter(XMLReader parent) {
-    super(parent);
-    catalogResolver = new CatalogResolver(catalogManager);
-  }
-
-  /** Construct an XML filter with the specified parent. */
-  public ResolvingXMLFilter(CatalogManager manager) {
-    super();
-    catalogManager = manager;
-    catalogResolver = new CatalogResolver(catalogManager);
-  }
-
-  /** Construct an XML filter with the specified parent. */
-  public ResolvingXMLFilter(XMLReader parent, CatalogManager manager) {
-    super(parent);
-    catalogManager = manager;
-    catalogResolver = new CatalogResolver(catalogManager);
-  }
-
-  /**
-   * Provide accessto the underlying Catalog.
-   */
-  public Catalog getCatalog() {
-    return catalogResolver.getCatalog();
-  }
-
-  /**
-   * SAX XMLReader API.
-   *
-   * <p>Note that the JAXP 1.1ea2 parser crashes with an InternalError if
-   * it encounters a system identifier that appears to be a relative URI
-   * that begins with a slash. For example, the declaration:</p>
-   *
-   * <pre>
-   * &lt;!DOCTYPE book SYSTEM "/path/to/dtd/on/my/system/docbookx.dtd">
-   * </pre>
-   *
-   * <p>would cause such an error. As a convenience, this method catches
-   * that error and prints an explanation. (Unfortunately, it's not possible
-   * to identify the particular system identifier that causes the problem.)
-   * </p>
-   *
-   * <p>The underlying error is forwarded after printing the explanatory
-   * message. The message is only every printed once and if
-   * <code>suppressExplanation</code> is set to <code>false</code> before
-   * parsing, it will never be printed.</p>
-   */
-  public void parse(InputSource input)
-    throws IOException, SAXException {
-    allowXMLCatalogPI = true;
-
-    setupBaseURI(input.getSystemId());
-
-    try {
-      super.parse(input);
-    } catch (InternalError ie) {
-      explain(input.getSystemId());
-      throw ie;
-    }
-  }
-
-  /** SAX XMLReader API.
-   *
-   * @see #parse(InputSource)
-   */
-  public void parse(String systemId)
-    throws IOException, SAXException {
-    allowXMLCatalogPI = true;
-
-    setupBaseURI(systemId);
-
-    try {
-      super.parse(systemId);
-    } catch (InternalError ie) {
-      explain(systemId);
-      throw ie;
-    }
-  }
-
-  /**
-   * Implements the <code>resolveEntity</code> method
-   * for the SAX interface, using an underlying CatalogResolver
-   * to do the real work.
-   */
-  public InputSource resolveEntity (String publicId, String systemId) {
-    allowXMLCatalogPI = false;
-    String resolved = catalogResolver.getResolvedEntity(publicId, systemId);
-
-    if (resolved == null && piCatalogResolver != null) {
-      resolved = piCatalogResolver.getResolvedEntity(publicId, systemId);
-    }
-
-    if (resolved != null) {
-      try {
-        InputSource iSource = new InputSource(resolved);
-        iSource.setPublicId(publicId);
-
-        // Ideally this method would not attempt to open the
-        // InputStream, but there is a bug (in Xerces, at least)
-        // that causes the parser to mistakenly open the wrong
-        // system identifier if the returned InputSource does
-        // not have a byteStream.
-        //
-        // It could be argued that we still shouldn't do this here,
-        // but since the purpose of calling the entityResolver is
-        // almost certainly to open the input stream, it seems to
-        // do little harm.
-        //
-        URL url = new URL(resolved);
-        InputStream iStream = url.openStream();
-        iSource.setByteStream(iStream);
-
-        return iSource;
-      } catch (Exception e) {
-        catalogManager.debug.message(1,
-                                     "Failed to create InputSource ("
-                                     + e.toString()
-                                     + ")", resolved);
-        return null;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  /** SAX DTDHandler API.
-   *
-   * <p>Captured here only to detect the end of the prolog so that
-   * we can ignore subsequent oasis-xml-catalog PIs. Otherwise
-   * the events are just passed through.</p>
-   */
-  public void notationDecl (String name, String publicId, String systemId)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    super.notationDecl(name,publicId,systemId);
-  }
-
-  /** SAX DTDHandler API.
-   *
-   * <p>Captured here only to detect the end of the prolog so that
-   * we can ignore subsequent oasis-xml-catalog PIs. Otherwise
-   * the events are just passed through.</p>
-   */
-  public void unparsedEntityDecl (String name,
-                                  String publicId,
-                                  String systemId,
-                                  String notationName)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    super.unparsedEntityDecl (name, publicId, systemId, notationName);
-  }
-
-  /** SAX ContentHandler API.
-   *
-   * <p>Captured here only to detect the end of the prolog so that
-   * we can ignore subsequent oasis-xml-catalog PIs. Otherwise
-   * the events are just passed through.</p>
-   */
-  public void startElement (String uri, String localName, String qName,
-                            Attributes atts)
-    throws SAXException {
-    allowXMLCatalogPI = false;
-    super.startElement(uri,localName,qName,atts);
-  }
-
-  /** SAX ContentHandler API.
-   *
-   * <p>Detect and use the oasis-xml-catalog PI if it occurs.</p>
-   */
-  public void processingInstruction(String target, String pidata)
-    throws SAXException {
-    if (target.equals("oasis-xml-catalog")) {
-      URL catalog = null;
-      String data = pidata;
-
-      int pos = data.indexOf("catalog=");
-      if (pos >= 0) {
-        data = data.substring(pos+8);
-        if (data.length() > 1) {
-          String quote = data.substring(0,1);
-          data = data.substring(1);
-          pos = data.indexOf(quote);
-          if (pos >= 0) {
-            data = data.substring(0, pos);
-            try {
-              if (baseURL != null) {
-                catalog = new URL(baseURL, data);
-              } else {
-                catalog = new URL(data);
-              }
-            } catch (MalformedURLException mue) {
-              // nevermind
-            }
-          }
-        }
-      }
-
-      if (allowXMLCatalogPI) {
-        if (catalogManager.getAllowOasisXMLCatalogPI()) {
-          catalogManager.debug.message(4,"oasis-xml-catalog PI", pidata);
-
-          if (catalog != null) {
-            try {
-              catalogManager.debug.message(4,"oasis-xml-catalog", catalog.toString());
-
-              if (piCatalogResolver == null) {
-                piCatalogResolver = new CatalogResolver(true);
-              }
-
-              piCatalogResolver.getCatalog().parseCatalog(catalog.toString());
-            } catch (Exception e) {
-              catalogManager.debug.message(3, "Exception parsing oasis-xml-catalog: "
-                            + catalog.toString());
-            }
-          } else {
-            catalogManager.debug.message(3, "PI oasis-xml-catalog unparseable: " + pidata);
-          }
-        } else {
-          catalogManager.debug.message(4,"PI oasis-xml-catalog ignored: " + pidata);
-        }
-      } else {
-        catalogManager.debug.message(3, "PI oasis-xml-catalog occurred in an invalid place: "
-                      + pidata);
-      }
-    } else {
-      super.processingInstruction(target, pidata);
-    }
-  }
-
-  /** Save the base URI of the document being parsed. */
-  private void setupBaseURI(String systemId) {
-    URL cwd = null;
-
-    try {
-      cwd = FileURL.makeURL("basename");
-    } catch (MalformedURLException mue) {
-      cwd = null;
-    }
-
-    try {
-      baseURL = new URL(systemId);
-    } catch (MalformedURLException mue) {
-      if (cwd != null) {
-        try {
-          baseURL = new URL(cwd, systemId);
-        } catch (MalformedURLException mue2) {
-          // give up
-          baseURL = null;
-        }
-      } else {
-        // give up
-        baseURL = null;
-      }
-    }
-  }
-
-  /** Provide one possible explanation for an InternalError. */
-  private void explain(String systemId) {
-    if (!suppressExplanation) {
-      System.out.println("XMLReader probably encountered bad URI in " + systemId);
-      System.out.println("For example, replace '/some/uri' with 'file:/some/uri'.");
-    }
-    suppressExplanation = true;
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.resolver.tools;
-
-
-import javax.xml.parsers.*;
-
-import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
-import com.sun.org.apache.xml.internal.resolver.*;
-
-/**
- * A SAX XMLReader that performs catalog-based entity resolution.
- *
- * <p>This class implements a SAX XMLReader that performs entity resolution
- * using the CatalogResolver. The actual, underlying parser is obtained
- * from a SAXParserFactory.</p>
- * </p>
- *
- * @see CatalogResolver
- * @see org.xml.sax.XMLReader
- *
- * @author Norman Walsh
- * <a href="mailto:Norman.Walsh@Sun.COM">Norman.Walsh@Sun.COM</a>
- *
- * @version 1.0
- */
-public class ResolvingXMLReader extends ResolvingXMLFilter {
-  /** Make the parser Namespace aware? */
-  private static final boolean namespaceAware = true;
-
-  /** Make the parser validating? */
-  private static final boolean validating = false;
-
-  /**
-   * Construct a new reader from the JAXP factory.
-   *
-   * <p>In order to do its job, a ResolvingXMLReader must in fact be
-   * a filter. So the only difference between this code and the filter
-   * code is that the constructor builds a new reader.</p>
-   */
-  public ResolvingXMLReader() {
-    super();
-    SAXParserFactory spf = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-    spf.setNamespaceAware(namespaceAware);
-    spf.setValidating(validating);
-    try {
-      SAXParser parser = spf.newSAXParser();
-      setParent(parser.getXMLReader());
-    } catch (Exception ex) {
-      ex.printStackTrace();
-    }
-  }
-
-  /**
-   * Construct a new reader from the JAXP factory.
-   *
-   * <p>In order to do its job, a ResolvingXMLReader must in fact be
-   * a filter. So the only difference between this code and the filter
-   * code is that the constructor builds a new reader.</p>
-   */
-  public ResolvingXMLReader(CatalogManager manager) {
-    super(manager);
-    SAXParserFactory spf = catalogManager.useServicesMechanism() ?
-                    SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
-    spf.setNamespaceAware(namespaceAware);
-    spf.setValidating(validating);
-    try {
-      SAXParser parser = spf.newSAXParser();
-      setParent(parser.getXMLReader());
-    } catch (Exception ex) {
-      ex.printStackTrace();
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -128,6 +128,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public abstract class BaseMarkupSerializer
     implements ContentHandler, DocumentHandler, LexicalHandler,
                DTDHandler, DeclHandler, DOMSerializer, Serializer
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,6 +41,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public interface DOMSerializer
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -76,6 +75,7 @@
  * @deprecated As of JDK 9, Xerces 2.9.0, replaced by
  * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}
  */
+@Deprecated
 public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {
 
     // TODO: When DOM Level 3 goes to REC replace method calls using
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/ElementState.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/ElementState.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,6 +36,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class ElementState
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,6 +36,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class EncodingInfo {
 
     // name of encoding as registered with IANA;
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,6 +42,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 class Encodings
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/HTMLSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/HTMLSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -92,6 +92,7 @@
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see Serializer
  */
+@Deprecated
 public class HTMLSerializer
     extends BaseMarkupSerializer
 {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/HTMLdtd.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -51,6 +51,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public final class HTMLdtd
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/IndentPrinter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,6 +38,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class IndentPrinter
     extends Printer
 {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/LineSeparator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,6 +31,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public final class LineSeparator
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Method.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Method.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -32,6 +31,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public final class Method
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/OutputFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -65,6 +64,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class OutputFormat
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Printer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Printer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -47,6 +46,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class Printer
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Serializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Serializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -67,6 +66,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public interface Serializer
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -42,6 +42,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public abstract class SerializerFactory
 {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactoryImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -41,6 +40,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 final class SerializerFactoryImpl
     extends SerializerFactory
 {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/TextSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -65,6 +64,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class TextSerializer
     extends BaseMarkupSerializer
 {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XHTMLSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -39,6 +38,7 @@
  * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
  * @see Serializer
  */
+@Deprecated
 public class XHTMLSerializer
     extends HTMLSerializer
 {
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XML11Serializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -84,6 +83,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class XML11Serializer
 extends XMLSerializer {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -95,6 +94,7 @@
  * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
  * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
  */
+@Deprecated
 public class XMLSerializer
 extends BaseMarkupSerializer {
 
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TreeWalker.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/TreeWalker.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,13 +17,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package com.sun.org.apache.xml.internal.serializer;
 
-import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
-import java.io.File;
-
-import com.sun.org.apache.xml.internal.serializer.utils.AttList;
-import com.sun.org.apache.xml.internal.serializer.utils.DOM2Helper;
+import com.sun.org.apache.xml.internal.utils.AttList;
+import com.sun.org.apache.xml.internal.utils.DOM2Helper;
+import javax.xml.transform.Result;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Element;
 import org.w3c.dom.EntityReference;
@@ -31,7 +30,6 @@
 import org.w3c.dom.Node;
 import org.w3c.dom.ProcessingInstruction;
 import org.w3c.dom.Text;
-
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.ext.LexicalHandler;
@@ -58,12 +56,6 @@
    */
   final private SerializationHandler m_Serializer;
 
-  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
-  // DOM2Helper m_dh = new DOM2Helper();
-
-  /** DomHelper for this TreeWalker          */
-  final protected DOM2Helper m_dh;
-
   /** Locator object for this TreeWalker          */
   final private LocatorImpl m_locator = new LocatorImpl();
 
@@ -78,7 +70,7 @@
   }
 
   public TreeWalker(ContentHandler ch) {
-      this(ch,null);
+      this(ch, null);
   }
   /**
    * Constructor.
@@ -99,8 +91,6 @@
       if (systemId != null) {
           m_locator.setSystemId(systemId);
       }
-
-      m_dh = new DOM2Helper();
   }
 
   /**
@@ -209,7 +199,7 @@
     this.m_contentHandler.endDocument();
   }
 
-  /** Flag indicating whether following text to be processed is raw text          */
+  // Flag indicating whether following text to be processed is raw text
   boolean nextIsRaw = false;
 
   /**
@@ -313,7 +303,6 @@
         final int colon = attrName.indexOf(':');
         final String prefix;
 
-        // System.out.println("TreeWalker#startNode: attr["+i+"] = "+attrName+", "+attr.getNodeValue());
         if (attrName.equals("xmlns") || attrName.startsWith("xmlns:"))
         {
           // Use "" instead of null, as Xerces likes "" for the
@@ -335,13 +324,13 @@
         }
       }
 
-      String ns = m_dh.getNamespaceOfNode(node);
+      String ns = DOM2Helper.getNamespaceOfNode(node);
       if(null == ns)
         ns = "";
       this.m_contentHandler.startElement(ns,
-                                         m_dh.getLocalNameOfNode(node),
+                                         DOM2Helper.getLocalNameOfNode(node),
                                          node.getNodeName(),
-                                         new AttList(atts, m_dh));
+                                         new AttList(atts));
       break;
     case Node.PROCESSING_INSTRUCTION_NODE :
     {
@@ -389,9 +378,9 @@
       {
         nextIsRaw = false;
 
-        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
+        m_contentHandler.processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "");
         dispatachChars(node);
-        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
+        m_contentHandler.processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, "");
       }
       else
       {
@@ -436,12 +425,12 @@
       break;
 
     case Node.ELEMENT_NODE :
-      String ns = m_dh.getNamespaceOfNode(node);
+      String ns = DOM2Helper.getNamespaceOfNode(node);
       if(null == ns)
         ns = "";
       this.m_contentHandler.endElement(ns,
-                                         m_dh.getLocalNameOfNode(node),
-                                         node.getNodeName());
+              DOM2Helper.getLocalNameOfNode(node),
+              node.getNodeName());
 
       if (m_Serializer == null) {
       // Don't bother with endPrefixMapping calls if the ContentHandler is a
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/AttList.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.serializer.utils;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import org.xml.sax.Attributes;
-
-/**
- * Wraps a DOM attribute list in a SAX Attributes.
- *
- * This class is a copy of the one in com.sun.org.apache.xml.internal.utils.
- * It exists to cut the serializers dependancy on that package.
- * A minor changes from that package are:
- * DOMHelper reference changed to DOM2Helper, class is not "public"
- *
- * This class is not a public API, it is only public because it is
- * used in com.sun.org.apache.xml.internal.serializer.
- *
- * @xsl.usage internal
- */
-public final class AttList implements Attributes
-{
-
-  /** List of attribute nodes          */
-  NamedNodeMap m_attrs;
-
-  /** Index of last attribute node          */
-  int m_lastIndex;
-
-  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
-  // DOM2Helper m_dh = new DOM2Helper();
-
-  /** Local reference to DOMHelper          */
-  DOM2Helper m_dh;
-
-//  /**
-//   * Constructor AttList
-//   *
-//   *
-//   * @param attrs List of attributes this will contain
-//   */
-//  public AttList(NamedNodeMap attrs)
-//  {
-//
-//    m_attrs = attrs;
-//    m_lastIndex = m_attrs.getLength() - 1;
-//    m_dh = new DOM2Helper();
-//  }
-
-  /**
-   * Constructor AttList
-   *
-   *
-   * @param attrs List of attributes this will contain
-   * @param dh DOMHelper
-   */
-  public AttList(NamedNodeMap attrs, DOM2Helper dh)
-  {
-
-    m_attrs = attrs;
-    m_lastIndex = m_attrs.getLength() - 1;
-    m_dh = dh;
-  }
-
-  /**
-   * Get the number of attribute nodes in the list
-   *
-   *
-   * @return number of attribute nodes
-   */
-  public int getLength()
-  {
-    return m_attrs.getLength();
-  }
-
-  /**
-   * Look up an attribute's Namespace URI by index.
-   *
-   * @param index The attribute index (zero-based).
-   * @return The Namespace URI, or the empty string if none
-   *         is available, or null if the index is out of
-   *         range.
-   */
-  public String getURI(int index)
-  {
-    String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index)));
-    if(null == ns)
-      ns = "";
-    return ns;
-  }
-
-  /**
-   * Look up an attribute's local name by index.
-   *
-   * @param index The attribute index (zero-based).
-   * @return The local name, or the empty string if Namespace
-   *         processing is not being performed, or null
-   *         if the index is out of range.
-   */
-  public String getLocalName(int index)
-  {
-    return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
-  }
-
-  /**
-   * Look up an attribute's qualified name by index.
-   *
-   *
-   * @param i The attribute index (zero-based).
-   *
-   * @return The attribute's qualified name
-   */
-  public String getQName(int i)
-  {
-    return ((Attr) m_attrs.item(i)).getName();
-  }
-
-  /**
-   * Get the attribute's node type by index
-   *
-   *
-   * @param i The attribute index (zero-based)
-   *
-   * @return the attribute's node type
-   */
-  public String getType(int i)
-  {
-    return "CDATA";  // for the moment
-  }
-
-  /**
-   * Get the attribute's node value by index
-   *
-   *
-   * @param i The attribute index (zero-based)
-   *
-   * @return the attribute's node value
-   */
-  public String getValue(int i)
-  {
-    return ((Attr) m_attrs.item(i)).getValue();
-  }
-
-  /**
-   * Get the attribute's node type by name
-   *
-   *
-   * @param name Attribute name
-   *
-   * @return the attribute's node type
-   */
-  public String getType(String name)
-  {
-    return "CDATA";  // for the moment
-  }
-
-  /**
-   * Look up an attribute's type by Namespace name.
-   *
-   * @param uri The Namespace URI, or the empty String if the
-   *        name has no Namespace URI.
-   * @param localName The local name of the attribute.
-   * @return The attribute type as a string, or null if the
-   *         attribute is not in the list or if Namespace
-   *         processing is not being performed.
-   */
-  public String getType(String uri, String localName)
-  {
-    return "CDATA";  // for the moment
-  }
-
-  /**
-   * Look up an attribute's value by name.
-   *
-   *
-   * @param name The attribute node's name
-   *
-   * @return The attribute node's value
-   */
-  public String getValue(String name)
-  {
-    Attr attr = ((Attr) m_attrs.getNamedItem(name));
-    return (null != attr)
-          ? attr.getValue() : null;
-  }
-
-  /**
-   * Look up an attribute's value by Namespace name.
-   *
-   * @param uri The Namespace URI, or the empty String if the
-   *        name has no Namespace URI.
-   * @param localName The local name of the attribute.
-   * @return The attribute value as a string, or null if the
-   *         attribute is not in the list.
-   */
-  public String getValue(String uri, String localName)
-  {
-        Node a=m_attrs.getNamedItemNS(uri,localName);
-        return (a==null) ? null : a.getNodeValue();
-  }
-
-  /**
-   * Look up the index of an attribute by Namespace name.
-   *
-   * @param uri The Namespace URI, or the empty string if
-   *        the name has no Namespace URI.
-   * @param localPart The attribute's local name.
-   * @return The index of the attribute, or -1 if it does not
-   *         appear in the list.
-   */
-  public int getIndex(String uri, String localPart)
-  {
-    for(int i=m_attrs.getLength()-1;i>=0;--i)
-    {
-      Node a=m_attrs.item(i);
-      String u=a.getNamespaceURI();
-      if( (u==null ? uri==null : u.equals(uri))
-      &&
-      a.getLocalName().equals(localPart) )
-    return i;
-    }
-    return -1;
-  }
-
-  /**
-   * Look up the index of an attribute by raw XML 1.0 name.
-   *
-   * @param qName The qualified (prefixed) name.
-   * @return The index of the attribute, or -1 if it does not
-   *         appear in the list.
-   */
-  public int getIndex(String qName)
-  {
-    for(int i=m_attrs.getLength()-1;i>=0;--i)
-    {
-      Node a=m_attrs.item(i);
-      if(a.getNodeName().equals(qName) )
-    return i;
-    }
-    return -1;
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/DOM2Helper.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.serializer.utils;
-
-import java.io.IOException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import org.xml.sax.InputSource;
-
-/**
- * This class provides a DOM level 2 "helper", which provides services currently
- * not provided be the DOM standard.
- *
- * This class is a copy of the one in com.sun.org.apache.xml.internal.utils.
- * It exists to cut the serializers dependancy on that package.
- *
- * The differences from the original class are:
- * it doesn't extend DOMHelper, not depricated,
- * dropped method isNodeAfter(Node node1, Node node2)
- * dropped method parse(InputSource)
- * dropped method supportSAX()
- * dropped method setDocument(doc)
- * dropped method checkNode(Node)
- * dropped method getDocument()
- * dropped method getElementByID(String id, Document doc)
- * dropped method getParentOfNode(Node node)
- * dropped field Document m_doc;
- * made class non-public
- *
- * This class is not a public API, it is only public because it is
- * used in com.sun.org.apache.xml.internal.serializer.
- *
- * @xsl.usage internal
- */
-public final class DOM2Helper
-{
-
-  /**
-   * Construct an instance.
-   */
-  public DOM2Helper(){}
-
-  /**
-   * Returns the local name of the given node, as defined by the
-   * XML Namespaces specification. This is prepared to handle documents
-   * built using DOM Level 1 methods by falling back upon explicitly
-   * parsing the node name.
-   *
-   * @param n Node to be examined
-   *
-   * @return String containing the local name, or null if the node
-   * was not assigned a Namespace.
-   */
-  public String getLocalNameOfNode(Node n)
-  {
-
-    String name = n.getLocalName();
-
-    return (null == name) ? getLocalNameOfNodeFallback(n) : name;
-  }
-
-  /**
-   * Returns the local name of the given node. If the node's name begins
-   * with a namespace prefix, this is the part after the colon; otherwise
-   * it's the full node name.
-   *
-   * This method is copied from com.sun.org.apache.xml.internal.utils.DOMHelper
-   *
-   * @param n the node to be examined.
-   *
-   * @return String containing the Local Name
-   */
-  private String getLocalNameOfNodeFallback(Node n)
-  {
-
-    String qname = n.getNodeName();
-    int index = qname.indexOf(':');
-
-    return (index < 0) ? qname : qname.substring(index + 1);
-  }
-
-  /**
-   * Returns the Namespace Name (Namespace URI) for the given node.
-   * In a Level 2 DOM, you can ask the node itself. Note, however, that
-   * doing so conflicts with our decision in getLocalNameOfNode not
-   * to trust the that the DOM was indeed created using the Level 2
-   * methods. If Level 1 methods were used, these two functions will
-   * disagree with each other.
-   * <p>
-   * TODO: Reconcile with getLocalNameOfNode.
-   *
-   * @param n Node to be examined
-   *
-   * @return String containing the Namespace URI bound to this DOM node
-   * at the time the Node was created.
-   */
-  public String getNamespaceOfNode(Node n)
-  {
-    return n.getNamespaceURI();
-  }
-
-  /** Field m_useDOM2getNamespaceURI is a compile-time flag which
-   *  gates some of the parser options used to build a DOM -- but
-   * that code is commented out at this time and nobody else
-   * references it, so I've commented this out as well. */
-  //private boolean m_useDOM2getNamespaceURI = false;
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/AttList.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -40,26 +39,9 @@
   /** Index of last attribute node          */
   int m_lastIndex;
 
-  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
+  // JAXP Uses Xerces without setting the namespace processing to ON!
   // DOM2Helper m_dh = new DOM2Helper();
 
-  /** Local reference to DOMHelper          */
-  DOMHelper m_dh;
-
-//  /**
-//   * Constructor AttList
-//   *
-//   *
-//   * @param attrs List of attributes this will contain
-//   */
-//  public AttList(NamedNodeMap attrs)
-//  {
-//
-//    m_attrs = attrs;
-//    m_lastIndex = m_attrs.getLength() - 1;
-//    m_dh = new DOM2Helper();
-//  }
-
   /**
    * Constructor AttList
    *
@@ -67,12 +49,10 @@
    * @param attrs List of attributes this will contain
    * @param dh DOMHelper
    */
-  public AttList(NamedNodeMap attrs, DOMHelper dh)
+  public AttList(NamedNodeMap attrs)
   {
-
     m_attrs = attrs;
     m_lastIndex = m_attrs.getLength() - 1;
-    m_dh = dh;
   }
 
   /**
@@ -96,7 +76,7 @@
    */
   public String getURI(int index)
   {
-    String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index)));
+    String ns = DOM2Helper.getNamespaceOfNode(((Attr) m_attrs.item(index)));
     if(null == ns)
       ns = "";
     return ns;
@@ -112,7 +92,7 @@
    */
   public String getLocalName(int index)
   {
-    return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index)));
+    return DOM2Helper.getLocalNameOfNode(((Attr) m_attrs.item(index)));
   }
 
   /**
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOM2Helper.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -18,298 +17,327 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.sun.org.apache.xml.internal.utils;
 
-import java.io.IOException;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-
+import com.sun.org.apache.xml.internal.dtm.ref.DTMNodeProxy;
 import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
-import org.xml.sax.InputSource;
 
 /**
- * @deprecated Since the introduction of the DTM, this class will be removed.
- * This class provides a DOM level 2 "helper", which provides services currently
- * not provided be the DOM standard.
+ * This class provides a DOM level 2 "helper", which provides several services.
+ *
+ * The original class extended DOMHelper that was deprecated and then removed.
  */
-public class DOM2Helper extends DOMHelper
-{
-
-  /**
-   * Construct an instance.
-   */
-  public DOM2Helper(){}
+public final class DOM2Helper {
 
-  /**
-   * Check node to see if it was created by a DOM implementation
-   * that this helper is intended to support. This is currently
-   * disabled, and assumes all nodes are acceptable rather than checking
-   * that they implement com.sun.org.apache.xerces.internal.dom.NodeImpl.
-   *
-   * @param node The node to be tested.
-   *
-   * @throws TransformerException if the node is not one which this
-   * DOM2Helper can support. If we return without throwing the exception,
-   * the node is compatable.
-   * @xsl.usage internal
-   */
-  public void checkNode(Node node) throws TransformerException
-  {
-
-    // if(!(node instanceof com.sun.org.apache.xerces.internal.dom.NodeImpl))
-    //  throw new TransformerException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_XERCES_CANNOT_HANDLE_NODES, new Object[]{((Object)node).getClass()})); //"DOM2Helper can not handle nodes of type"
-    //+((Object)node).getClass());
-  }
+    /**
+     * Construct an instance.
+     */
+    private DOM2Helper() {
+    }
 
-  /**
-   * Returns true if the DOM implementation handled by this helper
-   * supports the SAX ContentHandler interface.
-   *
-   * @return true (since Xerces does).
-   */
-  public boolean supportsSAX()
-  {
-    return true;
-  }
-
-  /** Field m_doc: Document Node for the document this helper is currently
-   * accessing or building
-   * @see #setDocument
-   * @see #getDocument
-   *  */
-  private Document m_doc;
+    /**
+     * Returns the local name of the given node, as defined by the XML
+     * Namespaces specification. This is prepared to handle documents built
+     * using DOM Level 1 methods by falling back upon explicitly parsing the
+     * node name.
+     *
+     * @param n Node to be examined
+     *
+     * @return String containing the local name, or null if the node was not
+     * assigned a Namespace.
+     */
+    public static String getLocalNameOfNode(Node n) {
 
-  /**
-   * Specify which document this helper is currently operating on.
-   *
-   * @param doc The DOM Document node for this document.
-   * @see #getDocument
-   */
-  public void setDocument(Document doc)
-  {
-    m_doc = doc;
-  }
+        String name = n.getLocalName();
 
-  /**
-   * Query which document this helper is currently operating on.
-   *
-   * @return The DOM Document node for this document.
-   * @see #setDocument
-   */
-  public Document getDocument()
-  {
-    return m_doc;
-  }
+        return (null == name) ? getLocalNameOfNodeFallback(n) : name;
+    }
 
-  /**
-   * Parse an XML document.
-   *
-   * <p>Right now the Xerces DOMParser class is used.  This needs
-   * fixing, either via jaxp, or via some other, standard method.</p>
-   *
-   * <p>The application can use this method to instruct the SAX parser
-   * to begin parsing an XML document from any valid input
-   * source (a character stream, a byte stream, or a URI).</p>
-   *
-   * <p>Applications may not invoke this method while a parse is in
-   * progress (they should create a new Parser instead for each
-   * additional XML document).  Once a parse is complete, an
-   * application may reuse the same Parser object, possibly with a
-   * different input source.</p>
-   *
-   * @param source The input source for the top-level of the
-   *        XML document.
-   *
-   * @throws TransformerException if any checked exception is thrown.
-   * @xsl.usage internal
-   */
-  public void parse(InputSource source) throws TransformerException
-  {
+    /**
+     * Returns the local name of the given node. If the node's name begins with
+     * a namespace prefix, this is the part after the colon; otherwise it's the
+     * full node name.
+     *
+     * This method is copied from
+     * com.sun.org.apache.xml.internal.utils.DOMHelper
+     *
+     * @param n the node to be examined.
+     *
+     * @return String containing the Local Name
+     */
+    private static String getLocalNameOfNodeFallback(Node n) {
 
-    try
-    {
-
-      // I guess I should use JAXP factory here... when it's legal.
-      // com.sun.org.apache.xerces.internal.parsers.DOMParser parser
-      //  = new com.sun.org.apache.xerces.internal.parsers.DOMParser();
-      DocumentBuilderFactory builderFactory =
-        DocumentBuilderFactory.newInstance();
-
-      builderFactory.setNamespaceAware(true);
-      builderFactory.setValidating(true);
+        String qname = n.getNodeName();
+        int index = qname.indexOf(':');
 
-      DocumentBuilder parser = builderFactory.newDocumentBuilder();
-
-      /*
-      // domParser.setFeature("http://apache.org/xml/features/dom/create-entity-ref-nodes", getShouldExpandEntityRefs()? false : true);
-      if(m_useDOM2getNamespaceURI)
-      {
-      parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", true);
-      parser.setFeature("http://xml.org/sax/features/namespaces", true);
-      }
-      else
-      {
-      parser.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
-      }
-
-      parser.setFeature("http://apache.org/xml/features/allow-java-encodings", true);
-      */
+        return (index < 0) ? qname : qname.substring(index + 1);
+    }
 
-      parser.setErrorHandler(
-        new com.sun.org.apache.xml.internal.utils.DefaultErrorHandler());
-
-      // if(null != m_entityResolver)
-      // {
-      // System.out.println("Setting the entity resolver.");
-      //  parser.setEntityResolver(m_entityResolver);
-      // }
-      setDocument(parser.parse(source));
-    }
-    catch (org.xml.sax.SAXException se)
-    {
-      throw new TransformerException(se);
-    }
-    catch (ParserConfigurationException pce)
-    {
-      throw new TransformerException(pce);
-    }
-    catch (IOException ioe)
-    {
-      throw new TransformerException(ioe);
+    /**
+     * Returns the Namespace Name (Namespace URI) for the given node. In a Level
+     * 2 DOM, you can ask the node itself. Note, however, that doing so
+     * conflicts with our decision in getLocalNameOfNode not to trust the that
+     * the DOM was indeed created using the Level 2 methods. If Level 1 methods
+     * were used, these two functions will disagree with each other.
+     * <p>
+     * TODO: Reconcile with getLocalNameOfNode.
+     *
+     * @param n Node to be examined
+     *
+     * @return String containing the Namespace URI bound to this DOM node at the
+     * time the Node was created.
+     */
+    public static String getNamespaceOfNode(Node n) {
+        return n.getNamespaceURI();
     }
 
-    // setDocument(((com.sun.org.apache.xerces.internal.parsers.DOMParser)parser).getDocument());
-  }
+    /**
+     * Figure out whether node2 should be considered as being later in the
+     * document than node1, in Document Order as defined by the XPath model.
+     * This may not agree with the ordering defined by other XML applications.
+     * <p>
+     * There are some cases where ordering isn't defined, and neither are the
+     * results of this function -- though we'll generally return true.
+     *
+     * @param node1 DOM Node to perform position comparison on.
+     * @param node2 DOM Node to perform position comparison on .
+     *
+     * @return false if node2 comes before node1, otherwise return true. You can
+     * think of this as
+     * {@code (node1.documentOrderPosition &lt;= node2.documentOrderPosition)}.
+     */
+    public static boolean isNodeAfter(Node node1, Node node2) {
+        if (node1 == node2 || isNodeTheSame(node1, node2)) {
+            return true;
+        }
+
+        // Default return value, if there is no defined ordering
+        boolean isNodeAfter = true;
+
+        Node parent1 = getParentOfNode(node1);
+        Node parent2 = getParentOfNode(node2);
 
-  /**
-   * Given an XML ID, return the element. This requires assistance from the
-   * DOM and parser, and is meaningful only in the context of a DTD
-   * or schema which declares attributes as being of type ID. This
-   * information may or may not be available in all parsers, may or
-   * may not be available for specific documents, and may or may not
-   * be available when validation is not turned on.
-   *
-   * @param id The ID to search for, as a String.
-   * @param doc The document to search within, as a DOM Document node.
-   * @return DOM Element node with an attribute of type ID whose value
-   * uniquely matches the requested id string, or null if there isn't
-   * such an element or if the DOM can't answer the question for other
-   * reasons.
-   */
-  public Element getElementByID(String id, Document doc)
-  {
-    return doc.getElementById(id);
-  }
+        // Optimize for most common case
+        if (parent1 == parent2 || isNodeTheSame(parent1, parent2)) // then we know they are siblings
+        {
+            if (null != parent1) {
+                isNodeAfter = isNodeAfterSibling(parent1, node1, node2);
+            }
+        } else {
+            // General strategy: Figure out the lengths of the two
+            // ancestor chains, reconcile the lengths, and look for
+            // the lowest common ancestor. If that ancestor is one of
+            // the nodes being compared, it comes before the other.
+            // Otherwise perform a sibling compare.
+            //
+            // NOTE: If no common ancestor is found, ordering is undefined
+            // and we return the default value of isNodeAfter.
+            // Count parents in each ancestor chain
+            int nParents1 = 2, nParents2 = 2;  // include node & parent obtained above
+
+            while (parent1 != null) {
+                nParents1++;
+
+                parent1 = getParentOfNode(parent1);
+            }
+
+            while (parent2 != null) {
+                nParents2++;
 
-  /**
-   * Figure out whether node2 should be considered as being later
-   * in the document than node1, in Document Order as defined
-   * by the XPath model. This may not agree with the ordering defined
-   * by other XML applications.
-   * <p>
-   * There are some cases where ordering isn't defined, and neither are
-   * the results of this function -- though we'll generally return true.
-   * <p>
-   * TODO: Make sure this does the right thing with attribute nodes!!!
-   *
-   * @param node1 DOM Node to perform position comparison on.
-   * @param node2 DOM Node to perform position comparison on .
-   *
-   * @return false if node2 comes before node1, otherwise return true.
-   * You can think of this as
-   * <code>(node1.documentOrderPosition &lt;= node2.documentOrderPosition)</code>.
-   */
-  public static boolean isNodeAfter(Node node1, Node node2)
-  {
+                parent2 = getParentOfNode(parent2);
+            }
+
+            // Initially assume scan for common ancestor starts with
+            // the input nodes.
+            Node startNode1 = node1, startNode2 = node2;
+
+            // If one ancestor chain is longer, adjust its start point
+            // so we're comparing at the same depths
+            if (nParents1 < nParents2) {
+                // Adjust startNode2 to depth of startNode1
+                int adjust = nParents2 - nParents1;
+
+                for (int i = 0; i < adjust; i++) {
+                    startNode2 = getParentOfNode(startNode2);
+                }
+            } else if (nParents1 > nParents2) {
+                // adjust startNode1 to depth of startNode2
+                int adjust = nParents1 - nParents2;
+
+                for (int i = 0; i < adjust; i++) {
+                    startNode1 = getParentOfNode(startNode1);
+                }
+            }
+
+            Node prevChild1 = null, prevChild2 = null;  // so we can "back up"
 
-    // Assume first that the nodes are DTM nodes, since discovering node
-    // order is massivly faster for the DTM.
-    if(node1 instanceof DOMOrder && node2 instanceof DOMOrder)
-    {
-      int index1 = ((DOMOrder) node1).getUid();
-      int index2 = ((DOMOrder) node2).getUid();
+            // Loop up the ancestor chain looking for common parent
+            while (null != startNode1) {
+                if (startNode1 == startNode2 || isNodeTheSame(startNode1, startNode2)) // common parent?
+                {
+                    if (null == prevChild1) // first time in loop?
+                    {
+
+                        // Edge condition: one is the ancestor of the other.
+                        isNodeAfter = (nParents1 < nParents2) ? true : false;
 
-      return index1 <= index2;
-    }
-    else
-    {
+                        break;  // from while loop
+                    } else {
+                        // Compare ancestors below lowest-common as siblings
+                        isNodeAfter = isNodeAfterSibling(startNode1, prevChild1,
+                                prevChild2);
+
+                        break;  // from while loop
+                    }
+                }  // end if(startNode1 == startNode2)
 
-      // isNodeAfter will return true if node is after countedNode
-      // in document order. The base isNodeAfter is sloooow (relatively).
-      return DOMHelper.isNodeAfter(node1, node2);
-    }
-  }
+                // Move up one level and try again
+                prevChild1 = startNode1;
+                startNode1 = getParentOfNode(startNode1);
+                prevChild2 = startNode2;
+                startNode2 = getParentOfNode(startNode2);
+            }  // end while(parents exist to examine)
+        }  // end big else (not immediate siblings)
+
+        return isNodeAfter;
+    }  // end isNodeAfter(Node node1, Node node2)
 
-  /**
-   * Get the XPath-model parent of a node.  This version takes advantage
-   * of the DOM Level 2 Attr.ownerElement() method; the base version we
-   * would otherwise inherit is prepared to fall back on exhaustively
-   * walking the document to find an Attr's parent.
-   *
-   * @param node Node to be examined
-   *
-   * @return the DOM parent of the input node, if there is one, or the
-   * ownerElement if the input node is an Attr, or null if the node is
-   * a Document, a DocumentFragment, or an orphan.
-   */
-  public static Node getParentOfNode(Node node)
-  {
-          Node parent=node.getParentNode();
-          if(parent==null && (Node.ATTRIBUTE_NODE == node.getNodeType()) )
-           parent=((Attr) node).getOwnerElement();
-          return parent;
-  }
+    /**
+     * Use DTMNodeProxy to determine whether two nodes are the same.
+     *
+     * @param node1 The first DOM node to compare.
+     * @param node2 The second DOM node to compare.
+     * @return true if the two nodes are the same.
+     */
+    public static boolean isNodeTheSame(Node node1, Node node2) {
+        if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy) {
+            return ((DTMNodeProxy) node1).equals((DTMNodeProxy) node2);
+        } else {
+            return (node1 == node2);
+        }
+    }
+
+    /**
+     * Get the XPath-model parent of a node. This version takes advantage of the
+     * DOM Level 2 Attr.ownerElement() method; the base version we would
+     * otherwise inherit is prepared to fall back on exhaustively walking the
+     * document to find an Attr's parent.
+     *
+     * @param node Node to be examined
+     *
+     * @return the DOM parent of the input node, if there is one, or the
+     * ownerElement if the input node is an Attr, or null if the node is a
+     * Document, a DocumentFragment, or an orphan.
+     */
+    public static Node getParentOfNode(Node node) {
+        Node parent = node.getParentNode();
+        if (parent == null && (Node.ATTRIBUTE_NODE == node.getNodeType())) {
+            parent = ((Attr) node).getOwnerElement();
+        }
+        return parent;
+    }
+
+    /**
+     * Figure out if child2 is after child1 in document order.
+     * <p>
+     * Warning: Some aspects of "document order" are not well defined. For
+     * example, the order of attributes is considered meaningless in XML, and
+     * the order reported by our model will be consistent for a given invocation
+     * but may not match that of either the source file or the serialized
+     * output.
+     *
+     * @param parent Must be the parent of both child1 and child2.
+     * @param child1 Must be the child of parent and not equal to child2.
+     * @param child2 Must be the child of parent and not equal to child1.
+     * @return true if child 2 is after child1 in document order.
+     */
+    private static boolean isNodeAfterSibling(Node parent, Node child1,
+            Node child2) {
+
+        boolean isNodeAfterSibling = false;
+        short child1type = child1.getNodeType();
+        short child2type = child2.getNodeType();
+
+        if ((Node.ATTRIBUTE_NODE != child1type)
+                && (Node.ATTRIBUTE_NODE == child2type)) {
+
+            // always sort attributes before non-attributes.
+            isNodeAfterSibling = false;
+        } else if ((Node.ATTRIBUTE_NODE == child1type)
+                && (Node.ATTRIBUTE_NODE != child2type)) {
 
-  /**
-   * Returns the local name of the given node, as defined by the
-   * XML Namespaces specification. This is prepared to handle documents
-   * built using DOM Level 1 methods by falling back upon explicitly
-   * parsing the node name.
-   *
-   * @param n Node to be examined
-   *
-   * @return String containing the local name, or null if the node
-   * was not assigned a Namespace.
-   */
-  public String getLocalNameOfNode(Node n)
-  {
+            // always sort attributes before non-attributes.
+            isNodeAfterSibling = true;
+        } else if (Node.ATTRIBUTE_NODE == child1type) {
+            NamedNodeMap children = parent.getAttributes();
+            int nNodes = children.getLength();
+            boolean found1 = false, found2 = false;
+
+            // Count from the start until we find one or the other.
+            for (int i = 0; i < nNodes; i++) {
+                Node child = children.item(i);
 
-    String name = n.getLocalName();
+                if (child1 == child || isNodeTheSame(child1, child)) {
+                    if (found2) {
+                        isNodeAfterSibling = false;
+
+                        break;
+                    }
 
-    return (null == name) ? super.getLocalNameOfNode(n) : name;
-  }
+                    found1 = true;
+                } else if (child2 == child || isNodeTheSame(child2, child)) {
+                    if (found1) {
+                        isNodeAfterSibling = true;
+
+                        break;
+                    }
 
-  /**
-   * Returns the Namespace Name (Namespace URI) for the given node.
-   * In a Level 2 DOM, you can ask the node itself. Note, however, that
-   * doing so conflicts with our decision in getLocalNameOfNode not
-   * to trust the that the DOM was indeed created using the Level 2
-   * methods. If Level 1 methods were used, these two functions will
-   * disagree with each other.
-   * <p>
-   * TODO: Reconcile with getLocalNameOfNode.
-   *
-   * @param n Node to be examined
-   *
-   * @return String containing the Namespace URI bound to this DOM node
-   * at the time the Node was created.
-   */
-  public String getNamespaceOfNode(Node n)
-  {
-    return n.getNamespaceURI();
-  }
+                    found2 = true;
+                }
+            }
+        } else {
+            // TODO: Check performance of alternate solution:
+            // There are two choices here: Count from the start of
+            // the document until we find one or the other, or count
+            // from one until we find or fail to find the other.
+            // Either can wind up scanning all the siblings in the worst
+            // case, which on a wide document can be a lot of work but
+            // is more typically is a short list.
+            // Scanning from the start involves two tests per iteration,
+            // but it isn't clear that scanning from the middle doesn't
+            // yield more iterations on average.
+            // We should run some testcases.
+            Node child = parent.getFirstChild();
+            boolean found1 = false, found2 = false;
+
+            while (null != child) {
 
-  /** Field m_useDOM2getNamespaceURI is a compile-time flag which
-   *  gates some of the parser options used to build a DOM -- but
-   * that code is commented out at this time and nobody else
-   * references it, so I've commented this out as well. */
-  //private boolean m_useDOM2getNamespaceURI = false;
+                // Node child = children.item(i);
+                if (child1 == child || isNodeTheSame(child1, child)) {
+                    if (found2) {
+                        isNodeAfterSibling = false;
+
+                        break;
+                    }
+
+                    found1 = true;
+                } else if (child2 == child || isNodeTheSame(child2, child)) {
+                    if (found1) {
+                        isNodeAfterSibling = true;
+
+                        break;
+                    }
+
+                    found2 = true;
+                }
+
+                child = child.getNextSibling();
+            }
+        }
+
+        return isNodeAfterSibling;
+    }  // end isNodeAfterSibling(Node parent, Node child1, Node child2)
 }
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMHelper.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1330 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- * $Id: DOMHelper.java,v 1.2.4.1 2005/09/15 08:15:40 suresh_emailid Exp $
- */
-package com.sun.org.apache.xml.internal.utils;
-
-import com.sun.org.apache.xml.internal.dtm.ref.DTMNodeProxy;
-import com.sun.org.apache.xml.internal.res.XMLErrorResources;
-import com.sun.org.apache.xml.internal.res.XMLMessages;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.Entity;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-/**
- * @deprecated Since the introduction of the DTM, this class will be removed.
- * This class provides a front-end to DOM implementations, providing
- * a number of utility functions that either aren't yet standardized
- * by the DOM spec or that are defined in optional DOM modules and
- * hence may not be present in all DOMs.
- */
-public class DOMHelper
-{
-
-  /**
-   * DOM Level 1 did not have a standard mechanism for creating a new
-   * Document object. This function provides a DOM-implementation-independent
-   * abstraction for that for that concept. It's typically used when
-   * outputting a new DOM as the result of an operation.
-   * <p>
-   * TODO: This isn't directly compatable with DOM Level 2.
-   * The Level 2 createDocument call also creates the root
-   * element, and thus requires that you know what that element will be
-   * before creating the Document. We should think about whether we want
-   * to change this code, and the callers, so we can use the DOM's own
-   * method. (It's also possible that DOM Level 3 may relax this
-   * sequence, but you may give up some intelligence in the DOM by
-   * doing so; the intent was that knowing the document type and root
-   * element might let the DOM automatically switch to a specialized
-   * subclass for particular kinds of documents.)
-   *
-   * @param isSecureProcessing state of the secure processing feature.
-   * @return The newly created DOM Document object, with no children, or
-   * null if we can't find a DOM implementation that permits creating
-   * new empty Documents.
-   */
-  public static Document createDocument(boolean isSecureProcessing)
-  {
-
-    try
-    {
-
-      // Use an implementation of the JAVA API for XML Parsing 1.0 to
-      // create a DOM Document node to contain the result.
-      DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
-
-      dfactory.setNamespaceAware(true);
-      dfactory.setValidating(true);
-
-      if (isSecureProcessing)
-      {
-        try
-        {
-          dfactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
-        }
-        catch (ParserConfigurationException pce) {}
-      }
-
-      DocumentBuilder docBuilder = dfactory.newDocumentBuilder();
-      Document outNode = docBuilder.newDocument();
-
-      return outNode;
-    }
-    catch (ParserConfigurationException pce)
-    {
-      throw new RuntimeException(
-        XMLMessages.createXMLMessage(
-          XMLErrorResources.ER_CREATEDOCUMENT_NOT_SUPPORTED, null));  //"createDocument() not supported in XPathContext!");
-
-      // return null;
-    }
-  }
-
-  /**
-   * DOM Level 1 did not have a standard mechanism for creating a new
-   * Document object. This function provides a DOM-implementation-independent
-   * abstraction for that for that concept. It's typically used when
-   * outputting a new DOM as the result of an operation.
-   *
-   * @return The newly created DOM Document object, with no children, or
-   * null if we can't find a DOM implementation that permits creating
-   * new empty Documents.
-   */
-  public static Document createDocument()
-  {
-    return createDocument(false);
-  }
-
-  /**
-   * Tells, through the combination of the default-space attribute
-   * on xsl:stylesheet, xsl:strip-space, xsl:preserve-space, and the
-   * xml:space attribute, whether or not extra whitespace should be stripped
-   * from the node.  Literal elements from template elements should
-   * <em>not</em> be tested with this function.
-   * @param textNode A text node from the source tree.
-   * @return true if the text node should be stripped of extra whitespace.
-   *
-   * @throws javax.xml.transform.TransformerException
-   * @xsl.usage advanced
-   */
-  public boolean shouldStripSourceNode(Node textNode)
-          throws javax.xml.transform.TransformerException
-  {
-
-    // return (null == m_envSupport) ? false : m_envSupport.shouldStripSourceNode(textNode);
-    return false;
-  }
-
-  /**
-   * Supports the XPath function GenerateID by returning a unique
-   * identifier string for any given DOM Node.
-   * <p>
-   * Warning: The base implementation uses the Node object's hashCode(),
-   * which is NOT guaranteed to be unique. If that method hasn't been
-   * overridden in this DOM ipmlementation, most Java implementions will
-   * derive it from the object's address and should be OK... but if
-   * your DOM uses a different definition of hashCode (eg hashing the
-   * contents of the subtree), or if your DOM may have multiple objects
-   * that represent a single Node in the data structure (eg via proxying),
-   * you may need to find another way to assign a unique identifier.
-   * <p>
-   * Also, be aware that if nodes are destroyed and recreated, there is
-   * an open issue regarding whether an ID may be reused. Currently
-   * we're assuming that the input document is stable for the duration
-   * of the XPath/XSLT operation, so this shouldn't arise in this context.
-   * <p>
-   * (DOM Level 3 is investigating providing a unique node "key", but
-   * that won't help Level 1 and Level 2 implementations.)
-   *
-   * @param node whose identifier you want to obtain
-   *
-   * @return a string which should be different for every Node object.
-   */
-  public String getUniqueID(Node node)
-  {
-    return "N" + Integer.toHexString(node.hashCode()).toUpperCase();
-  }
-
-  /**
-   * Figure out whether node2 should be considered as being later
-   * in the document than node1, in Document Order as defined
-   * by the XPath model. This may not agree with the ordering defined
-   * by other XML applications.
-   * <p>
-   * There are some cases where ordering isn't defined, and neither are
-   * the results of this function -- though we'll generally return true.
-   *
-   * TODO: Make sure this does the right thing with attribute nodes!!!
-   *
-   * @param node1 DOM Node to perform position comparison on.
-   * @param node2 DOM Node to perform position comparison on .
-   *
-   * @return false if node2 comes before node1, otherwise return true.
-   * You can think of this as
-   * <code>(node1.documentOrderPosition &lt;= node2.documentOrderPosition)</code>.
-   */
-  public static boolean isNodeAfter(Node node1, Node node2)
-  {
-    if (node1 == node2 || isNodeTheSame(node1, node2))
-      return true;
-
-        // Default return value, if there is no defined ordering
-    boolean isNodeAfter = true;
-
-    Node parent1 = getParentOfNode(node1);
-    Node parent2 = getParentOfNode(node2);
-
-    // Optimize for most common case
-    if (parent1 == parent2 || isNodeTheSame(parent1, parent2))  // then we know they are siblings
-    {
-      if (null != parent1)
-        isNodeAfter = isNodeAfterSibling(parent1, node1, node2);
-      else
-      {
-                  // If both parents are null, ordering is not defined.
-                  // We're returning a value in lieu of throwing an exception.
-                  // Not a case we expect to arise in XPath, but beware if you
-                  // try to reuse this method.
-
-                  // We can just fall through in this case, which allows us
-                  // to hit the debugging code at the end of the function.
-          //return isNodeAfter;
-      }
-    }
-    else
-    {
-
-      // General strategy: Figure out the lengths of the two
-      // ancestor chains, reconcile the lengths, and look for
-          // the lowest common ancestor. If that ancestor is one of
-          // the nodes being compared, it comes before the other.
-      // Otherwise perform a sibling compare.
-                //
-                // NOTE: If no common ancestor is found, ordering is undefined
-                // and we return the default value of isNodeAfter.
-
-      // Count parents in each ancestor chain
-      int nParents1 = 2, nParents2 = 2;  // include node & parent obtained above
-
-      while (parent1 != null)
-      {
-        nParents1++;
-
-        parent1 = getParentOfNode(parent1);
-      }
-
-      while (parent2 != null)
-      {
-        nParents2++;
-
-        parent2 = getParentOfNode(parent2);
-      }
-
-          // Initially assume scan for common ancestor starts with
-          // the input nodes.
-      Node startNode1 = node1, startNode2 = node2;
-
-      // If one ancestor chain is longer, adjust its start point
-          // so we're comparing at the same depths
-      if (nParents1 < nParents2)
-      {
-        // Adjust startNode2 to depth of startNode1
-        int adjust = nParents2 - nParents1;
-
-        for (int i = 0; i < adjust; i++)
-        {
-          startNode2 = getParentOfNode(startNode2);
-        }
-      }
-      else if (nParents1 > nParents2)
-      {
-        // adjust startNode1 to depth of startNode2
-        int adjust = nParents1 - nParents2;
-
-        for (int i = 0; i < adjust; i++)
-        {
-          startNode1 = getParentOfNode(startNode1);
-        }
-      }
-
-      Node prevChild1 = null, prevChild2 = null;  // so we can "back up"
-
-      // Loop up the ancestor chain looking for common parent
-      while (null != startNode1)
-      {
-        if (startNode1 == startNode2 || isNodeTheSame(startNode1, startNode2))  // common parent?
-        {
-          if (null == prevChild1)  // first time in loop?
-          {
-
-            // Edge condition: one is the ancestor of the other.
-            isNodeAfter = (nParents1 < nParents2) ? true : false;
-
-            break;  // from while loop
-          }
-          else
-          {
-                        // Compare ancestors below lowest-common as siblings
-            isNodeAfter = isNodeAfterSibling(startNode1, prevChild1,
-                                             prevChild2);
-
-            break;  // from while loop
-          }
-        }  // end if(startNode1 == startNode2)
-
-                // Move up one level and try again
-        prevChild1 = startNode1;
-        startNode1 = getParentOfNode(startNode1);
-        prevChild2 = startNode2;
-        startNode2 = getParentOfNode(startNode2);
-      }  // end while(parents exist to examine)
-    }  // end big else (not immediate siblings)
-
-        // WARNING: The following diagnostic won't report the early
-        // "same node" case. Fix if/when needed.
-
-    /* -- please do not remove... very useful for diagnostics --
-    System.out.println("node1 = "+node1.getNodeName()+"("+node1.getNodeType()+")"+
-    ", node2 = "+node2.getNodeName()
-    +"("+node2.getNodeType()+")"+
-    ", isNodeAfter = "+isNodeAfter); */
-    return isNodeAfter;
-  }  // end isNodeAfter(Node node1, Node node2)
-
-  /**
-   * Use DTMNodeProxy to determine whether two nodes are the same.
-   *
-   * @param node1 The first DOM node to compare.
-   * @param node2 The second DOM node to compare.
-   * @return true if the two nodes are the same.
-   */
-  public static boolean isNodeTheSame(Node node1, Node node2)
-  {
-    if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy)
-      return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2);
-    else
-      return (node1 == node2);
-  }
-
-  /**
-   * Figure out if child2 is after child1 in document order.
-   * <p>
-   * Warning: Some aspects of "document order" are not well defined.
-   * For example, the order of attributes is considered
-   * meaningless in XML, and the order reported by our model will
-   * be consistant for a given invocation but may not
-   * match that of either the source file or the serialized output.
-   *
-   * @param parent Must be the parent of both child1 and child2.
-   * @param child1 Must be the child of parent and not equal to child2.
-   * @param child2 Must be the child of parent and not equal to child1.
-   * @return true if child 2 is after child1 in document order.
-   */
-  private static boolean isNodeAfterSibling(Node parent, Node child1,
-                                            Node child2)
-  {
-
-    boolean isNodeAfterSibling = false;
-    short child1type = child1.getNodeType();
-    short child2type = child2.getNodeType();
-
-    if ((Node.ATTRIBUTE_NODE != child1type)
-            && (Node.ATTRIBUTE_NODE == child2type))
-    {
-
-      // always sort attributes before non-attributes.
-      isNodeAfterSibling = false;
-    }
-    else if ((Node.ATTRIBUTE_NODE == child1type)
-             && (Node.ATTRIBUTE_NODE != child2type))
-    {
-
-      // always sort attributes before non-attributes.
-      isNodeAfterSibling = true;
-    }
-    else if (Node.ATTRIBUTE_NODE == child1type)
-    {
-      NamedNodeMap children = parent.getAttributes();
-      int nNodes = children.getLength();
-      boolean found1 = false, found2 = false;
-
-          // Count from the start until we find one or the other.
-      for (int i = 0; i < nNodes; i++)
-      {
-        Node child = children.item(i);
-
-        if (child1 == child || isNodeTheSame(child1, child))
-        {
-          if (found2)
-          {
-            isNodeAfterSibling = false;
-
-            break;
-          }
-
-          found1 = true;
-        }
-        else if (child2 == child || isNodeTheSame(child2, child))
-        {
-          if (found1)
-          {
-            isNodeAfterSibling = true;
-
-            break;
-          }
-
-          found2 = true;
-        }
-      }
-    }
-    else
-    {
-                // TODO: Check performance of alternate solution:
-                // There are two choices here: Count from the start of
-                // the document until we find one or the other, or count
-                // from one until we find or fail to find the other.
-                // Either can wind up scanning all the siblings in the worst
-                // case, which on a wide document can be a lot of work but
-                // is more typically is a short list.
-                // Scanning from the start involves two tests per iteration,
-                // but it isn't clear that scanning from the middle doesn't
-                // yield more iterations on average.
-                // We should run some testcases.
-      Node child = parent.getFirstChild();
-      boolean found1 = false, found2 = false;
-
-      while (null != child)
-      {
-
-        // Node child = children.item(i);
-        if (child1 == child || isNodeTheSame(child1, child))
-        {
-          if (found2)
-          {
-            isNodeAfterSibling = false;
-
-            break;
-          }
-
-          found1 = true;
-        }
-        else if (child2 == child || isNodeTheSame(child2, child))
-        {
-          if (found1)
-          {
-            isNodeAfterSibling = true;
-
-            break;
-          }
-
-          found2 = true;
-        }
-
-        child = child.getNextSibling();
-      }
-    }
-
-    return isNodeAfterSibling;
-  }  // end isNodeAfterSibling(Node parent, Node child1, Node child2)
-
-  //==========================================================
-  // SECTION: Namespace resolution
-  //==========================================================
-
-  /**
-   * Get the depth level of this node in the tree (equals 1 for
-   * a parentless node).
-   *
-   * @param n Node to be examined.
-   * @return the number of ancestors, plus one
-   * @xsl.usage internal
-   */
-  public short getLevel(Node n)
-  {
-
-    short level = 1;
-
-    while (null != (n = getParentOfNode(n)))
-    {
-      level++;
-    }
-
-    return level;
-  }
-
-  /**
-   * Given an XML Namespace prefix and a context in which the prefix
-   * is to be evaluated, return the Namespace Name this prefix was
-   * bound to. Note that DOM Level 3 is expected to provide a version of
-   * this which deals with the DOM's "early binding" behavior.
-   *
-   * Default handling:
-   *
-   * @param prefix String containing namespace prefix to be resolved,
-   * without the ':' which separates it from the localname when used
-   * in a Node Name. The empty sting signifies the default namespace
-   * at this point in the document.
-   * @param namespaceContext Element which provides context for resolution.
-   * (We could extend this to work for other nodes by first seeking their
-   * nearest Element ancestor.)
-   *
-   * @return a String containing the Namespace URI which this prefix
-   * represents in the specified context.
-   */
-  public String getNamespaceForPrefix(String prefix, Element namespaceContext)
-  {
-
-    int type;
-    Node parent = namespaceContext;
-    String namespace = null;
-
-    if (prefix.equals("xml"))
-    {
-      namespace = QName.S_XMLNAMESPACEURI; // Hardcoded, per Namespace spec
-    }
-        else if(prefix.equals("xmlns"))
-    {
-          // Hardcoded in the DOM spec, expected to be adopted by
-          // Namespace spec. NOTE: Namespace declarations _must_ use
-          // the xmlns: prefix; other prefixes declared as belonging
-          // to this namespace will not be recognized and should
-          // probably be rejected by parsers as erroneous declarations.
-      namespace = "http://www.w3.org/2000/xmlns/";
-    }
-    else
-    {
-          // Attribute name for this prefix's declaration
-          String declname=(prefix=="")
-                        ? "xmlns"
-                        : "xmlns:"+prefix;
-
-          // Scan until we run out of Elements or have resolved the namespace
-      while ((null != parent) && (null == namespace)
-             && (((type = parent.getNodeType()) == Node.ELEMENT_NODE)
-                 || (type == Node.ENTITY_REFERENCE_NODE)))
-      {
-        if (type == Node.ELEMENT_NODE)
-        {
-
-                        // Look for the appropriate Namespace Declaration attribute,
-                        // either "xmlns:prefix" or (if prefix is "") "xmlns".
-                        // TODO: This does not handle "implicit declarations"
-                        // which may be created when the DOM is edited. DOM Level
-                        // 3 will define how those should be interpreted. But
-                        // this issue won't arise in freshly-parsed DOMs.
-
-                // NOTE: declname is set earlier, outside the loop.
-                        Attr attr=((Element)parent).getAttributeNode(declname);
-                        if(attr!=null)
-                        {
-                namespace = attr.getNodeValue();
-                break;
-                        }
-                }
-
-        parent = getParentOfNode(parent);
-      }
-    }
-
-    return namespace;
-  }
-
-  /**
-   * An experiment for the moment.
-   */
-  Map<Node, NSInfo> m_NSInfos = new HashMap<>();
-
-  /** Object to put into the m_NSInfos table that tells that a node has not been
-   *  processed, but has xmlns namespace decls.  */
-  protected static final NSInfo m_NSInfoUnProcWithXMLNS = new NSInfo(false,
-                                                            true);
-
-  /** Object to put into the m_NSInfos table that tells that a node has not been
-   *  processed, but has no xmlns namespace decls.  */
-  protected static final NSInfo m_NSInfoUnProcWithoutXMLNS = new NSInfo(false,
-                                                               false);
-
-  /** Object to put into the m_NSInfos table that tells that a node has not been
-   *  processed, and has no xmlns namespace decls, and has no ancestor decls.  */
-  protected static final NSInfo m_NSInfoUnProcNoAncestorXMLNS =
-    new NSInfo(false, false, NSInfo.ANCESTORNOXMLNS);
-
-  /** Object to put into the m_NSInfos table that tells that a node has been
-   *  processed, and has xmlns namespace decls.  */
-  protected static final NSInfo m_NSInfoNullWithXMLNS = new NSInfo(true,
-                                                          true);
-
-  /** Object to put into the m_NSInfos table that tells that a node has been
-   *  processed, and has no xmlns namespace decls.  */
-  protected static final NSInfo m_NSInfoNullWithoutXMLNS = new NSInfo(true,
-                                                             false);
-
-  /** Object to put into the m_NSInfos table that tells that a node has been
-   *  processed, and has no xmlns namespace decls. and has no ancestor decls.  */
-  protected static final NSInfo m_NSInfoNullNoAncestorXMLNS =
-    new NSInfo(true, false, NSInfo.ANCESTORNOXMLNS);
-
-  /** Vector of node (odd indexes) and NSInfos (even indexes) that tell if
-   *  the given node is a candidate for ancestor namespace processing.  */
-  protected Vector m_candidateNoAncestorXMLNS = new Vector();
-
-  /**
-   * Returns the namespace of the given node. Differs from simply getting
-   * the node's prefix and using getNamespaceForPrefix in that it attempts
-   * to cache some of the data in NSINFO objects, to avoid repeated lookup.
-   * TODO: Should we consider moving that logic into getNamespaceForPrefix?
-   *
-   * @param n Node to be examined.
-   *
-   * @return String containing the Namespace Name (uri) for this node.
-   * Note that this is undefined for any nodes other than Elements and
-   * Attributes.
-   */
-  public String getNamespaceOfNode(Node n)
-  {
-
-    String namespaceOfPrefix;
-    boolean hasProcessedNS;
-    NSInfo nsInfo;
-    short ntype = n.getNodeType();
-
-    if (Node.ATTRIBUTE_NODE != ntype)
-    {
-      nsInfo = m_NSInfos.get(n);
-      hasProcessedNS = (nsInfo == null) ? false : nsInfo.m_hasProcessedNS;
-    }
-    else
-    {
-      hasProcessedNS = false;
-      nsInfo = null;
-    }
-
-    if (hasProcessedNS)
-    {
-      namespaceOfPrefix = nsInfo.m_namespace;
-    }
-    else
-    {
-      namespaceOfPrefix = null;
-
-      String nodeName = n.getNodeName();
-      int indexOfNSSep = nodeName.indexOf(':');
-      String prefix;
-
-      if (Node.ATTRIBUTE_NODE == ntype)
-      {
-        if (indexOfNSSep > 0)
-        {
-          prefix = nodeName.substring(0, indexOfNSSep);
-        }
-        else
-        {
-
-          // Attributes don't use the default namespace, so if
-          // there isn't a prefix, we're done.
-          return namespaceOfPrefix;
-        }
-      }
-      else
-      {
-        prefix = (indexOfNSSep >= 0)
-                 ? nodeName.substring(0, indexOfNSSep) : "";
-      }
-
-      boolean ancestorsHaveXMLNS = false;
-      boolean nHasXMLNS = false;
-
-      if (prefix.equals("xml"))
-      {
-        namespaceOfPrefix = QName.S_XMLNAMESPACEURI;
-      }
-      else
-      {
-        int parentType;
-        Node parent = n;
-
-        while ((null != parent) && (null == namespaceOfPrefix))
-        {
-          if ((null != nsInfo)
-                  && (nsInfo.m_ancestorHasXMLNSAttrs
-                      == NSInfo.ANCESTORNOXMLNS))
-          {
-            break;
-          }
-
-          parentType = parent.getNodeType();
-
-          if ((null == nsInfo) || nsInfo.m_hasXMLNSAttrs)
-          {
-            boolean elementHasXMLNS = false;
-
-            if (parentType == Node.ELEMENT_NODE)
-            {
-              NamedNodeMap nnm = parent.getAttributes();
-
-              for (int i = 0; i < nnm.getLength(); i++)
-              {
-                Node attr = nnm.item(i);
-                String aname = attr.getNodeName();
-
-                if (aname.charAt(0) == 'x')
-                {
-                  boolean isPrefix = aname.startsWith("xmlns:");
-
-                  if (aname.equals("xmlns") || isPrefix)
-                  {
-                    if (n == parent)
-                      nHasXMLNS = true;
-
-                    elementHasXMLNS = true;
-                    ancestorsHaveXMLNS = true;
-
-                    String p = isPrefix ? aname.substring(6) : "";
-
-                    if (p.equals(prefix))
-                    {
-                      namespaceOfPrefix = attr.getNodeValue();
-
-                      break;
-                    }
-                  }
-                }
-              }
-            }
-
-            if ((Node.ATTRIBUTE_NODE != parentType) && (null == nsInfo)
-                    && (n != parent))
-            {
-              nsInfo = elementHasXMLNS
-                       ? m_NSInfoUnProcWithXMLNS : m_NSInfoUnProcWithoutXMLNS;
-
-              m_NSInfos.put(parent, nsInfo);
-            }
-          }
-
-          if (Node.ATTRIBUTE_NODE == parentType)
-          {
-            parent = getParentOfNode(parent);
-          }
-          else
-          {
-            m_candidateNoAncestorXMLNS.addElement(parent);
-            m_candidateNoAncestorXMLNS.addElement(nsInfo);
-
-            parent = parent.getParentNode();
-          }
-
-          if (null != parent)
-          {
-            nsInfo = m_NSInfos.get(parent);
-          }
-        }
-
-        int nCandidates = m_candidateNoAncestorXMLNS.size();
-
-        if (nCandidates > 0)
-        {
-          if ((false == ancestorsHaveXMLNS) && (null == parent))
-          {
-            for (int i = 0; i < nCandidates; i += 2)
-            {
-              Object candidateInfo = m_candidateNoAncestorXMLNS.elementAt(i
-                                       + 1);
-
-              if (candidateInfo == m_NSInfoUnProcWithoutXMLNS)
-              {
-                m_NSInfos.put((Node)m_candidateNoAncestorXMLNS.elementAt(i),
-                              m_NSInfoUnProcNoAncestorXMLNS);
-              }
-              else if (candidateInfo == m_NSInfoNullWithoutXMLNS)
-              {
-                m_NSInfos.put((Node)m_candidateNoAncestorXMLNS.elementAt(i),
-                              m_NSInfoNullNoAncestorXMLNS);
-              }
-            }
-          }
-
-          m_candidateNoAncestorXMLNS.removeAllElements();
-        }
-      }
-
-      if (Node.ATTRIBUTE_NODE != ntype)
-      {
-        if (null == namespaceOfPrefix)
-        {
-          if (ancestorsHaveXMLNS)
-          {
-            if (nHasXMLNS)
-              m_NSInfos.put(n, m_NSInfoNullWithXMLNS);
-            else
-              m_NSInfos.put(n, m_NSInfoNullWithoutXMLNS);
-          }
-          else
-          {
-            m_NSInfos.put(n, m_NSInfoNullNoAncestorXMLNS);
-          }
-        }
-        else
-        {
-          m_NSInfos.put(n, new NSInfo(namespaceOfPrefix, nHasXMLNS));
-        }
-      }
-    }
-
-    return namespaceOfPrefix;
-  }
-
-  /**
-   * Returns the local name of the given node. If the node's name begins
-   * with a namespace prefix, this is the part after the colon; otherwise
-   * it's the full node name.
-   *
-   * @param n the node to be examined.
-   *
-   * @return String containing the Local Name
-   */
-  public String getLocalNameOfNode(Node n)
-  {
-
-    String qname = n.getNodeName();
-    int index = qname.indexOf(':');
-
-    return (index < 0) ? qname : qname.substring(index + 1);
-  }
-
-  /**
-   * Returns the element name with the namespace prefix (if any) replaced
-   * by the Namespace URI it was bound to. This is not a standard
-   * representation of a node name, but it allows convenient
-   * single-string comparison of the "universal" names of two nodes.
-   *
-   * @param elem Element to be examined.
-   *
-   * @return String in the form "namespaceURI:localname" if the node
-   * belongs to a namespace, or simply "localname" if it doesn't.
-   * @see #getExpandedAttributeName
-   */
-  public String getExpandedElementName(Element elem)
-  {
-
-    String namespace = getNamespaceOfNode(elem);
-
-    return (null != namespace)
-           ? namespace + ":" + getLocalNameOfNode(elem)
-           : getLocalNameOfNode(elem);
-  }
-
-  /**
-   * Returns the attribute name with the namespace prefix (if any) replaced
-   * by the Namespace URI it was bound to. This is not a standard
-   * representation of a node name, but it allows convenient
-   * single-string comparison of the "universal" names of two nodes.
-   *
-   * @param attr Attr to be examined
-   *
-   * @return String in the form "namespaceURI:localname" if the node
-   * belongs to a namespace, or simply "localname" if it doesn't.
-   * @see #getExpandedElementName
-   */
-  public String getExpandedAttributeName(Attr attr)
-  {
-
-    String namespace = getNamespaceOfNode(attr);
-
-    return (null != namespace)
-           ? namespace + ":" + getLocalNameOfNode(attr)
-           : getLocalNameOfNode(attr);
-  }
-
-  //==========================================================
-  // SECTION: DOM Helper Functions
-  //==========================================================
-
-  /**
-   * Tell if the node is ignorable whitespace. Note that this can
-   * be determined only in the context of a DTD or other Schema,
-   * and that DOM Level 2 has nostandardized DOM API which can
-   * return that information.
-   * @deprecated
-   *
-   * @param node Node to be examined
-   *
-   * @return CURRENTLY HARDCODED TO FALSE, but should return true if
-   * and only if the node is of type Text, contains only whitespace,
-   * and does not appear as part of the #PCDATA content of an element.
-   * (Note that determining this last may require allowing for
-   * Entity References.)
-   */
-  public boolean isIgnorableWhitespace(Text node)
-  {
-
-    boolean isIgnorable = false;  // return value
-
-    // TODO: I can probably do something to figure out if this
-    // space is ignorable from just the information in
-    // the DOM tree.
-        // -- You need to be able to distinguish whitespace
-        // that is #PCDATA from whitespace that isn't.  That requires
-        // DTD support, which won't be standardized until DOM Level 3.
-    return isIgnorable;
-  }
-
-  /**
-   * Get the first unparented node in the ancestor chain.
-   * @deprecated
-   *
-   * @param node Starting node, to specify which chain to chase
-   *
-   * @return the topmost ancestor.
-   */
-  public Node getRoot(Node node)
-  {
-
-    Node root = null;
-
-    while (node != null)
-    {
-      root = node;
-      node = getParentOfNode(node);
-    }
-
-    return root;
-  }
-
-  /**
-   * Get the root node of the document tree, regardless of
-   * whether or not the node passed in is a document node.
-   * <p>
-   * TODO: This doesn't handle DocumentFragments or "orphaned" subtrees
-   * -- it's currently returning ownerDocument even when the tree is
-   * not actually part of the main Document tree. We should either
-   * rewrite the description to say that it finds the Document node,
-   * or change the code to walk up the ancestor chain.
-
-   *
-   * @param n Node to be examined
-   *
-   * @return the Document node. Note that this is not the correct answer
-   * if n was (or was a child of) a DocumentFragment or an orphaned node,
-   * as can arise if the DOM has been edited rather than being generated
-   * by a parser.
-   */
-  public Node getRootNode(Node n)
-  {
-    int nt = n.getNodeType();
-    return ( (Node.DOCUMENT_NODE == nt) || (Node.DOCUMENT_FRAGMENT_NODE == nt) )
-           ? n : n.getOwnerDocument();
-  }
-
-  /**
-   * Test whether the given node is a namespace decl node. In DOM Level 2
-   * this can be done in a namespace-aware manner, but in Level 1 DOMs
-   * it has to be done by testing the node name.
-   *
-   * @param n Node to be examined.
-   *
-   * @return boolean -- true iff the node is an Attr whose name is
-   * "xmlns" or has the "xmlns:" prefix.
-   */
-  public boolean isNamespaceNode(Node n)
-  {
-
-    if (Node.ATTRIBUTE_NODE == n.getNodeType())
-    {
-      String attrName = n.getNodeName();
-
-      return (attrName.startsWith("xmlns:") || attrName.equals("xmlns"));
-    }
-
-    return false;
-  }
-
-  /**
-   * Obtain the XPath-model parent of a DOM node -- ownerElement for Attrs,
-   * parent for other nodes.
-   * <p>
-   * Background: The DOM believes that you must be your Parent's
-   * Child, and thus Attrs don't have parents. XPath said that Attrs
-   * do have their owning Element as their parent. This function
-   * bridges the difference, either by using the DOM Level 2 ownerElement
-   * function or by using a "silly and expensive function" in Level 1
-   * DOMs.
-   * <p>
-   * (There's some discussion of future DOMs generalizing ownerElement
-   * into ownerNode and making it work on all types of nodes. This
-   * still wouldn't help the users of Level 1 or Level 2 DOMs)
-   * <p>
-   *
-   * @param node Node whose XPath parent we want to obtain
-   *
-   * @return the parent of the node, or the ownerElement if it's an
-   * Attr node, or null if the node is an orphan.
-   *
-   * @throws RuntimeException if the Document has no root element.
-   * This can't arise if the Document was created
-   * via the DOM Level 2 factory methods, but is possible if other
-   * mechanisms were used to obtain it
-   */
-  public static Node getParentOfNode(Node node) throws RuntimeException
-  {
-    Node parent;
-    short nodeType = node.getNodeType();
-
-    if (Node.ATTRIBUTE_NODE == nodeType)
-    {
-      Document doc = node.getOwnerDocument();
-          /*
-      TBD:
-      if(null == doc)
-      {
-        throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_CHILD_HAS_NO_OWNER_DOCUMENT, null));//"Attribute child does not have an owner document!");
-      }
-      */
-
-          // Given how expensive the tree walk may be, we should first ask
-          // whether this DOM can answer the question for us. The additional
-          // test does slow down Level 1 DOMs slightly. DOMHelper2, which
-          // is currently specialized for Xerces, assumes it can use the
-          // Level 2 solution. We might want to have an intermediate stage,
-          // which would assume DOM Level 2 but not assume Xerces.
-          //
-          // (Shouldn't have to check whether impl is null in a compliant DOM,
-          // but let's be paranoid for a moment...)
-          DOMImplementation impl=doc.getImplementation();
-          if(impl!=null && impl.hasFeature("Core","2.0"))
-          {
-                  parent=((Attr)node).getOwnerElement();
-                  return parent;
-          }
-
-          // DOM Level 1 solution, as fallback. Hugely expensive.
-
-      Element rootElem = doc.getDocumentElement();
-
-      if (null == rootElem)
-      {
-        throw new RuntimeException(
-          XMLMessages.createXMLMessage(
-            XMLErrorResources.ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT,
-            null));  //"Attribute child does not have an owner document element!");
-      }
-
-      parent = locateAttrParent(rootElem, node);
-
-        }
-    else
-    {
-      parent = node.getParentNode();
-
-      // if((Node.DOCUMENT_NODE != nodeType) && (null == parent))
-      // {
-      //   throw new RuntimeException("Child does not have parent!");
-      // }
-    }
-
-    return parent;
-  }
-
-  /**
-   * Given an ID, return the element. This can work only if the document
-   * is interpreted in the context of a DTD or Schema, since otherwise
-   * we don't know which attributes are or aren't IDs.
-   * <p>
-   * Note that DOM Level 1 had no ability to retrieve this information.
-   * DOM Level 2 introduced it but does not promise that it will be
-   * supported in all DOMs; those which can't support it will always
-   * return null.
-   * <p>
-   * TODO: getElementByID is currently unimplemented. Support DOM Level 2?
-   *
-   * @param id The unique identifier to be searched for.
-   * @param doc The document to search within.
-   * @return CURRENTLY HARDCODED TO NULL, but it should be:
-   * The node which has this unique identifier, or null if there
-   * is no such node or this DOM can't reliably recognize it.
-   */
-  public Element getElementByID(String id, Document doc)
-  {
-    return null;
-  }
-
-  /**
-   * The getUnparsedEntityURI function returns the URI of the unparsed
-   * entity with the specified name in the same document as the context
-   * node (see [3.3 Unparsed Entities]). It returns the empty string if
-   * there is no such entity.
-   * <p>
-   * XML processors may choose to use the System Identifier (if one
-   * is provided) to resolve the entity, rather than the URI in the
-   * Public Identifier. The details are dependent on the processor, and
-   * we would have to support some form of plug-in resolver to handle
-   * this properly. Currently, we simply return the System Identifier if
-   * present, and hope that it a usable URI or that our caller can
-   * map it to one.
-   * TODO: Resolve Public Identifiers... or consider changing function name.
-   * <p>
-   * If we find a relative URI
-   * reference, XML expects it to be resolved in terms of the base URI
-   * of the document. The DOM doesn't do that for us, and it isn't
-   * entirely clear whether that should be done here; currently that's
-   * pushed up to a higher levelof our application. (Note that DOM Level
-   * 1 didn't store the document's base URI.)
-   * TODO: Consider resolving Relative URIs.
-   * <p>
-   * (The DOM's statement that "An XML processor may choose to
-   * completely expand entities before the structure model is passed
-   * to the DOM" refers only to parsed entities, not unparsed, and hence
-   * doesn't affect this function.)
-   *
-   * @param name A string containing the Entity Name of the unparsed
-   * entity.
-   * @param doc Document node for the document to be searched.
-   *
-   * @return String containing the URI of the Unparsed Entity, or an
-   * empty string if no such entity exists.
-   */
-  public String getUnparsedEntityURI(String name, Document doc)
-  {
-
-    String url = "";
-    DocumentType doctype = doc.getDoctype();
-
-    if (null != doctype)
-    {
-      NamedNodeMap entities = doctype.getEntities();
-      if(null == entities)
-        return url;
-      Entity entity = (Entity) entities.getNamedItem(name);
-      if(null == entity)
-        return url;
-
-      String notationName = entity.getNotationName();
-
-      if (null != notationName)  // then it's unparsed
-      {
-        // The draft says: "The XSLT processor may use the public
-        // identifier to generate a URI for the entity instead of the URI
-        // specified in the system identifier. If the XSLT processor does
-        // not use the public identifier to generate the URI, it must use
-        // the system identifier; if the system identifier is a relative
-        // URI, it must be resolved into an absolute URI using the URI of
-        // the resource containing the entity declaration as the base
-        // URI [RFC2396]."
-        // So I'm falling a bit short here.
-        url = entity.getSystemId();
-
-        if (null == url)
-        {
-          url = entity.getPublicId();
-        }
-        else
-        {
-          // This should be resolved to an absolute URL, but that's hard
-          // to do from here.
-        }
-      }
-    }
-
-    return url;
-  }
-
-  /**
-   * Support for getParentOfNode; walks a DOM tree until it finds
-   * the Element which owns the Attr. This is hugely expensive, and
-   * if at all possible you should use the DOM Level 2 Attr.ownerElement()
-   * method instead.
-   *  <p>
-   * The DOM Level 1 developers expected that folks would keep track
-   * of the last Element they'd seen and could recover the info from
-   * that source. Obviously that doesn't work very well if the only
-   * information you've been presented with is the Attr. The DOM Level 2
-   * getOwnerElement() method fixes that, but only for Level 2 and
-   * later DOMs.
-   *
-   * @param elem Element whose subtree is to be searched for this Attr
-   * @param attr Attr whose owner is to be located.
-   *
-   * @return the first Element whose attribute list includes the provided
-   * attr. In modern DOMs, this will also be the only such Element. (Early
-   * DOMs had some hope that Attrs might be sharable, but this idea has
-   * been abandoned.)
-   */
-  private static Node locateAttrParent(Element elem, Node attr)
-  {
-
-    Node parent = null;
-
-        // This should only be called for Level 1 DOMs, so we don't have to
-        // worry about namespace issues. In later levels, it's possible
-        // for a DOM to have two Attrs with the same NodeName but
-        // different namespaces, and we'd need to get getAttributeNodeNS...
-        // but later levels also have Attr.getOwnerElement.
-        Attr check=elem.getAttributeNode(attr.getNodeName());
-        if(check==attr)
-                parent = elem;
-
-    if (null == parent)
-    {
-      for (Node node = elem.getFirstChild(); null != node;
-              node = node.getNextSibling())
-      {
-        if (Node.ELEMENT_NODE == node.getNodeType())
-        {
-          parent = locateAttrParent((Element) node, attr);
-
-          if (null != parent)
-            break;
-        }
-      }
-    }
-
-    return parent;
-  }
-
-  /**
-   * The factory object used for creating nodes
-   * in the result tree.
-   */
-  protected Document m_DOMFactory = null;
-
-  /**
-   * Store the factory object required to create DOM nodes
-   * in the result tree. In fact, that's just the result tree's
-   * Document node...
-   *
-   * @param domFactory The DOM Document Node within whose context
-   * the result tree will be built.
-   */
-  public void setDOMFactory(Document domFactory)
-  {
-    this.m_DOMFactory = domFactory;
-  }
-
-  /**
-   * Retrieve the factory object required to create DOM nodes
-   * in the result tree.
-   *
-   * @return The result tree's DOM Document Node.
-   */
-  public Document getDOMFactory()
-  {
-
-    if (null == this.m_DOMFactory)
-    {
-      this.m_DOMFactory = createDocument();
-    }
-
-    return this.m_DOMFactory;
-  }
-
-  /**
-   * Get the textual contents of the node. See
-   * getNodeData(Node,FastStringBuffer) for discussion of how
-   * whitespace nodes are handled.
-   *
-   * @param node DOM Node to be examined
-   * @return String containing a concatenation of all the
-   * textual content within that node.
-   * @see #getNodeData(Node,FastStringBuffer)
-   *
-   */
-  public static String getNodeData(Node node)
-  {
-
-    FastStringBuffer buf = StringBufferPool.get();
-    String s;
-
-    try
-    {
-      getNodeData(node, buf);
-
-      s = (buf.length() > 0) ? buf.toString() : "";
-    }
-    finally
-    {
-      StringBufferPool.free(buf);
-    }
-
-    return s;
-  }
-
-  /**
-   * Retrieve the text content of a DOM subtree, appending it into a
-   * user-supplied FastStringBuffer object. Note that attributes are
-   * not considered part of the content of an element.
-   * <p>
-   * There are open questions regarding whitespace stripping.
-   * Currently we make no special effort in that regard, since the standard
-   * DOM doesn't yet provide DTD-based information to distinguish
-   * whitespace-in-element-context from genuine #PCDATA. Note that we
-   * should probably also consider xml:space if/when we address this.
-   * DOM Level 3 may solve the problem for us.
-   *
-   * @param node Node whose subtree is to be walked, gathering the
-   * contents of all Text or CDATASection nodes.
-   * @param buf FastStringBuffer into which the contents of the text
-   * nodes are to be concatenated.
-   */
-  public static void getNodeData(Node node, FastStringBuffer buf)
-  {
-
-    switch (node.getNodeType())
-    {
-    case Node.DOCUMENT_FRAGMENT_NODE :
-    case Node.DOCUMENT_NODE :
-    case Node.ELEMENT_NODE :
-    {
-      for (Node child = node.getFirstChild(); null != child;
-              child = child.getNextSibling())
-      {
-        getNodeData(child, buf);
-      }
-    }
-    break;
-    case Node.TEXT_NODE :
-    case Node.CDATA_SECTION_NODE :
-      buf.append(node.getNodeValue());
-      break;
-    case Node.ATTRIBUTE_NODE :
-      buf.append(node.getNodeValue());
-      break;
-    case Node.PROCESSING_INSTRUCTION_NODE :
-      // warning(XPATHErrorResources.WG_PARSING_AND_PREPARING);
-      break;
-    default :
-      // ignore
-      break;
-    }
-  }
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMOrder.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xml.internal.utils;
-
-/**
- * @deprecated Since the introduction of the DTM, this class will be removed.
- * Nodes that implement this index can return a document order index.
- * Eventually, this will be replaced by DOM 3 methods.
- * (compareDocumentOrder and/or compareTreePosition.)
- */
-public interface DOMOrder
-{
-
-  /**
-   * Get the UID (document order index).
-   *
-   * @return integer whose relative value corresponds to document order
-   * -- that is, if node1.getUid()<node2.getUid(), node1 comes before
-   * node2, and if they're equal node1 and node2 are the same node. No
-   * promises are made beyond that.
-   */
-  public int getUid();
-}
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/TreeWalker.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/TreeWalker.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,11 +17,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package com.sun.org.apache.xml.internal.utils;
 
-import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
-import java.io.File;
-
+import com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.CharacterNodeHandler;
+import javax.xml.transform.Result;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Element;
 import org.w3c.dom.EntityReference;
@@ -47,14 +47,8 @@
   /** Local reference to a ContentHandler          */
   private ContentHandler m_contentHandler = null;
 
-  // ARGHH!!  JAXP Uses Xerces without setting the namespace processing to ON!
-  // DOM2Helper m_dh = new DOM2Helper();
-
-  /** DomHelper for this TreeWalker          */
-  protected DOMHelper m_dh;
-
-        /** Locator object for this TreeWalker          */
-        private LocatorImpl m_locator = new LocatorImpl();
+   /** Locator object for this TreeWalker          */
+   private LocatorImpl m_locator = new LocatorImpl();
 
   /**
    * Get the ContentHandler used for the tree walk.
@@ -76,32 +70,21 @@
     m_contentHandler = ch;
   }
 
-        /**
+   /**
    * Constructor.
    * @param   contentHandler The implementation of the
    * @param   systemId System identifier for the document.
    * contentHandler operation (toXMLString, digest, ...)
    */
-  public TreeWalker(ContentHandler contentHandler, DOMHelper dh, String systemId)
+  public TreeWalker(ContentHandler contentHandler, String systemId)
   {
     this.m_contentHandler = contentHandler;
-    m_contentHandler.setDocumentLocator(m_locator);
+    if (m_contentHandler != null) {
+        m_contentHandler.setDocumentLocator(m_locator);
+    }
     if (systemId != null) {
         m_locator.setSystemId(systemId);
     }
-    m_dh = dh;
-  }
-
-  /**
-   * Constructor.
-   * @param   contentHandler The implementation of the
-   * contentHandler operation (toXMLString, digest, ...)
-   */
-  public TreeWalker(ContentHandler contentHandler, DOMHelper dh)
-  {
-    this.m_contentHandler = contentHandler;
-    m_contentHandler.setDocumentLocator(m_locator);
-    m_dh = dh;
   }
 
   /**
@@ -111,11 +94,7 @@
    */
   public TreeWalker(ContentHandler contentHandler)
   {
-    this.m_contentHandler = contentHandler;
-    if (m_contentHandler != null) {
-        m_contentHandler.setDocumentLocator(m_locator);
-    }
-    m_dh = new DOM2Helper();
+      this(contentHandler, null);
   }
 
   /**
@@ -239,7 +218,7 @@
     this.m_contentHandler.endDocument();
   }
 
-  /** Flag indicating whether following text to be processed is raw text          */
+  // Flag indicating whether following text to be processed is raw text
   boolean nextIsRaw = false;
 
   /**
@@ -248,9 +227,9 @@
   private final void dispatachChars(Node node)
      throws org.xml.sax.SAXException
   {
-    if(m_contentHandler instanceof com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.CharacterNodeHandler)
+    if(m_contentHandler instanceof CharacterNodeHandler)
     {
-      ((com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.CharacterNodeHandler)m_contentHandler).characters(node);
+      ((CharacterNodeHandler)m_contentHandler).characters(node);
     }
     else
     {
@@ -313,17 +292,14 @@
     case Node.ELEMENT_NODE :
       NamedNodeMap atts = ((Element) node).getAttributes();
       int nAttrs = atts.getLength();
-      // System.out.println("TreeWalker#startNode: "+node.getNodeName());
 
       for (int i = 0; i < nAttrs; i++)
       {
         Node attr = atts.item(i);
         String attrName = attr.getNodeName();
 
-        // System.out.println("TreeWalker#startNode: attr["+i+"] = "+attrName+", "+attr.getNodeValue());
         if (attrName.equals("xmlns") || attrName.startsWith("xmlns:"))
         {
-          // System.out.println("TreeWalker#startNode: attr["+i+"] = "+attrName+", "+attr.getNodeValue());
           int index;
           // Use "" instead of null, as Xerces likes "" for the
           // name of the default namespace.  Fix attributed
@@ -337,15 +313,13 @@
 
       }
 
-      // System.out.println("m_dh.getNamespaceOfNode(node): "+m_dh.getNamespaceOfNode(node));
-      // System.out.println("m_dh.getLocalNameOfNode(node): "+m_dh.getLocalNameOfNode(node));
-      String ns = m_dh.getNamespaceOfNode(node);
+      String ns = DOM2Helper.getNamespaceOfNode(node);
       if(null == ns)
         ns = "";
       this.m_contentHandler.startElement(ns,
-                                         m_dh.getLocalNameOfNode(node),
+                                         DOM2Helper.getLocalNameOfNode(node),
                                          node.getNodeName(),
-                                         new AttList(atts, m_dh));
+                                         new AttList(atts));
       break;
     case Node.PROCESSING_INSTRUCTION_NODE :
     {
@@ -393,9 +367,9 @@
       {
         nextIsRaw = false;
 
-        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, "");
+        m_contentHandler.processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, "");
         dispatachChars(node);
-        m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, "");
+        m_contentHandler.processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, "");
       }
       else
       {
@@ -440,12 +414,12 @@
       break;
 
     case Node.ELEMENT_NODE :
-      String ns = m_dh.getNamespaceOfNode(node);
+      String ns = DOM2Helper.getNamespaceOfNode(node);
       if(null == ns)
         ns = "";
       this.m_contentHandler.endElement(ns,
-                                         m_dh.getLocalNameOfNode(node),
-                                         node.getNodeName());
+              DOM2Helper.getLocalNameOfNode(node),
+              node.getNodeName());
 
       NamedNodeMap atts = ((Element) node).getAttributes();
       int nAttrs = atts.getLength();
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Quo.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,6 +1,5 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -28,6 +27,7 @@
  * The 'quo' operation expression executer. (no longer supported by XPath).
  * @deprecated
  */
+@Deprecated
 public class Quo extends Operation
 {
     static final long serialVersionUID = 693765299196169905L;
--- a/jaxp/src/java.xml/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,17 @@
  * Defines the Java API for XML Processing (JAXP), the Streaming API for XML (StAX),
  * the Simple API for XML (SAX), and the W3C Document Object Model (DOM) API.
  *
+ * @uses javax.xml.datatype.DatatypeFactory
+ * @uses javax.xml.parsers.DocumentBuilderFactory
+ * @uses javax.xml.parsers.SAXParserFactory
+ * @uses javax.xml.stream.XMLEventFactory
+ * @uses javax.xml.stream.XMLInputFactory
+ * @uses javax.xml.stream.XMLOutputFactory
+ * @uses javax.xml.transform.TransformerFactory
+ * @uses javax.xml.validation.SchemaFactory
+ * @uses javax.xml.xpath.XPathFactory
+ * @uses org.xml.sax.XMLReader
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/HandlerBase.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/HandlerBase.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,7 @@
  * @see org.xml.sax.DocumentHandler
  * @see org.xml.sax.ErrorHandler
  */
+@Deprecated(since="1.5")
 public class HandlerBase
     implements EntityResolver, DTDHandler, DocumentHandler, ErrorHandler
 {
--- a/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxp/src/java.xml/share/classes/org/xml/sax/helpers/AttributeListImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,6 +87,7 @@
  * @see org.xml.sax.AttributeList
  * @see org.xml.sax.DocumentHandler#startElement
  */
+@Deprecated(since="1.5")
 public class AttributeListImpl implements AttributeList
 {
 
--- a/jaxws/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxws/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -429,3 +429,7 @@
 139e7c786ee4885efe53eb650b72c7b5a2d3b964 jdk-9+171
 3ccd9f37faa601866db5edb827363e797f5a2493 jdk-10+10
 8c615099f3e3ca137325be34bf566b767d9e3c64 jdk-9+172
+2d22d6732a73e615b9e13d6bc93bf026db3bc231 jdk-10+11
+2bd967aa452c1e0e87a6173bef6fbb96ef1c521b jdk-9+173
+c2296642010f1b215ac35da89e92c3ce44104e32 jdk-9+174
+712a3a657654079514590d37a0f4894d43541d5c jdk-10+12
--- a/jaxws/src/java.xml.bind/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxws/src/java.xml.bind/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the Java Architecture for XML Binding (JAXB) API.
  *
+ * @uses javax.xml.bind.JAXBContextFactory
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jaxws/src/java.xml.ws/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxws/src/java.xml.ws/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,12 @@
  * Defines the Java API for XML-Based Web Services (JAX-WS), and
  * the Web Services Metadata API.
  *
+ * @uses javax.xml.soap.MessageFactory
+ * @uses javax.xml.soap.SAAJMetaFactory
+ * @uses javax.xml.soap.SOAPConnectionFactory
+ * @uses javax.xml.soap.SOAPFactory
+ * @uses javax.xml.ws.spi.Provider
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jaxws/src/jdk.xml.bind/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxws/src/jdk.xml.bind/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -23,6 +23,21 @@
  * questions.
  */
 
+/**
+ * Defines tools for JAXB classes and XML schema generation,
+ * including the <em>{@index schemagen schemagen tool}</em>
+ * and <em>{@index xjc xjc tool}</em> tools.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink schemagen_tool_reference schemagen},
+ *     {@extLink xjc_tool_reference xjc}
+ * </dl>
+ *
+ * @moduleGraph
+ * @since 9
+ */
+@Deprecated(since="9", forRemoval=true)
 module jdk.xml.bind {
     requires java.activation;
     requires java.compiler;
--- a/jaxws/src/jdk.xml.ws/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jaxws/src/jdk.xml.ws/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -23,6 +23,21 @@
  * questions.
  */
 
+/**
+ * Defines tools for JAX-WS classes and WSDL generation,
+ * including the <em>{@index wsgen wsgen tool}</em>
+ * and <em>{@index wsimport wsimport tool}</em> tools.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink wsgen_tool_reference wsgen},
+ *     {@extLink wsimport_tool_reference wsimport}
+ * </dl>
+ *
+ * @moduleGraph
+ * @since 9
+ */
+@Deprecated(since="9", forRemoval=true)
 module jdk.xml.ws {
     requires java.compiler;
     requires java.logging;
--- a/jdk/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -426,3 +426,7 @@
 29bbedd4cce8e14742bdb22118c057b877c02f0f jdk-9+171
 df64bd4757d0d130d62a22b8143ba31d3a16ac18 jdk-10+10
 0ff9ad7d067cd4fa14450cf208bf019175a0aaba jdk-9+172
+7c54889c0ec649ee04643e5cace434623d0dc667 jdk-10+11
+a5506b425f1bf91530d8417b57360e5d89328c0c jdk-9+173
+42f18c931bd4fae5c206ccf6d8e591e4c4e69d31 jdk-9+174
+5f504872a75b71f2fb19299f0d1e3395cf32eaa0 jdk-10+12
--- a/jdk/make/copy/Copy-java.desktop.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/copy/Copy-java.desktop.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -77,6 +77,13 @@
         endif
 
   TARGETS += $(FREETYPE_TARGET_LIB)
+
+  $(eval $(call SetupCopyFiles, COPY_FREETYPE_LICENSE, \
+      FILES := $(FREETYPE_LICENSE), \
+      DEST := $(LEGAL_DST_DIR), \
+  ))
+
+  TARGETS += $(COPY_FREETYPE_LICENSE)
 endif
 
 ################################################################################
--- a/jdk/make/launcher/Launcher-jdk.aot.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/launcher/Launcher-jdk.aot.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -30,7 +30,7 @@
 
 $(eval $(call SetupBuildLauncher, jaotc, \
     MAIN_CLASS := jdk.tools.jaotc.Main, \
-    JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
+    EXTRA_JAVA_ARGS := -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.aarch64=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.amd64=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.code=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
@@ -38,12 +38,13 @@
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.code.stack=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.common=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
-        --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
+    , \
+    JAVA_ARGS := --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.meta=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
         --add-exports=jdk.internal.vm.ci/jdk.vm.ci.runtime=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
-        --add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler  jdk.aot) \
+        --add-exports=jdk.internal.vm.ci/jdk.vm.ci.sparc=$(call CommaList, jdk.internal.vm.compiler  jdk.aot)  \
         -XX:+UseAOT \
         -Djvmci.UseProfilingInformation=false \
         -Dgraal.UseExceptionProbability=false \
--- a/jdk/make/launcher/LauncherCommon.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/launcher/LauncherCommon.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -66,7 +66,10 @@
 # MAIN_MODULE  The module of the main class to launch if different from the
 #     current module
 # MAIN_CLASS   The Java main class to launch
-# JAVA_ARGS   Processed into a -DJAVA_ARGS C flag
+# JAVA_ARGS   Processed into a -DJAVA_ARGS and added to CFLAGS
+# EXTRA_JAVA_ARGS Processed into a -DEXTRA_JAVA_ARGS and is prepended
+#     before JAVA_ARGS to CFLAGS, primarily to allow long string literal
+#     compile time defines exceeding Visual Studio 2013 limitations.
 # CFLAGS   Additional CFLAGS
 # CFLAGS_windows   Additional CFLAGS_windows
 # LIBS_unix   Additional LIBS_unix
@@ -104,6 +107,11 @@
   endif
 
   ifneq ($$($1_JAVA_ARGS), )
+    ifneq ($$($1_EXTRA_JAVA_ARGS), )
+      $1_EXTRA_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
+        $$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
+      $1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
+    endif
     $1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
         $$(addprefix -J, $$($1_JAVA_ARGS)) -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS), "$$a"$(COMMA) )) }'
     $1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
--- a/jdk/make/lib/CoreLibraries.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/lib/CoreLibraries.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -132,7 +132,8 @@
 
 ##########################################################################################
 
-LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
+# Allow a custom makefile to add extra src dirs
+LIBJAVA_SRC_DIRS += $(call FindSrcDirsForLib, java.base, java)
 
 LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
     -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
--- a/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/src/classes/build/tools/cldrconverter/LDMLParseHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -549,12 +549,20 @@
         case "decimal":
             // for FormatData
             // copy string for later assembly into NumberElements
-            pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/decimal");
+            if (currentContainer.getqName().equals("symbols")) {
+                pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/decimal");
+            } else {
+                pushIgnoredContainer(qName);
+            }
             break;
         case "group":
             // for FormatData
             // copy string for later assembly into NumberElements
-            pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/group");
+            if (currentContainer.getqName().equals("symbols")) {
+                pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/group");
+            } else {
+                pushIgnoredContainer(qName);
+            }
             break;
         case "list":
             // for FormatData
--- a/jdk/make/src/classes/build/tools/docs/docs-module-groups.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/src/classes/build/tools/docs/docs-module-groups.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -10,7 +10,9 @@
 java.transaction \
 java.xml.bind \
 java.xml.ws \
-java.xml.ws.annotation
+java.xml.ws.annotation \
+jdk.xml.bind \
+jdk.xml.ws
 
 aggregator_modules=\
 java.se \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/src/classes/build/tools/jigsaw/ListPackages.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,203 @@
+/*
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 build.tools.jigsaw;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.UncheckedIOException;
+import java.lang.module.ModuleDescriptor;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+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.nio.file.attribute.BasicFileAttributes;
+import java.time.LocalDateTime;
+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.Set;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * Run this tool to generate the JDK internal APIs in the previous releases
+ * including platform-specific internal APIs.
+ */
+public class ListPackages {
+    // Filter non-interesting JAR files
+    private final static List<String> excludes = Arrays.asList(
+        "deploy.jar",
+        "javaws.jar",
+        "plugin.jar",
+        "cldrdata.jar",
+        "localedata.jar"
+    );
+    private static void usage() {
+        System.out.println("ListPackages [-o <outfile>] [-jdkinternals] <javaHome> [<javaHome>]*");
+    }
+
+    private static final Set<String> EXPORTED_PACKAGES = new HashSet<>();
+
+    public static void main(String... args) throws IOException {
+        List<Path> paths = new ArrayList<>();
+        Path outFile = null;
+        boolean jdkinternals = false;
+        int i=0;
+        while (i < args.length) {
+            String arg = args[i++];
+            if (arg.equals("-o")) {
+                outFile = Paths.get(args[i++]);
+            } else if (arg.equals("-jdkinternals")) {
+                jdkinternals = true;
+            } else {
+                Path p = Paths.get(arg);
+                if (Files.notExists(p))
+                    throw new IllegalArgumentException(p + " not exist");
+                paths.add(p);
+            }
+        }
+        if (paths.isEmpty()) {
+            usage();
+            System.exit(1);
+        }
+
+        // Get the exported APIs from the current JDK releases
+        Path javaHome = Paths.get(System.getProperty("java.home"));
+        ModuleFinder.ofSystem().findAll()
+            .stream()
+            .map(ModuleReference::descriptor)
+            .filter(md -> !md.name().equals("jdk.unsupported"))
+            .flatMap(md -> md.exports().stream())
+            .filter(exp -> !exp.isQualified())
+            .map(ModuleDescriptor.Exports::source)
+            .forEach(EXPORTED_PACKAGES::add);
+
+        ListPackages listPackages = new ListPackages(paths);
+        Stream<String> pkgs = listPackages.packages().stream();
+        if (jdkinternals) {
+            pkgs = pkgs.filter(pn -> !EXPORTED_PACKAGES.contains(pn));
+        }
+        if (outFile != null) {
+            try (OutputStream out = Files.newOutputStream(outFile);
+                 PrintStream pw = new PrintStream(out)) {
+                write(pw, pkgs);
+            }
+        } else {
+            write(System.out, pkgs);
+        }
+    }
+
+
+    private static void write(PrintStream pw, Stream<String> packages) {
+        pw.println("# This file is auto-generated by ListPackages tool on " +
+                   LocalDateTime.now().toString());
+        packages.sorted().forEach(pw::println);
+    }
+
+    private final Set<String> packages = new HashSet<>();
+    ListPackages(List<Path> dirs) throws IOException {
+        for (Path p : dirs) {
+            packages.addAll(list(p));
+        }
+    }
+
+    Set<String> packages() {
+        return packages;
+    }
+
+    private Set<String> list(Path javaHome) throws IOException {
+        Path jrt = javaHome.resolve("lib").resolve("modules");
+        Path jre = javaHome.resolve("jre");
+
+        if (Files.exists(jrt)) {
+            return listModularRuntime(javaHome);
+        } else if (Files.exists(jre.resolve("lib").resolve("rt.jar"))) {
+            return listLegacyRuntime(javaHome);
+        }
+        throw new IllegalArgumentException("invalid " + javaHome);
+    }
+
+    private Set<String> listModularRuntime(Path javaHome) throws IOException {
+        Map<String, String> env = new HashMap<>();
+        env.put("java.home", javaHome.toString());
+        FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), env);
+        Path root = fs.getPath("packages");
+        return Files.walk(root, 1)
+                    .map(Path::getFileName)
+                    .map(Path::toString)
+                    .collect(Collectors.toSet());
+    }
+
+    private Set<String> listLegacyRuntime(Path javaHome) throws IOException {
+        List<Path> dirs = new ArrayList<>();
+        Path jre = javaHome.resolve("jre");
+        Path lib = javaHome.resolve("lib");
+
+        dirs.add(jre.resolve("lib"));
+        dirs.add(jre.resolve("lib").resolve("ext"));
+        dirs.add(lib.resolve("tools.jar"));
+        dirs.add(lib.resolve("jconsole.jar"));
+        Set<String> packages = new HashSet<>();
+        for (Path d : dirs) {
+            Files.find(d, 1, (Path p, BasicFileAttributes attr)
+                    -> p.getFileName().toString().endsWith(".jar") &&
+                       !excludes.contains(p.getFileName().toString()))
+                 .map(ListPackages::walkJarFile)
+                 .forEach(packages::addAll);
+        }
+        return packages;
+    }
+
+    static Set<String> walkJarFile(Path jarfile) {
+        try (JarFile jf = new JarFile(jarfile.toFile())) {
+            return jf.stream()
+                     .map(JarEntry::getName)
+                     .filter(n -> n.endsWith(".class"))
+                     .map(ListPackages::toPackage)
+                     .collect(Collectors.toSet());
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    static String toPackage(String name) {
+        int i = name.lastIndexOf('/');
+        if (i < 0) {
+            System.err.format("Warning: unnamed package %s%n", name);
+        }
+        return i >= 0 ? name.substring(0, i).replace("/", ".") : "";
+    }
+}
--- a/jdk/make/src/classes/build/tools/taglet/ExtLink.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/src/classes/build/tools/taglet/ExtLink.java	Tue Jun 27 16:00:14 2017 -0400
@@ -58,7 +58,7 @@
 
     static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase9&amp;id=";
 
-    static final Pattern TAG_PATTERN = Pattern.compile("(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)");
+    static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");
 
     /**
      * Returns the set of locations in which the tag may be used.
--- a/jdk/make/test/JtregNative.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/make/test/JtregNative.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -42,12 +42,22 @@
 # Add more directories here when needed.
 BUILD_JDK_JTREG_NATIVE_SRC := \
     $(JDK_TOPDIR)/test/native_sanity \
+    $(JDK_TOPDIR)/test/java/lang/String/nativeEncoding \
     #
 
 BUILD_JDK_JTREG_OUTPUT_DIR := $(BUILD_OUTPUT)/support/test/jdk/jtreg/native
 
 BUILD_JDK_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/jdk/jtreg
 
+ifeq ($(OPENJDK_TARGET_OS), windows)
+    WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
+    BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
+else ifeq ($(OPENJDK_TARGET_OS), solaris)
+    BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava -lc
+else
+    BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
+endif
+
 $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
     TYPE := LIBRARY, \
     SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
--- a/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/ClassLoader.java	Tue Jun 27 16:00:14 2017 -0400
@@ -2146,8 +2146,6 @@
      * @revised 9
      * @spec JPMS
      *
-     * @see <a href="../../../technotes/guides/jar/jar.html#versioning">
-     *      The JAR File Specification: Package Versioning</a>
      * @see <a href="../../../technotes/guides/jar/jar.html#sealing">
      *      The JAR File Specification: Package Sealing</a>
      */
--- a/jdk/src/java.base/share/classes/java/lang/Package.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/Package.java	Tue Jun 27 16:00:14 2017 -0400
@@ -102,9 +102,13 @@
  * with the {@link Package#getPackages Package.getPackages()} and
  * {@link ClassLoader#getDefinedPackages} methods.
  *
+ * @implNote
+ * The <a href="ClassLoader.html#builtinLoaders">builtin class loaders</a>
+ * do not explicitly define {@code Package} objects for packages in
+ * <em>named modules</em>.  Instead those packages are automatically defined
+ * and have no specification and implementation versioning information.
+ *
  * @jvms 5.3 Run-time package
- * @see <a href="../../../technotes/guides/jar/jar.html#versioning">
- * The JAR File Specification: Package Versioning</a>
  * @see <a href="../../../technotes/guides/jar/jar.html#sealing">
  * The JAR File Specification: Package Sealing</a>
  * @see ClassLoader#definePackage(String, String, String, String, String, String, String, URL)
--- a/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/RuntimePermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -403,6 +403,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class RuntimePermission extends BasicPermission {
--- a/jdk/src/java.base/share/classes/java/lang/String.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/String.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,7 @@
 
 import java.io.ObjectStreamField;
 import java.io.UnsupportedEncodingException;
+import java.lang.annotation.Native;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -3063,8 +3064,8 @@
         return COMPACT_STRINGS && coder == LATIN1;
     }
 
-    static final byte LATIN1 = 0;
-    static final byte UTF16  = 1;
+    @Native static final byte LATIN1 = 0;
+    @Native static final byte UTF16  = 1;
 
     /*
      * StringIndexOutOfBoundsException  if {@code index} is
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1092,13 +1092,24 @@
         final MemberName member;
         private @Stable MethodHandle resolvedHandle;
         @Stable MethodHandle invoker;
+        private final MethodHandleImpl.Intrinsic intrinsicName;
 
         NamedFunction(MethodHandle resolvedHandle) {
-            this(resolvedHandle.internalMemberName(), resolvedHandle);
+            this(resolvedHandle.internalMemberName(), resolvedHandle, MethodHandleImpl.Intrinsic.NONE);
+        }
+        NamedFunction(MethodHandle resolvedHandle, MethodHandleImpl.Intrinsic intrinsic) {
+            this(resolvedHandle.internalMemberName(), resolvedHandle, intrinsic);
         }
         NamedFunction(MemberName member, MethodHandle resolvedHandle) {
+            this(member, resolvedHandle, MethodHandleImpl.Intrinsic.NONE);
+        }
+        NamedFunction(MemberName member, MethodHandle resolvedHandle, MethodHandleImpl.Intrinsic intrinsic) {
             this.member = member;
             this.resolvedHandle = resolvedHandle;
+            this.intrinsicName = intrinsic;
+            assert(resolvedHandle == null ||
+                   resolvedHandle.intrinsicName() == MethodHandleImpl.Intrinsic.NONE ||
+                   resolvedHandle.intrinsicName() == intrinsic) : resolvedHandle.intrinsicName() + " != " + intrinsic;
              // The following assert is almost always correct, but will fail for corner cases, such as PrivateInvokeTest.
              //assert(!isInvokeBasic(member));
         }
@@ -1111,6 +1122,7 @@
                 // necessary to pass BigArityTest
                 this.member = Invokers.invokeBasicMethod(basicInvokerType);
             }
+            this.intrinsicName = MethodHandleImpl.Intrinsic.NONE;
             assert(isInvokeBasic(member));
         }
 
@@ -1263,8 +1275,7 @@
         }
 
         public MethodHandleImpl.Intrinsic intrinsicName() {
-            return resolvedHandle == null ? MethodHandleImpl.Intrinsic.NONE
-                                          : resolvedHandle.intrinsicName();
+            return intrinsicName;
         }
     }
 
@@ -1741,15 +1752,15 @@
             Name[] idNames = new Name[] { argument(0, L_TYPE), argument(1, type) };
             idForm = new LambdaForm(2, idNames, 1, Kind.IDENTITY);
             idForm.compileToBytecode();
-            idFun = new NamedFunction(idMem, MethodHandleImpl.makeIntrinsic(
-                    idMem.getInvocationType(), idForm, MethodHandleImpl.Intrinsic.IDENTITY));
+            idFun = new NamedFunction(idMem, SimpleMethodHandle.make(idMem.getInvocationType(), idForm),
+                        MethodHandleImpl.Intrinsic.IDENTITY);
 
             Object zeValue = Wrapper.forBasicType(btChar).zero();
             Name[] zeNames = new Name[] { argument(0, L_TYPE), new Name(idFun, zeValue) };
             zeForm = new LambdaForm(1, zeNames, 1, Kind.ZERO);
             zeForm.compileToBytecode();
-            zeFun = new NamedFunction(zeMem, MethodHandleImpl.makeIntrinsic(
-                    zeMem.getInvocationType(), zeForm, MethodHandleImpl.Intrinsic.ZERO));
+            zeFun = new NamedFunction(zeMem, SimpleMethodHandle.make(zeMem.getInvocationType(), zeForm),
+                    MethodHandleImpl.Intrinsic.ZERO);
         }
 
         LF_zero[ord] = zeForm;
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -541,7 +541,7 @@
         // adjust the arguments
         MethodHandle aload = MethodHandles.arrayElementGetter(erasedArrayType);
         for (int i = 0; i < arrayLength; i++) {
-            Name loadArgument = new Name(aload, spreadParam, i);
+            Name loadArgument = new Name(new NamedFunction(aload, Intrinsic.ARRAY_LOAD), spreadParam, i);
             buf.insertExpression(exprPos + i, loadArgument);
             buf.replaceParameterByCopy(pos + i, exprPos + i);
         }
@@ -604,7 +604,8 @@
         for (int i = 0; i < collectorArity; i++) {
             newParams[i] = new Name(pos + i, argType);
         }
-        Name callCombiner = new Name(arrayCollector, (Object[]) /*...*/ newParams);
+        Name callCombiner = new Name(new NamedFunction(arrayCollector, Intrinsic.NEW_ARRAY),
+                                        (Object[]) /*...*/ newParams);
 
         // insert the new expression
         int exprPos = lambdaForm.arity();
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -592,7 +592,7 @@
                 names[nameCursor++] = new Name(getFunction(NF_checkSpreadArgument), array, spreadArgCount);
                 for (int j = 0; j < spreadArgCount; i++, j++) {
                     indexes[i] = nameCursor;
-                    names[nameCursor++] = new Name(aload, array, j);
+                    names[nameCursor++] = new Name(new NamedFunction(aload, Intrinsic.ARRAY_LOAD), array, j);
                 }
             } else if (i < indexes.length) {
                 indexes[i] = argIndex;
@@ -937,7 +937,7 @@
             names[PROFILE] = new Name(getFunction(NF_profileBoolean), names[CALL_TEST], names[GET_COUNTERS]);
         }
         // call selectAlternative
-        names[SELECT_ALT] = new Name(getConstantHandle(MH_selectAlternative), names[TEST], names[GET_TARGET], names[GET_FALLBACK]);
+        names[SELECT_ALT] = new Name(new NamedFunction(getConstantHandle(MH_selectAlternative), Intrinsic.SELECT_ALTERNATIVE), names[TEST], names[GET_TARGET], names[GET_FALLBACK]);
 
         // call target or fallback
         invokeArgs[0] = names[SELECT_ALT];
@@ -1008,7 +1008,7 @@
         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.GUARD_WITH_CATCH), args);
+        names[BOXED_ARGS] = new Name(new NamedFunction(invokeBasic, Intrinsic.GUARD_WITH_CATCH), args);
 
         // t_{i+1}:L=MethodHandleImpl.guardWithCatch(target:L,exType:L,catcher:L,t_{i}:L);
         Object[] gwcArgs = new Object[] {names[GET_TARGET], names[GET_CLASS], names[GET_CATCHER], names[BOXED_ARGS]};
@@ -1896,7 +1896,7 @@
             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);
+            names[BOXED_ARGS] = new Name(new NamedFunction(invokeBasic, Intrinsic.LOOP), args);
 
             // t_{i+1}:L=MethodHandleImpl.loop(localTypes:L,clauses:L,t_{i}:L);
             Object[] lArgs =
@@ -2133,7 +2133,7 @@
         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);
+        names[BOXED_ARGS] = new Name(new NamedFunction(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]};
@@ -2225,9 +2225,8 @@
                     return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "fillNewTypedArray",
                             MethodType.methodType(Object[].class, Object[].class, Integer.class, Object[].class));
                 case MH_selectAlternative:
-                    return makeIntrinsic(IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
-                            MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class)),
-                        Intrinsic.SELECT_ALTERNATIVE);
+                    return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "selectAlternative",
+                            MethodType.methodType(MethodHandle.class, boolean.class, MethodHandle.class, MethodHandle.class));
                 case MH_countedLoopPred:
                     return IMPL_LOOKUP.findStatic(MethodHandleImpl.class, "countedLoopPredicate",
                             MethodType.methodType(boolean.class, int.class, int.class));
--- a/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,13 +44,13 @@
  * </li>
  * </ul>
  *
- * <h1><a name="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h1>
+ * <h1><a id="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h1>
  * The following low-level information summarizes relevant parts of the
  * Java Virtual Machine specification.  For full details, please see the
  * current version of that specification.
  *
  * Each occurrence of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
- * <h2><a name="indyinsn"></a>{@code invokedynamic} instructions</h2>
+ * <h2><a id="indyinsn"></a>{@code invokedynamic} instructions</h2>
  * A dynamic call site is originally in an unlinked state.  In this state, there is
  * no target method for the call site to invoke.
  * <p>
@@ -77,7 +77,8 @@
  * <p>
  * The bootstrap method is invoked on at least three values:
  * <ul>
- * <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em> in which dynamic call site occurs </li>
+ * <li>a {@code MethodHandles.Lookup}, a lookup object on the <em>caller class</em>
+ *     in which dynamic call site occurs </li>
  * <li>a {@code String}, the method name mentioned in the call site </li>
  * <li>a {@code MethodType}, the resolved type descriptor of the call </li>
  * <li>optionally, between 1 and 251 additional static arguments taken from the constant pool </li>
@@ -165,17 +166,27 @@
  * Given these rules, here are examples of legal bootstrap method declarations,
  * given various numbers {@code N} of extra arguments.
  * The first rows (marked {@code *}) will work for any number of extra arguments.
- * <table border=1 cellpadding=5 summary="Static argument types">
- * <tr><th>N</th><th>sample bootstrap method</th></tr>
- * <tr><td>*</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
- * <tr><td>*</td><td><code>CallSite bootstrap(Object... args)</code></td></tr>
- * <tr><td>*</td><td><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
- * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
- * <tr><td>0</td><td><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
- * <tr><td>1</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
- * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
- * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
- * <tr><td>2</td><td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
+ * <table class="plain">
+ * <caption style="display:none">Static argument types</caption>
+ * <tr><th>N</th><th>Sample bootstrap method</th></tr>
+ * <tr><td>*</td>
+ *     <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
+ * <tr><td>*</td><td>
+ *     <code>CallSite bootstrap(Object... args)</code></td></tr>
+ * <tr><td>*</td><td>
+ *     <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
+ * <tr><td>0</td><td>
+ *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
+ * <tr><td>0</td><td>
+ *     <code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
+ * <tr><td>1</td><td>
+ *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
+ * <tr><td>2</td><td>
+ *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
+ * <tr><td>2</td><td>
+ *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
+ * <tr><td>2</td>
+ *     <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
  * </table>
  * The last example assumes that the extra arguments are of type
  * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.
--- a/jdk/src/java.base/share/classes/java/lang/module/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/module/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,7 @@
  * Classes to support module descriptors and creating configurations of modules
  * by means of resolution and service binding.
  *
- * <h2><a name="resolution">Resolution</a></h2>
+ * <h2><a id="resolution">Resolution</a></h2>
  *
  * <p> Resolution is the process of computing the transitive closure of a set
  * of root modules over a set of observable modules by resolving the
@@ -97,7 +97,7 @@
  * resolved so that it reads all other modules in the resulting configuration and
  * all modules in parent configurations. </p>
  *
- * <h2><a name="servicebinding">Service binding</a></h2>
+ * <h2><a id="servicebinding">Service binding</a></h2>
  *
  * <p> Service binding is the process of augmenting a graph of resolved modules
  * from the set of observable modules induced by the service-use dependence
--- a/jdk/src/java.base/share/classes/java/lang/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
  * by the {@code throw} statement. Subclasses of {@code Throwable}
  * represent errors and exceptions.
  *
- * <a name="charenc"></a>
+ * <a id="charenc"></a>
  * <h3>Character Encodings</h3>
  *
  * The specification of the {@link java.nio.charset.Charset
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Array.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Array.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  * conversion would occur.
  *
  * @author Nakul Saraiya
+ * @since 1.1
  */
 public final
 class Array {
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Constructor.java	Tue Jun 27 16:00:14 2017 -0400
@@ -59,6 +59,7 @@
  *
  * @author      Kenneth Russell
  * @author      Nakul Saraiya
+ * @since 1.1
  */
 public final class Constructor<T> extends Executable {
     private Class<T>            clazz;
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Field.java	Tue Jun 27 16:00:14 2017 -0400
@@ -60,6 +60,7 @@
  *
  * @author Kenneth Russell
  * @author Nakul Saraiya
+ * @since 1.1
  */
 public final
 class Field extends AccessibleObject implements Member {
--- a/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/InvocationTargetException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  *
  * @see Method
  * @see Constructor
+ * @since 1.1
  */
 public class InvocationTargetException extends ReflectiveOperationException {
     /**
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Member.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Member.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  * @see Constructor
  *
  * @author Nakul Saraiya
+ * @since 1.1
  */
 public
 interface Member {
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Method.java	Tue Jun 27 16:00:14 2017 -0400
@@ -63,6 +63,7 @@
  *
  * @author Kenneth Russell
  * @author Nakul Saraiya
+ * @since 1.1
  */
 public final class Method extends Executable {
     private Class<?>            clazz;
--- a/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/Modifier.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,6 +43,7 @@
  *
  * @author Nakul Saraiya
  * @author Kenneth Russell
+ * @since 1.1
  */
 public class Modifier {
 
--- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Tue Jun 27 16:00:14 2017 -0400
@@ -222,6 +222,7 @@
  * @author  Mike Cowlishaw
  * @author  Joseph D. Darcy
  * @author  Sergey V. Kuksenko
+ * @since 1.1
  */
 public class BigDecimal extends Number implements Comparable<BigDecimal> {
     /**
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Tue Jun 27 16:00:14 2017 -0400
@@ -75,7 +75,7 @@
  * <blockquote><table class="borderless">
  *   <caption style="display:none">Description of unicast and multicast address types</caption>
  *   <tbody>
- *   <tr><th valign=top><i>unicast</i></th>
+ *   <tr><th style="vertical-align:top"><i>unicast</i></th>
  *       <td>An identifier for a single interface. A packet sent to
  *         a unicast address is delivered to the interface identified by
  *         that address.
@@ -94,7 +94,7 @@
  *         IP address loops around and becomes IP input on the local
  *         host. This address is often used when testing a
  *         client.</td></tr>
- *   <tr><th valign=top><i>multicast</i></th>
+ *   <tr><th style="vertical-align:top"><i>multicast</i></th>
  *       <td>An identifier for a set of interfaces (typically belonging
  *         to different nodes). A packet sent to a multicast address is
  *         delivered to all interfaces identified by that address.</td></tr>
--- a/jdk/src/java.base/share/classes/java/net/NetPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/NetPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -167,6 +167,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class NetPermission extends BasicPermission {
--- a/jdk/src/java.base/share/classes/java/net/SocketOptions.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/SocketOptions.java	Tue Jun 27 16:00:14 2017 -0400
@@ -40,6 +40,7 @@
  * DatagramSocket and MulticastSocket.
  *
  * @author David Brown
+ * @since 1.1
  */
 
 
--- a/jdk/src/java.base/share/classes/java/net/SocketPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/SocketPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -142,6 +142,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  *
  * @serial exclude
  */
--- a/jdk/src/java.base/share/classes/java/net/URI.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/URI.java	Tue Jun 27 16:00:14 2017 -0400
@@ -253,32 +253,32 @@
  * which are taken from that specification, are used below to describe these
  * constraints:
  *
- * <blockquote><table>
+ * <blockquote><table class="borderless">
  * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
  *   <tbody>
- *   <tr><th valign=top><i>alpha</i></th>
+ *   <tr><th style="vertical-align:top"><i>alpha</i></th>
  *       <td>The US-ASCII alphabetic characters,
  *        {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
  *        and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr>
- *   <tr><th valign=top><i>digit</i></th>
+ *   <tr><th style="vertical-align:top"><i>digit</i></th>
  *       <td>The US-ASCII decimal digit characters,
  *       {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr>
- *   <tr><th valign=top><i>alphanum</i></th>
+ *   <tr><th style="vertical-align:top"><i>alphanum</i></th>
  *       <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
- *   <tr><th valign=top><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *   <tr><th style="vertical-align:top"><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *       <td>All <i>alphanum</i> characters together with those in the string
  *        {@code "_-!.~'()*"}</td></tr>
- *   <tr><th valign=top><i>punct</i></th>
+ *   <tr><th style="vertical-align:top"><i>punct</i></th>
  *       <td>The characters in the string {@code ",;:$&+="}</td></tr>
- *   <tr><th valign=top><i>reserved</i></th>
+ *   <tr><th style="vertical-align:top"><i>reserved</i></th>
  *       <td>All <i>punct</i> characters together with those in the string
  *        {@code "?/[]@"}</td></tr>
- *   <tr><th valign=top><i>escaped</i></th>
+ *   <tr><th style="vertical-align:top"><i>escaped</i></th>
  *       <td>Escaped octets, that is, triplets consisting of the percent
  *           character ({@code '%'}) followed by two hexadecimal digits
  *           ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
  *           {@code 'a'}-{@code 'f'})</td></tr>
- *   <tr><th valign=top><i>other</i></th>
+ *   <tr><th style="vertical-align:top"><i>other</i></th>
  *       <td>The Unicode characters that are not in the US-ASCII character set,
  *           are not control characters (according to the {@link
  *           java.lang.Character#isISOControl(char) Character.isISOControl}
--- a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,6 @@
+<!DOCTYPE HTML>
 <!--
- Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -22,15 +23,14 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 -->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML>
 <HEAD>
 	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
 	<TITLE>Networking Properties</TITLE>
 </HEAD>
 <BODY LANG="en-US" DIR="LTR">
-<H1 ALIGN=CENTER>Networking Properties</H1>
-<P ALIGN=LEFT>There are a few standard system properties used to
+<H1 style="text-align:center">Networking Properties</H1>
+<P>There are a few standard system properties used to
 alter the mechanisms and behavior of the various classes of the
 java.net package. Some are checked only once at startup of the VM,
 and therefore are best set using the -D option of the java command,
@@ -39,7 +39,7 @@
 The purpose of this document is to list
 and detail all of these properties.</P>
 <P>If there is no special note, a property value is checked every time it is used.</P>
-<a name="Ipv4IPv6"></a>
+<a id="Ipv4IPv6"></a>
 <H2>IPv4 / IPv6</H2>
 <UL>
 	<LI><P><B>java.net.preferIPv4Stack</B> (default: false)<BR>
@@ -62,7 +62,7 @@
     returned by the operating system.</P>
 </UL>
 <P>Both of these properties are checked only once, at startup.</P>
-<a name="Proxies"></a>
+<a id="Proxies"></a>
 <H2>Proxies</H2>
 <P>A proxy server allows indirect connection to network services and
 is used mainly for security (to get through firewalls) and
@@ -155,7 +155,7 @@
 	globally through their user interface). Note that this property is
 	checked only once at startup.</P>
 </UL>
-<a name="MiscHTTP"></a>
+<a id="MiscHTTP"></a>
 <H2>Misc HTTP properties</H2>
 <UL>
 	<LI><P><B>http.agent</B> (default: &ldquo;Java/&lt;version&gt;&rdquo;)<BR>
@@ -214,7 +214,7 @@
 	</OL>
 </UL>
 <P>All these properties are checked only once at startup.</P>
-<a name="AddressCache"></a>
+<a id="AddressCache"></a>
 <H2>Address Cache</H2>
 <P>The java.net package, when doing name resolution, uses an address
 cache for both security and performance reasons. Any address
--- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,33 +28,46 @@
  * performing I/O operations, such as files and sockets; defines selectors, for
  * multiplexed, non-blocking I/O operations.
  *
- * <a name="channels"></a>
+ * <a id="channels"></a>
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists channels and their descriptions">
- * <tr><th align="left">Channels</th><th align="left">Description</th></tr>
- * <tr><td valign=top><i>{@link java.nio.channels.Channel}</i></td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">Lists channels and their descriptions</caption>
+ * <tr><th style="text-align:left">Channels</th>
+ *     <th style="text-align:left">Description</th></tr>
+ * <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td>
  *     <td>A nexus for I/O operations</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
  *     <td>Can read into a buffer</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
  *     <td>Can read into a sequence of&nbsp;buffers</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
  *     <td>Can write from a buffer</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
  *     <td>Can write from a sequence of&nbsp;buffers</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
  *     <td>Can read/write to/from a&nbsp;buffer</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
- *     <td>A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
+ *     <td>A {@code ByteChannel} connected to an entity that contains a variable-length
+ *         sequence of bytes</td></tr>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
  *     <td>Supports asynchronous I/O operations.</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
  *     <td>Can read and write bytes asynchronously</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
  *     <td>A channel to a network socket</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
  *     <td>Can join Internet Protocol (IP) multicast groups</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.Channels}</td>
+ * <tr><td style="vertical-align:top">{@link java.nio.channels.Channels}</td>
  *     <td>Utility methods for channel/stream interoperation</td></tr>
  * </table></blockquote>
  *
@@ -109,13 +122,19 @@
  * be constructed that uses a given charset to encode characters into bytes and
  * write them to a given writable byte channel.
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists file channels and their descriptions">
- * <tr><th align="left">File channels</th><th align="left">Description</th></tr>
- * <tr><td valign=top>{@link java.nio.channels.FileChannel}</td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">
+ *         Lists file channels and their descriptions</caption>
+ * <tr><th style="text-align:left">File channels</th>
+ *     <th style="text-align:left">Description</th></tr>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.FileChannel}</td>
  *     <td>Reads, writes, maps, and manipulates files</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.FileLock}</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.FileLock}</td>
  *     <td>A lock on a (region of a) file</td></tr>
- * <tr><td valign=top>{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
  *     <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr>
  * </table></blockquote>
  *
@@ -136,27 +155,35 @@
  * file channel connected to the same underlying file as the {@link java.io}
  * class.
  *
- * <a name="multiplex"></a>
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists multiplexed, non-blocking channels and their descriptions">
- * <tr><th align="left">Multiplexed, non-blocking I/O</th><th align="left"><p>Description</th></tr>
- * <tr><td valign=top>{@link java.nio.channels.SelectableChannel}</td>
+ * <a id="multiplex"></a>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">
+ *         Lists multiplexed, non-blocking channels and their descriptions</caption>
+ * <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th>
+ *     <th style="text-align:left">Description</th></tr>
+ * <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td>
  *     <td>A channel that can be multiplexed</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
  *     <td>A channel to a datagram-oriented socket</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
  *     <td>The write end of a pipe</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
  *     <td>The read end of a pipe</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
  *     <td>A channel to a stream-oriented listening socket</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
  *     <td>A channel for a stream-oriented connecting socket</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.Selector}</td>
+ * <tr><td style="vertical-align:top">{@link java.nio.channels.Selector}</td>
  *     <td>A multiplexor of selectable channels</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.SelectionKey}</td>
+ * <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td>
  *     <td>A token representing the registration <br> of a channel
  *     with&nbsp;a&nbsp;selector</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.Pipe}</td>
+ * <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td>
  *     <td>Two channels that form a unidirectional&nbsp;pipe</td></tr>
  * </table></blockquote>
  *
@@ -222,19 +249,27 @@
  * directly; custom channel classes should extend the appropriate {@link
  * java.nio.channels.SelectableChannel} subclasses defined in this package.
  *
- * <a name="async"></a>
+ * <a id="async"></a>
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Lists asynchronous channels and their descriptions">
- * <tr><th align="left">Asynchronous I/O</th><th align="left">Description</th></tr>
- * <tr><td valign=top>{@link java.nio.channels.AsynchronousFileChannel}</td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">
+ *         Lists asynchronous channels and their descriptions</caption>
+ * <tr><th style="text-align:left">
+ *     Asynchronous I/O</th><th style="text-align:left">Description</th></tr>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.AsynchronousFileChannel}</td>
  *     <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.AsynchronousSocketChannel}</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.AsynchronousSocketChannel}</td>
  *     <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
  *     <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.CompletionHandler}</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.CompletionHandler}</td>
  *     <td>A handler for consuming the result of an asynchronous operation</td></tr>
- * <tr><td valign=top>{@link java.nio.channels.AsynchronousChannelGroup}</td>
+ * <tr><td style="vertical-align:top">
+ *     {@link java.nio.channels.AsynchronousChannelGroup}</td>
  *     <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
  * </table></blockquote>
  *
@@ -277,7 +312,6 @@
  * so that sophisticated users can take advantage of operating-system-specific
  * asynchronous I/O mechanisms when very high performance is required.
  *
- * <hr width="80%">
  * <p> Unless otherwise noted, passing a {@code null} argument to a constructor
  * or method in any class or interface in this package will cause a {@link
  * java.lang.NullPointerException NullPointerException} to be thrown.
--- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,17 +27,19 @@
  * Defines charsets, decoders, and encoders, for translating between
  * bytes and Unicode characters.
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Summary of charsets, decoders, and encoders in this package">
- *  <tr><th align="left">Class name</th><th align="left">Description</th></tr>
- *   <tr><td valign=top>{@link java.nio.charset.Charset}</td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
+ *  <tr><th style="text-align:left">Class name</th>
+ *      <th style="text-align:left"><th>DescriptiPath
+ *   <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
  *       <td>A named mapping between characters<br>and bytes</td></tr>
- *   <tr><td valign=top>{@link java.nio.charset.CharsetDecoder}</td>
+ *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>
  *       <td>Decodes bytes into characters</td></tr>
- *   <tr><td valign=top>{@link java.nio.charset.CharsetEncoder}&nbsp;&nbsp;</td>
+ *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
  *       <td>Encodes characters into bytes</td></tr>
- *   <tr><td valign=top>{@link java.nio.charset.CoderResult}&nbsp;&nbsp;</td>
+ *   <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
  *       <td>Describes coder results</td></tr>
- *   <tr><td valign=top>{@link java.nio.charset.CodingErrorAction}&nbsp;&nbsp;</td>
+ *   <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
  *       <td>Describes actions to take when<br>coding errors are detected</td></tr>
  *
  * </table></blockquote>
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,25 +26,41 @@
 /**
  * Interfaces and classes providing access to file and file system attributes.
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Attribute views">
- * <tr><th align="left">Attribute views</th><th align="left">Description</th></tr>
- * <tr><td valign=top><i>{@link java.nio.file.attribute.AttributeView}</i></td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">Attribute views</caption>
+ * <tr><th style="text-align:left">Attribute views</th>
+ *     <th style="text-align:left">Description</th></tr>
+ * <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td>
  *     <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
  *     <td>Can read or update file attributes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update a basic set of file attributes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update POSIX defined file attributes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update FAT file attributes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update the owner of a file</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update Access Control Lists</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;&nbsp;&nbsp;
+ *     <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
  *     <td>Can read or update user-defined file attributes</td></tr>
- * <tr><td valign=top>&nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
+ * <tr><td style="vertical-align:top">
+ *     &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
  *     <td>Can read or update file system attributes</td></tr>
  * </table></blockquote>
  *
--- a/jdk/src/java.base/share/classes/java/nio/file/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/nio/file/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
  * package is used by service provider implementors wishing to extend the
  * platform default provider, or to construct other provider implementations. </p>
  *
- * <h3><a name="links">Symbolic Links</a></h3>
+ * <h3><a id="links">Symbolic Links</a></h3>
  * <p> Many operating systems and file systems support for <em>symbolic links</em>.
  * A symbolic link is a special file that serves as a reference to another file.
  * For the most part, symbolic links are transparent to applications and
@@ -45,7 +45,7 @@
  * that are semantically close but support for these other types of links is
  * not included in this package. </p>
  *
- * <h3><a name="interop">Interoperability</a></h3>
+ * <h3><a id="interop">Interoperability</a></h3>
  * <p> The {@link java.io.File} class defines the {@link java.io.File#toPath
  * toPath} method to construct a {@link java.nio.file.Path} by converting
  * the abstract path represented by the {@code java.io.File} object. The resulting
@@ -65,7 +65,7 @@
  * or on some other machine.  The exact nature of any such inconsistencies are
  * system-dependent and are therefore unspecified. </p>
  *
- * <h3><a name="integrity">Synchronized I/O File Integrity</a></h3>
+ * <h3><a id="integrity">Synchronized I/O File Integrity</a></h3>
  * <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
  * java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
  * to require that updates to the file are written synchronously to the underlying
--- a/jdk/src/java.base/share/classes/java/nio/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/nio/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,30 +60,33 @@
  * the contents of which can be used to extend the platform's default
  * implementations or to construct alternative implementations.
  *
- * <a name="buffers"> </a>
+ * <a id="buffers"> </a>
  *
- * <blockquote><table cellspacing=1 cellpadding=0 summary="Description of the various buffers">
- *   <tr><th align="left">Buffers</th><th align="left">Description</th></tr>
- *   <tr><td valign=top>{@link java.nio.Buffer}</td>
+ * <blockquote><table class="borderless">
+ *     <caption style="display:none">Description of the various buffers</caption>
+ *   <tr><th style="text-align:left">Buffers</th>
+ *       <th style="text-align:left">Description</th></tr>
+ *   <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td>
  *       <td>Position, limit, and capacity;
  *           <br>clear, flip, rewind, and mark/reset</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
  *       <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
+ *   <tr><td style="vertical-align:top">
+ *       &nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
  *       <td>A byte buffer mapped to a file</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
  *       <td>Get/put, compact; allocate,&nbsp;wrap</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top>&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
+ *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
  *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td valign=top>{@link java.nio.ByteOrder}</td>
+ *   <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td>
  *       <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr>
  * </table></blockquote>
  *
--- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java	Tue Jun 27 16:00:14 2017 -0400
@@ -74,6 +74,7 @@
  * @see AccessController
  *
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class AccessControlContext {
--- a/jdk/src/java.base/share/classes/java/security/AccessControlException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AccessControlException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  *
  * @author Li Gong
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public class AccessControlException extends SecurityException {
--- a/jdk/src/java.base/share/classes/java/security/AccessController.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AccessController.java	Tue Jun 27 16:00:14 2017 -0400
@@ -259,6 +259,7 @@
  *
  * @author Li Gong
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class AccessController {
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -61,11 +61,17 @@
  * </ul>
  *
  * <P>In case the client does not explicitly initialize the
- * AlgorithmParameterGenerator
- * (via a call to an {@code init} method), each provider must supply (and
- * document) a default initialization. For example, the Sun provider uses a
- * default modulus prime size of 1024 bits for the generation of DSA
- * parameters.
+ * AlgorithmParameterGenerator (via a call to an {@code init} method),
+ * each provider must supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the AlgorithmParameterGenerator defaults
+ * used by JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * AlgorithmParameterGenerator instead of relying on provider-specific defaults.
  *
  * <p> Every implementation of the Java platform is required to support the
  * following standard {@code AlgorithmParameterGenerator} algorithms and
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,8 +39,15 @@
  * <p> In case the client does not explicitly initialize the
  * AlgorithmParameterGenerator (via a call to an {@code engineInit}
  * method), each provider must supply (and document) a default initialization.
- * For example, the Sun provider uses a default modulus prime size of 1024
- * bits for the generation of DSA parameters.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the AlgorithmParameterGenerator defaults
+ * used by JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * AlgorithmParameterGenerator instead of relying on provider-specific defaults.
  *
  * @author Jan Luehe
  *
--- a/jdk/src/java.base/share/classes/java/security/AllPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,6 +51,7 @@
  *
  *
  * @author Roland Schemers
+ * @since 1.2
  *
  * @serial exclude
  */
--- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -62,6 +62,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public abstract class BasicPermission extends Permission
--- a/jdk/src/java.base/share/classes/java/security/Certificate.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Certificate.java	Tue Jun 27 16:00:14 2017 -0400
@@ -56,6 +56,7 @@
  * the certificate and satisfy itself of its validity.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  * @deprecated A new certificate handling package is created in the Java platform.
  *             This Certificate interface is entirely deprecated and
  *             is here to allow for a smooth transition to the new
--- a/jdk/src/java.base/share/classes/java/security/CodeSource.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/CodeSource.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,7 @@
  *
  * @author Li Gong
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public class CodeSource implements java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/DigestException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/DigestException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * This is the generic Message Digest exception.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 public class DigestException extends GeneralSecurityException {
 
--- a/jdk/src/java.base/share/classes/java/security/DigestInputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/DigestInputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -59,6 +59,7 @@
  * @see DigestOutputStream
  *
  * @author Benjamin Renaud
+ * @since 1.2
  */
 
 public class DigestInputStream extends FilterInputStream {
--- a/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,6 +51,7 @@
  * @see DigestInputStream
  *
  * @author Benjamin Renaud
+ * @since 1.2
  */
 public class DigestOutputStream extends FilterOutputStream {
 
--- a/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * security-related exception classes that extend from it.
  *
  * @author Jan Luehe
+ * @since 1.2
  */
 
 public class GeneralSecurityException extends Exception {
--- a/jdk/src/java.base/share/classes/java/security/Guard.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Guard.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  *
  * @author Roland Schemers
  * @author Li Gong
+ * @since 1.2
  */
 
 public interface Guard {
--- a/jdk/src/java.base/share/classes/java/security/GuardedObject.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/GuardedObject.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,7 @@
  *
  * @author Roland Schemers
  * @author Li Gong
+ * @since 1.2
  */
 
 public class GuardedObject implements java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/Identity.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Identity.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,6 +51,7 @@
  * @see Principal
  *
  * @author Benjamin Renaud
+ * @since 1.1
  * @deprecated This class is no longer used. Its functionality has been
  * replaced by {@code java.security.KeyStore}, the
  * {@code java.security.cert} package, and
--- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java	Tue Jun 27 16:00:14 2017 -0400
@@ -55,6 +55,7 @@
  * @see Key
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  * @deprecated This class is no longer used. Its functionality has been
  * replaced by {@code java.security.KeyStore}, the
--- a/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * length, uninitialized, etc).
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class InvalidKeyException extends KeyException {
--- a/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * to a method.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class InvalidParameterException extends IllegalArgumentException {
--- a/jdk/src/java.base/share/classes/java/security/Key.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Key.java	Tue Jun 27 16:00:14 2017 -0400
@@ -97,6 +97,7 @@
  * @see Signer
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public interface Key extends java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/KeyException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/KeyException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @see KeyManagementException
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class KeyException extends GeneralSecurityException {
--- a/jdk/src/java.base/share/classes/java/security/KeyManagementException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/KeyManagementException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  * </ul>
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  * @see Key
  * @see KeyException
--- a/jdk/src/java.base/share/classes/java/security/KeyPair.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/KeyPair.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  * @see PrivateKey
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public final class KeyPair implements java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -95,8 +95,15 @@
  * <p>In case the client does not explicitly initialize the KeyPairGenerator
  * (via a call to an {@code initialize} method), each provider must
  * supply (and document) a default initialization.
- * For example, the <i>Sun</i> provider uses a default modulus size (keysize)
- * of 1024 bits for DSA key pairs.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the KeyPairGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyPairGenerator instead of relying on provider-specific defaults.
  *
  * <p>Note that this class is abstract and extends from
  * {@code KeyPairGeneratorSpi} for historical reasons.
@@ -121,6 +128,7 @@
  * other algorithms are supported.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  * @see java.security.spec.AlgorithmParameterSpec
  */
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,10 +39,18 @@
  * <p> In case the client does not explicitly initialize the KeyPairGenerator
  * (via a call to an {@code initialize} method), each provider must
  * supply (and document) a default initialization.
- * For example, the <i>Sun</i> provider uses a default modulus size (keysize)
- * of 1024 bits.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the KeyPairGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyPairGenerator instead of relying on provider-specific defaults.
  *
  * @author Benjamin Renaud
+ * @since 1.2
  *
  *
  * @see KeyPairGenerator
--- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -96,6 +96,7 @@
  * other algorithms are supported.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  * @see DigestInputStream
  * @see DigestOutputStream
--- a/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,6 +43,7 @@
  * <p> Implementations are free to implement the Cloneable interface.
  *
  * @author Benjamin Renaud
+ * @since 1.2
  *
  *
  * @see MessageDigest
--- a/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * requested but is not available in the environment.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class NoSuchAlgorithmException extends GeneralSecurityException {
--- a/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * requested but is not available in the environment.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class NoSuchProviderException extends GeneralSecurityException {
--- a/jdk/src/java.base/share/classes/java/security/Permission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Permission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -60,6 +60,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public abstract class Permission implements Guard, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/PermissionCollection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PermissionCollection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -91,6 +91,7 @@
  *
  *
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public abstract class PermissionCollection implements java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/Permissions.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Permissions.java	Tue Jun 27 16:00:14 2017 -0400
@@ -75,6 +75,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  *
  * @serial exclude
  */
--- a/jdk/src/java.base/share/classes/java/security/Policy.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Policy.java	Tue Jun 27 16:00:14 2017 -0400
@@ -78,6 +78,7 @@
  *
  * @author Roland Schemers
  * @author Gary Ellison
+ * @since 1.2
  * @see java.security.Provider
  * @see java.security.ProtectionDomain
  * @see java.security.Permission
--- a/jdk/src/java.base/share/classes/java/security/Principal.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Principal.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  * @see java.security.cert.X509Certificate
  *
  * @author Li Gong
+ * @since 1.1
  */
 public interface Principal {
 
--- a/jdk/src/java.base/share/classes/java/security/PrivateKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PrivateKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -54,6 +54,7 @@
  *
  * @author Benjamin Renaud
  * @author Josh Bloch
+ * @since 1.1
  */
 
 public interface PrivateKey extends Key, javax.security.auth.Destroyable {
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java	Tue Jun 27 16:00:14 2017 -0400
@@ -34,6 +34,7 @@
  * throw checked exceptions must use {@code PrivilegedExceptionAction}
  * instead.
  *
+ * @since 1.2
  * @see AccessController
  * @see AccessController#doPrivileged(PrivilegedAction)
  * @see PrivilegedExceptionAction
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,6 +43,7 @@
  * <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}
  * method, as well as the aforementioned "legacy method."
  *
+ * @since 1.2
  * @see PrivilegedExceptionAction
  * @see AccessController#doPrivileged(PrivilegedExceptionAction)
  * @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext)
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  * computations that do not throw
  * checked exceptions should use {@code PrivilegedAction} instead.
  *
+ * @since 1.2
  * @see AccessController
  * @see AccessController#doPrivileged(PrivilegedExceptionAction)
  * @see AccessController#doPrivileged(PrivilegedExceptionAction,
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java	Tue Jun 27 16:00:14 2017 -0400
@@ -59,6 +59,7 @@
  * @author Li Gong
  * @author Roland Schemers
  * @author Gary Ellison
+ * @since 1.2
  */
 
 public class ProtectionDomain {
--- a/jdk/src/java.base/share/classes/java/security/Provider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -102,6 +102,7 @@
  *
  * @author Benjamin Renaud
  * @author Andreas Sterbenz
+ * @since 1.1
  */
 public abstract class Provider extends Properties {
 
--- a/jdk/src/java.base/share/classes/java/security/ProviderException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/ProviderException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * throw specialized, provider-specific runtime errors.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 public class ProviderException extends RuntimeException {
 
--- a/jdk/src/java.base/share/classes/java/security/PublicKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/PublicKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -34,6 +34,7 @@
  * See, for example, the DSAPublicKey interface in
  * {@code java.security.interfaces}.
  *
+ * @since 1.1
  * @see Key
  * @see PrivateKey
  * @see Certificate
--- a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  *
  * @author  Li Gong
  * @author  Roland Schemers
+ * @since 1.2
  */
 public class SecureClassLoader extends ClassLoader {
     /*
--- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java	Tue Jun 27 16:00:14 2017 -0400
@@ -143,6 +143,7 @@
  *
  * @author Benjamin Renaud
  * @author Josh Bloch
+ * @since 1.1
  */
 
 public class SecureRandom extends java.util.Random {
--- a/jdk/src/java.base/share/classes/java/security/Security.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Security.java	Tue Jun 27 16:00:14 2017 -0400
@@ -45,6 +45,7 @@
  * {@code conf/security/java.security} in the Java installation directory.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public final class Security {
--- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -333,6 +333,7 @@
  *
  * @author Marianne Mueller
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class SecurityPermission extends BasicPermission {
--- a/jdk/src/java.base/share/classes/java/security/Signature.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Signature.java	Tue Jun 27 16:00:14 2017 -0400
@@ -113,6 +113,7 @@
  * other algorithms are supported.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  */
 
--- a/jdk/src/java.base/share/classes/java/security/SignatureException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SignatureException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * This is the generic Signature exception.
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 
 public class SignatureException extends GeneralSecurityException {
--- a/jdk/src/java.base/share/classes/java/security/SignatureSpi.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SignatureSpi.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,7 @@
  * of a particular signature algorithm.
  *
  * @author Benjamin Renaud
+ * @since 1.2
  *
  *
  * @see Signature
--- a/jdk/src/java.base/share/classes/java/security/SignedObject.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/SignedObject.java	Tue Jun 27 16:00:14 2017 -0400
@@ -114,6 +114,7 @@
  * @see Signature
  *
  * @author Li Gong
+ * @since 1.2
  */
 
 public final class SignedObject implements Serializable {
--- a/jdk/src/java.base/share/classes/java/security/Signer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/Signer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  * @see Identity
  *
  * @author Benjamin Renaud
+ * @since 1.1
  *
  * @deprecated This class is no longer used. Its functionality has been
  * replaced by {@code java.security.KeyStore}, the
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -96,6 +96,7 @@
  *
  *
  * @author Roland Schemers
+ * @since 1.2
  */
 
 public final class UnresolvedPermission extends Permission
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,6 +43,7 @@
  *
  *
  * @author Roland Schemers
+ * @since 1.2
  *
  * @serial include
  */
--- a/jdk/src/java.base/share/classes/java/security/acl/Acl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/Acl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -82,6 +82,7 @@
  * @see java.security.acl.Acl#getPermissions
  *
  * @author Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java	Tue Jun 27 16:00:14 2017 -0400
@@ -50,6 +50,7 @@
  * @see java.security.acl.Acl
  *
  * @author      Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * non-existent ACL (Access Control List).
  *
  * @author      Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/Group.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/Group.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * Principal or Group.
  *
  * @author      Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * @see java.security.acl.Owner#deleteOwner
  *
  * @author Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * the object, but the Principal attempting the modification is not an owner.
  *
  * @author      Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/acl/Owner.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/Owner.java	Tue Jun 27 16:00:14 2017 -0400
@@ -34,6 +34,7 @@
  * interface.) The initial owner Principal should be specified as an
  * argument to the constructor of the class implementing this interface.
  *
+ * @since 1.1
  * @see java.security.acl.Acl
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
--- a/jdk/src/java.base/share/classes/java/security/acl/Permission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/acl/Permission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * a particular type of access to a resource.
  *
  * @author Satish Dharmaraj
+ * @since 1.1
  *
  * @deprecated This package has been replaced by {@code java.security.Policy}
  *      and related classes since 1.2.
--- a/jdk/src/java.base/share/classes/java/security/cert/CRLException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CRLException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * CRL (Certificate Revocation List) Exception.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 public class CRLException extends GeneralSecurityException {
 
--- a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java	Tue Jun 27 16:00:14 2017 -0400
@@ -57,6 +57,7 @@
  * @see CertificateFactory
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 
 public abstract class Certificate implements java.io.Serializable {
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * occurs while attempting to encode a certificate.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 public class CertificateEncodingException extends CertificateException {
 
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * This exception indicates one of a variety of certificate problems.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  * @see Certificate
  */
 public class CertificateException extends GeneralSecurityException {
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * of the certificate.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 public class CertificateExpiredException extends CertificateException {
 
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * validity period.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 public class CertificateNotYetValidException extends CertificateException {
 
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * are found in the Certificate.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 public class CertificateParsingException extends CertificateException {
 
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java	Tue Jun 27 16:00:14 2017 -0400
@@ -103,6 +103,7 @@
  * }</pre>
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  *
  *
  * @see CRL
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java	Tue Jun 27 16:00:14 2017 -0400
@@ -62,6 +62,7 @@
  * @see X509Extension
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 
 public abstract class X509CRLEntry implements X509Extension {
--- a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java	Tue Jun 27 16:00:14 2017 -0400
@@ -95,6 +95,7 @@
  * </pre>
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  *
  *
  * @see Certificate
--- a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java	Tue Jun 27 16:00:14 2017 -0400
@@ -65,6 +65,7 @@
  * be handled by a <em>Class</em> that understands the extension.
  *
  * @author Hemma Prafullchandra
+ * @since 1.2
  */
 
 public interface X509Extension {
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *
  * @author Benjamin Renaud
  * @author Josh Bloch
+ * @since 1.1
  */
 public interface DSAKey {
 
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -65,6 +65,7 @@
  * <p>Note: Some earlier implementations of this interface may not support
  * larger sizes of DSA parameters such as 2048 and 3072-bit.
  *
+ * @since 1.1
  * @see java.security.KeyPairGenerator
  */
 public interface DSAKeyPairGenerator {
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  *
  * @author Benjamin Renaud
  * @author Josh Bloch
+ * @since 1.1
  */
 public interface DSAParams {
 
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  * @see DSAPublicKey
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
 
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  * @see DSAPrivateKey
  *
  * @author Benjamin Renaud
+ * @since 1.1
  */
 public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
 
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * using the <i>Chinese Remainder Theorem</i> (CRT) information values.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  *
  * @see RSAPrivateKey
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * The interface to an RSA private key.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  *
  * @see RSAPrivateCrtKey
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * The interface to an RSA public key.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  */
 
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * efficiency.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  *
  * @see java.security.Key
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * This class specifies an RSA private key.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  *
  * @see java.security.Key
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * This class specifies an RSA public key.
  *
  * @author Jan Luehe
+ * @since 1.2
  *
  *
  * @see java.security.Key
--- a/jdk/src/java.base/share/classes/java/text/BreakIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/BreakIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -221,6 +221,7 @@
  * and the next is a word; otherwise, it's the material between words.)
  * </blockquote>
  *
+ * @since 1.1
  * @see CharacterIterator
  *
  */
--- a/jdk/src/java.base/share/classes/java/text/CharacterIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/CharacterIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -98,6 +98,7 @@
  * }
  * }</pre>
  *
+ * @since 1.1
  * @see StringCharacterIterator
  * @see AttributedCharacterIterator
  */
--- a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -163,6 +163,7 @@
  * @see          DecimalFormat
  * @see          MessageFormat
  * @author       Mark Davis
+ * @since 1.1
  */
 public class ChoiceFormat extends NumberFormat {
 
--- a/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -104,6 +104,7 @@
  * @see                Collator
  * @see                RuleBasedCollator
  * @author             Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
  */
 public final class CollationElementIterator
 {
--- a/jdk/src/java.base/share/classes/java/text/CollationKey.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/CollationKey.java	Tue Jun 27 16:00:14 2017 -0400
@@ -95,6 +95,7 @@
  * @see          Collator
  * @see          RuleBasedCollator
  * @author       Helena Shih
+ * @since 1.1
  */
 
 public abstract class CollationKey implements Comparable<CollationKey> {
--- a/jdk/src/java.base/share/classes/java/text/Collator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/Collator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -123,6 +123,7 @@
  * @see         CollationElementIterator
  * @see         Locale
  * @author      Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
  */
 
 public abstract class Collator
--- a/jdk/src/java.base/share/classes/java/text/DateFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/DateFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -167,6 +167,7 @@
  * @see          java.util.GregorianCalendar
  * @see          java.util.TimeZone
  * @author       Mark Davis, Chen-Lieh Huang, Alan Liu
+ * @since 1.1
  */
 public abstract class DateFormat extends Format {
 
--- a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java	Tue Jun 27 16:00:14 2017 -0400
@@ -98,6 +98,7 @@
  * @see          SimpleDateFormat
  * @see          java.util.SimpleTimeZone
  * @author       Chen-Lieh Huang
+ * @since 1.1
  */
 public class DateFormatSymbols implements Serializable, Cloneable {
 
--- a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -381,6 +381,7 @@
  * @see          ParsePosition
  * @author       Mark Davis
  * @author       Alan Liu
+ * @since 1.1
  */
 public class DecimalFormat extends NumberFormat {
 
--- a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java	Tue Jun 27 16:00:14 2017 -0400
@@ -60,6 +60,7 @@
  * @see          DecimalFormat
  * @author       Mark Davis
  * @author       Alan Liu
+ * @since 1.1
  */
 
 public class DecimalFormatSymbols implements Cloneable, Serializable {
--- a/jdk/src/java.base/share/classes/java/text/FieldPosition.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/FieldPosition.java	Tue Jun 27 16:00:14 2017 -0400
@@ -68,6 +68,7 @@
  * <code>formatToCharacterIterator</code>.
  *
  * @author      Mark Davis
+ * @since 1.1
  * @see         java.text.Format
  */
 public class FieldPosition {
--- a/jdk/src/java.base/share/classes/java/text/Format.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/Format.java	Tue Jun 27 16:00:14 2017 -0400
@@ -129,6 +129,7 @@
  * @see          java.text.DateFormat
  * @see          java.text.MessageFormat
  * @author       Mark Davis
+ * @since 1.1
  */
 public abstract class Format implements Serializable, Cloneable {
 
--- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -344,6 +344,7 @@
  * @see          SimpleDateFormat
  *
  * @author       Mark Davis
+ * @since 1.1
  */
 
 public class MessageFormat extends Format {
--- a/jdk/src/java.base/share/classes/java/text/NumberFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/NumberFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -185,6 +185,7 @@
  * @see          ChoiceFormat
  * @author       Mark Davis
  * @author       Helena Shih
+ * @since 1.1
  */
 public abstract class NumberFormat extends Format  {
 
--- a/jdk/src/java.base/share/classes/java/text/ParseException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/ParseException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -45,6 +45,7 @@
  * @see java.text.Format
  * @see java.text.FieldPosition
  * @author      Mark Davis
+ * @since 1.1
  */
 public
 class ParseException extends Exception {
--- a/jdk/src/java.base/share/classes/java/text/ParsePosition.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/ParsePosition.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,6 +51,7 @@
  * records the current position.
  *
  * @author      Mark Davis
+ * @since 1.1
  * @see         java.text.Format
  */
 
--- a/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -242,6 +242,7 @@
  * @see        Collator
  * @see        CollationElementIterator
  * @author     Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
  */
 public class RuleBasedCollator extends Collator{
     // IMPLEMENTATION NOTES:  The implementation of the collation algorithm is
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java	Tue Jun 27 16:00:14 2017 -0400
@@ -434,6 +434,7 @@
  * @see          DateFormat
  * @see          DateFormatSymbols
  * @author       Mark Davis, Chen-Lieh Huang, Alan Liu
+ * @since 1.1
  */
 public class SimpleDateFormat extends DateFormat {
 
--- a/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -47,6 +47,7 @@
  * entire <code>String</code>.
  *
  * @see CharacterIterator
+ * @since 1.1
  */
 
 public final class StringCharacterIterator implements CharacterIterator
--- a/jdk/src/java.base/share/classes/java/util/BitSet.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/BitSet.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1212,7 +1212,7 @@
      *
      * <p>The stream binds to this bit set when the terminal stream operation
      * commences (specifically, the spliterator for the stream is
-     * <a href="../Spliterator.html#binding"><em>late-binding</em></a>).  If the
+     * <a href="Spliterator.html#binding"><em>late-binding</em></a>).  If the
      * bit set is modified during that operation then the result is undefined.
      *
      * @return a stream of integers representing set indices
--- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Jun 27 16:00:14 2017 -0400
@@ -216,16 +216,17 @@
  * the caller module, those resource bundles need to be loaded from service
  * providers of {@link ResourceBundleProvider}. The caller module must declare
  * "{@code uses}" and the service interface name is the concatenation of the
- * base name of the bundles and the string "{@code Provider}". The
+ * package name of the base name, string "{@code .spi.}", the simple class
+ * name of the base name, and the string "{@code Provider}". The
  * <em>bundle provider modules</em> containing resource bundles must
  * declare "{@code provides}" with the service interface name and
  * its implementation class name. For example, if the base name is
  * "{@code com.example.app.MyResources}", the caller module must declare
- * "{@code uses com.example.app.MyResourcesProvider;}" and a module containing resource
- * bundles must declare "{@code provides com.example.app.MyResourcesProvider
+ * "{@code uses com.example.app.spi.MyResourcesProvider;}" and a module containing resource
+ * bundles must declare "{@code provides com.example.app.spi.MyResourcesProvider
  * with com.example.app.internal.MyResourcesProviderImpl;}"
  * where {@code com.example.app.internal.MyResourcesProviderImpl} is an
- * implementation class of {@code com.example.app.MyResourcesProvider}.</li>
+ * implementation class of {@code com.example.app.spi.MyResourcesProvider}.</li>
  * <li>If you want to use non-standard formats in named modules, such as XML,
  * {@link ResourceBundleProvider} needs to be used.</li>
  * <li>The {@code getBundle} method with a {@code ClassLoader} may not be able to
@@ -243,9 +244,10 @@
  *
  * The {@code getBundle} factory methods load service providers of
  * {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}.
- * The service type is designated by {@code basename+"Provider"}. For
+ * The service type is designated by
+ * {@code <package name> + ".spi." + <simple name> + "Provider"}. For
  * example, if the base name is "{@code com.example.app.MyResources}", the service
- * type is {@code com.example.app.MyResourcesProvider}.
+ * type is {@code com.example.app.spi.MyResourcesProvider}.
  * <p>
  * In named modules, the loaded service providers for the given base name are
  * used to load resource bundles. If no service provider is available, or if
@@ -923,7 +925,12 @@
      * <p> Resource bundles in named modules may be encapsulated.  When
      * the resource bundle is loaded from a provider, the caller module
      * must have an appropriate <i>uses</i> clause in its <i>module descriptor</i>
-     * to declare that the module uses implementations of {@code "baseName"Provider}.
+     * to declare that the module uses implementations of
+     * {@code <package name> + ".spi." + <simple name> + "Provider"}.
+     * Otherwise, it will load the resource bundles that are local in the
+     * given module or that are visible to the class loader of the given module
+     * (refer to the <a href="#bundleprovider">Resource Bundles in Named Modules</a>
+     * section for details).
      * When the resource bundle is loaded from the specified module, it is
      * subject to the encapsulation rules specified by
      * {@link Module#getResourceAsStream Module.getResourceAsStream}.
@@ -958,20 +965,17 @@
      * <p> Resource bundles in named modules may be encapsulated.  When
      * the resource bundle is loaded from a provider, the caller module
      * must have an appropriate <i>uses</i> clause in its <i>module descriptor</i>
-     * to declare that the module uses implementations of {@code "baseName"Provider}.
+     * to declare that the module uses implementations of
+     * {@code <package name> + ".spi." + <simple name> + "Provider"}.
+     * Otherwise, it will load the resource bundles that are local in the
+     * given module or that are visible to the class loader of the given module
+     * (refer to the <a href="#bundleprovider">Resource Bundles in Named Modules</a>
+     * section for details).
      * When the resource bundle is loaded from the specified module, it is
      * subject to the encapsulation rules specified by
      * {@link Module#getResourceAsStream Module.getResourceAsStream}.
      *
      * <p>
-     * If the given {@code module} is a named module, this method will
-     * load the service providers for {@link java.util.spi.ResourceBundleProvider}
-     * and also resource bundles that are local in the given module or that
-     * are visible to the class loader of the given module (refer to the
-     * <a href="#bundleprovider">Resource Bundles in Named Modules</a> section
-     * for details).
-     *
-     * <p>
      * If the given {@code module} is an unnamed module, then this method is
      * equivalent to calling {@link #getBundle(String, Locale, ClassLoader)
      * getBundle(baseName, targetLocale, module.getClassLoader()} to load
@@ -1070,8 +1074,10 @@
      * Resource bundles in a named module are private to that module.  If
      * the caller is in a named module, this method will find resource bundles
      * from the service providers of {@link java.util.spi.ResourceBundleProvider}
-     * and also find resource bundles that are in the caller's module or
-     * that are visible to the given class loader.
+     * if any. Otherwise, it will load the resource bundles that are visible to
+     * the given {@code loader} (refer to the
+     * <a href="#bundleprovider">Resource Bundles in Named Modules</a> section
+     * for details).
      * If the caller is in a named module and the given {@code loader} is
      * different than the caller's class loader, or if the caller is not in
      * a named module, this method will not find resource bundles from named
@@ -1883,8 +1889,15 @@
     private static Class<ResourceBundleProvider>
             getResourceBundleProviderType(String baseName, ClassLoader loader)
     {
-        // Look up <baseName> + "Provider"
-        String providerName = baseName + "Provider";
+        // Look up <packagename> + ".spi." + <name>"Provider"
+        int i = baseName.lastIndexOf('.');
+        if (i <= 0) {
+            return null;
+        }
+
+        String name = baseName.substring(i+1, baseName.length()) + "Provider";
+        String providerName = baseName.substring(0, i) + ".spi." + name;
+
         // Use the class loader of the getBundle caller so that the caller's
         // visibility of the provider type is checked.
         return AccessController.doPrivileged(
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java	Tue Jun 27 16:00:14 2017 -0400
@@ -57,6 +57,8 @@
  * <a href="package-summary.html#MemoryVisibility"><i>happen-before</i></a>
  * actions taken by that task, which in turn <i>happen-before</i>
  * actions following a successful return from the corresponding {@code take()}.
+ *
+ * @since 1.5
  */
 public interface CompletionService<V> {
     /**
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java	Tue Jun 27 16:00:14 2017 -0400
@@ -97,6 +97,8 @@
  *   if (result != null)
  *     use(result);
  * }}</pre>
+ *
+ * @since 1.5
  */
 public class ExecutorCompletionService<V> implements CompletionService<V> {
     private final Executor executor;
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java	Tue Jun 27 16:00:14 2017 -0400
@@ -133,6 +133,8 @@
  *     Class<?> ensureLoaded = LockSupport.class;
  *   }
  * }}</pre>
+ *
+ * @since 1.5
  */
 public class LockSupport {
     private LockSupport() {} // Cannot be instantiated.
--- a/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,8 @@
 
 /**
  * This class is used to represent a JAR file entry.
+ *
+ * @since 1.2
  */
 public
 class JarEntry extends ZipEntry {
--- a/jdk/src/java.base/share/classes/java/util/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
  * miscellaneous utility classes (a string tokenizer, a random-number
  * generator, and a bit array).
  *
- * <h2><a name="CollectionsFramework"></a>{@index "Java Collections Framework"}</h2>
+ * <h2><a id="CollectionsFramework"></a>{@index "Java Collections Framework"}</h2>
  * <ul>
  *   <li><a href="../../../technotes/guides/collections/overview.html"><b>Collections Framework Overview</b></a>
  *   <li><a href="../../../technotes/guides/collections/reference.html"><b>
--- a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -46,7 +46,7 @@
  * Calendar}. The following are calendar-common fields and their values to be
  * supported for each calendar system.
  *
- * <table class="plain" style="border-bottom:1px solid">
+ *  <table class="plain">
  * <caption style="display:none">Field values</caption>
  * <thead>
  *   <tr>
@@ -57,8 +57,8 @@
  * </thead>
  * <tbody>
  *   <tr>
- *     <td valign="top">{@link Calendar#MONTH}</td>
- *     <td valign="top">{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}</td>
+ *     <td style="vertical-align:top">{@link Calendar#MONTH}</td>
+ *     <td style="vertical-align:top">{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}</td>
  *     <td>Month numbering is 0-based (e.g., 0 - January, ..., 11 -
  *         December). Some calendar systems have 13 months. Month
  *         names need to be supported in both the formatting and
@@ -67,14 +67,14 @@
  *         in both of the forms.</td>
  *   </tr>
  *   <tr>
- *     <td valign="top">{@link Calendar#DAY_OF_WEEK}</td>
- *     <td valign="top">{@link Calendar#SUNDAY} to {@link Calendar#SATURDAY}</td>
+ *     <td style="vertical-align:top">{@link Calendar#DAY_OF_WEEK}</td>
+ *     <td style="vertical-align:top">{@link Calendar#SUNDAY} to {@link Calendar#SATURDAY}</td>
  *     <td>Day-of-week numbering is 1-based starting from Sunday (i.e., 1 - Sunday,
  *         ..., 7 - Saturday).</td>
  *   </tr>
  *   <tr>
- *     <td valign="top">{@link Calendar#AM_PM}</td>
- *     <td valign="top">{@link Calendar#AM} to {@link Calendar#PM}</td>
+ *     <td style="vertical-align:top">{@link Calendar#AM_PM}</td>
+ *     <td style="vertical-align:top">{@link Calendar#AM} to {@link Calendar#PM}</td>
  *     <td>0 - AM, 1 - PM</td>
  *   </tr>
  * </tbody>
@@ -82,7 +82,7 @@
  *
  * <p style="margin-top:20px">The following are calendar-specific fields and their values to be supported.
  *
- * <table class="plain" style="border-bottom:1px solid">
+ * <table class="plain">
  * <caption style="display:none">Calendar type and field values</caption>
  * <thead>
  *   <tr>
@@ -94,8 +94,8 @@
  * </thead>
  * <tbody>
  *   <tr>
- *     <td rowspan="2" valign="top">{@code "gregory"}</td>
- *     <td rowspan="2" valign="top">{@link Calendar#ERA}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@code "gregory"}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
  *     <td>0</td>
  *     <td>{@link java.util.GregorianCalendar#BC} (BCE)</td>
  *   </tr>
@@ -104,8 +104,8 @@
  *     <td>{@link java.util.GregorianCalendar#AD} (CE)</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" valign="top">{@code "buddhist"}</td>
- *     <td rowspan="2" valign="top">{@link Calendar#ERA}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@code "buddhist"}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
  *     <td>0</td>
  *     <td>BC (BCE)</td>
  *   </tr>
@@ -114,8 +114,8 @@
  *     <td>B.E. (Buddhist Era)</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="6" valign="top">{@code "japanese"}</td>
- *     <td rowspan="5" valign="top">{@link Calendar#ERA}</td>
+ *     <td rowspan="6" style="vertical-align:top">{@code "japanese"}</td>
+ *     <td rowspan="5" style="vertical-align:top">{@link Calendar#ERA}</td>
  *     <td>0</td>
  *     <td>Seireki (Before Meiji)</td>
  *   </tr>
@@ -144,8 +144,8 @@
  *     Year representation in {@code SimpleDateFormat}</a>.</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" valign="top">{@code "roc"}</td>
- *     <td rowspan="2" valign="top">{@link Calendar#ERA}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@code "roc"}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
  *     <td>0</td>
  *     <td>Before R.O.C.</td>
  *   </tr>
@@ -154,8 +154,8 @@
  *     <td>R.O.C.</td>
  *   </tr>
  *   <tr>
- *     <td rowspan="2" valign="top">{@code "islamic"}</td>
- *     <td rowspan="2" valign="top">{@link Calendar#ERA}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@code "islamic"}</td>
+ *     <td rowspan="2" style="vertical-align:top">{@link Calendar#ERA}</td>
  *     <td>0</td>
  *     <td>Before AH</td>
  *   </tr>
--- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,11 +35,11 @@
  * during a call to the
  * {@link ResourceBundle#getBundle(String, Locale, ClassLoader)
  * ResourceBundle.getBundle} method. The provider service type is determined by
- * {@code basename+"Provider"}.
+ * {@code <package name> + ".spi." + <simple name> + "Provider"}.
  *
  * <p>
  * For example, if the base name is "com.example.app.MyResources",
- * {@code com.example.app.MyResourcesProvider} will be the provider service type:
+ * {@code com.example.app.spi.MyResourcesProvider} will be the provider service type:
  * <pre>{@code
  * public interface MyResourcesProvider extends ResourceBundleProvider {
  * }
--- a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * a {@link NullPointerException} to be thrown.</p>
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class Adler32 implements Checksum {
--- a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  * a {@link NullPointerException} to be thrown.</p>
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class CRC32 implements Checksum {
--- a/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *
  * @see         Checksum
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class CheckedInputStream extends FilterInputStream {
--- a/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  *
  * @see         Checksum
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class CheckedOutputStream extends FilterOutputStream {
--- a/jdk/src/java.base/share/classes/java/util/zip/Checksum.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/Checksum.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * An interface representing a data checksum.
  *
  * @author David Connelly
+ * @since 1.1
  */
 public interface Checksum {
 
--- a/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * Signals that a data format error has occurred.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class DataFormatException extends Exception {
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java	Tue Jun 27 16:00:14 2017 -0400
@@ -69,6 +69,7 @@
  *
  * @see         Inflater
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class Deflater {
--- a/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  *
  * @see         Deflater
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class DeflaterOutputStream extends FilterOutputStream {
--- a/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  *
  * @see         InflaterInputStream
  * @author      David Connelly
+ * @since 1.1
  *
  */
 public
--- a/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * This class implements a stream filter for writing compressed data in
  * the GZIP file format.
  * @author      David Connelly
+ * @since 1.1
  *
  */
 public
--- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java	Tue Jun 27 16:00:14 2017 -0400
@@ -68,6 +68,7 @@
  *
  * @see         Deflater
  * @author      David Connelly
+ * @since 1.1
  *
  */
 public
--- a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  *
  * @see         Inflater
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class InflaterInputStream extends FilterInputStream {
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * which manipulate ZIP files.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 interface ZipConstants {
     /*
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * This class is used to represent a ZIP file entry.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class ZipEntry implements ZipConstants, Cloneable {
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java	Tue Jun 27 16:00:14 2017 -0400
@@ -70,6 +70,7 @@
  * thrown.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class ZipFile implements ZipConstants, Closeable {
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -40,6 +40,7 @@
  * entries.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class ZipInputStream extends InflaterInputStream implements ZipConstants {
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -41,6 +41,7 @@
  * entries.
  *
  * @author      David Connelly
+ * @since 1.1
  */
 public
 class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
--- a/jdk/src/java.base/share/classes/java/util/zip/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/java/util/zip/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,13 +37,13 @@
  *         Info-ZIP Application Note 970311</a> - a detailed description of
  *         the Info-ZIP format upon which the {@code java.util.zip} classes
  *         are based.
- *     <li><a name="zip64">An implementation may optionally support the
+ *     <li><a id="zip64">An implementation may optionally support the
  *         ZIP64(tm) format extensions defined by the</a>
  *         <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">
  *         PKWARE ZIP File Format Specification</a>. The ZIP64(tm) format
  *         extensions are used to overcome the size limitations of the
  *         original ZIP format.
- *     <li><a name="lang_encoding">APPENDIX D of</a>
+ *     <li><a id="lang_encoding">APPENDIX D of</a>
  *         <a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT">
  *         PKWARE ZIP File Format Specification</a> - Language Encoding Flag
  *         (EFS) to encode ZIP entry filename and comment fields using UTF-8.
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -83,6 +83,15 @@
  * <p>In case the client does not explicitly initialize the KeyGenerator
  * (via a call to an {@code init} method), each provider must
  * supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the KeyGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyGenerator instead of relying on provider-specific defaults.
  *
  * <p> Every implementation of the Java platform is required to support the
  * following standard {@code KeyGenerator} algorithms with the keysizes in
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,19 @@
  * cryptographic service provider who wishes to supply the implementation
  * of a key generator for a particular algorithm.
  *
+ * <p>In case the client does not explicitly initialize the KeyGenerator
+ * (via a call to an {@code init} method), each provider must
+ * supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ * <a href="{@docRoot}/../technotes/guides/security/SunProviders.html">
+ * JDK Providers</a>
+ * document for information on the KeyGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyGenerator instead of relying on provider-specific defaults.
+ *
  * @author Jan Luehe
  *
  * @see SecretKey
--- a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -139,6 +139,7 @@
  * @implNote
  * Implementations may define additional target names, but should use naming
  * conventions such as reverse domain name notation to avoid name clashes.
+ * @since 1.4
  */
 public final class AuthPermission extends
 java.security.BasicPermission {
--- a/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * the {@code Destroyable} interface when the {@code destroy}
  * method fails.
  *
+ * @since 1.4
  */
 public class DestroyFailedException extends Exception {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * Objects such as credentials may optionally implement this interface
  * to provide the capability to destroy its contents.
  *
+ * @since 1.4
  * @see javax.security.auth.Subject
  */
 public interface Destroyable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java	Tue Jun 27 16:00:14 2017 -0400
@@ -153,6 +153,7 @@
  * These two APIs provide callers the means to query the
  * Policy for Principal-based Permission entries.
  *
+ * @since 1.4
  * @see java.security.Security security properties
  */
 @Deprecated(since="1.4")
--- a/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -100,6 +100,7 @@
  * "a.b.Principal" with the name, "duke", and "c.d.Principal", with the name,
  * "dukette".
  *
+ * @since 1.4
  */
 public final class PrivateCredentialPermission extends Permission {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * the {@code Refreshable} interface when the {@code refresh}
  * method fails.
  *
+ * @since 1.4
  */
 public class RefreshFailedException extends Exception {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * may implement this interface to allow callers to refresh the time period
  * for which it is valid.
  *
+ * @since 1.4
  * @see javax.security.auth.Subject
  */
 public interface Refreshable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java	Tue Jun 27 16:00:14 2017 -0400
@@ -94,6 +94,7 @@
  * {@code Principal} implementations associated with Subjects
  * must implement {@code Serializable}.
  *
+ * @since 1.4
  * @see java.security.Principal
  * @see java.security.DomainCombiner
  */
--- a/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,6 +43,7 @@
  * with Principals from the {@code Subject} associated with this
  * {@code SubjectDomainCombiner}.
  *
+ * @since 1.4
  */
 public class SubjectDomainCombiner implements java.security.DomainCombiner {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -40,6 +40,7 @@
  * if appropriate, to return requested information back to the
  * underlying security services.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  * @see javax.security.auth.callback.ChoiceCallback
  * @see javax.security.auth.callback.ConfirmationCallback
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -63,6 +63,7 @@
  * <p> All default handler implementations must provide a public
  * zero-argument constructor.
  *
+ * @since 1.4
  * @see java.security.Security security properties
  */
 public interface CallbackHandler {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * method of a {@code CallbackHandler} to display a list of choices
  * and to retrieve the selected choice(s).
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class ChoiceCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * method of a {@code CallbackHandler} to ask for YES/NO,
  * OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class ConfirmationCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * method of a {@code CallbackHandler} to retrieve the {@code Locale}
  * used for localizing text.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class LanguageCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * {@code NameCallback} to the {@code handle}
  * method of a {@code CallbackHandler} to retrieve name information.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class NameCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * {@code PasswordCallback} to the {@code handle}
  * method of a {@code CallbackHandler} to retrieve password information.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class PasswordCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * method of a {@code CallbackHandler} to retrieve generic text
  * information.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class TextInputCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * method of a {@code CallbackHandler} to display information messages,
  * warning messages and error messages.
  *
+ * @since 1.4
  * @see javax.security.auth.callback.CallbackHandler
  */
 public class TextOutputCallback implements Callback, java.io.Serializable {
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * Signals that a {@code CallbackHandler} does not
  * recognize a particular {@code Callback}.
  *
+ * @since 1.4
  */
 public class UnsupportedCallbackException extends Exception {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  * throws this exception to notify the application.  The application can
  * then take the appropriate steps to notify the user.
  *
+ * @since 1.4
  */
 public class AccountExpiredException extends AccountException {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * options.  Please refer to the {@code Configuration} class for
  * more information on the different control flags and their semantics.
  *
+ * @since 1.4
  * @see javax.security.auth.login.Configuration
  */
 public class AppConfigurationEntry {
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Tue Jun 27 16:00:14 2017 -0400
@@ -182,6 +182,7 @@
  * Java Security Standard Algorithm Names Specification</a>
  * for a list of standard Configuration types.
  *
+ * @since 1.4
  * @see javax.security.auth.login.LoginContext
  * @see java.security.Security security properties
  */
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  * the application.  The application can then take the appropriate
  * steps to assist the user in updating the password.
  *
+ * @since 1.4
  */
 public class CredentialExpiredException extends CredentialException {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  * For example, a {@code LoginModule} throws this exception if
  * the user entered an incorrect password.
  *
+ * @since 1.4
  */
 public class FailedLoginException extends LoginException {
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java	Tue Jun 27 16:00:14 2017 -0400
@@ -182,6 +182,7 @@
  * </ul>
  * </ol>
  *
+ * @since 1.4
  * @see java.security.Security
  * @see javax.security.auth.AuthPermission
  * @see javax.security.auth.Subject
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,7 @@
 /**
  * This is the basic login exception.
  *
+ * @since 1.4
  * @see javax.security.auth.login.LoginContext
  */
 
--- a/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java	Tue Jun 27 16:00:14 2017 -0400
@@ -122,6 +122,7 @@
  * no arguments.  This allows classes which load the {@code LoginModule}
  * to instantiate it.
  *
+ * @since 1.4
  * @see javax.security.auth.login.LoginContext
  * @see javax.security.auth.login.Configuration
  */
--- a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  * This enables looking up the private credentials for an X.500 principal
  * in a subject.
  *
+ * @since 1.4
  */
 public final class X500PrivateCredential implements Destroyable {
     private X509Certificate cert;
--- a/jdk/src/java.base/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,51 @@
 /**
  * Defines the foundational APIs of the Java SE Platform.
  *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Providers:</dt>
+ * <dd> The JDK implementation of this module provides an implementation of
+ *      the {@index jrt jrt} {@linkplain java.nio.file.spi.FileSystemProvider
+ *      file system provider} to enumerate and read the class and resource
+ *      files in a run-time image.
+ *      The jrt file system can be created by calling
+ *      {@link java.nio.file.FileSystems#newFileSystem
+ *      FileSystems.newFileSystem(URI.create("jrt:/"))}.
+ *      <p></dd>
+ * <dt class="simpleTagLabel">Tool Guides:</dt>
+ * <dd> {@extLink java_tool_reference java launcher},
+ *      {@extLink keytool_tool_reference keytool}</dd>
+ * </dl>
+ *
+ * @provides java.nio.file.spi.FileSystemProvider
+ *
+ * @uses java.lang.System.LoggerFinder
+ * @uses java.net.ContentHandlerFactory
+ * @uses java.net.spi.URLStreamHandlerProvider
+ * @uses java.nio.channels.spi.AsynchronousChannelProvider
+ * @uses java.nio.channels.spi.SelectorProvider
+ * @uses java.nio.charset.spi.CharsetProvider
+ * @uses java.nio.file.spi.FileSystemProvider
+ * @uses java.nio.file.spi.FileTypeDetector
+ * @uses java.security.Provider
+ * @uses java.text.spi.BreakIteratorProvider
+ * @uses java.text.spi.CollatorProvider
+ * @uses java.text.spi.DateFormatProvider
+ * @uses java.text.spi.DateFormatSymbolsProvider
+ * @uses java.text.spi.DecimalFormatSymbolsProvider
+ * @uses java.text.spi.NumberFormatProvider
+ * @uses java.time.chrono.AbstractChronology
+ * @uses java.time.chrono.Chronology
+ * @uses java.time.zone.ZoneRulesProvider
+ * @uses java.util.spi.CalendarDataProvider
+ * @uses java.util.spi.CalendarNameProvider
+ * @uses java.util.spi.CurrencyNameProvider
+ * @uses java.util.spi.LocaleNameProvider
+ * @uses java.util.spi.ResourceBundleControlProvider
+ * @uses java.util.spi.ResourceBundleProvider
+ * @uses java.util.spi.TimeZoneNameProvider
+ * @uses java.util.spi.ToolProvider
+ * @uses javax.security.auth.spi.LoginModule
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Jun 27 16:00:14 2017 -0400
@@ -181,7 +181,7 @@
     enum Command {
         CERTREQ("Generates.a.certificate.request",
             ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME,
-            STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
+            EXT, STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
             PROVIDERCLASS, PROVIDERPATH, V, PROTECTED),
         CHANGEALIAS("Changes.an.entry.s.alias",
             ALIAS, DESTALIAS, KEYPASS, KEYSTORE, CACERTS, STOREPASS,
@@ -250,12 +250,12 @@
             KEYSTORE, STOREPASS, PROVIDERNAME, ADDPROVIDER,
             PROVIDERCLASS, PROVIDERPATH, V),
         SELFCERT("Generates.a.self.signed.certificate",
-            ALIAS, SIGALG, DNAME, STARTDATE, VALIDITY, KEYPASS,
+            ALIAS, SIGALG, DNAME, STARTDATE, EXT, VALIDITY, KEYPASS,
             STORETYPE, KEYSTORE, STOREPASS, PROVIDERNAME,
             ADDPROVIDER, PROVIDERCLASS, PROVIDERPATH, V),
         GENCRL("Generates.CRL",
             RFC, FILEOUT, ID,
-            ALIAS, SIGALG, EXT, KEYPASS, KEYSTORE,
+            ALIAS, SIGALG, KEYPASS, KEYSTORE,
             STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
             PROVIDERCLASS, PROVIDERPATH, V, PROTECTED),
         IDENTITYDB("Imports.entries.from.a.JDK.1.1.x.style.identity.database",
--- a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.io.OutputStream;
 import java.math.BigInteger;
 import java.util.Date;
 import sun.util.calendar.CalendarDate;
@@ -275,7 +274,7 @@
         if (len > available())
             throw new IOException("short read of DER Generalized Time");
 
-        if (len < 13 || len > 23)
+        if (len < 13)
             throw new IOException("DER Generalized Time length error");
 
         return getTime(len, true);
@@ -350,7 +349,7 @@
          */
 
         millis = 0;
-        if (len > 2 && len < 12) {
+        if (len > 2) {
             second = 10 * Character.digit((char)buf[pos++], 10);
             second += Character.digit((char)buf[pos++], 10);
             len -= 2;
@@ -358,31 +357,30 @@
             if (buf[pos] == '.' || buf[pos] == ',') {
                 len --;
                 pos++;
-                // handle upto milisecond precision only
                 int precision = 0;
-                int peek = pos;
-                while (buf[peek] != 'Z' &&
-                       buf[peek] != '+' &&
-                       buf[peek] != '-') {
-                    peek++;
+                while (buf[pos] != 'Z' &&
+                       buf[pos] != '+' &&
+                       buf[pos] != '-') {
+                    // Validate all digits in the fractional part but
+                    // store millisecond precision only
+                    int thisDigit = Character.digit((char)buf[pos], 10);
                     precision++;
+                    pos++;
+                    switch (precision) {
+                        case 1:
+                            millis += 100 * thisDigit;
+                            break;
+                        case 2:
+                            millis += 10 * thisDigit;
+                            break;
+                        case 3:
+                            millis += thisDigit;
+                            break;
+                    }
                 }
-                switch (precision) {
-                case 3:
-                    millis += 100 * Character.digit((char)buf[pos++], 10);
-                    millis += 10 * Character.digit((char)buf[pos++], 10);
-                    millis += Character.digit((char)buf[pos++], 10);
-                    break;
-                case 2:
-                    millis += 100 * Character.digit((char)buf[pos++], 10);
-                    millis += 10 * Character.digit((char)buf[pos++], 10);
-                    break;
-                case 1:
-                    millis += 100 * Character.digit((char)buf[pos++], 10);
-                    break;
-                default:
-                        throw new IOException("Parse " + type +
-                            " time, unsupported precision for seconds value");
+                if (precision == 0) {
+                    throw new IOException("Parse " + type +
+                            " time, empty fractional part");
                 }
                 len -= precision;
             }
--- a/jdk/src/java.base/share/native/launcher/defines.h	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/launcher/defines.h	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,17 +44,24 @@
 #define DOT_VERSION "0.0"
 
 #ifdef JAVA_ARGS
-#define HAS_JAVA_ARGS JNI_TRUE
 #ifdef PROGNAME
 static const char* const_progname = PROGNAME;
 #else
 static char* const_progname = NULL;
 #endif
 static const char* const_jargs[] = JAVA_ARGS;
+#ifdef EXTRA_JAVA_ARGS
+static const char* const_extra_jargs[] = EXTRA_JAVA_ARGS;
+#else
+static const char** const_extra_jargs = NULL;
+#endif
 #else  /* !JAVA_ARGS */
-#define HAS_JAVA_ARGS JNI_FALSE
+#ifdef EXTRA_JAVA_ARGS
+#error "EXTRA_JAVA_ARGS defined without JAVA_ARGS"
+#endif
 static const char* const_progname = "java";
 static const char** const_jargs = NULL;
+static const char** const_extra_jargs = NULL;
 static const char* const_appclasspath[] = { NULL };
 #endif /* JAVA_ARGS */
 
--- a/jdk/src/java.base/share/native/launcher/main.c	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/launcher/main.c	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -85,6 +85,8 @@
 {
     int margc;
     char** margv;
+    int jargc;
+    char** jargv;
     const jboolean const_javaw = JNI_TRUE;
 
     __initenv = _environ;
@@ -95,10 +97,47 @@
 {
     int margc;
     char** margv;
+    int jargc;
+    char** jargv;
     const jboolean const_javaw = JNI_FALSE;
 #endif /* JAVAW */
+    {
+        int i, main_jargc, extra_jargc;
+        JLI_List list;
 
-    JLI_InitArgProcessing(!HAS_JAVA_ARGS, const_disable_argfile);
+        main_jargc = (sizeof(const_jargs) / sizeof(char *)) > 1
+            ? sizeof(const_jargs) / sizeof(char *)
+            : 0; // ignore the null terminator index
+
+        extra_jargc = (sizeof(const_extra_jargs) / sizeof(char *)) > 1
+            ? sizeof(const_extra_jargs) / sizeof(char *)
+            : 0; // ignore the null terminator index
+
+        if (main_jargc > 0 && extra_jargc > 0) { // combine extra java args
+            jargc = main_jargc + extra_jargc;
+            list = JLI_List_new(jargc + 1);
+
+            for (i = 0 ; i < extra_jargc; i++) {
+                JLI_List_add(list, JLI_StringDup(const_extra_jargs[i]));
+            }
+
+            for (i = 0 ; i < main_jargc ; i++) {
+                JLI_List_add(list, JLI_StringDup(const_jargs[i]));
+            }
+
+            // terminate the list
+            JLI_List_add(list, NULL);
+            jargv = list->elements;
+         } else if (extra_jargc > 0) { // should never happen
+            fprintf(stderr, "EXTRA_JAVA_ARGS defined without JAVA_ARGS");
+            abort();
+         } else { // no extra args, business as usual
+            jargc = main_jargc;
+            jargv = (char **) const_jargs;
+         }
+    }
+
+    JLI_InitArgProcessing(jargc > 0, const_disable_argfile);
 
 #ifdef _WIN32
     {
@@ -164,12 +203,12 @@
     }
 #endif /* WIN32 */
     return JLI_Launch(margc, margv,
-                   sizeof(const_jargs) / sizeof(char *), const_jargs,
+                   jargc, (const char**) jargv,
                    0, NULL,
                    VERSION_STRING,
                    DOT_VERSION,
                    (const_progname != NULL) ? const_progname : *margv,
                    (const_launcher != NULL) ? const_launcher : *margv,
-                   HAS_JAVA_ARGS,
+                   jargc > 0,
                    const_cpwildcard, const_javaw, 0);
 }
--- a/jdk/src/java.base/share/native/libjava/jni_util.c	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/libjava/jni_util.c	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
 #include "jvm.h"
 #include "jni.h"
 #include "jni_util.h"
+#include "java_lang_String.h"
 
 /* Due to a bug in the win32 C runtime library strings
  * such as "z:" need to be appended with a "." so we
@@ -442,16 +443,18 @@
     return obj;
 }
 
-/* Optimized for char set ISO_8559_1 */
+/* Optimized for charset ISO_8559_1 */
 static jstring
-newString8859_1(JNIEnv *env, const char *str)
+newSizedString8859_1(JNIEnv *env, const char *str, const int len)
 {
-    int len = (int)strlen(str);
     jchar buf[512];
     jchar *str1;
     jstring result;
     int i;
 
+    if ((*env)->EnsureLocalCapacity(env, 1) < 0)
+        return NULL;
+
     if (len > 512) {
         str1 = (jchar *)malloc(len * sizeof(jchar));
         if (str1 == 0) {
@@ -469,6 +472,13 @@
     return result;
 }
 
+static jstring
+newString8859_1(JNIEnv *env, const char *str)
+{
+    int len = (int)strlen(str);
+    return newSizedString8859_1(env, str, len);
+}
+
 static const char*
 getString8859_1Chars(JNIEnv *env, jstring jstr)
 {
@@ -501,7 +511,7 @@
 }
 
 
-/* Optimized for char set ISO646-US (us-ascii) */
+/* Optimized for charset ISO646-US (us-ascii) */
 static jstring
 newString646_US(JNIEnv *env, const char *str)
 {
@@ -573,7 +583,7 @@
     0x02Dc,0x2122,0x0161,0x203A,0x0153,0xFFFD,0x017E,0x0178
 };
 
-/* Optimized for char set Cp1252 */
+/* Optimized for charset Cp1252 */
 static jstring
 newStringCp1252(JNIEnv *env, const char *str)
 {
@@ -582,6 +592,10 @@
     jchar *str1;
     jstring result;
     int i;
+
+    if ((*env)->EnsureLocalCapacity(env, 1) < 0)
+        return NULL;
+
     if (len > 512) {
         str1 = (jchar *)malloc(len * sizeof(jchar));
         if (str1 == 0) {
@@ -625,9 +639,13 @@
 
     for (i=0; i<len; i++) {
         jchar c = str[i];
-        if (c < 256)
-            result[i] = (char)c;
-        else switch(c) {
+        if (c < 256) {
+            if ((c >= 0x80) && (c <= 0x9f)) {
+                result[i] = '?';
+            } else {
+                result[i] = (char)c;
+            }
+        } else switch(c) {
             case 0x20AC: result[i] = (char)0x80; break;
             case 0x201A: result[i] = (char)0x82; break;
             case 0x0192: result[i] = (char)0x83; break;
@@ -671,8 +689,89 @@
 static jmethodID String_init_ID;        /* String(byte[], enc) */
 static jmethodID String_getBytes_ID;    /* String.getBytes(enc) */
 
-int getFastEncoding() {
-    return fastEncoding;
+/* Cached field IDs */
+static jfieldID String_coder_ID;        /* String.coder */
+static jfieldID String_value_ID;        /* String.value */
+
+static jboolean isJNUEncodingSupported = JNI_FALSE;
+static jboolean jnuEncodingSupported(JNIEnv *env) {
+    jboolean exe;
+    if (isJNUEncodingSupported == JNI_TRUE) {
+        return JNI_TRUE;
+    }
+    isJNUEncodingSupported = (jboolean) JNU_CallStaticMethodByName (
+                                    env, &exe,
+                                    "java/nio/charset/Charset",
+                                    "isSupported",
+                                    "(Ljava/lang/String;)Z",
+                                    jnuEncoding).z;
+    return isJNUEncodingSupported;
+}
+
+/* Create a new string by converting str to a heap-allocated byte array and
+ * calling the appropriate String constructor.
+ */
+static jstring
+newSizedStringJava(JNIEnv *env, const char *str, const int len)
+{
+    jstring result = NULL;
+    jbyteArray bytes = 0;
+
+    if ((*env)->EnsureLocalCapacity(env, 2) < 0)
+        return NULL;
+
+    bytes = (*env)->NewByteArray(env, len);
+    if (bytes != NULL) {
+        jclass strClazz = JNU_ClassString(env);
+        CHECK_NULL_RETURN(strClazz, 0);
+        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte *)str);
+        if (jnuEncodingSupported(env)) {
+            result = (*env)->NewObject(env, strClazz,
+                                       String_init_ID, bytes, jnuEncoding);
+        } else {
+            /*If the encoding specified in sun.jnu.encoding is not endorsed
+              by "Charset.isSupported" we have to fall back to use String(byte[])
+              explicitly here without specifying the encoding name, in which the
+              StringCoding class will pickup the iso-8859-1 as the fallback
+              converter for us.
+             */
+            jmethodID mid = (*env)->GetMethodID(env, strClazz,
+                                                "<init>", "([B)V");
+            if (mid != NULL) {
+                result = (*env)->NewObject(env, strClazz, mid, bytes);
+            }
+        }
+        (*env)->DeleteLocalRef(env, bytes);
+        return result;
+    }
+    return NULL;
+}
+
+static jstring
+newStringJava(JNIEnv *env, const char *str)
+{
+    int len = (int)strlen(str);
+    return newSizedStringJava(env, str, len);
+}
+
+/* Optimized for charset UTF-8 */
+static jstring
+newStringUTF8(JNIEnv *env, const char *str)
+{
+    int len;
+    const unsigned char *p;
+    unsigned char asciiCheck;
+    for (asciiCheck = 0, p = (const unsigned char*)str; *p != '\0'; p++) {
+        asciiCheck |= *p;
+    }
+    len = (int)((const char*)p - str);
+
+    if (asciiCheck < 0x80) {
+        // ascii fast-path
+        return newSizedString8859_1(env, str, len);
+    }
+
+    return newSizedStringJava(env, str, len);
 }
 
 /* Initialize the fast encoding.  If the "sun.jnu.encoding" property
@@ -718,17 +817,20 @@
                     if ((strcmp(encname, "8859_1") == 0) ||
                         (strcmp(encname, "ISO8859-1") == 0) ||
                         (strcmp(encname, "ISO8859_1") == 0) ||
-                        (strcmp(encname, "ISO-8859-1") == 0))
+                        (strcmp(encname, "ISO-8859-1") == 0)) {
                         fastEncoding = FAST_8859_1;
-                    else if (strcmp(encname, "ISO646-US") == 0)
+                    } else if (strcmp(encname, "UTF-8") == 0) {
+                        fastEncoding = FAST_UTF_8;
+                        jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
+                    } else if (strcmp(encname, "ISO646-US") == 0) {
                         fastEncoding = FAST_646_US;
-                    else if (strcmp(encname, "Cp1252") == 0 ||
+                    } else if (strcmp(encname, "Cp1252") == 0 ||
                              /* This is a temporary fix until we move */
                              /* to wide character versions of all Windows */
                              /* calls. */
-                             strcmp(encname, "utf-16le") == 0)
+                             strcmp(encname, "utf-16le") == 0) {
                         fastEncoding = FAST_CP1252;
-                    else {
+                    } else {
                         fastEncoding = NO_FAST_ENCODING;
                         jnuEncoding = (jstring)(*env)->NewGlobalRef(env, enc);
                     }
@@ -750,24 +852,10 @@
     CHECK_NULL(String_getBytes_ID);
     String_init_ID = (*env)->GetMethodID(env, strClazz,
                                          "<init>", "([BLjava/lang/String;)V");
+    String_coder_ID = (*env)->GetFieldID(env, strClazz, "coder", "B");
+    String_value_ID = (*env)->GetFieldID(env, strClazz, "value", "[B");
 }
 
-static jboolean isJNUEncodingSupported = JNI_FALSE;
-static jboolean jnuEncodingSupported(JNIEnv *env) {
-    jboolean exe;
-    if (isJNUEncodingSupported == JNI_TRUE) {
-        return JNI_TRUE;
-    }
-    isJNUEncodingSupported = (jboolean) JNU_CallStaticMethodByName (
-                                    env, &exe,
-                                    "java/nio/charset/Charset",
-                                    "isSupported",
-                                    "(Ljava/lang/String;)Z",
-                                    jnuEncoding).z;
-    return isJNUEncodingSupported;
-}
-
-
 JNIEXPORT jstring
 NewStringPlatform(JNIEnv *env, const char *str)
 {
@@ -777,10 +865,6 @@
 JNIEXPORT jstring JNICALL
 JNU_NewStringPlatform(JNIEnv *env, const char *str)
 {
-    jstring result = NULL;
-    jbyteArray hab = 0;
-    int len;
-
     if (fastEncoding == NO_ENCODING_YET) {
         initializeEncoding(env);
         JNU_CHECK_EXCEPTION_RETURN(env, NULL);
@@ -792,36 +876,9 @@
         return newString646_US(env, str);
     if (fastEncoding == FAST_CP1252)
         return newStringCp1252(env, str);
-
-    if ((*env)->EnsureLocalCapacity(env, 2) < 0)
-        return NULL;
-
-    len = (int)strlen(str);
-    hab = (*env)->NewByteArray(env, len);
-    if (hab != 0) {
-        jclass strClazz = JNU_ClassString(env);
-        CHECK_NULL_RETURN(strClazz, 0);
-        (*env)->SetByteArrayRegion(env, hab, 0, len, (jbyte *)str);
-        if (jnuEncodingSupported(env)) {
-            result = (*env)->NewObject(env, strClazz,
-                                       String_init_ID, hab, jnuEncoding);
-        } else {
-            /*If the encoding specified in sun.jnu.encoding is not endorsed
-              by "Charset.isSupported" we have to fall back to use String(byte[])
-              explicitly here without specifying the encoding name, in which the
-              StringCoding class will pickup the iso-8859-1 as the fallback
-              converter for us.
-             */
-            jmethodID mid = (*env)->GetMethodID(env, strClazz,
-                                                "<init>", "([B)V");
-            if (mid != NULL) {
-                result = (*env)->NewObject(env, strClazz, mid, hab);
-            }
-        }
-        (*env)->DeleteLocalRef(env, hab);
-        return result;
-    }
-    return NULL;
+    if (fastEncoding == FAST_UTF_8)
+        return newStringUTF8(env, str);
+    return newStringJava(env, str);
 }
 
 JNIEXPORT const char *
@@ -830,27 +887,10 @@
     return JNU_GetStringPlatformChars(env, jstr, isCopy);
 }
 
-JNIEXPORT const char * JNICALL
-JNU_GetStringPlatformChars(JNIEnv *env, jstring jstr, jboolean *isCopy)
-{
+static const char* getStringBytes(JNIEnv *env, jstring jstr) {
     char *result = NULL;
     jbyteArray hab = 0;
 
-    if (isCopy)
-        *isCopy = JNI_TRUE;
-
-    if (fastEncoding == NO_ENCODING_YET) {
-        initializeEncoding(env);
-        JNU_CHECK_EXCEPTION_RETURN(env, 0);
-    }
-
-    if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
-        return getString8859_1Chars(env, jstr);
-    if (fastEncoding == FAST_646_US)
-        return getString646_USChars(env, jstr);
-    if (fastEncoding == FAST_CP1252)
-        return getStringCp1252Chars(env, jstr);
-
     if ((*env)->EnsureLocalCapacity(env, 2) < 0)
         return 0;
 
@@ -883,6 +923,85 @@
     return result;
 }
 
+static const char*
+getStringUTF8(JNIEnv *env, jstring jstr)
+{
+    int i;
+    char *result;
+    jbyteArray value;
+    jint len;
+    jbyte *str;
+    jint rlen;
+    int ri;
+    jbyte coder = (*env)->GetByteField(env, jstr, String_coder_ID);
+    if (coder != java_lang_String_LATIN1) {
+        return getStringBytes(env, jstr);
+    }
+    if ((*env)->EnsureLocalCapacity(env, 2) < 0) {
+        return NULL;
+    }
+    value = (*env)->GetObjectField(env, jstr, String_value_ID);
+    if (value == NULL)
+        return NULL;
+    len = (*env)->GetArrayLength(env, value);
+    str = (*env)->GetPrimitiveArrayCritical(env, value, NULL);
+    if (str == NULL) {
+        return NULL;
+    }
+
+    rlen = len;
+    // we need two bytes for each latin-1 char above 127 (negative jbytes)
+    for (i = 0; i < len; i++) {
+        if (str[i] < 0) {
+            rlen++;
+        }
+    }
+
+    result = MALLOC_MIN4(rlen);
+    if (result == NULL) {
+        (*env)->ReleasePrimitiveArrayCritical(env, value, str, 0);
+        JNU_ThrowOutOfMemoryError(env, 0);
+        return NULL;
+    }
+
+    for (ri = 0, i = 0; i < len; i++) {
+        jbyte c = str[i];
+        if (c < 0) {
+            result[ri++] = (char)(0xc0 | ((c & 0xff) >> 6));
+            result[ri++] = (char)(0x80 | (c & 0x3f));
+        } else {
+            result[ri++] = c;
+        }
+    }
+    (*env)->ReleasePrimitiveArrayCritical(env, value, str, 0);
+    result[rlen] = '\0';
+    return result;
+}
+
+JNIEXPORT const char * JNICALL
+JNU_GetStringPlatformChars(JNIEnv *env, jstring jstr, jboolean *isCopy)
+{
+
+    if (isCopy)
+        *isCopy = JNI_TRUE;
+
+    if (fastEncoding == NO_ENCODING_YET) {
+        initializeEncoding(env);
+        JNU_CHECK_EXCEPTION_RETURN(env, 0);
+    }
+
+    if ((fastEncoding == FAST_8859_1) || (fastEncoding == NO_ENCODING_YET))
+        return getString8859_1Chars(env, jstr);
+    if (fastEncoding == FAST_646_US)
+        return getString646_USChars(env, jstr);
+    if (fastEncoding == FAST_CP1252)
+        return getStringCp1252Chars(env, jstr);
+    if (fastEncoding == FAST_UTF_8)
+        return getStringUTF8(env, jstr);
+    else
+        return getStringBytes(env, jstr);
+}
+
 JNIEXPORT void JNICALL
 JNU_ReleaseStringPlatformChars(JNIEnv *env, jstring jstr, const char *str)
 {
--- a/jdk/src/java.base/share/native/libjava/jni_util.h	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/libjava/jni_util.h	Tue Jun 27 16:00:14 2017 -0400
@@ -382,7 +382,8 @@
     NO_FAST_ENCODING,           /* Platform encoding is not fast */
     FAST_8859_1,                /* ISO-8859-1 */
     FAST_CP1252,                /* MS-DOS Cp1252 */
-    FAST_646_US                 /* US-ASCII : ISO646-US */
+    FAST_646_US,                /* US-ASCII : ISO646-US */
+    FAST_UTF_8
 };
 
 int getFastEncoding();
--- a/jdk/src/java.base/share/native/libjli/args.c	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/libjli/args.c	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@
 static jboolean stopExpansion = JNI_FALSE;
 static jboolean relaunch = JNI_FALSE;
 
-void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile) {
+void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) {
     // No expansion for relaunch
     if (argsCount != 1) {
         relaunch = JNI_TRUE;
@@ -91,7 +91,7 @@
     expectingNoDashArg = JNI_FALSE;
 
     // for tools, this value remains 0 all the time.
-    firstAppArgIndex = isJava ? NOT_FOUND : 0;
+    firstAppArgIndex = hasJavaArgs ? 0: NOT_FOUND;
 }
 
 int JLI_GetAppArgIndex() {
--- a/jdk/src/java.base/share/native/libjli/java.c	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/libjli/java.c	Tue Jun 27 16:00:14 2017 -0400
@@ -246,6 +246,10 @@
     DumpState();
     if (JLI_IsTraceLauncher()) {
         int i;
+        printf("Java args:\n");
+        for (i = 0; i < jargc ; i++) {
+            printf("jargv[%d] = %s\n", i, jargv[i]);
+        }
         printf("Command line args:\n");
         for (i = 0; i < argc ; i++) {
             printf("argv[%d] = %s\n", i, argv[i]);
--- a/jdk/src/java.base/share/native/libjli/jli_util.h	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.base/share/native/libjli/jli_util.h	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -133,7 +133,7 @@
 char *JLI_List_join(JLI_List l, char sep);
 JLI_List JLI_List_split(const char *str, char sep);
 
-void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile);
+void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
 JLI_List JLI_PreprocessArg(const char *arg);
 jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
 
--- a/jdk/src/java.base/share/specs/serialization/class.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](input.html) | [NEXT](version.html)'
-include-after: '[CONTENTS](index.html) | [PREV](input.html) | [NEXT](version.html)'
-
-title: 'Java Object Serialization Specification: 4 - Class Descriptors'
----
-
--   [The ObjectStreamClass Class](#the-objectstreamclass-class)
--   [Dynamic Proxy Class Descriptors](#dynamic-proxy-class-descriptors)
--   [Serialized Form](#serialized-form)
--   [The ObjectStreamField Class](#the-objectstreamfield-class)
--   [Inspecting Serializable Classes](#inspecting-serializable-classes)
--   [Stream Unique Identifiers](#stream-unique-identifiers)
-
--------------------------------------------------------------------------------
-
-## 4.1 The ObjectStreamClass Class
-
-The `ObjectStreamClass` provides information about classes that are saved in a
-Serialization stream. The descriptor provides the fully-qualified name of the
-class and its serialization version UID. A `SerialVersionUID` identifies the
-unique original class version for which this class is capable of writing
-streams and from which it can read.
-
-```
-package java.io;
-
-public class ObjectStreamClass
-{
-    public static ObjectStreamClass lookup(Class cl);
-
-        public static ObjectStreamClass lookupAny(Class cl);
-
-    public String getName();
-
-    public Class forClass();
-
-    public ObjectStreamField[] getFields();
-
-    public long getSerialVersionUID();
-
-    public String toString();
-}
-```
-
-The `lookup` method returns the `ObjectStreamClass` descriptor for the
-specified class in the virtual machine. If the class has defined
-`serialVersionUID` it is retrieved from the class. If the `serialVersionUID` is
-not defined by the class, it is computed from the definition of the class in
-the virtual machine. *I*f the specified class is not serializable or
-externalizable, *null* is returned.
-
-The `lookupAny` method behaves like the `lookup` method, except that it returns
-the descriptor for any class, regardless of whether it implements
-`Serializable`. The `serialVersionUID` of a class that does not implement
-`Serializable` is *0L.*
-
-The `getName` method returns the name of the class, in the same format that is
-used by the `Class.getName` method.
-
-The `forClass` method returns the `Class` in the local virtual machine if one
-was found by `ObjectInputStream.resolveClass` method. Otherwise, it returns
-*null*.
-
-The `getFields` method returns an array of `ObjectStreamField` objects that
-represent the serializable fields of this class.
-
-The `getSerialVersionUID` method returns the `serialVersionUID` of this class.
-Refer to [Section 4.6, "Stream Unique
-Identifiers"](#stream-unique-identifiers). If not specified by the class, the
-value returned is a hash computed from the class's name, interfaces, methods,
-and fields using the Secure Hash Algorithm (SHA) as defined by the National
-Institute of Standards.
-
-The `toString` method returns a printable representation of the class
-descriptor including the name of the class and the `serialVersionUID`.
-
-## 4.2 Dynamic Proxy Class Descriptors
-
-ObjectStreamClass descriptors are also used to provide information about
-dynamic proxy classes (e.g., classes obtained via calls to the getProxyClass
-method of java.lang.reflect.Proxy) saved in a serialization stream. A dynamic
-proxy class itself has no serializable fields and a serialVersionUID of 0L. In
-other words, when the Class object for a dynamic proxy class is passed to the
-static lookup method of ObjectStreamClass, the returned ObjectStreamClass
-instance will have the following properties:
-
--   Invoking its getSerialVersionUID method will return 0L.
--   Invoking its getFields method will return an array of length zero.
--   Invoking its getField method with any String argument will return null.
-
-## 4.3 Serialized Form
-
-The serialized form of an ObjectStreamClass instance depends on whether or not
-the Class object it represents is serializable, externalizable, or a dynamic
-proxy class.
-
-When an `ObjectStreamClass` instance that does not represent a dynamic proxy
-class is written to the stream, it writes the class name and
-`serialVersionUID`, flags, and the number of fields. Depending on the class,
-additional information may be written:
-
--   For non-serializable classes, the number of fields is always zero. Neither
-    the `SC_SERIALIZABLE` nor the `SC_EXTERNALIZABLE` flag bits are set.
-
--   For serializable classes, the `SC_SERIALIZABLE` flag is set, the number of
-    fields counts the number of serializable fields and is followed by a
-    descriptor for each serializable field. The descriptors are written in
-    canonical order. The descriptors for primitive typed fields are written
-    first sorted by field name followed by descriptors for the object typed
-    fields sorted by field name. The names are sorted using `String.compareTo`.
-    For details of the format, refer to [Section 6.4, "Grammar for the Stream
-    Format"](protocol.html#grammar-for-the-stream-format).
-
--   For externalizable classes, flags includes the `SC_EXTERNALIZABLE` flag,
-    and the number of fields is always zero.
-
--   For enum types, flags includes the `SC_ENUM` flag, and the number of fields
-    is always zero.
-
-When an ObjectOutputStream serializes the ObjectStreamClass descriptor for a
-dynamic proxy class, as determined by passing its Class object to the
-isProxyClass method of java.lang.reflect.Proxy, it writes the number of
-interfaces that the dynamic proxy class implements, followed by the interface
-names. Interfaces are listed in the order that they are returned by invoking
-the getInterfaces method on the Class object of the dynamic proxy class.
-
-The serialized representations of ObjectStreamClass descriptors for dynamic
-proxy classes and non-dynamic proxy classes are differentiated through the use
-of different typecodes (`TC_PROXYCLASSDESC` and `TC_CLASSDESC`, respectively);
-for a more detailed specification of the grammar, see [Section 6.4, "Grammar
-for the Stream Format"](protocol.html#grammar-for-the-stream-format).
-
-## 4.4 The ObjectStreamField Class
-
-An `ObjectStreamField` represents a serializable field of a serializable class.
-The serializable fields of a class can be retrieved from the
-`ObjectStreamClass`.
-
-The special static serializable field, `serialPersistentFields`, is an array of
-`ObjectStreamField` components that is used to override the default
-serializable fields.
-
-```
-package java.io;
-
-public class ObjectStreamField implements Comparable {
-
-    public ObjectStreamField(String fieldName,
-                             Class fieldType);
-
-    public ObjectStreamField(String fieldName,
-                             Class fieldType,
-                             boolean unshared);
-
-    public String getName();
-
-    public Class getType();
-
-    public String getTypeString();
-
-    public char getTypeCode();
-
-    public boolean isPrimitive();
-
-    public boolean isUnshared();
-
-    public int getOffset();
-
-    protected void setOffset(int offset);
-
-    public int compareTo(Object obj);
-
-    public String toString();
-}
-```
-
-`ObjectStreamField` objects are used to specify the serializable fields of a
-class or to describe the fields present in a stream. Its constructors accept
-arguments describing the field to represent: a string specifying the name of
-the field, a `Class` object specifying the type of the field, and a `boolean`
-flag (implicitly `false` for the two-argument constructor) indicating whether
-or not values of the represented field should be read and written as "unshared"
-objects if default serialization/deserialization is in use (see the
-descriptions of the `ObjectInputStream.readUnshared` and
-`ObjectOutputStream.writeUnshared` methods in [Section 3.1, "The
-ObjectInputStream Class"](input.html#the-objectinputstream-class) and [Section
-2.1, "The ObjectOutputStream Class"](output.html#the-objectoutputstream-class),
-respectively).
-
-The `getName` method returns the name of the serializable field.
-
-The `getType` method returns the type of the field.
-
-The `getTypeString` method returns the type signature of the field.
-
-The `getTypeCode` method returns a character encoding of the field type ('`B`'
-for `byte`, '`C`' for `char`, '`D`' for `double`, '`F`' for `float`, '`I`' for
-`int`, '`J`' for `long`, '`L`' for non-array object types, '`S`' for `short`,
-'`Z`' for `boolean`, and '`[`' for arrays).
-
-The `isPrimitive` method returns `true` if the field is of primitive type, or
-`false` otherwise.
-
-The `isUnshared` method returns `true` if values of the field should be written
-as "unshared" objects, or `false` otherwise.
-
-The `getOffset` method returns the offset of the field's value within instance
-data of the class defining the field.
-
-The `setOffset` method allows `ObjectStreamField` subclasses to modify the
-offset value returned by the `getOffset` method.
-
-The `compareTo` method compares `ObjectStreamFields` for use in sorting.
-Primitive fields are ranked as "smaller" than non-primitive fields; fields
-otherwise equal are ranked alphabetically.
-
-The `toString` method returns a printable representation with name and type.
-
-## 4.5 Inspecting Serializable Classes
-
-The program *serialver* can be used to find out if a class is serializable and
-to get its `serialVersionUID`. 
-
-When invoked on the command line with one or more class names, serialver prints
-the `serialVersionUID` for each class in a form suitable for copying into an
-evolving class. When invoked with no arguments, it prints a usage line.
-
-## 4.6 Stream Unique Identifiers
-
-Each versioned class must identify the original class version for which it is
-capable of writing streams and from which it can read. For example, a versioned
-class must declare:
-
-```
-private static final long serialVersionUID = 3487495895819393L;
-```
-
-The stream-unique identifier is a 64-bit hash of the class name, interface
-class names, methods, and fields. The value must be declared in all versions of
-a class except the first. It may be declared in the original class but is not
-required. The value is fixed for all compatible classes. If the SUID is not
-declared for a class, the value defaults to the hash for that class. The
-`serialVersionUID` for dynamic proxy classes and enum types always have the
-value *0L*. Array classes cannot declare an explicit `serialVersionUID`, so
-they always have the default computed value, but the requirement for matching
-`serialVersionUID` values is waived for array classes.
-
-**Note:** It is strongly recommended that all serializable classes explicitly
-declare `serialVersionUID` values, since the default `serialVersionUID`
-computation is highly sensitive to class details that may vary depending on
-compiler implementations, and can thus result in unexpected `serialVersionUID`
-conflicts during deserialization, causing deserialization to fail.
-
-The initial version of an `Externalizable` class must output a stream data
-format that is extensible in the future. The initial version of the method
-`readExternal` has to be able to read the output format of all future versions
-of the method `writeExternal`.
-
-The `serialVersionUID` is computed using the signature of a stream of bytes
-that reflect the class definition. The National Institute of Standards and
-Technology (NIST) Secure Hash Algorithm (SHA-1) is used to compute a signature
-for the stream. The first two 32-bit quantities are used to form a 64-bit hash.
-A `java.lang.DataOutputStream` is used to convert primitive data types to a
-sequence of bytes. The values input to the stream are defined by the Java
-Virtual Machine (VM) specification for classes. Class modifiers may include the
-`ACC_PUBLIC`, `ACC_FINAL`, `ACC_INTERFACE`, and `ACC_ABSTRACT` flags; other
-flags are ignored and do not affect `serialVersionUID` computation. Similarly,
-for field modifiers, only the `ACC_PUBLIC`, `ACC_PRIVATE`, `ACC_PROTECTED`,
-`ACC_STATIC`, `ACC_FINAL`, `ACC_VOLATILE`, and `ACC_TRANSIENT` flags are used
-when computing `serialVersionUID` values. For constructor and method modifiers,
-only the `ACC_PUBLIC`, `ACC_PRIVATE`, `ACC_PROTECTED`, `ACC_STATIC`,
-`ACC_FINAL`, `ACC_SYNCHRONIZED`, `ACC_NATIVE`, `ACC_ABSTRACT` and `ACC_STRICT`
-flags are used. Names and descriptors are written in the format used by the
-`java.io.DataOutputStream.writeUTF` method.
-
-The sequence of items in the stream is as follows:
-
-1.  The class name.
-
-2.  The class modifiers written as a 32-bit integer.
-
-3.  The name of each interface sorted by name.
-
-4.  For each field of the class sorted by field name (except `private static`
-    and `private transient` fields:
-
-    a.  The name of the field.
-
-    b.  The modifiers of the field written as a 32-bit integer.
-
-    c.  The descriptor of the field.
-
-5.  If a class initializer exists, write out the following:
-
-    a.  The name of the method, `<clinit>`.
-
-    b.  The modifier of the method, `java.lang.reflect.Modifier.STATIC`,
-        written as a 32-bit integer.
-
-    c.  The descriptor of the method, `()V`.
-
-6.  For each non-`private` constructor sorted by method name and signature:
-
-    a.  The name of the method, `<init>`.
-
-    b.  The modifiers of the method written as a 32-bit integer.
-
-    c.  The descriptor of the method.
-
-7.  For each non-`private` method sorted by method name and signature:
-
-    a.  The name of the method.
-
-    b.  The modifiers of the method written as a 32-bit integer.
-
-    c.  The descriptor of the method.
-
-8.  The SHA-1 algorithm is executed on the stream of bytes produced by
-    `DataOutputStream` and produces five 32-bit values `sha[0..4]`.
-
-9.  The hash value is assembled from the first and second 32-bit values of the
-    SHA-1 message digest. If the result of the message digest, the five 32-bit
-    words `H0 H1 H2 H3 H4`, is in an array of five `int` values named `sha`,
-    the hash value would be computed as follows:
-
-```
-      long hash = ((sha[0] >>> 24) & 0xFF) |
-                  ((sha[0] >>> 16) & 0xFF) << 8 |
-                  ((sha[0] >>> 8) & 0xFF) << 16 |
-                  ((sha[0] >>> 0) & 0xFF) << 24 |
-                  ((sha[1] >>> 24) & 0xFF) << 32 |
-                  ((sha[1] >>> 16) & 0xFF) << 40 |
-                  ((sha[1] >>> 8) & 0xFF) << 48 |
-                  ((sha[1] >>> 0) & 0xFF) << 56;
-```
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/examples.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](exceptions.html) | NEXT'
-include-after: '[CONTENTS](index.html) | [PREV](exceptions.html) | NEXT'
-
-title: 'Java Object Serialization Specification: C - Example of Serializable Fields'
----
-
--   [Example Alternate Implementation of
-    java.io.File](#c.1-example-alternate-implementation-of-java.io.file)
-
--------------------------------------------------------------------------------
-
-## C.1 Example Alternate Implementation of java.io.File
-
-This appendix provides a brief example of how an existing class could be
-specified and implemented to interoperate with the existing implementation but
-without requiring the same assumptions about the representation of the file
-name as a *String*.
-
-The system class `java.io.File` represents a filename and has methods for
-parsing, manipulating files and directories by name. It has a single private
-field that contains the current file name. The semantics of the methods that
-parse paths depend on the current path separator which is held in a static
-field. This path separator is part of the serialized state of a file so that
-file name can be adjusted when read.
-
-The serialized state of a `File` object is defined as the serializable fields
-and the sequence of data values for the file. In this case, there is one of
-each.
-
-```
-Serializable Fields:
-    String path;     // path name with embedded separators
-Serializable Data:
-    char            // path name separator for path name
-```
-
-An alternate implementation might be defined as follows:
-
-```
-class File implements java.io.Serializable {
-    ...
-    private String[] pathcomponents;
-    // Define serializable fields with the ObjectStreamClass
-
-    /**
-     * @serialField path String
-     *              Path components separated by separator.
-     */
-
-    private static final ObjectStreamField[] serialPersistentFields
-        = { new ObjectStreamField("path", String.class) };
-    ...
-        /**
-         * @serialData  Default fields followed by separator character.
-         */
-
-    private void writeObject(ObjectOutputStream s)
-        throws IOException
-    {
-        ObjectOutputStream.PutField fields = s.putFields();
-        StringBuffer str = new StringBuffer();
-        for(int i = 0; i < pathcomponents; i++) {
-            str.append(separator);
-            str.append(pathcomponents[i]);
-        }
-        fields.put("path", str.toString());
-        s.writeFields();
-        s.writeChar(separatorChar); // Add the separator character
-    }
-    ...
-
-    private void readObject(ObjectInputStream s)
-        throws IOException
-    {
-        ObjectInputStream.GetField fields = s.readFields();
-        String path = (String)fields.get("path", null);
-        ...
-        char sep = s.readChar(); // read the previous separator char
-
-        // parse path into components using the separator
-        // and store into pathcomponents array.
-    }
-}
-```
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/exceptions.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](security.html) | [NEXT](examples.html)'
-include-after: '[CONTENTS](index.html) | [PREV](security.html) | [NEXT](examples.html)'
-
-title: 'Java Object Serialization Specification: B - Exceptions In Object Serialization'
----
-
--------------------------------------------------------------------------------
-
-All exceptions thrown by serialization classes are subclasses of
-`ObjectStreamException` which is a subclass of `IOException`.
-
-### `ObjectStreamException`
-
-Superclass of all serialization exceptions.
-
-### `InvalidClassException`
-
-Thrown when a class cannot be used to restore objects for any of these reasons:
-
--   The class does not match the serial version of the class in the stream.
--   The class contains fields with invalid primitive data types.
--   The `Externalizable` class does not have a public no-arg constructor.
--   The `Serializable` class can not access the no-arg constructor of its
-    closest non-Serializable superclass.
-
-### `NotSerializableException`
-
-Thrown by a `readObject` or `writeObject` method to terminate serialization or
-deserialization.
-
-### `StreamCorruptedException`
-
-Thrown:
-
--   If the stream header is invalid.
--   If control information not found.
--   If control information is invalid.
--   JDK 1.1.5 or less attempts to call `readExternal` on a `PROTOCOL_VERSION_2`
-    stream.
-
-### `NotActiveException`
-
-Thrown if `writeObject` state is invalid within the following
-`ObjectOutputStream` methods:
-
--   `defaultWriteObject`
--   `putFields`
--   `writeFields`
-
-Thrown if `readObject` state is invalid within the following
-`ObjectInputStream` methods:
-
--   `defaultReadObject`
--   `readFields`
--   `registerValidation`
-
-### `InvalidObjectException`
-
-Thrown when a restored object cannot be made valid.
-
-### `OptionalDataException`
-
-Thrown by `readObject` when there is primitive data in the stream and an object
-is expected. The length field of the exception indicates the number of bytes
-that are available in the current block.
-
-### `WriteAbortedException`
-
-Thrown when reading a stream terminated by an exception that occurred while the
-stream was being written.
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
Binary file jdk/src/java.base/share/specs/serialization/images/version.gif has changed
--- a/jdk/src/java.base/share/specs/serialization/index.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: 'CONTENTS | PREV | [NEXT](serial-arch.html)'
-include-after: 'CONTENTS | PREV | [NEXT](serial-arch.html)'
-
-title: 'Java Object Serialization Specification: Contents'
----
-
--------------------------------------------------------------------------------
-
-## Table of Contents
-
-### 1 [System Architecture](serial-arch.html)
-
--   1.1 [Overview](serial-arch.html#overview)
--   1.2 [Writing to an Object
-    Stream](serial-arch.html#writing-to-an-object-stream)
--   1.3 [Reading from an Object
-    Stream](serial-arch.html#reading-from-an-object-stream)
--   1.4 [Object Streams as
-    Containers](serial-arch.html#object-streams-as-containers)
--   1.5 [Defining Serializable Fields for a
-    Class](serial-arch.html#defining-serializable-fields-for-a-class)
--   1.6 [Documenting Serializable Fields and Data for a
-    Class](serial-arch.html#documenting-serializable-fields-and-data-for-a-class)
--   1.7 [Accessing Serializable Fields of a
-    Class](serial-arch.html#accessing-serializable-fields-of-a-class)
--   1.8 [The ObjectOutput
-    Interface](serial-arch.html#the-objectoutput-interface)
--   1.9 [The ObjectInput Interface](serial-arch.html#the-objectinput-interface)
--   1.10 [The Serializable
-    Interface](serial-arch.html#the-serializable-interface)
--   1.11 [The Externalizable
-    Interface](serial-arch.html#the-externalizable-interface)
--   1.12 [Serialization of Enum
-    Constants](serial-arch.html#serialization-of-enum-constants)
--   1.13 [Protecting Sensitive
-    Information](serial-arch.html#protecting-sensitive-information)
-
-### 2 [Object Output Classes](output.html)
-
--   2.1 [The ObjectOutputStream
-    Class](output.html#the-objectoutputstream-class)
--   2.2 [The ObjectOutputStream.PutField
-    Class](output.html#the-objectoutputstream.putfield-class)
--   2.3 [The writeObject Method](output.html#the-writeobject-method)
--   2.4 [The writeExternal Method](output.html#the-writeexternal-method)
--   2.5 [The writeReplace Method](output.html#the-writereplace-method)
--   2.6 [The useProtocolVersion
-    Method](output.html#the-useprotocolversion-method)
-
-### 3 [Object Input Classes](input.html)
-
--   3.1 [The ObjectInputStream Class](input.html#the-objectinputstream-class)
--   3.2 [The ObjectInputStream.GetField
-    Class](input.html#the-objectinputstream.getfield-class)
--   3.3 [The ObjectInputValidation
-    Interface](input.html#the-objectinputvalidation-interface)
--   3.4 [The readObject Method](input.html#the-readobject-method)
--   3.5 [The readObjectNoData Method](input.html#the-readobjectnodata-method)
--   3.6 [The readExternal Method](input.html#the-readexternal-method)
--   3.7 [The readResolve Method](input.html#the-readresolve-method)
-
-### 4 [Class Descriptors](class.html)
-
--   4.1 [The ObjectStreamClass Class](class.html#the-objectstreamclass-class)
--   4.2 [Dynamic Proxy Class
-    Descriptors](class.html#dynamic-proxy-class-descriptors)
--   4.3 [Serialized Form](class.html#serialized-form)
--   4.4 [The ObjectStreamField Class](class.html#the-objectstreamfield-class)
--   4.5 [Inspecting Serializable
-    Classes](class.html#inspecting-serializable-classes)
--   4.6 [Stream Unique Identifiers](class.html#stream-unique-identifiers)
-
-### 5 [Versioning of Serializable Objects](version.html)
-
--   5.1 [Overview](version.html#overview)
--   5.2 [Goals](version.html#goals)
--   5.3 [Assumptions](version.html#assumptions)
--   5.4 [Who's Responsible for Versioning of
-    Streams](version.html#whos-responsible-for-versioning-of-streams)
--   5.5 [Compatible Java Type
-    Evolution](version.html#compatible-java-type-evolution)
--   5.6 [Type Changes Affecting
-    Serialization](version.html#type-changes-affecting-serialization)
-    -   5.6.1 [Incompatible Changes](version.html#incompatible-changes)
-    -   5.6.2 [Compatible Changes](version.html#compatible-changes)
-
-### 6 [Object Serialization Stream Protocol](protocol.html)
-
--   6.1 [Overview](protocol.html#overview)
--   6.2 [Stream Elements](protocol.html#stream-elements)
--   6.3 [Stream Protocol Versions](protocol.html#stream-protocol-versions)
--   6.4 [Grammar for the Stream
-    Format](protocol.html#grammar-for-the-stream-format)
-    -   6.4.1 [Rules of the Grammar](protocol.html#rules-of-the-grammar)
-    -   6.4.2 [Terminal Symbols and
-        Constants](protocol.html#terminal-symbols-and-constants)
-
-### A [Security in Object Serialization](security.html)
-
-### B [Exceptions In Object Serialization](exceptions.html)
-
-### C [Example of Serializable Fields](examples.html)
-
--   [C.1 Example Alternate Implementation of
-    `java.io.File`](examples.html#c.1-example-alternate-implementation-of-java.io.file)
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/input.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,672 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](output.html) | [NEXT](class.html)'
-include-after: '[CONTENTS](index.html) | [PREV](output.html) | [NEXT](class.html)'
-
-title: 'Java Object Serialization Specification: 3 - Object Input Classes'
----
-
--   [The ObjectInputStream Class](#the-objectinputstream-class)
--   [The ObjectInputStream.GetField
-    Class](#the-objectinputstream.getfield-class)
--   [The ObjectInputValidation Interface](#the-objectinputvalidation-interface)
--   [The readObject Method](#the-readobject-method)
--   [The readExternal Method](#the-readexternal-method)
--   [The readResolve Method](#the-readresolve-method)
-
--------------------------------------------------------------------------------
-
-## 3.1 The ObjectInputStream Class
-
-Class `ObjectInputStream` implements object deserialization. It maintains the
-state of the stream including the set of objects already deserialized. Its
-methods allow primitive types and objects to be read from a stream written by
-`ObjectOutputStream`. It manages restoration of the object and the objects that
-it refers to from the stream.
-
-```
-package java.io;
-
-public class ObjectInputStream
-    extends InputStream
-    implements ObjectInput, ObjectStreamConstants
-{
-    public ObjectInputStream(InputStream in)
-        throws StreamCorruptedException, IOException;
-
-    public final Object readObject()
-        throws OptionalDataException, ClassNotFoundException,
-            IOException;
-
-    public Object readUnshared()
-        throws OptionalDataException, ClassNotFoundException,
-            IOException;
-
-    public void defaultReadObject()
-        throws IOException, ClassNotFoundException,
-            NotActiveException;
-
-    public GetField readFields()
-        throws IOException;
-
-    public synchronized void registerValidation(
-        ObjectInputValidation obj, int prio)
-        throws NotActiveException, InvalidObjectException;
-
-    protected ObjectStreamClass readClassDescriptor()
-        throws IOException, ClassNotFoundException;
-
-    protected Class resolveClass(ObjectStreamClass v)
-        throws IOException, ClassNotFoundException;
-
-    protected Object resolveObject(Object obj)
-        throws IOException;
-
-    protected boolean enableResolveObject(boolean enable)
-        throws SecurityException;
-
-    protected void readStreamHeader()
-        throws IOException, StreamCorruptedException;
-
-    public int read() throws IOException;
-
-    public int read(byte[] data, int offset, int length)
-        throws IOException
-
-    public int available() throws IOException;
-
-    public void close() throws IOException;
-
-    public boolean readBoolean() throws IOException;
-
-    public byte readByte() throws IOException;
-
-    public int readUnsignedByte() throws IOException;
-
-    public short readShort() throws IOException;
-
-    public int readUnsignedShort() throws IOException;
-
-    public char readChar() throws IOException;
-
-    public int readInt() throws IOException;
-
-    public long readLong() throws IOException;
-
-    public float readFloat() throws IOException;
-
-    public double readDouble() throws IOException;
-
-    public void readFully(byte[] data) throws IOException;
-
-    public void readFully(byte[] data, int offset, int size)
-        throws IOException;
-
-    public int skipBytes(int len) throws IOException;
-
-    public String readLine() throws IOException;
-
-    public String readUTF() throws IOException;
-
-    // Class to provide access to serializable fields.
-    static abstract public class GetField
-    {
-        public ObjectStreamClass getObjectStreamClass();
-
-        public boolean defaulted(String name)
-            throws IOException, IllegalArgumentException;
-
-        public char get(String name, char default)
-            throws IOException, IllegalArgumentException;
-
-        public boolean get(String name, boolean default)
-            throws IOException, IllegalArgumentException;
-
-        public byte get(String name, byte default)
-            throws IOException, IllegalArgumentException;
-
-        public short get(String name, short default)
-            throws IOException, IllegalArgumentException;
-
-        public int get(String name, int default)
-            throws IOException, IllegalArgumentException;
-
-        public long get(String name, long default)
-            throws IOException, IllegalArgumentException;
-
-        public float get(String name, float default)
-            throws IOException, IllegalArgumentException;
-
-        public double get(String name, double default)
-            throws IOException, IllegalArgumentException;
-
-        public Object get(String name, Object default)
-            throws IOException, IllegalArgumentException;
-    }
-
-    protected ObjectInputStream()
-        throws StreamCorruptedException, IOException;
-
-    protected readObjectOverride()
-        throws OptionalDataException, ClassNotFoundException,
-            IOException;
-}
-```
-
-The single-argument `ObjectInputStream` constructor requires an `InputStream`.
-The constructor calls `readStreamHeader` to read and verifies the header and
-version written by the corresponding `ObjectOutputStream.writeStreamHeader`
-method. If a security manager is installed, this constructor checks for the
-`"enableSubclassImplementation"` `SerializablePermission` when invoked directly
-or indirectly by the constructor of a subclass which overrides the `readFields`
-and/or `readUnshared` methods.
-
-**Note:** The `ObjectInputStream` constructor blocks until it completes reading
-the serialization stream header. Code which waits for an `ObjectInputStream` to
-be constructed before creating the corresponding `ObjectOutputStream` for that
-stream will deadlock, since the `ObjectInputStream` constructor will block
-until a header is written to the stream, and the header will not be written to
-the stream until the `ObjectOutputStream` constructor executes. This problem
-can be resolved by creating the `ObjectOutputStream` before the
-`ObjectInputStream`, or otherwise removing the timing dependency between
-completion of `ObjectInputStream` construction and the creation of the
-`ObjectOutputStream`.
-
-The `readObject` method is used to deserialize an object from the stream. It
-reads from the stream to reconstruct an object.
-
-1.  If the `ObjectInputStream` subclass is overriding the implementation, call
-    the `readObjectOverride` method and return. Reimplementation is described
-    at the end of this section.
-
-2.  If a block data record occurs in the stream, throw a `BlockDataException`
-    with the number of available bytes.
-
-3.  If the object in the stream is null, return null.
-
-4.  If the object in the stream is a handle to a previous object, return the
-    object.
-
-5.  If the object in the stream is a `Class`, read its `ObjectStreamClass`
-    descriptor, add it and its handle to the set of known objects, and return
-    the corresponding `Class` object.
-
-6.  If the object in the stream is an `ObjectStreamClass`, read in its data
-    according to the formats described in [Section 4.3, "Serialized
-    Form"](class.html#serialized-form). Add it and its handle to the set of
-    known objects. In versions 1.3 and later of the Java 2 SDK, Standard
-    Edition, the `readClassDescriptor` method is called to read in the
-    `ObjectStreamClass` if it represents a class that is not a dynamic proxy
-    class, as indicated in the stream data. If the class descriptor represents
-    a dynamic proxy class, call the `resolveProxyClass` method on the stream to
-    get the local class for the descriptor; otherwise, call the `resolveClass`
-    method on the stream to get the local class. If the class cannot be
-    resolved, throw a ClassNotFoundException. Return the resulting
-    `ObjectStreamClass` object.
-
-7.  If the object in the stream is a `String`, read its length information
-    followed by the contents of the string encoded in modified UTF-8. For
-    details, refer to [Section 6.2, "Stream
-    Elements"](protocol.html#stream-elements). Add the `String` and its handle
-    to the set of known objects, and proceed to Step 12.
-
-8.  If the object in the stream is an array, read its `ObjectStreamClass` and
-    the length of the array. Allocate the array, and add it and its handle in
-    the set of known objects. Read each element using the appropriate method
-    for its type and assign it to the array. Proceed to Step 12.
-
-9.  If the object in the stream is an enum constant, read its
-    `ObjectStreamClass` and the enum constant name. If the `ObjectStreamClass`
-    represents a class that is not an enum type, an `InvalidClassException` is
-    thrown. Obtain a reference to the enum constant by calling the
-    `java.lang.Enum.valueOf` method, passing the enum type bound to the
-    received `ObjectStreamClass` along with the received name as arguments. If
-    the `valueOf` method throws an `IllegalArgumentException`, an
-    `InvalidObjectException` is thrown with the `IllegalArgumentException` as
-    its cause. Add the enum constant and its handle in the set of known
-    objects, and proceed to Step 12.
-
-10. For all other objects, the `ObjectStreamClass` of the object is read from
-    the stream. The local class for that `ObjectStreamClass` is retrieved. The
-    class must be serializable or externalizable, and must not be an enum type.
-    If the class does not satisfy these criteria, an `InvalidClassException` is
-    thrown.
-
-11. An instance of the class is allocated. The instance and its handle are
-    added to the set of known objects. The contents restored appropriately:
-
-    a.  For serializable objects, the no-arg constructor for the first
-        non-serializable supertype is run. For serializable classes, the fields
-        are initialized to the default value appropriate for its type. Then the
-        fields of each class are restored by calling class-specific
-        `readObject` methods, or if these are not defined, by calling the
-        `defaultReadObject` method. Note that field initializers and
-        constructors are not executed for serializable classes during
-        deserialization. In the normal case, the version of the class that
-        wrote the stream will be the same as the class reading the stream. In
-        this case, all of the supertypes of the object in the stream will match
-        the supertypes in the currently-loaded class. If the version of the
-        class that wrote the stream had different supertypes than the loaded
-        class, the `ObjectInputStream` must be more careful about restoring or
-        initializing the state of the differing classes. It must step through
-        the classes, matching the available data in the stream with the classes
-        of the object being restored. Data for classes that occur in the
-        stream, but do not occur in the object, is discarded. For classes that
-        occur in the object, but not in the stream, the class fields are set to
-        default values by default serialization.
-
-    b.  For externalizable objects, the no-arg constructor for the class is run
-        and then the `readExternal` method is called to restore the contents of
-        the object.
-
-12. Process potential substitutions by the class of the object and/or by a
-    subclass of `ObjectInputStream`:
-
-    a.  If the class of the object is not an enum type and defines the
-        appropriate `readResolve` method, the method is called to allow the
-        object to replace itself.
-
-    b.  Then if previously enabled by `enableResolveObject,` the
-        `resolveObject` method is called to allow subclasses of the stream to
-        examine and replace the object. If the previous step did replace the
-        original object, the `resolveObject` method is called with the
-        replacement object. If a replacement took place, the table of known
-        objects is updated so the replacement object is associated with the
-        handle. The replacement object is then returned from `readObject`.
-
-All of the methods for reading primitives types only consume bytes from the
-block data records in the stream. If a read for primitive data occurs when the
-next item in the stream is an object, the read methods return *-1* or the
-`EOFException` as appropriate. The value of a primitive type is read by a
-`DataInputStream` from the block data record.
-
-The exceptions thrown reflect errors during the traversal or exceptions that
-occur on the underlying stream. If any exception is thrown, the underlying
-stream is left in an unknown and unusable state.
-
-When the reset token occurs in the stream, all of the state of the stream is
-discarded. The set of known objects is cleared.
-
-When the exception token occurs in the stream, the exception is read and a new
-`WriteAbortedException` is thrown with the terminating exception as an
-argument. The stream context is reset as described earlier.
-
-The `readUnshared` method is used to read "unshared" objects from the stream.
-This method is identical to `readObject`, except that it prevents subsequent
-calls to `readObject` and `readUnshared` from returning additional references
-to the deserialized instance returned by the original call to `readUnshared`.
-Specifically:
-
--   If `readUnshared` is called to deserialize a back-reference (the stream
-    representation of an object which has been written previously to the
-    stream), an `ObjectStreamException` will be thrown.
-
--   If `readUnshared` returns successfully, then any subsequent attempts to
-    deserialize back-references to the stream handle deserialized by
-    `readUnshared` will cause an `ObjectStreamException` to be thrown.
-
-Deserializing an object via `readUnshared` invalidates the stream handle
-associated with the returned object. Note that this in itself does not always
-guarantee that the reference returned by `readUnshared` is unique; the
-deserialized object may define a `readResolve` method which returns an object
-visible to other parties, or `readUnshared` may return a `Class` object or enum
-constant obtainable elsewhere in the stream or through external means. If the
-deserialized object defines a `readResolve` method and the invocation of that
-method returns an array, then `readUnshared` returns a shallow clone of that
-array; this guarantees that the returned array object is unique and cannot be
-obtained a second time from an invocation of `readObject` or `readUnshared` on
-the `ObjectInputStream`, even if the underlying data stream has been
-manipulated.
-
-The `defaultReadObject` method is used to read the fields and object from the
-stream. It uses the class descriptor in the stream to read the fields in the
-canonical order by name and type from the stream. The values are assigned to
-the matching fields by name in the current class. Details of the versioning
-mechanism can be found in [Section 5.5, "Compatible Java Type
-Evolution"](version.html#compatible-java-type-evolution). Any field of the
-object that does not appear in the stream is set to its default value. Values
-that appear in the stream, but not in the object, are discarded. This occurs
-primarily when a later version of a class has written additional fields that do
-not occur in the earlier version. This method may only be called from the
-`readObject` method while restoring the fields of a class. When called at any
-other time, the `NotActiveException` is thrown.
-
-The `readFields` method reads the values of the serializable fields from the
-stream and makes them available via the `GetField` class. The `readFields`
-method is only callable from within the `readObject` method of a serializable
-class. It cannot be called more than once or if `defaultReadObject` has been
-called. The `GetFields` object uses the current object's `ObjectStreamClass` to
-verify the fields that can be retrieved for this class. The `GetFields` object
-returned by `readFields` is only valid during this call to the classes
-`readObject` method. The fields may be retrieved in any order. Additional data
-may only be read directly from stream after `readFields` has been called.
-
-The `registerValidation` method can be called to request a callback when the
-entire graph has been restored but before the object is returned to the
-original caller of `readObject`. The order of validate callbacks can be
-controlled using the priority. Callbacks registered with higher values are
-called before those with lower values. The object to be validated must support
-the `ObjectInputValidation` interface and implement the `validateObject`
-method. It is only correct to register validations during a call to a class's
-`readObject` method. Otherwise, a `NotActiveException` is thrown. If the
-callback object supplied to `registerValidation` is null, an
-`InvalidObjectException` is thrown.
-
-Starting with the Java SDK, Standard Edition, v1.3, the `readClassDescriptor`
-method is used to read in all `ObjectStreamClass` objects.
-`readClassDescriptor` is called when the `ObjectInputStream` expects a class
-descriptor as the next item in the serialization stream. Subclasses of
-`ObjectInputStream` may override this method to read in class descriptors that
-have been written in non-standard formats (by subclasses of
-`ObjectOutputStream` which have overridden the `writeClassDescriptor` method).
-By default, this method reads class descriptors according to the format
-described in [Section 6.4, "Grammar for the Stream
-Format"](protocol.html#grammar-for-the-stream-format).
-
-The `resolveClass` method is called while a class is being deserialized, and
-after the class descriptor has been read. Subclasses may extend this method to
-read other information about the class written by the corresponding subclass of
-`ObjectOutputStream`. The method must find and return the class with the given
-name and `serialVersionUID`. The default implementation locates the class by
-calling the class loader of the closest caller of `readObject` that has a class
-loader. If the class cannot be found `ClassNotFoundException` should be thrown.
-Prior to JDK 1.1.6, the `resolveClass` method was required to return the same
-fully qualified class name as the class name in the stream. In order to
-accommodate package renaming across releases, `method` `resolveClass` only
-needs to return a class with the same base class name and `SerialVersionUID` in
-JDK 1.1.6 and later versions.
-
-The `resolveObject` method is used by trusted subclasses to monitor or
-substitute one object for another during deserialization. Resolving objects
-must be enabled explicitly by calling `enableResolveObject` before calling
-`readObject` for the first object to be resolved. Once enabled, `resolveObject`
-is called once for each serializable object just prior to the first time it is
-being returned from `readObject`. Note that the `resolveObject` method is not
-called for objects of the specially handled classes, `Class`,
-`ObjectStreamClass`, `String`, and arrays. A subclass's implementation of
-`resolveObject` may return a substitute object that will be assigned or
-returned instead of the original. The object returned must be of a type that is
-consistent and assignable to every reference of the original object or else a
-`ClassCastException` will be thrown. All assignments are type-checked. All
-references in the stream to the original object will be replaced by references
-to the substitute object.
-
-The `enableResolveObject` method is called by trusted subclasses of
-`ObjectOutputStream` to enable the monitoring or substitution of one object for
-another during deserialization. Replacing objects is disabled until
-`enableResolveObject` is called with a `true` value. It may thereafter be
-disabled by setting it to `false`. The previous setting is returned. The
-`enableResolveObject` method checks if the stream has permission to request
-substitution during serialization. To ensure that the private state of objects
-is not unintentionally exposed, only trusted streams may use `resolveObject`.
-Trusted classes are those classes with a class loader equal to null or belong
-to a security protection domain that provides permission to enable
-substitution.
-
-If the subclass of `ObjectInputStream` is not considered part of the system
-domain, a line has to be added to the security policy file to provide to a
-subclass of `ObjectInputStream` permission to call `enableResolveObject`. The
-`SerializablePermission` to add is `"enableSubstitution"`.
-`AccessControlException` is thrown if the protection domain of the subclass of
-`ObjectStreamClass` does not have permission to `"enableSubstitution"` by
-calling `enableResolveObject`. See the document Java Security Architecture (JDK
-1.2) for additional information about the security model.
-
-The `readStreamHeader` method reads and verifies the magic number and version
-of the stream. If they do not match, the `StreamCorruptedMismatch` is thrown.
-
-To override the implementation of deserialization, a subclass of
-`ObjectInputStream` should call the protected no-arg `ObjectInputStream`,
-constructor. There is a security check within the no-arg constructor for
-`SerializablePermission "enableSubclassImplementation"` to ensure that only
-trusted classes are allowed to override the default implementation. This
-constructor does not allocate any private data for `ObjectInputStream` and sets
-a flag that indicates that the final `readObject` method should invoke the
-`readObjectOverride` method and return. All other `ObjectInputStream` methods
-are not final and can be directly overridden by the subclass.
-
-## 3.2 The ObjectInputStream.GetField Class
-
-The class `ObjectInputStream.GetField` provides the API for getting the values
-of serializable fields. The protocol of the stream is the same as used by
-`defaultReadObject.` Using `readFields` to access the serializable fields does
-not change the format of the stream. It only provides an alternate API to
-access the values which does not require the class to have the corresponding
-non-transient and non-static fields for each named serializable field. The
-serializable fields are those declared using `serialPersistentFields` or if it
-is not declared the non-transient and non-static fields of the object. When the
-stream is read the available serializable fields are those written to the
-stream when the object was serialized. If the class that wrote the stream is a
-different version not all fields will correspond to the serializable fields of
-the current class. The available fields can be retrieved from the
-`ObjectStreamClass` of the `GetField` object.
-
-The `getObjectStreamClass` method returns an `ObjectStreamClass` object
-representing the class in the stream. It contains the list of serializable
-fields.
-
-The `defaulted` method returns *true* if the field is not present in the
-stream. An `IllegalArgumentException` is thrown if the requested field is not a
-serializable field of the current class.
-
-Each `get` method returns the specified serializable field from the stream. I/O
-exceptions will be thrown if the underlying stream throws an exception. An
-`IllegalArgumentException` is thrown if the name or type does not match the
-name and type of an field serializable field of the current class. The default
-value is returned if the stream does not contain an explicit value for the
-field.
-
-## 3.3 The ObjectInputValidation Interface
-
-This interface allows an object to be called when a complete graph of objects
-has been deserialized. If the object cannot be made valid, it should throw the
-`ObjectInvalidException`. Any exception that occurs during a call to
-`validateObject` will terminate the validation process, and the
-`InvalidObjectException` will be thrown.
-
-```
-package java.io;
-
-public interface ObjectInputValidation
-{
-    public void validateObject()
-        throws InvalidObjectException;
-}
-```
-
-## 3.4 The readObject Method
-
-For serializable objects, the `readObject` method allows a class to control the
-deserialization of its own fields. Here is its signature:
-
-```
-private void readObject(ObjectInputStream stream)
-    throws IOException, ClassNotFoundException;
-```
-
-Each subclass of a serializable object may define its own `readObject` method.
-If a class does not implement the method, the default serialization provided by
-`defaultReadObject` will be used. When implemented, the class is only
-responsible for restoring its own fields, not those of its supertypes or
-subtypes.
-
-The `readObject` method of the class, if implemented, is responsible for
-restoring the state of the class. The values of every field of the object
-whether transient or not, static or not are set to the default value for the
-fields type. Either `ObjectInputStream`'s `defaultReadObject` or `readFields`
-method must be called once (and only once) before reading any optional data
-written by the corresponding `writeObject` method; even if no optional data is
-read, `defaultReadObject` or `readFields` must still be invoked once. If the
-`readObject` method of the class attempts to read more data than is present in
-the optional part of the stream for this class, the stream will return `-1` for
-bytewise reads, throw an `EOFException` for primitive data reads (e.g.,
-`readInt`, `readFloat`), or throw an `OptionalDataException` with the `eof`
-field set to `true` for object reads.
-
-The responsibility for the format, structure, and versioning of the optional
-data lies completely with the class. The `@serialData` javadoc tag within the
-javadoc comment for the `readObject` method should be used to document the
-format and structure of the optional data.
-
-If the class being restored is not present in the stream being read, then its
-`readObjectNoData` method, if defined, is invoked (instead of `readObject`);
-otherwise, its fields are initialized to the appropriate default values. For
-further detail, see [Section 3.5, "The readObjectNoData
-Method"](#the-readobjectnodata-method).
-
-Reading an object from the `ObjectInputStream` is analogous to creating a new
-object. Just as a new object's constructors are invoked in the order from the
-superclass to the subclass, an object being read from a stream is deserialized
-from superclass to subclass. The `readObject` or `readObjectNoData` method is
-called instead of the constructor for each `Serializable` subclass during
-deserialization.
-
-One last similarity between a constructor and a `readObject` method is that
-both provide the opportunity to invoke a method on an object that is not fully
-constructed. Any overridable (neither private, static nor final) method called
-while an object is being constructed can potentially be overridden by a
-subclass. Methods called during the construction phase of an object are
-resolved by the actual type of the object, not the type currently being
-initialized by either its constructor or `readObject`/`readObjectNoData`
-method. Therefore, calling an overridable method from within a `readObject` or
-`readObjectNoData` method may result in the unintentional invocation of a
-subclass method before the superclass has been fully initialized.
-
-## 3.5 The readObjectNoData Method
-
-For serializable objects, the `readObjectNoData` method allows a class to
-control the initialization of its own fields in the event that a subclass
-instance is deserialized and the serialization stream does not list the class
-in question as a superclass of the deserialized object. This may occur in cases
-where the receiving party uses a different version of the deserialized
-instance's class than the sending party, and the receiver's version extends
-classes that are not extended by the sender's version. This may also occur if
-the serialization stream has been tampered; hence, `readObjectNoData` is useful
-for initializing deserialized objects properly despite a "hostile" or
-incomplete source stream.
-
-```
-private void readObjectNoData() throws ObjectStreamException;
-```
-
-Each serializable class may define its own `readObjectNoData` method. If a
-serializable class does not define a `readObjectNoData` method, then in the
-circumstances listed above the fields of the class will be initialized to their
-default values (as listed in The Java Language Specification); this behavior is
-consistent with that of `ObjectInputStream` prior to version 1.4 of the Java 2
-SDK, Standard Edition, when support for `readObjectNoData` methods was
-introduced. If a serializable class does define a `readObjectNoData` method and
-the aforementioned conditions arise, then `readObjectNoData` will be invoked at
-the point during deserialization when a class-defined `readObject` method would
-otherwise be called had the class in question been listed by the stream as a
-superclass of the instance being deserialized.
-
-## 3.6 The readExternal Method
-
-Objects implementing `java.io.Externalizable` must implement the `readExternal`
-method to restore the entire state of the object. It must coordinate with its
-superclasses to restore their state. All of the methods of `ObjectInput` are
-available to restore the object's primitive typed fields and object fields.
-
-```
-public void readExternal(ObjectInput stream)
-    throws IOException;
-```
-
-**Note:** The `readExternal` method is public, and it raises the risk of a
-client being able to overwrite an existing object from a stream. The class may
-add its own checks to insure that this is only called when appropriate.
-
-A new stream protocol version has been introduced in JDK 1.2 to correct a
-problem with `Externalizable` objects. The old definition of `Externalizable`
-objects required the local virtual machine to find a `readExternal` method to
-be able to properly read an `Externalizable` object from the stream. The new
-format adds enough information to the stream protocol so serialization can skip
-an `Externalizable` object when the local `readExternal` method is not
-available. Due to class evolution rules, serialization must be able to skip an
-`Externalizable` object in the input stream if there is not a mapping for the
-object using the local classes.
-
-An additional benefit of the new `Externalizable` stream format is that
-`ObjectInputStream` can detect attempts to read more External data than is
-available, and can also skip by any data that is left unconsumed by a
-`readExternal` method. The behavior of `ObjectInputStream` in response to a
-read past the end of External data is the same as the behavior when a
-class-defined `readObject` method attempts to read past the end of its optional
-data: bytewise reads will return `-1`, primitive reads will throw
-`EOFException`s, and object reads will throw `OptionalDataException`s with the
-`eof` field set to `true`.
-
-Due to the format change, JDK 1.1.6 and earlier releases are not able to read
-the new format. `StreamCorruptedException` is thrown when JDK 1.1.6 or earlier
-attempts to read an `Externalizable` object from a stream written in
-`PROTOCOL_VERSION_2`. Compatibility issues are discussed in more detail in
-[Section 6.3, "Stream Protocol
-Versions"](protocol.html#stream-protocol-versions).
-
-## 3.7 The readResolve Method
-
-For Serializable and Externalizable classes, the `readResolve` method allows a
-class to replace/resolve the object read from the stream before it is returned
-to the caller. By implementing the `readResolve` method, a class can directly
-control the types and instances of its own instances being deserialized. The
-method is defined as follows:
-
-```
-ANY-ACCESS-MODIFIER Object readResolve()
-            throws ObjectStreamException;
-```
-
-The `readResolve` method is called when `ObjectInputStream` has read an object
-from the stream and is preparing to return it to the caller.
-`ObjectInputStream` checks whether the class of the object defines the
-`readResolve` method. If the method is defined, the `readResolve` method is
-called to allow the object in the stream to designate the object to be
-returned. The object returned should be of a type that is compatible with all
-uses. If it is not compatible, a `ClassCastException` will be thrown when the
-type mismatch is discovered.
-
-For example, a `Symbol` class could be created for which only a single instance
-of each symbol binding existed within a virtual machine. The `readResolve`
-method would be implemented to determine if that symbol was already defined and
-substitute the preexisting equivalent `Symbol` object to maintain the identity
-constraint. In this way the uniqueness of `Symbol` objects can be maintained
-across serialization.
-
-**Note:** The `readResolve` method is not invoked on the object until the
-object is fully constructed, so any references to this object in its object
-graph will not be updated to the new object nominated by `readResolve`.
-However, during the serialization of an object with the `writeReplace` method,
-all references to the original object in the replacement object's object graph
-are replaced with references to the replacement object. Therefore in cases
-where an object being serialized nominates a replacement object whose object
-graph has a reference to the original object, deserialization will result in an
-incorrect graph of objects. Furthermore, if the reference types of the object
-being read (nominated by `writeReplace`) and the original object are not
-compatible, the construction of the object graph will raise a
-`ClassCastException`.
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/output.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,514 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](serial-arch.html) | [NEXT](input.html)'
-include-after: '[CONTENTS](index.html) | [PREV](serial-arch.html) | [NEXT](input.html)'
-
-title: 'Java Object Serialization Specification: 2 - Object Output Classes'
----
-
--   [The ObjectOutputStream Class](#the-objectoutputstream-class)
--   [The ObjectOutputStream.PutField
-    Class](#the-objectoutputstream.putfield-class)
--   [The writeObject Method](#the-writeobject-method)
--   [The writeExternal Method](#the-writeexternal-method)
--   [The writeReplace Method](#the-writereplace-method)
--   [The useProtocolVersion Method](#the-useprotocolversion-method)
-
--------------------------------------------------------------------------------
-
-## 2.1 The ObjectOutputStream Class
-
-Class `ObjectOutputStream` implements object serialization. It maintains the
-state of the stream including the set of objects already serialized. Its
-methods control the traversal of objects to be serialized to save the specified
-objects and the objects to which they refer.
-
-```
-package java.io;
-
-public class ObjectOutputStream
-    extends OutputStream
-    implements ObjectOutput, ObjectStreamConstants
-{
-    public ObjectOutputStream(OutputStream out)
-        throws IOException;
-
-    public final void writeObject(Object obj)
-        throws IOException;
-
-    public void writeUnshared(Object obj)
-        throws IOException;
-
-    public void defaultWriteObject()
-        throws IOException, NotActiveException;
-
-    public PutField putFields()
-        throws IOException;
-
-    public writeFields()
-        throws IOException;
-
-    public void reset() throws IOException;
-
-    protected void annotateClass(Class cl) throws IOException;
-
-    protected void writeClassDescriptor(ObjectStreamClass desc)
-        throws IOException;
-
-    protected Object replaceObject(Object obj) throws IOException;
-
-    protected boolean enableReplaceObject(boolean enable)
-        throws SecurityException;
-
-    protected void writeStreamHeader() throws IOException;
-
-    public void write(int data) throws IOException;
-
-    public void write(byte b[]) throws IOException;
-
-    public void write(byte b[], int off, int len) throws IOException;
-
-    public void flush() throws IOException;
-
-    protected void drain() throws IOException;
-
-    public void close() throws IOException;
-
-    public void writeBoolean(boolean data) throws IOException;
-
-    public void writeByte(int data) throws IOException;
-
-    public void writeShort(int data) throws IOException;
-
-    public void writeChar(int data) throws IOException;
-
-    public void writeInt(int data) throws IOException;
-
-    public void writeLong(long data) throws IOException;
-
-    public void writeFloat(float data) throws IOException;
-
-    public void writeDouble(double data) throws IOException;
-
-    public void writeBytes(String data) throws IOException;
-
-    public void writeChars(String data) throws IOException;
-
-    public void writeUTF(String data) throws IOException;
-
-    // Inner class to provide access to serializable fields.
-    abstract static public class PutField
-    {
-        public void put(String name, boolean value)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, char data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, byte data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, short data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, int data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, long data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, float data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, double data)
-            throws IOException, IllegalArgumentException;
-
-        public void put(String name, Object data)
-            throws IOException, IllegalArgumentException;
-    }
-
-    public void useProtocolVersion(int version) throws IOException;
-
-    protected ObjectOutputStream()
-        throws IOException;
-
-     protected writeObjectOverride()
-        throws NotActiveException, IOException;
-}
-```
-
-The single-argument `ObjectOutputStream` constructor creates an
-`ObjectOutputStream` that serializes objects to the given `OutputStream`. The
-constructor calls `writeStreamHeader` to write a magic number and version to
-the stream that will be read and verified by a corresponding call to
-`readStreamHeader` in the single-argument `ObjectInputStream` constructor. If a
-security manager is installed, this constructor checks for the
-`"enableSubclassImplementation"` `SerializablePermission` when invoked directly
-or indirectly by the constructor of a subclass which overrides the `putFields`
-and/or `writeUnshared` methods.
-
-The `writeObject` method is used to serialize an object to the stream. An
-object is serialized as follows:
-
-1.  If a subclass is overriding the implementation, call the
-    `writeObjectOverride` method and return. Overriding the implementation is
-    described at the end of this section.
-
-2.  If there is data in the block-data buffer, the data is written to the
-    stream and the buffer is reset.
-
-3.  If the object is null, null is put in the stream and `writeObject` returns.
-
-4.  If the object has been previously replaced, as described in Step 8, write
-    the handle of the replacement to the stream and `writeObject` returns.
-
-5.  If the object has already been written to the stream, its handle is written
-    to the stream and `writeObject` returns.
-
-6.  If the object is a `Class`, the corresponding `ObjectStreamClass` is
-    written to the stream, a handle is assigned for the class, and
-    `writeObject` returns.
-
-7.  If the object is an `ObjectStreamClass`, a handle is assigned to the
-    object, after which it is written to the stream using one of the class
-    descriptor formats described in [Section 4.3, "Serialized
-    Form"](class.html#serialized-form). In versions 1.3 and later of the Java 2
-    SDK, Standard Edition, the `writeClassDescriptor` method is called to
-    output the `ObjectStreamClass` if it represents a class that is not a
-    dynamic proxy class, as determined by passing the associated `Class` object
-    to the `isProxyClass` method of `java.lang.reflect.Proxy`. Afterwards, an
-    annotation for the represented class is written: if the class is a dynamic
-    proxy class, then the `annotateProxyClass` method is called; otherwise, the
-    `annotateClass` method is called. The `writeObject` method then returns.
-
-8.  Process potential substitutions by the class of the object and/or by a
-    subclass of `ObjectInputStream`.
-
-    a.  If the class of an object is not an enum type and defines the
-        appropriate `writeReplace` method, the method is called. Optionally, it
-        can return a substitute object to be serialized.
-
-    b.  Then, if enabled by calling the `enableReplaceObject` method, the
-        `replaceObject` method is called to allow subclasses of
-        `ObjectOutputStream` to substitute for the object being serialized. If
-        the original object was replaced in the previous step, the
-        `replaceObject` method is called with the replacement object.
-
-    If the original object was replaced by either one or both steps above, the
-    mapping from the original object to the replacement is recorded for later
-    use in Step 4. Then, Steps 3 through 7 are repeated on the new object. 
-
-    If the replacement object is not one of the types covered by Steps 3
-    through 7, processing resumes using the replacement object at Step 10.
-
-9.  <a id="java-lang-string-encoding"></a>
-    If the object is a `java.lang.String,` the string is written as length
-    information followed by the contents of the string encoded in modified
-    UTF-8. For details, refer to [Section 6.2, "Stream
-    Elements"](protocol.html#stream-elements). A handle is assigned to the
-    string, and `writeObject` returns.
-
-10. If the object is an array, `writeObject` is called recursively to write the
-    `ObjectStreamClass` of the array. The handle for the array is assigned. It
-    is followed by the length of the array. Each element of the array is then
-    written to the stream, after which `writeObject` returns.
-
-11. If the object is an enum constant, the `ObjectStreamClass` for the enum
-    type of the constant is written by recursively calling `writeObject`. It
-    will appear in the stream only the first time it is referenced. A handle is
-    assigned for the enum constant. Next, the value returned by the `name`
-    method of the enum constant is written as a `String` object, as described
-    in step 9. Note that if the same name string has appeared previously in the
-    stream, a back reference to it will be written. The `writeObject` method
-    then returns.
-
-12. For regular objects, the `ObjectStreamClass` for the class of the object is
-    written by recursively calling `writeObject`. It will appear in the stream
-    only the first time it is referenced. A handle is assigned for the object.
-
-13. The contents of the object are written to the stream.
-
-    a.  If the object is serializable, the highest serializable class is
-        located. For that class, and each derived class, that class's fields
-        are written. If the class does not have a `writeObject` method, the
-        `defaultWriteObject` method is called to write the serializable fields
-        to the stream. If the class does have a `writeObject` method, it is
-        called. It may call `defaultWriteObject` or `putFields` and
-        `writeFields` to save the state of the object, and then it can write
-        other information to the stream.
-
-    b.  If the object is externalizable, the `writeExternal` method of the
-        object is called.
-
-    c.  If the object is neither serializable or externalizable, the
-        `NotSerializableException` is thrown.
-
-Exceptions may occur during the traversal or may occur in the underlying
-stream. For any subclass of `IOException`, the exception is written to the
-stream using the exception protocol and the stream state is discarded. If a
-second `IOException` is thrown while attempting to write the first exception
-into the stream, the stream is left in an unknown state and
-`StreamCorruptedException` is thrown from `writeObject`. For other exceptions,
-the stream is aborted and left in an unknown and unusable state.
-
-The `writeUnshared` method writes an "unshared" object to the
-`ObjectOutputStream`. This method is identical to `writeObject`, except that it
-always writes the given object as a new, unique object in the stream (as
-opposed to a back-reference pointing to a previously serialized instance).
-Specifically:
-
--   An object written via `writeUnshared` is always serialized in the same
-    manner as a newly appearing object (an object that has not been written to
-    the stream yet), regardless of whether or not the object has been written
-    previously.
-
--   If `writeObject` is used to write an object that has been previously
-    written with `writeUnshared`, the previous `writeUnshared` operation is
-    treated as if it were a write of a separate object. In other words,
-    `ObjectOutputStream` will never generate back-references to object data
-    written by calls to `writeUnshared`.
-
-While writing an object via `writeUnshared` does not in itself guarantee a
-unique reference to the object when it is deserialized, it allows a single
-object to be defined multiple times in a stream, so that multiple calls to the
-`ObjectInputStream.readUnshared` method (see [Section 3.1, "The
-ObjectInputStream Class"](input.html#the-objectinputstream-class)) by the
-receiver will not conflict. Note that the rules described above only apply to
-the base-level object written with `writeUnshared`, and not to any transitively
-referenced sub-objects in the object graph to be serialized.
-
-The `defaultWriteObject` method implements the default serialization mechanism
-for the current class. This method may be called only from a class's
-`writeObject` method. The method writes all of the serializable fields of the
-current class to the stream. If called from outside the `writeObject` method,
-the `NotActiveException` is thrown.
-
-The `putFields` method returns a `PutField` object the caller uses to set the
-values of the serializable fields in the stream. The fields may be set in any
-order. After all of the fields have been set, `writeFields` must be called to
-write the field values in the canonical order to the stream. If a field is not
-set, the default value appropriate for its type will be written to the stream.
-This method may only be called from within the `writeObject` method of a
-serializable class. It may not be called more than once or if
-`defaultWriteObject` has been called. Only after `writeFields` has been called
-can other data be written to the stream.
-
-The `reset` method resets the stream state to be the same as if it had just
-been constructed. `Reset` will discard the state of any objects already written
-to the stream. The current point in the stream is marked as reset, so the
-corresponding `ObjectInputStream` will reset at the same point. Objects
-previously written to the stream will not be remembered as already having been
-written to the stream. They will be written to the stream again. This is useful
-when the contents of an object or objects must be sent again. `Reset` may not
-be called while objects are being serialized. If called inappropriately, an
-`IOException` is thrown.
-
-Starting with the Java 2 SDK, Standard Edition, v1.3, the
-`writeClassDescriptor` method is called when an `ObjectStreamClass` needs to be
-serialized. `writeClassDescriptor` is responsible for writing a representation
-of the `ObjectStreamClass` to the serialization stream. Subclasses may override
-this method to customize the way in which class descriptors are written to the
-serialization stream. If this method is overridden, then the corresponding
-`readClassDescriptor` method in `ObjectInputStream` should also be overridden
-to reconstitute the class descriptor from its custom stream representation. By
-default, `writeClassDescriptor` writes class descriptors according to the
-format specified in [Section 6.4, "Grammar for the Stream
-Format"](protocol.html#grammar-for-the-stream-format). Note that this method
-will only be called if the `ObjectOutputStream` is not using the old
-serialization stream format (see [Section 6.3, "Stream Protocol
-Versions"](protocol.html#stream-protocol-versions)). If the serialization
-stream is using the old format (`ObjectStreamConstants.PROTOCOL_VERSION_1`),
-the class descriptor will be written internally in a manner that cannot be
-overridden or customized.
-
-The `annotateClass` method is called while a `Class` is being serialized, and
-after the class descriptor has been written to the stream. Subclasses may
-extend this method and write other information to the stream about the class.
-This information must be read by the `resolveClass` method in a corresponding
-`ObjectInputStream` subclass.
-
-An `ObjectOutputStream` subclass can implement the `replaceObject` method to
-monitor or replace objects during serialization. Replacing objects must be
-enabled explicitly by calling `enableReplaceObject` before calling
-`writeObject` with the first object to be replaced. Once enabled,
-`replaceObject` is called for each object just prior to serializing the object
-for the first time. Note that the `replaceObject` method is not called for
-objects of the specially handled classes, `Class` and `ObjectStreamClass`. An
-implementation of a subclass may return a substitute object that will be
-serialized instead of the original. The substitute object must be serializable.
-All references in the stream to the original object will be replaced by the
-substitute object.
-
-When objects are being replaced, the subclass must ensure that the substituted
-object is compatible with every field where the reference will be stored, or
-that a complementary substitution will be made during deserialization. Objects,
-whose type is not a subclass of the type of the field or array element, will
-later abort the deserialization by raising a `ClassCastException` and the
-reference will not be stored.
-
-The `enableReplaceObject` method can be called by trusted subclasses of
-`ObjectOutputStream` to enable the substitution of one object for another
-during serialization. Replacing objects is disabled until `enableReplaceObject`
-is called with a `true` value. It may thereafter be disabled by setting it to
-`false`. The previous setting is returned. The `enableReplaceObject` method
-checks that the stream requesting the replacement can be trusted. To ensure
-that the private state of objects is not unintentionally exposed, only trusted
-stream subclasses may use `replaceObject`. Trusted classes are those classes
-that belong to a security protection domain with permission to enable
-Serializable substitution.
-
-If the subclass of `ObjectOutputStream` is not considered part of the system
-domain, `SerializablePermission "enableSubstitution"` must be added to the
-security policy file. `AccessControlException` is thrown if the protection
-domain of the subclass of `ObjectInputStream` does not have permission to
-`"enableSubstitution"` by calling `enableReplaceObject`. See the document Java
-Security Architecture (JDK1.2) for additional information about the security
-model.
-
-The `writeStreamHeader` method writes the magic number and version to the
-stream. This information must be read by the `readStreamHeader` method of
-`ObjectInputStream`. Subclasses may need to implement this method to identify
-the stream's unique format.
-
-The `flush` method is used to empty any buffers being held by the stream and to
-forward the flush to the underlying stream. The `drain` method may be used by
-subclassers to empty only the `ObjectOutputStream`'s buffers without forcing
-the underlying stream to be flushed.
-
-All of the write methods for primitive types encode their values using a
-`DataOutputStream` to put them in the standard stream format. The bytes are
-buffered into block data records so they can be distinguished from the encoding
-of objects. This buffering allows primitive data to be skipped if necessary for
-class versioning. It also allows the stream to be parsed without invoking
-class-specific methods.
-
-To override the implementation of serialization, the subclass of
-`ObjectOutputStream` should call the protected no-arg `ObjectOutputStream`,
-constructor. There is a security check within the no-arg constructor for
-`SerializablePermission "enableSubclassImplementation"` to ensure that only
-trusted classes are allowed to override the default implementation. This
-constructor does not allocate any private data for `ObjectOutputStream` and
-sets a flag that indicates that the final `writeObject` method should invoke
-the `writeObjectOverride` method and return. All other `ObjectOutputStream`
-methods are not final and can be directly overridden by the subclass.
-
-## 2.2 The ObjectOutputStream.PutField Class
-
-Class `PutField` provides the API for setting values of the serializable fields
-for a class when the class does not use default serialization. Each method puts
-the specified named value into the stream. An `IllegalArgumentException` is
-thrown if `name` does not match the name of a serializable field for the class
-whose fields are being written, or if the type of the named field does not
-match the second parameter type of the specific `put` method invoked.
-
-## 2.3 The writeObject Method
-
-For serializable objects, the `writeObject` method allows a class to control
-the serialization of its own fields. Here is its signature:
-
-```
-private void writeObject(ObjectOutputStream stream)
-    throws IOException;
-```
-
-Each subclass of a serializable object may define its own `writeObject` method.
-If a class does not implement the method, the default serialization provided by
-`defaultWriteObject` will be used. When implemented, the class is only
-responsible for writing its own fields, not those of its supertypes or
-subtypes.
-
-The class's `writeObject` method, if implemented, is responsible for saving the
-state of the class. Either `ObjectOutputStream`'s `defaultWriteObject` or
-`writeFields` method must be called once (and only once) before writing any
-optional data that will be needed by the corresponding `readObject` method to
-restore the state of the object; even if no optional data is written,
-`defaultWriteObject` or `writeFields` must still be invoked once. If
-`defaultWriteObject` or `writeFields` is not invoked once prior to the writing
-of optional data (if any), then the behavior of instance deserialization is
-undefined in cases where the `ObjectInputStream` cannot resolve the class which
-defined the `writeObject` method in question.
-
-The responsibility for the format, structure, and versioning of the optional
-data lies completely with the class.
-
-## 2.4 The writeExternal Method
-
-Objects implementing `java.io.Externalizable` must implement the
-`writeExternal` method to save the entire state of the object. It must
-coordinate with its superclasses to save their state. All of the methods of
-`ObjectOutput` are available to save the object's primitive typed fields and
-object fields.
-
-```
-public void writeExternal(ObjectOutput stream)
-    throws IOException;
-```
-
-A new default format for writing Externalizable data has been introduced in JDK
-1.2. The new format specifies that primitive data will be written in block data
-mode by `writeExternal` methods. Additionally, a tag denoting the end of the
-External object is appended to the stream after the `writeExternal` method
-returns. The benefits of this format change are discussed in [Section 3.6, "The
-readExternal Method"](input.html#the-readexternal-method). Compatibility issues
-caused by this change are discussed in [Section 2.6, "The useProtocolVersion
-Method"](#the-useprotocolversion-method).
-
-## 2.5 The writeReplace Method
-
-For Serializable and Externalizable classes, the `writeReplace` method allows a
-class of an object to nominate its own replacement in the stream before the
-object is written. By implementing the `writeReplace` method, a class can
-directly control the types and instances of its own instances being serialized.
-
-The method is defined as follows:
-
-```
-ANY-ACCESS-MODIFIER Object writeReplace()
-             throws ObjectStreamException;
-```
-
-The `writeReplace` method is called when `ObjectOutputStream` is preparing to
-write the object to the stream. The `ObjectOutputStream` checks whether the
-class defines the `writeReplace` method. If the method is defined, the
-`writeReplace` method is called to allow the object to designate its
-replacement in the stream. The object returned should be either of the same
-type as the object passed in or an object that when read and resolved will
-result in an object of a type that is compatible with all references to the
-object. If it is not, a `ClassCastException` will occur when the type mismatch
-is discovered.
-
-## 2.6 The useProtocolVersion Method
-
-Due to a stream protocol change that was not backwards compatible, a mechanism
-has been added to enable the current Virtual Machine to write a serialization
-stream that is readable by a previous release. Of course, the problems that are
-corrected by the new stream format will exist when using the backwards
-compatible protocol.
-
-Stream protocol versions are discussed in [Section 6.3, "Stream Protocol
-Versions"](protocol.html#stream-protocol-versions).
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/protocol.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](version.html) | [NEXT](security.html)'
-include-after: '[CONTENTS](index.html) | [PREV](version.html) | [NEXT](security.html)'
-
-title: 'Java Object Serialization Specification: 6 - Object Serialization Stream Protocol'
----
-
--   [Overview](#overview)
--   [Stream Elements](#stream-elements)
--   [Stream Protocol Versions](#stream-protocol-versions)
--   [Grammar for the Stream Format](#grammar-for-the-stream-format)
--   [Example](#example)
-
--------------------------------------------------------------------------------
-
-## 6.1 Overview
-
-The stream format satisfies the following design goals:
-
--   Is compact and is structured for efficient reading.
--   Allows skipping through the stream using only the knowledge of the
-    structure and format of the stream. Does not require invoking any per class
-    code.
--   Requires only stream access to the data.
-
-## 6.2 Stream Elements
-
-A basic structure is needed to represent objects in a stream. Each attribute of
-the object needs to be represented: its classes, its fields, and data written
-and later read by class-specific methods. The representation of objects in the
-stream can be described with a grammar. There are special representations for
-null objects, new objects, classes, arrays, strings, and back references to any
-object already in the stream. Each object written to the stream is assigned a
-handle that is used to refer back to the object. Handles are assigned
-sequentially starting from 0x7E0000. The handles restart at 0x7E0000 when the
-stream is reset.
-
-A class object is represented by the following:
-
--   Its `ObjectStreamClass` object.
-
-An `ObjectStreamClass` object for a Class that is not a dynamic proxy class is
-represented by the following:
-
--   The Stream Unique Identifier (SUID) of compatible classes.
-
--   A set of flags indicating various properties of the class, such as whether
-    the class defines a `writeObject` method, and whether the class is
-    serializable, externalizable, or an enum type
-
--   The number of serializable fields
-
--   The array of fields of the class that are serialized by the default
-    mechanismFor arrays and object fields, the type of the field is included as
-    a string which must be in "field descriptor" format (e.g.,
-    "`Ljava/lang/Object;`") as specified in The Java Virtual Machine
-    Specification.
-
--   Optional block-data records or objects written by the `annotateClass`
-    method
-
--   The `ObjectStreamClass` of its supertype (null if the superclass is not
-    serializable)
-
-An `ObjectStreamClass` object for a dynamic proxy class is represented by the
-following:
-
--   The number of interfaces that the dynamic proxy class implements
-
--   The names of all of the interfaces implemented by the dynamic proxy class,
-    listed in the order that they are returned by invoking the `getInterfaces`
-    method on the Class object.
-
--   Optional block-data records or objects written by the `annotateProxyClass`
-    method.
-
--   The ObjectStreamClass of its supertype, `java.lang.reflect.Proxy`.
-
-The representation of `String` objects consists of length information followed
-by the contents of the string encoded in modified UTF-8. The modified UTF-8
-encoding is the same as used in the Java Virtual Machine and in the
-`java.io.DataInput` and `DataOutput` interfaces; it differs from standard UTF-8
-in the representation of supplementary characters and of the null character.
-The form of the length information depends on the length of the string in
-modified UTF-8 encoding. If the modified UTF-8 encoding of the given `String`
-is less than 65536 bytes in length, the length is written as 2 bytes
-representing an unsigned 16-bit integer. Starting with the Java 2 platform,
-Standard Edition, v1.3, if the length of the string in modified UTF-8 encoding
-is 65536 bytes or more, the length is written in 8 bytes representing a signed
-64-bit integer. The typecode preceding the `String` in the serialization stream
-indicates which format was used to write the `String`.
-
-Arrays are represented by the following:
-
--   Their `ObjectStreamClass` object.
-
--   The number of elements.
-
--   The sequence of values. The type of the values is implicit in the type of
-    the array. for example the values of a byte array are of type byte.
-
-Enum constants are represented by the following:
-
--   The `ObjectStreamClass` object of the constant's base enum type.
-
--   The constant's name string.
-
-New objects in the stream are represented by the following:
-
--   The most derived class of the object.
-
--   Data for each serializable class of the object, with the highest superclass
-    first. For each class the stream contains the following:
-
-    -   The serializable fields.See [Section 1.5, "Defining Serializable Fields
-        for a
-        Class"](serial-arch.html#defining-serializable-fields-for-a-class).
-
-    -   If the class has `writeObject`/`readObject` methods, there may be
-        optional objects and/or block-data records of primitive types written
-        by the `writeObject` method followed by an `endBlockData` code.
-
-All primitive data written by classes is buffered and wrapped in block-data
-records, regardless if the data is written to the stream within a `writeObject`
-method or written directly to the stream from outside a `writeObject` method.
-This data can only be read by the corresponding `readObject` methods or be read
-directly from the stream. Objects written by the `writeObject` method terminate
-any previous block-data record and are written either as regular objects or
-null or back references, as appropriate. The block-data records allow error
-recovery to discard any optional data. When called from within a class, the
-stream can discard any data or objects until the `endBlockData`.
-
-## 6.3 Stream Protocol Versions
-
-It was necessary to make a change to the serialization stream format in JDK 1.2
-that is not backwards compatible to all minor releases of JDK 1.1. To provide
-for cases where backwards compatibility is required, a capability has been
-added to indicate what `PROTOCOL_VERSION` to use when writing a serialization
-stream. The method `ObjectOutputStream.useProtocolVersion` takes as a parameter
-the protocol version to use to write the serialization stream.
-
-The Stream Protocol Versions are as follows:
-
--   `ObjectStreamConstants.PROTOCOL_VERSION_1`: Indicates the initial stream
-    format.
-
--   `ObjectStreamConstants.PROTOCOL_VERSION_2`: Indicates the new external data
-    format. Primitive data is written in block data mode and is terminated with
-    `TC_ENDBLOCKDATA`.
-
-    Block data boundaries have been standardized. Primitive data written in
-    block data mode is normalized to not exceed 1024 byte chunks. The benefit
-    of this change was to tighten the specification of serialized data format
-    within the stream. This change is fully backward and forward compatible.
-
-JDK 1.2 defaults to writing `PROTOCOL_VERSION_2`.
-
-JDK 1.1 defaults to writing `PROTOCOL_VERSION_1`.
-
-JDK 1.1.7 and greater can read both versions.
-
-Releases prior to JDK 1.1.7 can only read `PROTOCOL_VERSION_1`.
-
-## 6.4 Grammar for the Stream Format
-
-The table below contains the grammar for the stream format. Nonterminal symbols
-are shown in italics. Terminal symbols in a *fixed width font*. Definitions of
-nonterminals are followed by a ":". The definition is followed by one or more
-alternatives, each on a separate line. The following table describes the
-notation:
-
-  -------------  --------------------------------------------------------------
-  **Notation**   **Meaning**
-  -------------  --------------------------------------------------------------
-  (*datatype*)   This token has the data type specified, such as byte.
-
-  *token*\[n\]   A predefined number of occurrences of the token, that is an
-                 array.
-
-  *x0001*        A literal value expressed in hexadecimal. The number of hex
-                 digits reflects the size of the value.
-
-  &lt;*xxx*&gt;  A value read from the stream used to indicate the length of an
-                 array.
-  -------------  --------------------------------------------------------------
-
-Note that the symbol (utf) is used to designate a string written using 2-byte
-length information, and (long-utf) is used to designate a string written using
-8-byte length information. For details, refer to [Section 6.2, "Stream
-Elements"](#stream-elements).
-
-### 6.4.1 Rules of the Grammar
-
-A Serialized stream is represented by any stream satisfying the *stream* rule.
-
-```
-stream:
-  magic version contents
-
-contents:
-  content
-  contents content
-
-content:
-  object
-  blockdata
-
-object:
-  newObject
-  newClass
-  newArray
-  newString
-  newEnum
-  newClassDesc
-  prevObject
-  nullReference
-  exception
-  TC_RESET
-
-newClass:
-  TC_CLASS classDesc newHandle
-
-classDesc:
-  newClassDesc
-  nullReference
-  (ClassDesc)prevObject      // an object required to be of type ClassDesc
-
-superClassDesc:
-  classDesc
-
-newClassDesc:
-  TC_CLASSDESC className serialVersionUID newHandle classDescInfo
-  TC_PROXYCLASSDESC newHandle proxyClassDescInfo
-
-classDescInfo:
-  classDescFlags fields classAnnotation superClassDesc
-
-className:
-  (utf)
-
-serialVersionUID:
-  (long)
-
-classDescFlags:
-  (byte)                  // Defined in Terminal Symbols and Constants
-
-proxyClassDescInfo:
-  (int)<count> proxyInterfaceName[count] classAnnotation
-      superClassDesc
-
-proxyInterfaceName:
-  (utf)
-
-fields:
-  (short)<count> fieldDesc[count]
-
-fieldDesc:
-  primitiveDesc
-  objectDesc
-
-primitiveDesc:
-  prim_typecode fieldName
-
-objectDesc:
-  obj_typecode fieldName className1
-
-fieldName:
-  (utf)
-
-className1:
-  (String)object             // String containing the field's type,
-                             // in field descriptor format
-
-classAnnotation:
-  endBlockData
-  contents endBlockData      // contents written by annotateClass
-
-prim_typecode:
-  'B'       // byte
-  'C'       // char
-  'D'       // double
-  'F'       // float
-  'I'       // integer
-  'J'       // long
-  'S'       // short
-  'Z'       // boolean
-
-obj_typecode:
-  '['       // array
-  'L'       // object
-
-newArray:
-  TC_ARRAY classDesc newHandle (int)<size> values[size]
-
-newObject:
-  TC_OBJECT classDesc newHandle classdata[]  // data for each class
-
-classdata:
-  nowrclass                 // SC_SERIALIZABLE & classDescFlag &&
-                            // !(SC_WRITE_METHOD & classDescFlags)
-  wrclass objectAnnotation  // SC_SERIALIZABLE & classDescFlag &&
-                            // SC_WRITE_METHOD & classDescFlags
-  externalContents          // SC_EXTERNALIZABLE & classDescFlag &&
-                            // !(SC_BLOCKDATA  & classDescFlags
-  objectAnnotation          // SC_EXTERNALIZABLE & classDescFlag&&
-                            // SC_BLOCKDATA & classDescFlags
-
-nowrclass:
-  values                    // fields in order of class descriptor
-
-wrclass:
-  nowrclass
-
-objectAnnotation:
-  endBlockData
-  contents endBlockData     // contents written by writeObject
-                            // or writeExternal PROTOCOL_VERSION_2.
-
-blockdata:
-  blockdatashort
-  blockdatalong
-
-blockdatashort:
-  TC_BLOCKDATA (unsigned byte)<size> (byte)[size]
-
-blockdatalong:
-  TC_BLOCKDATALONG (int)<size> (byte)[size]
-
-endBlockData:
-  TC_ENDBLOCKDATA
-
-externalContent:         // Only parseable by readExternal
-  (bytes)                // primitive data
-   object
-
-externalContents:         // externalContent written by
-  externalContent         // writeExternal in PROTOCOL_VERSION_1.
-  externalContents externalContent
-
-newString:
-  TC_STRING newHandle (utf)
-  TC_LONGSTRING newHandle (long-utf)
-
-newEnum:
-  TC_ENUM classDesc newHandle enumConstantName
-
-enumConstantName:
-  (String)object
-
-prevObject:
-  TC_REFERENCE (int)handle
-
-nullReference:
-  TC_NULL
-
-exception:
-  TC_EXCEPTION reset (Throwable)object reset
-
-magic:
-  STREAM_MAGIC
-
-version:
-  STREAM_VERSION
-
-values:          // The size and types are described by the
-                 // classDesc for the current object
-
-newHandle:       // The next number in sequence is assigned
-                 // to the object being serialized or deserialized
-
-reset:           // The set of known objects is discarded
-                 // so the objects of the exception do not
-                 // overlap with the previously sent objects
-                 // or with objects that may be sent after
-                 // the exception
-```
-
-### 6.4.2 Terminal Symbols and Constants
-
-The following symbols in `java.io.ObjectStreamConstants` define the terminal
-and constant values expected in a stream.
-
-```
-final static short STREAM_MAGIC = (short)0xaced;
-final static short STREAM_VERSION = 5;
-final static byte TC_NULL = (byte)0x70;
-final static byte TC_REFERENCE = (byte)0x71;
-final static byte TC_CLASSDESC = (byte)0x72;
-final static byte TC_OBJECT = (byte)0x73;
-final static byte TC_STRING = (byte)0x74;
-final static byte TC_ARRAY = (byte)0x75;
-final static byte TC_CLASS = (byte)0x76;
-final static byte TC_BLOCKDATA = (byte)0x77;
-final static byte TC_ENDBLOCKDATA = (byte)0x78;
-final static byte TC_RESET = (byte)0x79;
-final static byte TC_BLOCKDATALONG = (byte)0x7A;
-final static byte TC_EXCEPTION = (byte)0x7B;
-final static byte TC_LONGSTRING = (byte) 0x7C;
-final static byte TC_PROXYCLASSDESC = (byte) 0x7D;
-final static byte TC_ENUM = (byte) 0x7E;
-final static  int   baseWireHandle = 0x7E0000;
-```
-
-The flag byte *classDescFlags* may include values of
-
-```
-final static byte SC_WRITE_METHOD = 0x01; //if SC_SERIALIZABLE
-final static byte SC_BLOCK_DATA = 0x08;    //if SC_EXTERNALIZABLE
-final static byte SC_SERIALIZABLE = 0x02;
-final static byte SC_EXTERNALIZABLE = 0x04;
-final static byte SC_ENUM = 0x10;
-```
-
-The flag `SC_WRITE_METHOD` is set if the Serializable class writing the stream
-had a `writeObject` method that may have written additional data to the stream.
-In this case a `TC_ENDBLOCKDATA` marker is always expected to terminate the
-data for that class.
-
-The flag `SC_BLOCKDATA` is set if the `Externalizable` class is written into
-the stream using `STREAM_PROTOCOL_2`. By default, this is the protocol used to
-write `Externalizable` objects into the stream in JDK 1.2. JDK 1.1 writes
-`STREAM_PROTOCOL_1`.
-
-The flag `SC_SERIALIZABLE` is set if the class that wrote the stream extended
-`java.io.Serializable` but not `java.io.Externalizable`, the class reading the
-stream must also extend `java.io.Serializable` and the default serialization
-mechanism is to be used.
-
-The flag `SC_EXTERNALIZABLE` is set if the class that wrote the stream extended
-`java.io.Externalizable`, the class reading the data must also extend
-`Externalizable` and the data will be read using its `writeExternal` and
-`readExternal` methods.
-
-The flag `SC_ENUM` is set if the class that wrote the stream was an enum type.
-The receiver's corresponding class must also be an enum type. Data for
-constants of the enum type will be written and read as described in [Section
-1.12, "Serialization of Enum
-Constants"](serial-arch.html#serialization-of-enum-constants).
-
-#### Example
-
-Consider the case of an original class and two instances in a linked list:
-
-```
-class List implements java.io.Serializable {
-    int value;
-    List next;
-    public static void main(String[] args) {
-        try {
-            List list1 = new List();
-            List list2 = new List();
-            list1.value = 17;
-            list1.next = list2;
-            list2.value = 19;
-            list2.next = null;
-
-            ByteArrayOutputStream o = new ByteArrayOutputStream();
-            ObjectOutputStream out = new ObjectOutputStream(o);
-            out.writeObject(list1);
-            out.writeObject(list2);
-            out.flush();
-            ...
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-    }
-}
-```
-
-The resulting stream contains:
-
-```
-    00: ac ed 00 05 73 72 00 04 4c 69 73 74 69 c8 8a 15 >....sr..Listi...<
-    10: 40 16 ae 68 02 00 02 49 00 05 76 61 6c 75 65 4c >Z......I..valueL<
-    20: 00 04 6e 65 78 74 74 00 06 4c 4c 69 73 74 3b 78 >..nextt..LList;x<
-    30: 70 00 00 00 11 73 71 00 7e 00 00 00 00 00 13 70 >p....sq.~......p<
-    40: 71 00 7e 00 03                                  >q.~..<
-```
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/security.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](protocol.html) | [NEXT](exceptions.html)'
-include-after: '[CONTENTS](index.html) | [PREV](protocol.html) | [NEXT](exceptions.html)'
-
-title: 'Java Object Serialization Specification: A - Security in Object Serialization'
----
-
--------------------------------------------------------------------------------
-
-Refer to the [Secure Coding Guidelines for the Java Programming 
-Language](http://www.oracle.com/pls/topic/lookup?ctx=javase9&id=secure_coding_guidelines_javase) 
-for information about security in object serialization.
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/serial-arch.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,575 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)'
-include-after: '[CONTENTS](index.html) | [PREV](index.html) | [NEXT](output.html)'
-
-title: 'Java Object Serialization Specification: 1 - System Architecture'
----
-
--   [Overview](#overview)
--   [Writing to an Object Stream](#writing-to-an-object-stream)
--   [Reading from an Object Stream](#reading-from-an-object-stream)
--   [Object Streams as Containers](#object-streams-as-containers)
--   [Defining Serializable Fields for a
-    Class](#defining-serializable-fields-for-a-class)
--   [Documenting Serializable Fields and Data for a
-    Class](#documenting-serializable-fields-and-data-for-a-class)
--   [Accessing Serializable Fields of a
-    Class](#accessing-serializable-fields-of-a-class)
--   [The ObjectOutput Interface](#the-objectoutput-interface)
--   [The ObjectInput Interface](#the-objectinput-interface)
--   [The Serializable Interface](#the-serializable-interface)
--   [The Externalizable Interface](#the-externalizable-interface)
--   [Serialization of Enum Constants](#serialization-of-enum-constants)
--   [Protecting Sensitive Information](#protecting-sensitive-information)
-
--------------------------------------------------------------------------------
-
-## 1.1 Overview
-
-The ability to store and retrieve Java^TM^ objects is essential to building all
-but the most transient applications. The key to storing and retrieving objects
-in a serialized form is representing the state of objects sufficient to
-reconstruct the object(s). Objects to be saved in the stream may support either
-the `Serializable` or the `Externalizable` interface. For Java^TM^ objects, the
-serialized form must be able to identify and verify the Java^TM^ class from
-which the contents of the object were saved and to restore the contents to a
-new instance. For serializable objects, the stream includes sufficient
-information to restore the fields in the stream to a compatible version of the
-class. For Externalizable objects, the class is solely responsible for the
-external format of its contents.
-
-Objects to be stored and retrieved frequently refer to other objects. Those
-other objects must be stored and retrieved at the same time to maintain the
-relationships between the objects. When an object is stored, all of the objects
-that are reachable from that object are stored as well.
-
-The goals for serializing Java^TM^ objects are to:
-
--   Have a simple yet extensible mechanism.
--   Maintain the Java^TM^ object type and safety properties in the serialized
-    form.
--   Be extensible to support marshaling and unmarshaling as needed for remote
-    objects.
--   Be extensible to support simple persistence of Java^TM^ objects.
--   Require per class implementation only for customization.
--   Allow the object to define its external format.
-
-## 1.2 Writing to an Object Stream
-
-Writing objects and primitives to a stream is a straightforward process. For
-example:
-
-```
-// Serialize today's date to a file.
-    FileOutputStream f = new FileOutputStream("tmp");
-    ObjectOutput s = new ObjectOutputStream(f);
-    s.writeObject("Today");
-    s.writeObject(new Date());
-    s.flush();
-```
-
-First an `OutputStream`, in this case a `FileOutputStream`, is needed to
-receive the bytes. Then an `ObjectOutputStream` is created that writes to the
-`FileOutputStream`. Next, the string "Today" and a Date object are written to
-the stream. More generally, objects are written with the `writeObject` method
-and primitives are written to the stream with the methods of `DataOutput`.
-
-The `writeObject` method (see [Section 2.3, "The writeObject
-Method"](output.html#the-writeobject-method)) serializes the specified object
-and traverses its references to other objects in the object graph recursively
-to create a complete serialized representation of the graph. Within a stream,
-the first reference to any object results in the object being serialized or
-externalized and the assignment of a handle for that object. Subsequent
-references to that object are encoded as the handle. Using object handles
-preserves sharing and circular references that occur naturally in object
-graphs. Subsequent references to an object use only the handle allowing a very
-compact representation.
-
-Special handling is required for arrays, enum constants, and objects of type
-`Class`, `ObjectStreamClass`, and `String`. Other objects must implement either
-the `Serializable` or the `Externalizable` interface to be saved in or restored
-from a stream.
-
-Primitive data types are written to the stream with the methods in the
-`DataOutput` interface, such as `writeInt`, `writeFloat`, or `writeUTF`.
-Individual bytes and arrays of bytes are written with the methods of
-`OutputStream`. Except for serializable fields, primitive data is written to
-the stream in block-data records, with each record prefixed by a marker and an
-indication of the number of bytes in the record.
-
-`ObjectOutputStream` can be extended to customize the information about classes
-in the stream or to replace objects to be serialized. Refer to the
-`annotateClass` and `replaceObject` method descriptions for details.
-
-## 1.3 Reading from an Object Stream
-
-Reading an object from a stream, like writing, is straightforward:
-
-```
-// Deserialize a string and date from a file.
-    FileInputStream in = new FileInputStream("tmp");
-    ObjectInputStream s = new ObjectInputStream(in);
-    String today = (String)s.readObject();
-    Date date = (Date)s.readObject();
-```
-
-First an `InputStream`, in this case a `FileInputStream`, is needed as the
-source stream. Then an `ObjectInputStream` is created that reads from the
-`InputStream`. Next, the string "Today" and a Date object are read from the
-stream. Generally, objects are read with the `readObject` method and primitives
-are read from the stream with the methods of `DataInput`.
-
-The `readObject` method deserializes the next object in the stream and
-traverses its references to other objects recursively to create the complete
-graph of objects serialized.
-
-Primitive data types are read from the stream with the methods in the
-`DataInput` interface, such as `readInt`, `readFloat`, or `readUTF`. Individual
-bytes and arrays of bytes are read with the methods of `InputStream`. Except
-for serializable fields, primitive data is read from block-data records.
-
-`ObjectInputStream` can be extended to utilize customized information in the
-stream about classes or to replace objects that have been deserialized. Refer
-to the `resolveClass` and `resolveObject` method descriptions for details.
-
-## 1.4 Object Streams as Containers
-
-Object Serialization produces and consumes a stream of bytes that contain one
-or more primitives and objects. The objects written to the stream, in turn,
-refer to other objects, which are also represented in the stream. Object
-Serialization produces just one stream format that encodes and stores the
-contained objects.
-
-Each object that acts as a container implements an interface which allows
-primitives and objects to be stored in or retrieved from it. These interfaces
-are the `ObjectOutput` and `ObjectInput` interfaces which:
-
--   Provide a stream to write to and to read from
--   Handle requests to write primitive types and objects to the stream
--   Handle requests to read primitive types and objects from the stream
-
-Each object which is to be stored in a stream must explicitly allow itself to
-be stored and must implement the protocols needed to save and restore its
-state. Object Serialization defines two such protocols. The protocols allow the
-container to ask the object to write and read its state.
-
-To be stored in an Object Stream, each object must implement either the
-`Serializable` or the `Externalizable` interface:
-
--   For a `Serializable` class, Object Serialization can automatically save and
-    restore fields of each class of an object and automatically handle classes
-    that evolve by adding fields or supertypes. A serializable class can
-    declare which of its fields are saved or restored, and write and read
-    optional values and objects.
-
--   For an `Externalizable` class, Object Serialization delegates to the class
-    complete control over its external format and how the state of the
-    supertype(s) is saved and restored.
-
-## 1.5 Defining Serializable Fields for a Class
-
-The serializable fields of a class can be defined two different ways. Default
-serializable fields of a class are defined to be the non-transient and
-non-static fields. This default computation can be overridden by declaring a
-special field in the `Serializable` class, `serialPersistentFields`. This field
-must be initialized with an array of `ObjectStreamField` objects that list the
-names and types of the serializable fields. The modifiers for the field are
-required to be private, static, and final. If the field's value is null or is
-otherwise not an instance of `ObjectStreamField[]`, or if the field does not
-have the required modifiers, then the behavior is as if the field were not
-declared at all.
-
-For example, the following declaration duplicates the default behavior.
-
-```
-class List implements Serializable {
-    List next;
-
-    private static final ObjectStreamField[] serialPersistentFields
-                 = {new ObjectStreamField("next", List.class)};
-
-}
-```
-
-By using `serialPersistentFields` to define the Serializable fields for a
-class, there no longer is a limitation that a serializable field must be a
-field within the current definition of the `Serializable` class. The
-`writeObject` and `readObject` methods of the `Serializable` class can map the
-current implementation of the class to the serializable fields of the class
-using the interface that is described in [Section 1.7, "Accessing Serializable
-Fields of a Class"](#accessing-serializable-fields-of-a-class). Therefore, the
-fields for a `Serializable` class can change in a later release, as long as it
-maintains the mapping back to its Serializable fields that must remain
-compatible across release boundaries.
-
-**Note:** There is, however, a limitation to the use of this mechanism to
-specify serializable fields for inner classes. Inner classes can only contain
-final static fields that are initialized to constants or expressions built up
-from constants. Consequently, it is not possible to set
-`serialPersistentFields` for an inner class (though it is possible to set it
-for static member classes). For other restrictions pertaining to serialization
-of inner class instances, see section [Section 1.10, "The Serializable
-Interface"](#the-serializable-interface).
-
-## 1.6 Documenting Serializable Fields and Data for a Class
-
-It is important to document the serializable state of a class to enable
-interoperability with alternative implementations of a Serializable class and
-to document class evolution. Documenting a serializable field gives one a final
-opportunity to review whether or not the field should be serializable. The
-serialization javadoc tags, `@serial`, `@serialField`, and `@serialData`,
-provide a way to document the serialized form for a Serializable class within
-the source code.
-
--   The `@serial` tag should be placed in the javadoc comment for a default
-    serializable field. The syntax is as follows: `@serial` *field-description*
-    The optional *field-description* describes the meaning of the field and its
-    acceptable values. The *field-description* can span multiple lines. When a
-    field is added after the initial release, a *@since* tag indicates the
-    version the field was added. The *field-description* for `@serial` provides
-    serialization-specific documentation and is appended to the javadoc comment
-    for the field within the serialized form documentation.
-
--   The `@serialField` tag is used to document an `ObjectStreamField` component
-    of a `serialPersistentFields` array. One of these tags should be used for
-    each `ObjectStreamField` component. The syntax is as follows:
-    `@serialField` *field-name field-type field-description*
-
--   The `@serialData` tag describes the sequences and types of data written or
-    read. The tag describes the sequence and type of optional data written by
-    `writeObject` or all data written by the `Externalizable.writeExternal`
-    method. The syntax is as follows: `@serialData` *data-description*
-
-The javadoc application recognizes the serialization javadoc tags and generates
-a specification for each Serializable and Externalizable class. See [Section
-C.1, "Example Alternate Implementation of
-java.io.File"](examples.html#c.1-example-alternate-implementation-of-java.io.file)
-for an example that uses these tags.
-
-When a class is declared Serializable, the serializable state of the object is
-defined by serializable fields (by name and type) plus optional data. Optional
-data can only be written explicitly by the `writeObject` method of a
-`Serializable` class. Optional data can be read by the `Serializable` class'
-`readObject` method or serialization will skip unread optional data.
-
-When a class is declared Externalizable, the data that is written to the stream
-by the class itself defines the serialized state. The class must specify the
-order, types, and meaning of each datum that is written to the stream. The
-class must handle its own evolution, so that it can continue to read data
-written by and write data that can be read by previous versions. The class must
-coordinate with the superclass when saving and restoring data. The location of
-the superclasses data in the stream must be specified.
-
-The designer of a Serializable class must ensure that the information saved for
-the class is appropriate for persistence and follows the
-serialization-specified rules for interoperability and evolution. Class
-evolution is explained in greater detail in [Chapter
-5](version.html#versioning-of-serializable-objects), "Versioning of
-Serializable Objects".
-
-## 1.7 Accessing Serializable Fields of a Class
-
-Serialization provides two mechanisms for accessing the serializable fields in
-a stream:
-
--   The default mechanism requires no customization
--   The Serializable Fields API allows a class to explicitly access/set the
-    serializable fields by name and type
-
-The default mechanism is used automatically when reading or writing objects
-that implement the `Serializable` interface and do no further customization.
-The serializable fields are mapped to the corresponding fields of the class and
-values are either written to the stream from those fields or are read in and
-assigned respectively. If the class provides `writeObject` and `readObject`
-methods, the default mechanism can be invoked by calling `defaultWriteObject`
-and `defaultReadObject`. When the `writeObject` and `readObject` methods are
-implemented, the class has an opportunity to modify the serializable field
-values before they are written or after they are read.
-
-When the default mechanism cannot be used, the serializable class can use the
-`putFields` method of `ObjectOutputStream` to put the values for the
-serializable fields into the stream. The `writeFields` method of
-`ObjectOutputStream` puts the values in the correct order, then writes them to
-the stream using the existing protocol for serialization. Correspondingly, the
-`readFields` method of `ObjectInputStream` reads the values from the stream and
-makes them available to the class by name in any order. See [Section 2.2, "The
-ObjectOutputStream.PutField
-Class"](output.html#the-objectoutputstream.putfield-class) and [Section 3.2,
-"The ObjectInputStream.GetField
-Class"](input.html#the-objectinputstream.getfield-class) for a detailed
-description of the Serializable Fields API.
-
-## 1.8 The ObjectOutput Interface
-
-The `ObjectOutput` interface provides an abstract, stream-based interface to
-object storage. It extends the DataOutput interface so those methods can be
-used for writing primitive data types. Objects that implement this interface
-can be used to store primitives and objects.
-
-```
-package java.io;
-
-public interface ObjectOutput extends DataOutput
-{
-    public void writeObject(Object obj) throws IOException;
-    public void write(int b) throws IOException;
-    public void write(byte b[]) throws IOException;
-    public void write(byte b[], int off, int len) throws IOException;
-    public void flush() throws IOException;
-    public void close() throws IOException;
-}
-```
-
-`The` `writeObject` method is used to write an object. The exceptions thrown
-reflect errors while accessing the object or its fields, or exceptions that
-occur in writing to storage. If any exception is thrown, the underlying storage
-may be corrupted. If this occurs, refer to the object that is implementing this
-interface for more information.
-
-## 1.9 The ObjectInput Interface
-
-The `ObjectInput` interface provides an abstract stream based interface to
-object retrieval. It extends the `DataInput` interface so those methods for
-reading primitive data types are accessible in this interface.
-
-```
-package java.io;
-
-public interface ObjectInput extends DataInput
-{
-    public Object readObject()
-        throws ClassNotFoundException, IOException;
-    public int read() throws IOException;
-    public int read(byte b[]) throws IOException;
-    public int read(byte b[], int off, int len) throws IOException;
-    public long skip(long n) throws IOException;
-    public int available() throws IOException;
-    public void close() throws IOException;
-}
-```
-
-The `readObject` method is used to read and return an object. The exceptions
-thrown reflect errors while accessing the objects or its fields or exceptions
-that occur in reading from the storage. If any exception is thrown, the
-underlying storage may be corrupted. If this occurs, refer to the object
-implementing this interface for additional information.
-
-## 1.10 The Serializable Interface
-
-Object Serialization produces a stream with information about the Java^TM^
-classes for the objects which are being saved. For serializable objects,
-sufficient information is kept to restore those objects even if a different
-(but compatible) version of the implementation of the class is present. The
-`Serializable` interface is defined to identify classes which implement the
-serializable protocol:
-
-```
-package java.io;
-
-public interface Serializable {};
-```
-
-A Serializable class must do the following:
-
--   Implement the `java.io.Serializable` interface
-
--   Identify the fields that should be serializable
-
-    (Use the `serialPersistentFields` member to explicitly declare them
-    serializable or use the transient keyword to denote nonserializable
-    fields.)
-
--   Have access to the no-arg constructor of its first nonserializable
-    superclass
-
-The class can optionally define the following methods:
-
--   A `writeObject` method to control what information is saved or to append
-    additional information to the stream
-
--   A `readObject` method either to read the information written by the
-    corresponding `writeObject` method or to update the state of the object
-    after it has been restored
-
--   A `writeReplace` method to allow a class to nominate a replacement object
-    to be written to the stream
-
-    (See [Section 2.5, "The writeReplace
-    Method"](output.html#the-writereplace-method) for additional information.)
-
--   A `readResolve` method to allow a class to designate a replacement object
-    for the object just read from the stream
-
-    (See [Section 3.7, "The readResolve
-    Method](input.html#the-readresolve-method) for additional information.)
-
-`ObjectOutputStream` and `ObjectInputStream` allow the serializable classes on
-which they operate to evolve (allow changes to the classes that are compatible
-with the earlier versions of the classes). See [Section 5.5, "Compatible Java
-Type Evolution"](version.html#compatible-java-type-evolution) for information
-about the mechanism which is used to allow compatible changes.
-
-**Note:** Serialization of inner classes (i.e., nested classes that are not
-static member classes), including local and anonymous classes, is strongly
-discouraged for several reasons. Because inner classes declared in non-static
-contexts contain implicit non-transient references to enclosing class
-instances, serializing such an inner class instance will result in
-serialization of its associated outer class instance as well. Synthetic fields
-generated by `javac` (or other Java^TM^ compilers) to implement inner classes
-are implementation dependent and may vary between compilers; differences in
-such fields can disrupt compatibility as well as result in conflicting default
-`serialVersionUID` values. The names assigned to local and anonymous inner
-classes are also implementation dependent and may differ between compilers.
-Since inner classes cannot declare static members other than compile-time
-constant fields, they cannot use the `serialPersistentFields` mechanism to
-designate serializable fields. Finally, because inner classes associated with
-outer instances do not have zero-argument constructors (constructors of such
-inner classes implicitly accept the enclosing instance as a prepended
-parameter), they cannot implement `Externalizable`. None of the issues listed
-above, however, apply to static member classes.
-
-## 1.11 The Externalizable Interface
-
-For Externalizable objects, only the identity of the class of the object is
-saved by the container; the class must save and restore the contents. The
-`Externalizable` interface is defined as follows:
-
-```
-package java.io;
-
-public interface Externalizable extends Serializable
-{
-    public void writeExternal(ObjectOutput out)
-        throws IOException;
-
-    public void readExternal(ObjectInput in)
-        throws IOException, java.lang.ClassNotFoundException;
-}
-```
-
-The class of an Externalizable object must do the following:
-
--   Implement the `java.io.Externalizable` interface
-
--   Implement a `writeExternal` method to save the state of the object
-
-    (It must explicitly coordinate with its supertype to save its state.)
-
--   Implement a `readExternal` method to read the data written by the
-    `writeExternal` method from the stream and restore the state of the object
-
-    (It must explicitly coordinate with the supertype to save its state.)
-
--   Have the `writeExternal` and `readExternal` methods be solely responsible
-    for the format, if an externally defined format is written
-
-    **Note:** The `writeExternal` and `readExternal` methods are public and
-    raise the risk that a client may be able to write or read information in
-    the object other than by using its methods and fields. These methods must
-    be used only when the information held by the object is not sensitive or
-    when exposing it does not present a security risk.
-
--   Have a public no-arg constructor
-
-    **Note:** Inner classes associated with enclosing instances cannot have
-    no-arg constructors, since constructors of such classes implicitly accept
-    the enclosing instance as a prepended parameter. Consequently the
-    `Externalizable` interface mechanism cannot be used for inner classes and
-    they should implement the `Serializable` interface, if they must be
-    serialized. Several limitations exist for serializable inner classes as
-    well, however; see [Section 1.10, "The Serializable
-    Interface"](#the-serializable-interface), for a full enumeration.
-
-An Externalizable class can optionally define the following methods:
-
--   A `writeReplace` method to allow a class to nominate a replacement object
-    to be written to the stream
-
-    (See [Section 2.5, "The writeReplace
-    Method"](output.html#the-writereplace-method) for additional information.)
-
--   A `readResolve` method to allow a class to designate a replacement object
-    for the object just read from the stream
-
-    (See [Section 3.7, "The readResolve
-    Method"](input.html#the-readresolve-method) for additional information.)
-
-## 1.12 Serialization of Enum Constants
-
-Enum constants are serialized differently than ordinary serializable or
-externalizable objects. The serialized form of an enum constant consists solely
-of its name; field values of the constant are not present in the form. To
-serialize an enum constant, `ObjectOutputStream` writes the value returned by
-the enum constant's `name` method. To deserialize an enum constant,
-`ObjectInputStream` reads the constant name from the stream; the deserialized
-constant is then obtained by calling the `java.lang.Enum.valueOf` method,
-passing the constant's enum type along with the received constant name as
-arguments. Like other serializable or externalizable objects, enum constants
-can function as the targets of back references appearing subsequently in the
-serialization stream.
-
-The process by which enum constants are serialized cannot be customized: any
-class-specific `writeObject`, `readObject`, `readObjectNoData`, `writeReplace`,
-and `readResolve` methods defined by enum types are ignored during
-serialization and deserialization. Similarly, any `serialPersistentFields` or
-`serialVersionUID` field declarations are also ignored--all enum types have a
-fixed `serialVersionUID` of `0L`. Documenting serializable fields and data for
-enum types is unnecessary, since there is no variation in the type of data
-sent.
-
-## 1.13 Protecting Sensitive Information
-
-When developing a class that provides controlled access to resources, care must
-be taken to protect sensitive information and functions. During
-deserialization, the private state of the object is restored. For example, a
-file descriptor contains a handle that provides access to an operating system
-resource. Being able to forge a file descriptor would allow some forms of
-illegal access, since restoring state is done from a stream. Therefore, the
-serializing runtime must take the conservative approach and not trust the
-stream to contain only valid representations of objects. To avoid compromising
-a class, the sensitive state of an object must not be restored from the stream,
-or it must be reverified by the class. Several techniques are available to
-protect sensitive data in classes.
-
-The easiest technique is to mark fields that contain sensitive data as *private
-transient*. Transient fields are not persistent and will not be saved by any
-persistence mechanism. Marking the field will prevent the state from appearing
-in the stream and from being restored during deserialization. Since writing and
-reading (of private fields) cannot be superseded outside of the class, the
-transient fields of the class are safe.
-
-Particularly sensitive classes should not be serialized at all. To accomplish
-this, the object should not implement either the `Serializable` or the
-`Externalizable` interface.
-
-Some classes may find it beneficial to allow writing and reading but
-specifically handle and revalidate the state as it is deserialized. The class
-should implement `writeObject` and `readObject` methods to save and restore
-only the appropriate state. If access should be denied, throwing a
-`NotSerializableException` will prevent further access.
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.base/share/specs/serialization/version.md	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,304 +0,0 @@
----
-# Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# 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-before: '[CONTENTS](index.html) | [PREV](class.html) | [NEXT](protocol.html)'
-include-after: '[CONTENTS](index.html) | [PREV](class.html) | [NEXT](protocol.html)'
-
-title: 'Java Object Serialization Specification: 5 - Versioning of Serializable Objects'
----
-
--   [Overview](#overview)
--   [Goals](#goals)
--   [Assumptions](#assumptions)
--   [Who's Responsible for Versioning of
-    Streams](#whos-responsible-for-versioning-of-streams)
--   [Compatible Java Type Evolution](#compatible-java-type-evolution)
--   [Type Changes Affecting
-    Serialization](#type-changes-affecting-serialization)
-
--------------------------------------------------------------------------------
-
-## 5.1 Overview
-
-When Java objects use serialization to save state in files, or as blobs in
-databases, the potential arises that the version of a class reading the data is
-different than the version that wrote the data.
-
-Versioning raises some fundamental questions about the identity of a class,
-including what constitutes a compatible change. A ***compatible change*** is a
-change that does not affect the contract between the class and its callers.
-
-This section describes the goals, assumptions, and a solution that attempts to
-address this problem by restricting the kinds of changes allowed and by
-carefully choosing the mechanisms.
-
-The proposed solution provides a mechanism for "automatic" handling of classes
-that evolve by adding fields and adding classes. Serialization will handle
-versioning without class-specific methods to be implemented for each version.
-The stream format can be traversed without invoking class-specific methods.
-
-## 5.2 Goals
-
-The goals are to:
-
--   Support bidirectional communication between different versions of a class
-    operating in different virtual machines by:
-
-    -   Defining a mechanism that allows Java classes to read streams written
-        by older versions of the same class.
-
-    -   Defining a mechanism that allows Java classes to write streams intended
-        to be read by older versions of the same class.
-
--   Provide default serialization for persistence and for RMI.
-
--   Perform well and produce compact streams in simple cases, so that RMI can
-    use serialization.
-
--   Be able to identify and load classes that match the exact class used to
-    write the stream.
-
--   Keep the overhead low for nonversioned classes.
-
--   Use a stream format that allows the traversal of the stream without having
-    to invoke methods specific to the objects saved in the stream.
-
-## 5.3 Assumptions
-
-The assumptions are that:
-
--   Versioning will only apply to serializable classes since it must control
-    the stream format to achieve it goals. Externalizable classes will be
-    responsible for their own versioning which is tied to the external format.
-
--   All data and objects must be read from, or skipped in, the stream in the
-    same order as they were written.
-
--   Classes evolve individually as well as in concert with supertypes and
-    subtypes.
-
--   Classes are identified by name. Two classes with the same name may be
-    different versions or completely different classes that can be
-    distinguished only by comparing their interfaces or by comparing hashes of
-    the interfaces.
-
--   Default serialization will not perform any type conversions.
-
--   The stream format only needs to support a linear sequence of type changes,
-    not arbitrary branching of a type.
-
-## 5.4 Who's Responsible for Versioning of Streams
-
-In the evolution of classes, it is the responsibility of the evolved (later
-version) class to maintain the contract established by the nonevolved class.
-This takes two forms. First, the evolved class must not break the existing
-assumptions about the interface provided by the original version, so that the
-evolved class can be used in place of the original. Secondly, when
-communicating with the original (or previous) versions, the evolved class must
-provide sufficient and equivalent information to allow the earlier version to
-continue to satisfy the nonevolved contract.
-
->   ![*Private serialization protocol and contract with supertype relationships
-    between evolved and nonevolved classes and their
-    instances*](images/version.gif)
-
-For the purposes of the discussion here, each class implements and extends the
-interface or contract defined by its supertype. New versions of a class, for
-example `foo'`, must continue to satisfy the contract for `foo` and may extend
-the interface or modify its implementation.
-
-Communication between objects via serialization is not part of the contract
-defined by these interfaces. Serialization is a private protocol between the
-implementations. It is the responsibility of the implementations to communicate
-sufficiently to allow each implementation to continue to satisfy the contract
-expected by its clients.
-
-## 5.5 Compatible Java Type Evolution
-
-The Java Language Specification discusses binary compatibility of Java classes
-as those classes evolve. Most of the flexibility of binary compatibility comes
-from the use of late binding of symbolic references for the names of classes,
-interfaces, fields, methods, and so on.
-
-The following are the principle aspects of the design for versioning of
-serialized object streams.
-
--   The default serialization mechanism will use a symbolic model for binding
-    the fields in the stream to the fields in the corresponding class in the
-    virtual machine.
-
--   Each class referenced in the stream will uniquely identify itself, its
-    supertype, and the types and names of each serializable field written to
-    the stream. The fields are ordered with the primitive types first sorted by
-    field name, followed by the object fields sorted by field name.
-
--   Two types of data may occur in the stream for each class: required data
-    (corresponding directly to the serializable fields of the object); and
-    optional data (consisting of an arbitrary sequence of primitives and
-    objects). The stream format defines how the required and optional data
-    occur in the stream so that the whole class, the required, or the optional
-    parts can be skipped if necessary.
-
-    -   The required data consists of the fields of the object in the order
-        defined by the class descriptor.
-
-    -   The optional data is written to the stream and does not correspond
-        directly to fields of the class. The class itself is responsible for
-        the length, types, and versioning of this optional information.
-
--   If defined for a class, the `writeObject`/`readObject` methods supersede
-    the default mechanism to write/read the state of the class. These methods
-    write and read the optional data for a class. The required data is written
-    by calling `defaultWriteObject` and read by calling `defaultReadObject`.
-
--   The stream format of each class is identified by the use of a Stream Unique
-    Identifier (SUID). By default, this is the hash of the class. All later
-    versions of the class must declare the Stream Unique Identifier (SUID) that
-    they are compatible with. This guards against classes with the same name
-    that might inadvertently be identified as being versions of a single class.
-
--   Subtypes of `ObjectOutputStream` and `ObjectInputStream` may include their
-    own information identifying the class using the `annotateClass` method; for
-    example, `MarshalOutputStream` embeds the URL of the class.
-
-## 5.6 Type Changes Affecting Serialization
-
-With these concepts, we can now describe how the design will cope with the
-different cases of an evolving class. The cases are described in terms of a
-stream written by some version of a class. When the stream is read back by the
-same version of the class, there is no loss of information or functionality.
-The stream is the only source of information about the original class. Its
-class descriptions, while a subset of the original class description, are
-sufficient to match up the data in the stream with the version of the class
-being reconstituted.
-
-The descriptions are from the perspective of the stream being read in order to
-reconstitute either an earlier or later version of the class. In the parlance
-of RPC systems, this is a "receiver makes right" system. The writer writes its
-data in the most suitable form and the receiver must interpret that information
-to extract the parts it needs and to fill in the parts that are not available.
-
-### 5.6.1 Incompatible Changes
-
-Incompatible changes to classes are those changes for which the guarantee of
-interoperability cannot be maintained. The incompatible changes that may occur
-while evolving a class are:
-
--   Deleting fields - If a field is deleted in a class, the stream written will
-    not contain its value. When the stream is read by an earlier class, the
-    value of the field will be set to the default value because no value is
-    available in the stream. However, this default value may adversely impair
-    the ability of the earlier version to fulfill its contract.
-
--   Moving classes up or down the hierarchy - This cannot be allowed since the
-    data in the stream appears in the wrong sequence.
-
--   Changing a nonstatic field to static or a nontransient field to transient -
-    When relying on default serialization, this change is equivalent to
-    deleting a field from the class. This version of the class will not write
-    that data to the stream, so it will not be available to be read by earlier
-    versions of the class. As when deleting a field, the field of the earlier
-    version will be initialized to the default value, which can cause the class
-    to fail in unexpected ways.
-
--   Changing the declared type of a primitive field - Each version of the class
-    writes the data with its declared type. Earlier versions of the class
-    attempting to read the field will fail because the type of the data in the
-    stream does not match the type of the field.
-
--   Changing the `writeObject` or `readObject` method so that it no longer
-    writes or reads the default field data or changing it so that it attempts
-    to write it or read it when the previous version did not. The default field
-    data must consistently either appear or not appear in the stream.
-
--   Changing a class from `Serializable` to `Externalizable` or vice versa is
-    an incompatible change since the stream will contain data that is
-    incompatible with the implementation of the available class.
-
--   Changing a class from a non-enum type to an enum type or vice versa since
-    the stream will contain data that is incompatible with the implementation
-    of the available class.
-
--   Removing either `Serializable` or `Externalizable` is an incompatible
-    change since when written it will no longer supply the fields needed by
-    older versions of the class.
-
--   Adding the `writeReplace` or `readResolve` method to a class is
-    incompatible if the behavior would produce an object that is incompatible
-    with any older version of the class.
-
-### 5.6.2 Compatible Changes
-
-The compatible changes to a class are handled as follows:
-
--   Adding fields - When the class being reconstituted has a field that does
-    not occur in the stream, that field in the object will be initialized to
-    the default value for its type. If class-specific initialization is needed,
-    the class may provide a readObject method that can initialize the field to
-    nondefault values.
-
--   Adding classes - The stream will contain the type hierarchy of each object
-    in the stream. Comparing this hierarchy in the stream with the current
-    class can detect additional classes. Since there is no information in the
-    stream from which to initialize the object, the class's fields will be
-    initialized to the default values.
-
--   Removing classes - Comparing the class hierarchy in the stream with that of
-    the current class can detect that a class has been deleted. In this case,
-    the fields and objects corresponding to that class are read from the
-    stream. Primitive fields are discarded, but the objects referenced by the
-    deleted class are created, since they may be referred to later in the
-    stream. They will be garbage-collected when the stream is garbage-collected
-    or reset.
-
--   Adding `writeObject`/`readObject` methods - If the version reading the
-    stream has these methods then `readObject` is expected, as usual, to read
-    the required data written to the stream by the default serialization. It
-    should call `defaultReadObject` first before reading any optional data. The
-    `writeObject` method is expected as usual to call `defaultWriteObject` to
-    write the required data and then may write optional data.
-
--   Removing `writeObject`/`readObject` methods - If the class reading the
-    stream does not have these methods, the required data will be read by
-    default serialization, and the optional data will be discarded.
-
--   Adding `java.io.Serializable` - This is equivalent to adding types. There
-    will be no values in the stream for this class so its fields will be
-    initialized to default values. The support for subclassing nonserializable
-    classes requires that the class's supertype have a no-arg constructor and
-    the class itself will be initialized to default values. If the no-arg
-    constructor is not available, the `InvalidClassException` is thrown.
-
--   Changing the access to a field - The access modifiers public, package,
-    protected, and private have no effect on the ability of serialization to
-    assign values to the fields.
-
--   Changing a field from static to nonstatic or transient to nontransient -
-    When relying on default serialization to compute the serializable fields,
-    this change is equivalent to adding a field to the class. The new field
-    will be written to the stream but earlier classes will ignore the value
-    since serialization will not assign values to static or transient fields.
-
--------------------------------------------------------------------------------
-
-*[Copyright](../../../legal/SMICopyright.html) &copy; 2005, 2017, Oracle
-and/or its affiliates. All rights reserved.*
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java	Tue Jun 27 16:00:14 2017 -0400
@@ -48,6 +48,7 @@
  *
  * @author      Amy Fowler
  * @author      Alexander Gerasimov
+ * @since 1.1
  */
 public class Clipboard {
 
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * @see java.awt.datatransfer.Clipboard
  *
  * @author      Amy Fowler
+ * @since 1.1
  */
 
 public interface ClipboardOwner {
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Jun 27 16:00:14 2017 -0400
@@ -112,6 +112,7 @@
  * @author      Blake Sullivan
  * @author      Laurence P. G. Cable
  * @author      Jeff Dunn
+ * @since 1.1
  */
 public class DataFlavor implements Externalizable, Cloneable {
 
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
  * and all equivalent flavors is <b>deprecated</b>. No other
  * <code>DataFlavor</code>s are supported.
  *
+ * @since 1.1
  * @see java.awt.datatransfer.DataFlavor#stringFlavor
  * @see java.awt.datatransfer.DataFlavor#plainTextFlavor
  */
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,7 @@
  * a section in <em>The Java Tutorial</em>, for more information.
  *
  * @author      Amy Fowler
+ * @since 1.1
  */
 
 public interface Transferable {
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * @see Transferable#getTransferData
  *
  * @author      Amy Fowler
+ * @since 1.1
  */
 public class UnsupportedFlavorException extends Exception {
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m	Tue Jun 27 16:00:14 2017 -0400
@@ -376,7 +376,7 @@
     static JNF_MEMBER_CACHE(jm_getMaxPage, sjc_CPrinterJob, "getMaxPageAttrib", "()I");
     static JNF_MEMBER_CACHE(jm_getSelectAttrib, sjc_CPrinterJob, "getSelectAttrib", "()I");
     static JNF_MEMBER_CACHE(jm_getNumberOfPages, jc_Pageable, "getNumberOfPages", "()I");
-    static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormat", "(I)Ljava/awt/print/PageFormat;");
+    static JNF_MEMBER_CACHE(jm_getPageFormat, sjc_CPrinterJob, "getPageFormatFromAttributes", "()Ljava/awt/print/PageFormat;");
 
     NSMutableDictionary* printingDictionary = [dst dictionary];
 
@@ -412,7 +412,7 @@
     [printingDictionary setObject:[NSNumber numberWithInteger:fromPage] forKey:NSPrintFirstPage];
     [printingDictionary setObject:[NSNumber numberWithInteger:toPage] forKey:NSPrintLastPage];
 
-    jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat, (jint)0);
+    jobject page = JNFCallObjectMethod(env, srcPrinterJob, jm_getPageFormat); 
     if (page != NULL) {
         javaPageFormatToNSPrintInfo(env, NULL, page, dst);
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Tue Jun 27 16:00:14 2017 -0400
@@ -812,7 +812,7 @@
 
     /**
      * Scrolls the view to the given reference location
-     * (that is, the value returned by the <code>UL.getRef</code>
+     * (that is, the value returned by the <code>URL.getRef</code>
      * method for the URL being displayed).  By default, this
      * method only knows how to locate a reference in an
      * HTMLDocument.  The implementation calls the
--- a/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1900,7 +1900,7 @@
          * Returns the accessible name of this object, or {@code null} if
          * there is no accessible name.
          *
-         * @return the accessible name of this object, nor {@code null}.
+         * @return the accessible name of this object, or {@code null}.
          * @since 1.6
          */
         public String getAccessibleName() {
--- a/jdk/src/java.desktop/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.desktop/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,24 @@
  * Defines the AWT and Swing user interface toolkits, plus APIs for
  * accessibility, audio, imaging, printing, and JavaBeans.
  *
+ * @uses java.awt.im.spi.InputMethodDescriptor
+ * @uses javax.accessibility.AccessibilityProvider
+ * @uses javax.imageio.spi.ImageInputStreamSpi
+ * @uses javax.imageio.spi.ImageOutputStreamSpi
+ * @uses javax.imageio.spi.ImageReaderSpi
+ * @uses javax.imageio.spi.ImageTranscoderSpi
+ * @uses javax.imageio.spi.ImageWriterSpi
+ * @uses javax.print.PrintServiceLookup
+ * @uses javax.print.StreamPrintServiceFactory
+ * @uses javax.sound.midi.spi.MidiDeviceProvider
+ * @uses javax.sound.midi.spi.MidiFileReader
+ * @uses javax.sound.midi.spi.MidiFileWriter
+ * @uses javax.sound.midi.spi.SoundbankReader
+ * @uses javax.sound.sampled.spi.AudioFileReader
+ * @uses javax.sound.sampled.spi.AudioFileWriter
+ * @uses javax.sound.sampled.spi.FormatConversionProvider
+ * @uses javax.sound.sampled.spi.MixerProvider
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Tue Jun 27 16:00:14 2017 -0400
@@ -886,6 +886,14 @@
         }
    }
 
+   protected PageFormat getPageFormatFromAttributes() {
+       if (attributes == null || attributes.isEmpty()) {
+            return null;
+        }
+        return attributeToPageFormat(getPrintService(), this.attributes);
+   }
+
+
    /**
      * Presents the user a dialog for changing properties of the
      * print job interactively.
--- a/jdk/src/java.desktop/share/specs/AWT_Native_Interface.html	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,776 +0,0 @@
-<!--
- Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- 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.
--->
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xml:lang=
-"en-US">
-<head>
-<title>Java AWT Native Interface Specification and Guide</title>
-</head>
-<body>
-<h2>The Java AWT Native Interface Specification and Guide</h2>
-<h3>Introduction</h3>
-<p>The Java AWT Native Interface (JAWT) comprises a small set of native
-(eg C language-based) APIs that provide a standard supported way
-for interaction between Java API windows and surfaces, and
-platform native API windows and surfaces.
-Non-Java libraries may then render to a Java owned window.
-<p>
-Note: in this document the terms "Java AWT Native Interface",
-"AWT Native Interface" and "JAWT" are interchangeable and
-refer to this same specification.
-<p>
-The fundamental obstacle to native rendering without JAWT is that
-is that the rendering code cannot identify where to draw.
-The native code needs access to information about a Java
-drawing surface (such as a handle to the underlying native ID of a
-<tt>Canvas</tt>), but cannot get it.</p>
-Without that information (ie without JAWT) an application could
-use native rendering only by creating its own top-level window
-not shared at all with Java. This is unacceptable for most uses.
-Except for usage via JAWT, this is considered to be entirely
-internal to the Java platform implementation: private, unsupported
-and undocumented.
-<p>
-JAWT should be supported in all headful implementations
-where technically possible although this is not enforced by the JCK.
-There is a platform-specific and a platform
-independent portion to the API, to account for the differing
-data structures and requirements of each platform.
-This document specifies the platform independent portions and
-also documents the platform dependent portions for the Oracle JDK
-supported desktop operating environments.
-For AWT the term platform is less tied to the underlying operating
-system than it is to the desktop windowing environment.
-<p>
-Reasons for using the AWT Native Interface include
-<ul>
-<li>Use of a 3rd party native library not available in Java
-<li>A temporary porting aid before converting legacy code to Java
-<li>Rendering performance available only to native hardware accelerated APIs
-<li>Interoperation with another toolkit
-</ul>
-<p>
-Drawbacks include
-<ul>
-<li>A more complex application implementation, eg for painting
-<li>Potential for application instability if the native library does
-not interoperate properly with AWT.
-<li>Increased application delivery complexity - per platform binaries
-</ul>
-The header file <a href="#jawt.h"> "jawt.h"</a>
-in the Appendix fully specifies the APIs provided by JAWT.
-<p>
-An example illustrating how easy it is to use the AWT Native Interface
-is presented and discussed later in this document.</p>
-
-<p><b>JAWT usage depends on JNI</b></p>
-<p>The definition of Java Standard Edition includes JNI, the Java
-Native Interface. Many Java developers will never need to use it,
-but the interface is the only standard supported way for a Java
-language program to interact directly with
-application code that has been compiled to the native machine
-instructions for the host processor architecture.
-JNI is used where ever there is a need for mixed languages.
-These are by no means limited to cases like AWT. For example, you
-could use JNI to integrate with native code that communicates with
-a peripheral device, such as a scanner, connected to a system via a
-USB port.</p>
-<p>So JNI is general enough to be used to access almost any
-sort of native library.
-The rest of this document assumes a familiarity with how
-to use JNI.
-
-<p><b>How to use JAWT </b></p>
-<p>In this section we describe the most common usage of the AWT
-Native Interface &mdash; overriding the <tt>paint</tt> method to
-direct drawing operations to a native rendering library which then
-queries the Java VM to determine the information it needs in order
-to render. Note, however, that any native code may use the AWT
-Native Interface to learn about a target drawing surface, not just
-code in a <tt>paint</tt> method.</p>
-<p>The first step in hooking up a native rendering library to a
-Java <tt>Canvas</tt> is to define a new class that extends
-<tt>Canvas</tt> and overrides the <tt>paint</tt> method. The Java
-system routes all drawing operations for a <tt>Canvas</tt> object
-through the <tt>paint</tt> method, as it does for all other GUI
-objects. Canvas is a good candidate for the rendering surface as
-it does not have any content as a Button would.</p>
-<p>The new <tt>paint</tt> method, to be implemented in the native
-rendering library, must be declared as <tt>public native void</tt>
-, and the native library itself is loaded at runtime by including a
-call to <tt>System.loadLibrary( &quot;myRenderingLib&quot;)</tt>in
-the <tt>static</tt> block of the class. The <tt>myRenderingLib</tt>
-name is used for the native shared library; for Linux or the Solaris
-operating environment, the actual name for the library file on disk
-is <tt>libmyRenderingLib.so</tt> .</p>
-<p>Here is a simple example of such a class:</p>
-<pre>
-import java.awt.*;
-import java.awt.event.*;
-
-public class MyCanvas extends Canvas {
-    static {
-        System.loadLibrary("myRenderingLib");
-    }
-    public native void paint(Graphics g);
-
-    public static void main(String[] args) {
-        Frame f = new Frame();
-        f.setBounds(0, 0, 500, 110);
-        f.add(new MyCanvas());
-        f.addWindowListener( new WindowAdapter() {
-            public void windowClosing(WindowEvent ev) {
-                System.exit(0);
-            }
-        } );
-        f.show();
-    }
-}
-<br />
-</pre>
-<p>Note that this class has a <tt>main</tt> method that can be used
-to run this code as an application for testing purposes.</p>
-<p>The next step is to run the <tt>javah</tt> tool on the
-<tt>MyCanvas</tt> class file above to generate a C/C++ header file
-that describes the interface to the native <tt>paint</tt> method
-that Java expects to be used. <tt>javah</tt> is a standard tool
-included with the JDK. NB: <tt>javac -h outputdir</tt> may also be used.</p>
-
-<p>The final step &#173; and the most interesting one &#173; is to
-write the native rendering method, with an interface that conforms
-to the header file that <tt>javah</tt> generated, and build it as a
-standard shared library (called <tt>myRenderingLib</tt> in the
-above example) by linking it, against the appropriate JDK provided
-$JDK_HOME/lib/$JAWT_LIB library for the target platform.
-Where JAWT_LIB has the base name "jawt" and follows platform
-shared object naming rules. i.e.:
-<ul>
-<li>Windows: jawt.dll
-<li>MacOS: libjawt.dylib
-<li>Linux: libjawt.so
-<li>Solaris: libjawt.so
-</ul>
-
-This code will call back to the Java virtual machine to
-get the drawing surface information it needs to access the
-<tt>MyCanvas</tt> peer. Once this information is available, the
-code can draw directly to <tt>MyCanvas</tt> using standard drawing
-routines supplied by the underlying operating system.</p>
-<p>Here is sample source code for a native <tt>paint</tt> method
-designed for use in a X11-based drawing environment (Linux
-or Solaris) and a Java VM where the AWT Native Interface is present:</p>
-<pre>
-#include "MyCanvas.h"
-#include "jawt_md.h"
-
-/*
- * Class:     MyCanvas
- * Method:    paint
- * Signature: (Ljava/awt/Graphics;)V
- */
-JNIEXPORT void JNICALL Java_MyCanvas_paint
-(JNIEnv* env, jobject canvas, jobject graphics)
-{
-    JAWT awt;
-    JAWT_DrawingSurface* ds;
-    JAWT_DrawingSurfaceInfo* dsi;
-    JAWT_X11DrawingSurfaceInfo* dsi_x11;
-    jboolean result;
-    jint lock;
-    GC gc;
-
-    short       i;
-    char        *testString = "^^^ rendered from native code ^^^";
-
-    /* Get the AWT */
-    awt.version = JAWT_VERSION_9;
-    if (JAWT_GetAWT(env, &amp;awt) == JNI_FALSE) {
-        printf("AWT Not found\n");
-        return;
-    }
-
-    /* Get the drawing surface */
-    ds = awt.GetDrawingSurface(env, canvas);
-    if (ds == NULL) {
-        printf("NULL drawing surface\n");
-        return;
-    }
-
-    /* Lock the drawing surface */
-    lock = ds-&gt;Lock(ds);
-    if((lock &amp; JAWT_LOCK_ERROR) != 0) {
-        printf("Error locking surface\n");
-        awt.FreeDrawingSurface(ds);
-        return;
-    }
-
-    /* Get the drawing surface info */
-    dsi = ds-&gt;GetDrawingSurfaceInfo(ds);
-    if (dsi == NULL) {
-        printf("Error getting surface info\n");
-        ds-&gt;Unlock(ds);
-        awt.FreeDrawingSurface(ds);
-        return;
-    }
-
-    /* Get the platform-specific drawing info */
-    dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)dsi-&gt;platformInfo;
-
-
-    /* Now paint */
-    gc = XCreateGC(dsi_x11-&gt;display, dsi_x11-&gt;drawable, 0, 0);
-    XSetBackground(dsi_x11-&gt;display, gc, 0);
-    for (i=0; i&lt;36;i++)
-    {
-        XSetForeground(dsi_x11-&gt;display, gc, 10*i);
-        XFillRectangle(dsi_x11-&gt;display, dsi_x11-&gt;drawable, gc,
-                        10*i, 5, 90, 90);
-    }
-    XSetForeground(dsi_x11-&gt;display, gc, 155);
-    XDrawImageString(dsi_x11-&gt;display, dsi_x11-&gt;drawable, gc,
-                        100, 110, testString, strlen(testString));
-    XFreeGC(dsi_x11-&gt;display, gc);
-
-
-    /* Free the drawing surface info */
-    ds-&gt;FreeDrawingSurfaceInfo(dsi);
-
-    /* Unlock the drawing surface */
-    ds-&gt;Unlock(ds);
-
-    /* Free the drawing surface */
-    awt.FreeDrawingSurface(ds);
-}
-</pre>
-<p>The key data structure here is <tt>JAWT</tt> , which is defined
-in <tt>jawt.h</tt> (included by <tt>jawt_md.h)</tt> ; it provides
-access to all the information the native code needs to get the job
-done. The first part of the native method is boilerplate: it
-populates the <tt>JAWT</tt> structure, gets a
-<tt>JAWT_DrawingSurface</tt> structure, locks the surface (only one
-drawing engine at a time, please!), then gets a
-<tt>JAWT_DrawingSurfaceInfo</tt> structure that contains a pointer
-(in the <tt>platformInfo</tt> field) to the necessary
-platform-specific drawing information. It also includes the
-bounding rectangle of the drawing surface and the current clipping
-region.</p>
-<p>The structure of the information pointed to by
-<tt>platformInfo</tt> is defined in a machine-dependent header file
-called <tt>jawt_md.h</tt>. For X11 drawing, it includes
-information about the X11 display and X11 drawable associated with
-<tt>MyCanvas</tt>. After the drawing operations are completed,
-there is more boilerplate code as <tt>JAWT_DrawingSurfaceInfo</tt>
-is freed and <tt>JAWT_DrawingSurface</tt> is unlocked and
-freed.</p>
-<p>The corresponding code for the GDI API on the Microsoft Windows platform would
-be structured similarly, but would include the version of
-<tt>jawt_md.h</tt> for Microsoft Windows and the structure located
-in the <tt>platformInfo</tt> field of drawing surface info would be
-cast as a <tt>JAWT_Win32DrawingSurfaceInfo*</tt> . And, of course,
-the actual drawing operations would need to be changed to those
-appropriate for the Microsoft Windows platform.
-The same also for MacOS.
-</p>
-<p><b>Summary</b></p>
-<p>The ability to draw directly into a Java <tt>Canvas</tt> from a
-native code library is extremely useful for developers planning to
-migrate a legacy software system to Java, especially one that
-includes a high-performance rendering engine. It makes it much
-easier to migrate in stages, leaving performance-sensitive
-rendering code alone, while other less-sensitive portions of code
-are converted to Java. The result can be a modern Java-centric
-application, providing the benefit of portability and development
-efficiency, but one that does not sacrifice an investment in
-performance of a key piece of native code.</p>
-<p><b>References</b></p>
-<p>The definitive reference to the Java Native Interface is <i>The
-Java Native Interface: Programmer's Guide and Specification</i> by
-Sheng Liang. This book was published in June
-1999 by Addison-Wesley. The ISBN is 0-201-32577-2.</p>
-<p><b>Appendix</b></p>
-<p><b>Header Files for jawt.h and jawt_md.h</b></p>
-<a name="jawt.h"></a>
-<p>jawt.h</p>
-<pre>
-#ifndef _JAVASOFT_JAWT_H_
-#define _JAVASOFT_JAWT_H_
-
-#include "jni.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * AWT native interface.
- *
- * The AWT native interface allows a native C or C++ application a means
- * by which to access native structures in AWT.  This is to facilitate moving
- * legacy C and C++ applications to Java and to target the needs of the
- * developers who need to do their own native rendering to canvases
- * for performance or other reasons.
- *
- * Conversely it also provides mechanisms for an application which already
- * has a native window to provide that to AWT for AWT rendering.
- *
- * Since every platform may be different in its native data structures
- * and APIs for windowing systems the application must necessarily
- * provided per-platform source and compile and deliver per-platform
- * native code  to use this API.
- *
- * These interfaces are not part of the Java SE specification and
- * a VM is not required to implement this API. However it is strongly
- * recommended that all implementations which support headful AWT
- * also support these interfaces.
- *
- */
-
-/*
- * AWT Native Drawing Surface (JAWT_DrawingSurface).
- *
- * For each platform, there is a native drawing surface structure.  This
- * platform-specific structure can be found in jawt_md.h.  It is recommended
- * that additional platforms follow the same model.  It is also recommended
- * that VMs on all platforms support the existing structures in jawt_md.h.
- *
- *******************
- * EXAMPLE OF USAGE:
- *******************
- *
- * On Microsoft Windows, a programmer wishes to access the HWND of a canvas
- * to perform native rendering into it.  The programmer has declared the
- * paint() method for their canvas subclass to be native:
- *
- *
- * MyCanvas.java:
- *
- * import java.awt.*;
- *
- * public class MyCanvas extends Canvas {
- *
- *     static {
- *         System.loadLibrary("mylib");
- *     }
- *
- *     public native void paint(Graphics g);
- * }
- *
- *
- * myfile.c:
- *
- * #include "jawt_md.h"
- * #include &lt;assert.h&gt;
- *
- * JNIEXPORT void JNICALL
- * Java_MyCanvas_paint(JNIEnv* env, jobject canvas, jobject graphics)
- * {
- *     JAWT awt;
- *     JAWT_DrawingSurface* ds;
- *     JAWT_DrawingSurfaceInfo* dsi;
- *     JAWT_Win32DrawingSurfaceInfo* dsi_win;
- *     jboolean result;
- *     jint lock;
- *
- *     // Get the AWT. Request version 9 to access features in that release.
- *     awt.version = JAWT_VERSION_9;
- *     result = JAWT_GetAWT(env, &amp;awt);
- *     assert(result != JNI_FALSE);
- *
- *     // Get the drawing surface
- *     ds = awt.GetDrawingSurface(env, canvas);
- *     assert(ds != NULL);
- *
- *     // Lock the drawing surface
- *     lock = ds-&gt;Lock(ds);
- *     assert((lock &amp; JAWT_LOCK_ERROR) == 0);
- *
- *     // Get the drawing surface info
- *     dsi = ds-&gt;GetDrawingSurfaceInfo(ds);
- *
- *     // Get the platform-specific drawing info
- *     dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi-&gt;platformInfo;
- *
- *     //////////////////////////////
- *     // !!! DO PAINTING HERE !!! //
- *     //////////////////////////////
- *
- *     // Free the drawing surface info
- *     ds-&gt;FreeDrawingSurfaceInfo(dsi);
- *
- *     // Unlock the drawing surface
- *     ds-&gt;Unlock(ds);
- *
- *     // Free the drawing surface
- *     awt.FreeDrawingSurface(ds);
- * }
- *
- */
-
-/*
- * JAWT_Rectangle
- * Structure for a native rectangle.
- */
-typedef struct jawt_Rectangle {
-    jint x;
-    jint y;
-    jint width;
-    jint height;
-} JAWT_Rectangle;
-
-struct jawt_DrawingSurface;
-
-/*
- * JAWT_DrawingSurfaceInfo
- * Structure for containing the underlying drawing information of a component.
- */
-typedef struct jawt_DrawingSurfaceInfo {
-    /*
-     * Pointer to the platform-specific information.  This can be safely
-     * cast to a JAWT_Win32DrawingSurfaceInfo on Microsoft Windows or a
-     * JAWT_X11DrawingSurfaceInfo on Linux and Solaris. On MacOS this is a
-     * pointer to a NSObject that conforms to the JAWT_SurfaceLayers protocol.
-     * See jawt_md.h for details.
-     */
-    void* platformInfo;
-    /* Cached pointer to the underlying drawing surface */
-    struct jawt_DrawingSurface* ds;
-    /* Bounding rectangle of the drawing surface */
-    JAWT_Rectangle bounds;
-    /* Number of rectangles in the clip */
-    jint clipSize;
-    /* Clip rectangle array */
-    JAWT_Rectangle* clip;
-} JAWT_DrawingSurfaceInfo;
-
-#define JAWT_LOCK_ERROR                 0x00000001
-#define JAWT_LOCK_CLIP_CHANGED          0x00000002
-#define JAWT_LOCK_BOUNDS_CHANGED        0x00000004
-#define JAWT_LOCK_SURFACE_CHANGED       0x00000008
-
-/*
- * JAWT_DrawingSurface
- * Structure for containing the underlying drawing information of a component.
- * All operations on a JAWT_DrawingSurface MUST be performed from the same
- * thread as the call to GetDrawingSurface.
- */
-typedef struct jawt_DrawingSurface {
-    /* Cached reference to the Java environment of the calling thread.
-     * If Lock(), Unlock(), GetDrawingSurfaceInfo() or
-     * FreeDrawingSurfaceInfo() are called from a different thread,
-     * this data member should be set before calling those functions.
-     */
-    JNIEnv* env;
-    /* Cached reference to the target object */
-    jobject target;
-    /*
-     * Lock the surface of the target component for native rendering.
-     * When finished drawing, the surface must be unlocked with
-     * Unlock().  This function returns a bitmask with one or more of the
-     * following values:
-     *
-     * JAWT_LOCK_ERROR - When an error has occurred and the surface could not
-     * be locked.
-     *
-     * JAWT_LOCK_CLIP_CHANGED - When the clip region has changed.
-     *
-     * JAWT_LOCK_BOUNDS_CHANGED - When the bounds of the surface have changed.
-     *
-     * JAWT_LOCK_SURFACE_CHANGED - When the surface itself has changed
-     */
-    jint (JNICALL *Lock)
-        (struct jawt_DrawingSurface* ds);
-    /*
-     * Get the drawing surface info.
-     * The value returned may be cached, but the values may change if
-     * additional calls to Lock() or Unlock() are made.
-     * Lock() must be called before this can return a valid value.
-     * Returns NULL if an error has occurred.
-     * When finished with the returned value, FreeDrawingSurfaceInfo must be
-     * called.
-     */
-    JAWT_DrawingSurfaceInfo* (JNICALL *GetDrawingSurfaceInfo)
-        (struct jawt_DrawingSurface* ds);
-    /*
-     * Free the drawing surface info.
-     */
-    void (JNICALL *FreeDrawingSurfaceInfo)
-        (JAWT_DrawingSurfaceInfo* dsi);
-    /*
-     * Unlock the drawing surface of the target component for native rendering.
-     */
-    void (JNICALL *Unlock)
-        (struct jawt_DrawingSurface* ds);
-} JAWT_DrawingSurface;
-
-/*
- * JAWT
- * Structure for containing native AWT functions.
- */
-typedef struct jawt {
-    /*
-     * Version of this structure.  This must always be set before
-     * calling JAWT_GetAWT(). It affects the functions returned.
-     * Must be one of the known pre-defined versions.
-     */
-    jint version;
-    /*
-     * Return a drawing surface from a target jobject.  This value
-     * may be cached.
-     * Returns NULL if an error has occurred.
-     * Target must be a java.awt.Component (should be a Canvas
-     * or Window for native rendering).
-     * FreeDrawingSurface() must be called when finished with the
-     * returned JAWT_DrawingSurface.
-     */
-    JAWT_DrawingSurface* (JNICALL *GetDrawingSurface)
-        (JNIEnv* env, jobject target);
-    /*
-     * Free the drawing surface allocated in GetDrawingSurface.
-     */
-    void (JNICALL *FreeDrawingSurface)
-        (JAWT_DrawingSurface* ds);
-    /*
-     * Since 1.4
-     * Locks the entire AWT for synchronization purposes
-     */
-    void (JNICALL *Lock)(JNIEnv* env);
-    /*
-     * Since 1.4
-     * Unlocks the entire AWT for synchronization purposes
-     */
-    void (JNICALL *Unlock)(JNIEnv* env);
-    /*
-     * Since 1.4
-     * Returns a reference to a java.awt.Component from a native
-     * platform handle.  On Windows, this corresponds to an HWND;
-     * on Solaris and Linux, this is a Drawable.  For other platforms,
-     * see the appropriate machine-dependent header file for a description.
-     * The reference returned by this function is a local
-     * reference that is only valid in this environment.
-     * This function returns a NULL reference if no component could be
-     * found with matching platform information.
-     */
-    jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
-
-    /**
-     * Since 9
-     * Creates a java.awt.Frame placed in a native container. Container is
-     * referenced by the native platform handle. For example on Windows this
-     * corresponds to an HWND. For other platforms, see the appropriate
-     * machine-dependent header file for a description. The reference returned
-     * by this function is a local reference that is only valid in this
-     * environment. This function returns a NULL reference if no frame could be
-     * created with matching platform information.
-     */
-    jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
-
-    /**
-     * Since 9
-     * Moves and resizes the embedded frame. The new location of the top-left
-     * corner is specified by x and y parameters relative to the native parent
-     * component. The new size is specified by width and height.
-     *
-     * The embedded frame should be created by CreateEmbeddedFrame() method, or
-     * this function will not have any effect.
-     *
-     * java.awt.Component.setLocation() and java.awt.Component.setBounds() for
-     * EmbeddedFrame really don't move it within the native parent. These
-     * methods always locate the embedded frame at (0, 0) for backward
-     * compatibility. To allow moving embedded frames this method was
-     * introduced, and it works just the same way as setLocation() and
-     * setBounds() for usual, non-embedded components.
-     *
-     * Using usual get/setLocation() and get/setBounds() together with this new
-     * method is not recommended.
-     */
-    void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
-            jint x, jint y, jint w, jint h);
-    /**
-     * Since 9
-     * Synthesize a native message to activate or deactivate an EmbeddedFrame
-     * window depending on the value of parameter doActivate, if "true"
-     * activates the window; otherwise, deactivates the window.
-     *
-     * The embedded frame should be created by CreateEmbeddedFrame() method, or
-     * this function will not have any effect.
-     */
-    void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
-            jobject embeddedFrame, jboolean doActivate);
-} JAWT;
-
-/*
- * Get the AWT native structure.  This function returns JNI_FALSE if
- * an error occurs.
- */
-_JNI_IMPORT_OR_EXPORT_
-jboolean JNICALL JAWT_GetAWT(JNIEnv* env, JAWT* awt);
-
-/*
- * Specify one of these constants as the JAWT.version
- * Specifying an earlier version will limit the available functions to
- * those provided in that earlier version of JAWT.
- * See the "Since" note on each API. Methods with no "Since"
- * may be presumed to be present in JAWT_VERSION_1_3.
- */
-#define JAWT_VERSION_1_3 0x00010003
-#define JAWT_VERSION_1_4 0x00010004
-#define JAWT_VERSION_1_7 0x00010007
-#define JAWT_VERSION_9 0x00090000
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif /* !_JAVASOFT_JAWT_H_ */
-
-</pre>
-<p>jawt_md.h (Linux/Solaris/X11 operating environment version)</p>
-<pre>
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include &lt;X11/Xlib.h&gt;
-#include &lt;X11/Xutil.h&gt;
-#include &lt;X11/Intrinsic.h&gt;
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * X11-specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
-typedef struct jawt_X11DrawingSurfaceInfo {
-    Drawable drawable;
-    Display* display;
-    VisualID visualID;
-    Colormap colormapID;
-    int depth;
-} JAWT_X11DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
-</pre>
-<p>jawt_md.h (Microsoft Windows version)</p>
-<pre>
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include &lt;windows.h&gt;
-#include "jawt.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Microsoft Windows specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
-typedef struct jawt_Win32DrawingSurfaceInfo {
-    /* Native window, DDB, or DIB handle */
-    union {
-        HWND hwnd;
-        HBITMAP hbitmap;
-        void* pbits;
-    };
-    /*
-     * This HDC should always be used instead of the HDC returned from
-     * BeginPaint() or any calls to GetDC().
-     */
-    HDC hdc;
-    HPALETTE hpalette;
-} JAWT_Win32DrawingSurfaceInfo;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
-</pre>
-<p>jawt_md.h (MacOS version)</p>
-<pre>
-#ifndef _JAVASOFT_JAWT_MD_H_
-#define _JAVASOFT_JAWT_MD_H_
-
-#include "jawt.h"
-
-#ifdef __OBJC__
-#import <QuartzCore/CALayer.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * MacOS specific declarations for AWT native interface.
- * See notes in jawt.h for an example of use.
- */
-
-/*
- * When calling JAWT_GetAWT with a JAWT version less than 1.7, you must pass this
- * flag or you will not be able to get a valid drawing surface and JAWT_GetAWT will
- * return false. This is to maintain compatibility with applications that used the
- * interface with Java 6 which had multiple rendering models. This flag is not necessary
- * when JAWT version 1.7 or greater is used as this is the only supported rendering mode.
- *
- * Example:
- *   JAWT awt;
- *   awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
- *   jboolean success = JAWT_GetAWT(env, &awt);
- */
-#define JAWT_MACOSX_USE_CALAYER 0x80000000
-
-/*
- * When the native Cocoa toolkit is in use, the pointer stored in
- * JAWT_DrawingSurfaceInfo->platformInfo points to a NSObject that conforms to the
- * JAWT_SurfaceLayers protocol. Setting the layer property of this object will cause the
- * specified layer to be overlaid on the Components rectangle. If the window the
- * Component belongs to has a CALayer attached to it, this layer will be accessible via
- * the windowLayer property.
- */
-#ifdef __OBJC__
-@protocol JAWT_SurfaceLayers
-@property (readwrite, retain) CALayer *layer;
-@property (readonly) CALayer *windowLayer;
-@end
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_JAVASOFT_JAWT_MD_H_ */
-</pre>
-<!-- Body text ends here -->
-</body>
-</html>
--- a/jdk/src/java.management.rmi/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.management.rmi/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,27 +24,27 @@
  */
 
 /**
- * Defines the RMI Connector for the Java Management Extensions (JMX) Remote API.
- * <P>
- * The {@linkplain javax.management.remote.rmi RMI connector} is a connector
- * for the JMX Remote API that uses RMI to transmit client requests to a remote
- * MBean server.
+ * Defines the {@linkplain javax.management.remote.rmi RMI connector}
+ * for the Java Management Extensions (JMX) Remote API.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Providers:</dt>
+ * <dd>This module provides
+ * {@link javax.management.remote.JMXConnectorProvider} service
+ * that creates the JMX connector clients using RMI protocol.
+ * Instances of {@code JMXConnector} can be obtained via the
+ * {@link javax.management.remote.JMXConnectorFactory#newJMXConnector
+ * JMXConnectorFactory.newJMXConnector} factory method.
+ * It also provides {@link javax.management.remote.JMXConnectorServerProvider} service
+ * that creates the JMX connector servers using RMI protocol.
+ * Instances of {@code JMXConnectorServer} can be obtained via the
+ * {@link javax.management.remote.JMXConnectorServerFactory#newJMXConnectorServer
+ * JMXConnectorServerFactory.newJMXConnectorServer} factory method.
+ * </dd>
+ * </dl>
  *
  * @provides javax.management.remote.JMXConnectorProvider
- *           A provider of {@code JMXConnector} for the RMI protocol.<br>
- *           Instances of {@code JMXConnector} using the RMI protocol
- *           are usually created by the {@link
- *           javax.management.remote.JMXConnectorFactory} which will locate
- *           and load the appropriate {@code JMXConnectorProvider} service
- *           implementation for the given protocol.
- *
  * @provides javax.management.remote.JMXConnectorServerProvider
- *           A provider of {@code JMXConnectorServer} for the RMI protocol.<br>
- *           Instances of {@code JMXConnectorServer} using the RMI protocol
- *           are usually created by the {@link
- *           javax.management.remote.JMXConnectorServerFactory} which will locate
- *           and load the appropriate {@code JMXConnectorServerProvider} service
- *           implementation for the given protocol.
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/java.management/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.management/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,9 @@
  * The JMX API consists of interfaces for monitoring and management of the
  * JVM and other components in the Java runtime.
  *
+ * @uses javax.management.remote.JMXConnectorProvider
+ * @uses javax.management.remote.JMXConnectorServerProvider
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/java.management/share/specs/JVM-MANAGEMENT-MIB.mib	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3266 +0,0 @@
---
---
---
--- Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
--- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
---
--- This code is free software; you can redistribute it and/or modify it
--- 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.
---
---
--- The JVM-MANAGEMENT-MIB Module
---
--- See jvmManagementMIB MODULE-IDENTITY for a description overview.
--- See conformance statements for mandatory objects
---
-
-JVM-MANAGEMENT-MIB DEFINITIONS ::= BEGIN
-
-IMPORTS
-    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Counter32, Gauge32,
-	Integer32, Counter64, enterprises
-        FROM SNMPv2-SMI
-    DisplayString, TEXTUAL-CONVENTION, RowPointer
-        FROM SNMPv2-TC
-    MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
-        FROM SNMPv2-CONF;
-
--- Module Identity
-------------------
-
-jvmMgtMIB MODULE-IDENTITY
-    LAST-UPDATED "200403041800Z"
-    -- Format is "YYYYMMDDhhmmZ"
-    ORGANIZATION "Sun Microsystems, Inc."
-    CONTACT-INFO "Sun Microsystems, Inc.
-                  4150 Network Circle
-		  Santa Clara, CA 95054
-		  1-800-555-9SUN or
-		  1-650-960-1300
-		  http://www.sun.com
-		  or contact your local support representative"
-    DESCRIPTION
-            "Copyright 2004 Sun Microsystems, Inc. All rights reserved.
-
-             This module defines the MIB that provides access to the
-	     Java[tm] Virtual Machine monitoring data.
-	     This module is derived from the Java[tm] programming language APIs
-             described in the java.lang.management package of
-             Java[tm] 2, Standard Edition, 5.0.
-
-	     See the Java programming language APIs of JSR 163 for
-             'Monitoring and Management of the Java[TM] Virtual Machine'
-             for more details.
-
-	     Where the Java programming language API uses long, or int,
-             the MIB often uses the corresponding unsigned quantity -
-             which is closer to the object semantics.
-
-             In those cases, it often happens that the -1 value that might
-             be used by the API to indicate an unknown/unimplemented
-             value cannot be used. Instead the MIB uses the value 0, which
-             stricly speaking cannot be distinguished from a valid value.
-             In many cases however, a running system will have non-zero
-             values, so using 0 instead of -1 to indicate an unknown
-             quantity does not lose any functionality.
-	    "
-    REVISION     "200403041800Z"
-    -- Format is "YYYYMMDDhhmmZ"
-    DESCRIPTION
-            "
-            JVM-MANAGEMENT-MIB - JSR 163 Final Release 1.0
-            "
-
-    ::= { standard jsr163(163) 1 }
-
-
--- Enterprise OIDs
-------------------
-
---        internet          OBJECT IDENTIFIER ::= { iso(1) org(3) dod(6) 1 }
---        private           OBJECT IDENTIFIER ::= { internet 4 }
---        enterprises       OBJECT IDENTIFIER ::= { private 1 }
-	sun	  	  OBJECT IDENTIFIER ::= { enterprises 42 }
-	jmgt		  OBJECT IDENTIFIER ::= { sun products(2) 145 }
-	-- experimental      OBJECT IDENTIFIER ::= { jmgt 1 }
-        standard          OBJECT IDENTIFIER ::= { jmgt 3 }
-
-----------------------------------------------------------------------------
--- Textual Conventions
-----------------------
---
--- Note: Some of the TEXTUAL-CONVENTIONs defined in this module are
---       OCTET STRING with a 1023 size limitation (SIZE(0..1023)).
---
--- As per RFC2578, section 7.1.2.  OCTET STRING:
---
---       "The OCTET STRING type represents arbitrary binary or textual data.
---        Although the SMI-specified size limitation for this type is 65535
---        octets, MIB designers should realize that there may be
---        implementation and interoperability limitations for sizes in
---        excess of 255 octets."
---
--- As a consequence an agent implementing this MIB may decide to
--- restrict this maximum size to a lesser value than 1023, provided that
--- it makes it clear in an AGENT-CAPABILITY statement.
---
-----------------------------------------------------------------------------
-
-JvmUnsigned64TC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-           "A non-negative 64-bit bit integer, without counter
-            semantics."
-    -- We have cloned the Unsigned64TC defined in RFC 2564 rather
-    -- than importing it because the JVM-MANAGEMENT-MIB and the
-    -- APPLICATION-MIB are not related.
-    --
-    REFERENCE "RFC 2564 - APPLICATION-MIB, Unsigned64TC."
-    SYNTAX Counter64
-
-
-JvmJavaObjectNameTC ::= TEXTUAL-CONVENTION
-    DISPLAY-HINT "255a"
-    STATUS       current
-    DESCRIPTION
-          "An Object Name, as implemented by the java.lang.management API,
-	  which identify a runtime Object (e.g. a Class Loader, a
-          Memory Manager, etc...).
-	  The name is assumed to be unique in the scope of the object's
-	  class.
-
-	  This object syntax is equivalent to a DisplayString, but with a
-          a 1023 bytes size limits (instead of 255 for a DisplayString).
-
-	  Note that the SNMP agent may have to truncate the string returned
-          by the underlying API if it does not fit in this type.
-	  (1023 bytes max).
-	  "
-    SYNTAX       OCTET STRING (SIZE (0..1023))
-
-JvmPathElementTC ::= TEXTUAL-CONVENTION
-    DISPLAY-HINT "255a"
-    STATUS       current
-    DESCRIPTION
-          "A file or directory element in a PATH/CLASSPATH/LIBRARY_PATH
-           structure.
-
-	  This object syntax is equivalent to a DisplayString, but with a
-          a 1023 bytes size limits (instead of 255 for a DisplayString).
-
-	  Note that the SNMP agent may have to truncate the string returned
-          by the underlying API if it does not fit in this type.
-	  (1023 bytes max).
-	  "
-    SYNTAX       OCTET STRING (SIZE (0..1023))
-
-JvmArgValueTC ::= TEXTUAL-CONVENTION
-    DISPLAY-HINT "255a"
-    STATUS       current
-    DESCRIPTION
-          "A string representing an input argument.
-
-	  This object syntax is equivalent to a DisplayString, but with a
-          a 1023 bytes size limits (instead of 255 for a DisplayString).
-
-	  Note that the SNMP agent may have to truncate the string returned
-          by the underlying API if it does not fit in this type.
-	  (1023 bytes max).
-	  "
-    SYNTAX       OCTET STRING (SIZE (0..1023))
-
-JvmVerboseLevelTC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-	"Defines whether the verbose flag for a feature is active.
-	 verbose: the flag is on.
-	 silent:  the flag is off.
-	"
-    SYNTAX INTEGER { silent(1), verbose(2) }
-
-
-JvmImplSupportStateTC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-	"Defines whether a feature is supported or not.
-	"
-    SYNTAX INTEGER { unsupported(1), supported(2) }
-
-JvmImplOptFeatureStateTC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-	"Defines whether an optional feature is supported, enabled,
-	 or disabled.
-
-         An optional feature can be:
-
-	 unsupported: The JVM does not support this feature.
-	 enabled    : The JVM supports this feature, and it
-	              is enabled.
-	 disabled   : The JVM supports this feature, and it
-	              is disabled.
-
-         Only enabled(3) and disabled(4) may be supplied as values to a
-         SET request. unsupported(1) can only be set internally by the
-         agent.
-	 "
-    SYNTAX INTEGER { unsupported(1), enabled(3), disabled(4) }
-
-JvmTimeMillis64TC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-          "An elapsed time, expressed in milli-seconds.
-           This type is based on Counter64, but without its specific
-           semantics.
-	  "
-    SYNTAX Counter64
-
-JvmTimeNanos64TC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-          "An elapsed time, expressed in nano-seconds.
-           This type is based on Counter64, but without its specific
-           semantics.
-	  "
-    SYNTAX Counter64
-
-JvmPositive32TC ::= TEXTUAL-CONVENTION
-    STATUS       current
-    DESCRIPTION
-          "A positive Integer32. In Java that would be a number
-           in [0..Integer.MAX_VALUE].
-	  "
-    -- We use Integer32 (0..2147483647) rather than Unsigned32 because
-    -- Unsigned32 (0..2147483647) because Unsigned32 is based on
-    -- Gauge32 - which has a specific ASN.1 tag and a specific semantics.
-    -- In principle you cannot use a Gauge32 as base type for an index
-    -- in a table.
-    -- Note also that Unsigned32 is (0..2^32-1)
-    --          while Positive32 is (0..2^31-1)
-    --
-    SYNTAX Integer32 (0..2147483647)
-
-JvmManagedMemoryTypeTC ::= TEXTUAL-CONVENTION
-    STATUS  current
-    DESCRIPTION
-	"
-         Defines the type of memory contained in a memory pool.
-	 The pool may contain, heap memory or non-heap memory.
-	"
-    SYNTAX  INTEGER { nonheap(1), heap(2) }
-
-
-JvmValidityStateTC ::= TEXTUAL-CONVENTION
-    STATUS  current
-    DESCRIPTION
-	"
-         Defines whether an object is still valid.
-	"
-    SYNTAX  INTEGER { invalid(1), valid(2) }
-
-
-JvmThreadStateTC ::= TEXTUAL-CONVENTION
-    STATUS  current
-    DESCRIPTION
-	"Defines the possible states of a thread running in the
-	 Java virtual machine. They are virtual machine thread states
-	 and do not reflect any operating system thread states.
-
-	 The first two bits: inNative(1) and suspended(2) can be
-         combined together and with any other bits. The remaining
-         bits 3-9, are mutually exclusive. Bits 10-16 are reserved
-         for future evolution of this MIB.
-
-         An agent MUST always return a thread state with one of the
-         bits in the range 3-9 set to 1. The other(9) bit should only
-         be set to 1 if new thread states which are mutally exclusive
-         with bits 3-8 are defined.  An implementation can define
-         additional implementation dependant states and uses bits
-         from bit 17.
-
-	 See java.lang.Thread.State,
-	     java.lang.management.ThreadInfo.
-	 "
-     --
-     -- Take care that in SNMP bits are numbered starting at 1, from
-     -- left to right (1 is the highest bit). A bitmap defined by the
-     -- BITS construct is thus a byte array where bit 1 is the highest bit
-     -- of the first byte.
-     --
-     SYNTAX  BITS { -- Bits 1-2 may be specified in any combination
-                    inNative(1),
-                    suspended(2),
-
-                    -- Bits 3-9 are mutually exclusive. Attempting to
-                    -- set more than a single bit to 1 will result in
-                    -- a returned error-status of inconsistentValue.
-                    newThread(3),
-                    runnable(4),
-                    blocked(5),
-                    terminated(6),
-                    waiting(7),
-                    timedWaiting(8),
-                    other(9)
-                    -- Bits 10-16 are reserved for future use by
-                    -- this MIB
-                  }
-
-
-JvmIndex64TC ::= TEXTUAL-CONVENTION
-    STATUS current
-    DESCRIPTION
-	"A 64 bits string mapping an unsigned 64 bits integer value
-         in big-endian ordering (i.e: 1 is encoded as 0x0000000000000001).
-
-	 This type can be used when an unsigned 64 bits integer needs
-	 to be used inside a table index.
-	"
-    SYNTAX OCTET STRING (SIZE(8))
-
-
--- OBJECT-TYPE OID tree
------------------------
-
-jvmMgtMIBObjects
-	OBJECT IDENTIFIER ::= { jvmMgtMIB 1 }
-jvmMgtMIBNotifications
-	OBJECT IDENTIFIER ::= { jvmMgtMIB 2 }
-jvmMgtMIBConformance
-	OBJECT IDENTIFIER ::= { jvmMgtMIB 3 }
-
------------------------------------------------------------------------
---
--- The JVM Class Loading group
---
--- A collection of objects used to monitor Class Loading in the
--- Java Virtual Machine. These objects define the SNMP  management
--- interface for the class loading system of the Java virtual machine.
---
--- This group only contains a few scalar object and no tables. The objects
--- from this group are mapped from the java.lang.management.ClassLoadingMXBean
--- interface.
---
--- See J2SE 5.0 API Specification,
---     java.lang.management.ClassLoadingMXBean
------------------------------------------------------------------------
-
--- Root OBJECT IDENTIFIER for ClassLoading group.
---
-jvmClassLoading   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 1 }
-
--- The following objects are mapped from the ClassLoadingMXBean interface.
------------------------------------------------------------------------
-
-jvmClassesLoadedCount OBJECT-TYPE
-    SYNTAX      Gauge32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The number of classes currently loaded in the JVM.
-
-	     See java.lang.management.ClassLoadingMXBean.getLoadedClassCount()
-            "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ClassLoadingMXBean"
-    ::= { jvmClassLoading 1 }
-
-jvmClassesTotalLoadedCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of classes that have been loaded since
-	     the JVM has started execution.
-
-	     See java.lang.management.ClassLoadingMXBean.
-	              getTotalLoadedClassCount()
-            "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ClassLoadingMXBean"
-    ::= { jvmClassLoading 2 }
-
-jvmClassesUnloadedCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-            "The total number of classes that have been unloaded since
-	     the JVM has started execution.
-
-	     See java.lang.management.ClassLoadingMXBean.getUnloadedClassCount()
-            "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ClassLoadingMXBean"
-    ::= { jvmClassLoading 3 }
-
-jvmClassesVerboseLevel OBJECT-TYPE
-    SYNTAX      JvmVerboseLevelTC
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-            "Enables or disables the verbose output for the class loading
-             system. The verbose output information and the output stream
-             to which the verbose information is emitted are implementation
-             dependent. Typically, a Java virtual machine implementation
-             prints a message each time a class file is loaded.
-
-	     verbose: if the verbose output is enabled.
-	     silent:  otherwise.
-
-	     See java.lang.management.ClassLoadingMXBean.isVerbose(),
-                 java.lang.management.ClassLoadingMXBean.setVerbose()
-            "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ClassLoadingMXBean"
-    DEFVAL { silent }
-    ::= { jvmClassLoading 4 }
-
-
------------------------------------------------------------------------
---
--- The JVM Memory group
---
--- A collection of objects used to monitor memory management in the
--- Java Virtual Machine. These objects define management interface for
--- the memory system of the Java virtual machine.
---
--- Memory:
---
--- The memory system of the Java virtual machine manages the following
--- kinds of memory: heap, and non-heap. More information on these types
--- of memory can be obtained from the J2SE 5.0 API Specification,
--- java.lang.management.MemoryMXBean.
---
--- Memory Pools and Memory Managers:
---
--- Memory pools and memory managers are the abstract entities that monitor
--- and manage the memory system of the Java virtual machine.
---
--- Memory managers are represented by the jvmMemManagerTable, which contains
--- one row per Memory manager.
--- The garbage collector is one type of memory  manager responsible for
--- reclaiming memory occupied by unreachable objects.
--- The jvmMemGCTable is an extension of the jvmMemManagerTable, which contains
--- the attribute specific to garbage collectors. A garbage collector entity
--- is thus represented by one row in the jvmMemManagerTable, and one
--- extension row in the jvmMemGCTable.
---
--- Memory Pools are represented by the jvmMemPoolTable, which contains one
--- row per memory pool. A Java virtual machine may create or remove
--- memory pools during execution. A memory pool can belong to either the
--- heap or the non-heap memory.
---
--- A memory manager is responsible for managing one or more memory pools.
--- A memory pool can be managed by more than one memory manager.
--- The jvmMemMgrRelPoolTable represents this managing/managed relationship.
---
--- A Java virtual machine may add or remove memory managers during execution.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryMXBean for
---     more information on memory types, memory managers, memory pools,
---     and the memory subsystem.
---
------------------------------------------------------------------------
-
--- Root OBJECT IDENTIFIER for the JVM Memory group.
---
-jvmMemory   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 2 }
-
--- The following objects are mapped from the MemoryMXBean interface.
------------------------------------------------------------------------
-
-jvmMemoryPendingFinalCount OBJECT-TYPE
-    SYNTAX      Gauge32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate number objects that are pending for finalization.
-
-	 See java.lang.management.MemoryMXBean.
-                  getObjectPendingFinalizationCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean"
-    ::= { jvmMemory 1 }
-
-jvmMemoryGCVerboseLevel OBJECT-TYPE
-    SYNTAX      JvmVerboseLevelTC
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"Enables or disables verbose output for the memory system.
-         The verbose output information and the output stream to which
-         the verbose information is emitted are implementation dependent.
-         Typically, a Java virtual machine implementation prints a
-         message whenever it frees memory at garbage collection.
-
-	 verbose: if the verbose output is enabled,
-         silent:  otherwise.
-
-	 See java.lang.management.MemoryMXBean.isVerbose(),
-             java.lang.management.MemoryMXBean.setVerbose()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean"
-    ::= { jvmMemory 2 }
-
-jvmMemoryGCCall OBJECT-TYPE
-    SYNTAX      INTEGER { unsupported(1), supported(2), start(3),
-                          started(4), failed(5) }
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"This object makes it possible to remotelly trigger the
-	 Garbage Collector in the JVM.
-
-	 This object's syntax is an enumeration which defines:
-
-	 * Two state values, that can be returned from a GET request:
-
-           unsupported(1): means that remote invocation of gc() is not
-                           supported by the SNMP agent.
-           supported(2)  : means that remote invocation of gc() is supported
-	                   by the SNMP agent.
-
-         * One action value, that can be provided in a SET request to
-           trigger the garbage collector:
-
-           start(3)      : means that a manager wishes to trigger
-                           garbage collection.
-
-         * Two result value, that will be returned in the response to a
-           SET request when remote invocation of gc is supported
-	   by the SNMP agent:
-
-	   started(4)    : means that garbage collection was
-                           successfully triggered. It does not mean
-                           however that the action was successfullly
-                           completed: gc might still be running when
-                           this value is returned.
-	   failed(5)     : means that garbage collection couldn't be
-                           triggered.
-
-         * If remote invocation is not supported by the SNMP agent, then
-           unsupported(1) will always be returned as a result of either
-           a GET request, or a SET request with start(3) as input value.
-
-         * If a SET request with anything but start(3) is received, then
-	   the agent will return a wrongValue error.
-
-	 See java.lang.management.MemoryMXBean.gc()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean"
-    ::= { jvmMemory 3 }
-
--- The object identifiers in the range jvmMemory.[4-9] are reserved for future
--- evolution of this MIB.
---
--- We use the range jvmMemory.[10..19] for objects related to global JVM
--- heap memory  usage, as returned by
---      java.lang.management.MemoryMXBean.getHeapMemoryUsage().
--- Object identifiers in the range jvmMemory.[14..19] are not used but
--- reserved for future evolution of this MIB.
---
-jvmMemoryHeapInitSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of memory (in bytes) that the Java virtual machine
-        initially requests from the operating system for memory management
-	for heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getHeapMemoryUsage().getInit()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 10 }
-
-
-jvmMemoryHeapUsed OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of used memory (in bytes) from heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getHeapMemoryUsage().getUsed()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 11 }
-
-jvmMemoryHeapCommitted OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of memory (in bytes) committed by heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getHeapMemoryUsage().
-	         getCommitted()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 12 }
-
-jvmMemoryHeapMaxSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total maximum size of memory (in bytes) for all heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getHeapMemoryUsage().getMax()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 13 }
-
--- We use the range jvmMemory.[20..29] for objects related to global JVM
--- heap memory usage, as returned by
---      lang.management.MemoryMXBean.getNonHeapMemoryUsage().
--- Object identifiers in the range jvmMemory.[24..29] are not used but are
--- reserved for future evolution of this MIB.
---
-jvmMemoryNonHeapInitSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of memory (in bytes) that the Java virtual machine
-        initially requests from the operating system for memory management
-	for non heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getNonHeapMemoryUsage().getInit()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 20 }
-
-
-jvmMemoryNonHeapUsed OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of used memory (in bytes) from non heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getNonHeapMemoryUsage().getUsed()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 21 }
-
-jvmMemoryNonHeapCommitted OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total amount of memory (in bytes) committed by non heap memory pools.
-
-	See java.lang.management.MemoryMXBean.
-	         getNonHeapMemoryUsage().getCommitted()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 22 }
-
-jvmMemoryNonHeapMaxSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Total maximum size of memory (in bytes) for all non heap memory pools.
-
-	See java.lang.management.MemoryMXBean.getNonHeapMemoryUsage().getMax()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemory 23 }
-
--- The object identifiers in the range jvmMemory.[30-99] are not used but are
--- reserved for future evolution of this MIB.
---
--- The JVM Memory Manager Table
---
--- The jvmMemManagerTable represent memory manager abstract entities.
--- The jvmMemManagerTable contains one row per memory manager. In
--- addition, those memory managers which are also garbage collectors have
--- an extension row in the jvmMemGCTable.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryMXBean for
---     a detailed description of the memory subsystem.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryManagerMXBean
---     for more information on memory managers.
---
------------------------------------------------------------------------
---
--- We use the range jvmMemory.[100..109] for objects related to memory
--- managers.
--- Object identifiers in the range jvmMemory.[102-109] are not used
--- but are reserved for future evolution of this MIB.
---
-jvmMemManagerTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmMemManagerEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Memory Manager Table contains the whole list of Memory
-	 Managers  as returned by ManagementFactory.getMemoryManagerMXBeans().
-
-	 When a MemoryManagerMXBean object is an instance of
-	 GarbageCollectorMXBean, then additional information specific to
-	 the GarbageCollectorMXBean class will be found in the
-	 jvmGCTable, at the same index.
-
-	 Relationships between MemoryManagers and MemoryPools are shown
-	 by the Memory Manager-Pool Relation table (jvmMemMgrPoolRelTable).
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemory 100 }
-
-jvmMemManagerEntry OBJECT-TYPE
-    SYNTAX      JvmMemManagerEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"A jvmMemManagerEntry conceptual row represent an instance of the
-	 java.lang.management.MemoryManagerMXBean interface. If that instance
-	 is also an instance of java.lang.management.GarbageCollectorMXBean,
-	 then additional information will be found in the jvmGCTable, at the
-         same index.
-
-	 Columnar objects in this table are mapped from attributes of
-	 the MemoryManagerMXBean interface.
-
-	 See java.lang.management.MemoryManagerMXBean
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryManagerMXBean"
-    INDEX { jvmMemManagerIndex }
-    ::= { jvmMemManagerTable 1 }
-
-JvmMemManagerEntry ::= SEQUENCE {
-        jvmMemManagerIndex JvmPositive32TC,
-        jvmMemManagerName  JvmJavaObjectNameTC,
-	jvmMemManagerState JvmValidityStateTC
-}
-
-jvmMemManagerIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"An index opaquely computed by the agent and which uniquely
-	 identifies a Memory Manager.
-
-	 The jvmMemManagerIndex index is opaquely computed by the agent,
-	 from e.g the hash code of the MemoryManager (or MemoryManager name).
-	 The agent is responsible for allocating a free index when it needs
-	 one (e.g. if two objects have the same hash, then it may increment
-	 one of the values until the conflict is resolved). As a result a
-	 manager must not depend on the value of that index across,
-	 e.g. reboot of the agent, as this value is not guaranteed to
-	 stay identical after the agent restarts.
-	 "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemManagerEntry 1 }
-
-jvmMemManagerName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name of this memory manager, as returned by
-	 MemoryManagerMXBean.getName().
-
-	 See java.mangement.MemoryManagerMXBean.getName().
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemManagerEntry 2 }
-
-jvmMemManagerState OBJECT-TYPE
-    SYNTAX      JvmValidityStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-         Indicates whether this memory manager is valid in the Java
-         virtual machine. A memory manager becomes invalid once the
-         Java virtual machine removes it from the memory system.
-
-	 See java.lang.management.MemoryManagerMXBean.isValid()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemManagerEntry 3 }
-
-
--- The JVM Garbage Collector Table
---
--- The jvmMemGCTable is an extension of the jvmMemManagerTable.
--- It represents garbage collector abstract entities. A garbage collector
--- is a memory manager responsible for reclaiming  memory occupied by
--- unreachable objects.
---
--- A garbage collector is thus represented by one row in the
--- jvmMemManagerTable, plus an extension row in the jvmMemGCTable.
--- The extension row in the jvmMemGCTable contains those attributes which
--- are specific to garbage collectors.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryMXBean for
---     a detailed description of the memory subsystem.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryManagerMXBean
---     for more information on memory managers, and
---     java.lang.management.GarbageCollectorMXBean for more information on
---     garbage collectors.
---
------------------------------------------------------------------------
-
-jvmMemGCTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmMemGCEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Garbage Collector table provides additional information
-	 on those MemoryManagers which are also GarbageCollectors.
-	 This table extends the  jvmMemManagerTable table. The index
-	 used in the jvmMemGCTable table is imported from the
-	 jvmMemManagerTable table. If a row from the jvmMemManagerTable
-	 table is deleted, and if it has an extension in the jvmMemGCTable
-	 table, then the extension row will also be deleted.
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.GarbageCollectorMXBean"
-    ::= { jvmMemory 101 }
-
-jvmMemGCEntry OBJECT-TYPE
-    SYNTAX      JvmMemGCEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"Provide additional information on Garbage Collectors.
-
-	 Columnar objects in this table are mapped from the
-	 GarbageCollectorMXBean interface.
-
-	 See java.lang.management.GarbageCollectorMXBean
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.GarbageCollectorMXBean"
-    INDEX   { jvmMemManagerIndex }
-    ::= {jvmMemGCTable 1 }
-
-JvmMemGCEntry ::= SEQUENCE {
-        jvmMemGCCount  Counter64,
-        jvmMemGCTimeMs JvmTimeMillis64TC
-}
-
-jvmMemGCCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The total number of collections that have occurred,
-	 as returned by GarbageCollectorMXBean.getCollectionCount().
-
-	 If garbage collection statistics are not available, this
-	 object is set to 0.
-
-	 See java.lang.management.GarbageCollectorMXBean.getCollectionCount()
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.GarbageCollectorMXBean"
-    ::= { jvmMemGCEntry 2 }
-
-jvmMemGCTimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate accumulated collection elapsed time in
-	 milliseconds, since the Java virtual machine has started.
-	 This object is set to 0 if the collection elapsed time is
-	 undefined for this collector.
-
-	 See java.lang.management.GarbageCollectorMXBean.getCollectionTime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.GarbageCollectorMXBean"
-    DEFVAL { 0 }
-    ::= { jvmMemGCEntry 3 }
-
--- The JVM Memory Pool Table
---
--- The jvmMemPoolTable represent memory pool abstract entities.
--- The jvmMemPoolTable contains one row per memory pool.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryMXBean for
---     a detailed description of the memory subsystem.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryPoolMXBean
---     for more information on memory pool.
---
------------------------------------------------------------------------
---
--- We use the range jvmMemory.[110..119] for objects related to memory pools.
--- Object identifiers in the range jvmMemory.[111-119] are not used but
--- are reserved for future evolution of this MIB.
---
-jvmMemPoolTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmMemPoolEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Memory Pool Table contains the whole list of MemoryPools
-	 as returned by ManagementFactory.getMemoryPoolMXBeans().
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemory 110 }
-
-jvmMemPoolEntry OBJECT-TYPE
-    SYNTAX      JvmMemPoolEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"
-         Represents a memory pool. The pool may contain heap memory or
-         non-heap memory. A row in this table represents
-	 an instance of MemoryPoolMXBean.
-
-	 See java.lang.management.MemoryPoolMXBean
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    INDEX { jvmMemPoolIndex }
-    ::= { jvmMemPoolTable 1 }
-
-JvmMemPoolEntry ::= SEQUENCE {
-        jvmMemPoolIndex                 JvmPositive32TC,
-	jvmMemPoolName                  JvmJavaObjectNameTC,
-	jvmMemPoolType                  JvmManagedMemoryTypeTC,
-	jvmMemPoolState                 JvmValidityStateTC,
-	jvmMemPoolPeakReset             JvmTimeMillis64TC,
-
-	jvmMemPoolInitSize              JvmUnsigned64TC,
-	jvmMemPoolUsed                  JvmUnsigned64TC,
-	jvmMemPoolCommitted             JvmUnsigned64TC,
-	jvmMemPoolMaxSize               JvmUnsigned64TC,
-
-	jvmMemPoolPeakUsed              JvmUnsigned64TC,
-	jvmMemPoolPeakCommitted         JvmUnsigned64TC,
-	jvmMemPoolPeakMaxSize           JvmUnsigned64TC,
-
-	jvmMemPoolCollectUsed           JvmUnsigned64TC,
-	jvmMemPoolCollectCommitted      JvmUnsigned64TC,
-	jvmMemPoolCollectMaxSize        JvmUnsigned64TC,
-
-	jvmMemPoolThreshold             JvmUnsigned64TC,
-	jvmMemPoolThreshdCount          Counter64,
-	jvmMemPoolThreshdSupport        JvmImplSupportStateTC,
-	jvmMemPoolCollectThreshold      JvmUnsigned64TC,
-	jvmMemPoolCollectThreshdCount   Counter64,
-	jvmMemPoolCollectThreshdSupport JvmImplSupportStateTC
-
-}
-
-jvmMemPoolIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"An index value opaquely computed by the agent which uniquely
-	 identifies a row in the jvmMemPoolTable.
-
-	 The jvmMemPoolIndex index is opaquely computed by the agent,
-	 from e.g the hash code of the MemoryPool (or MemoryPool name).
-	 The agent is responsible for allocating a free index when it
-	 needs one (e.g. if two objects have the same hash, then it may
-	 increment one of the values until the conflict is resolved).
-	 As a result a manager must not depend on the value of that
-	 index across, e.g. reboot of the agent, as this value is not
-	 guaranteed to stay identical after the agent restarts.
-        "
-    ::= { jvmMemPoolEntry 1 }
-
-jvmMemPoolName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name of this memory pool, as returned by
-         MemoryPoolMXBean.getName().
-
-	 See java.lang.management.MemoryPoolMXBean.getName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 2 }
-
-jvmMemPoolType OBJECT-TYPE
-    SYNTAX      JvmManagedMemoryTypeTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The type of memory managed in this pool. This pool may be used for
-	 heap memory or non-heap memory.
-
-	 See java.lang.management.MemoryPoolMXBean.getMemoryType()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 3 }
-
-jvmMemPoolState OBJECT-TYPE
-    SYNTAX      JvmValidityStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-         Indicates whether this memory pool is valid in the Java
-         virtual machine. A memory pool becomes invalid once the
-         Java virtual machine removes it from the memory system.
-
-	 See java.lang.management.MemoryPoolMXBean.isValid()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 4 }
-
-jvmMemPoolPeakReset OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"
-        This object indicates the last time - in milliseconds - at which
-        the peak memory usage statistic of this memory pool was reset
-	to the current memory usage. This corresponds to a time stamp
-	as returned by java.lang.System.currentTimeMillis();
-
-	Setting this object to a time earlier than its current time value
-	has no effect. Setting this object to a time later than its current
-	time value causes the peak memory usage statistic of this memory
-	pool to be reset to the current memory usage. The new value of this
-	object will be the time at which the reset operation is triggered.
-
-	There could be a delay between the time at which the reset operation
-	is triggered and the time at which the actual resetting happens, so
-	this value is only indicative.
-
-	 See java.lang.management.MemoryPoolMXBean.resetPeakUsage()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 5 }
-
-
--- The object identifier arcs in the range jvmMemPoolEntry.[6-9] are
--- reserved for future evolution of this MIB.
---
--- We use the range jvmMemPoolEntry.[10..19] for objects related to this
--- pool memory usage, as returned by
---      java.lang.management.MemoryPoolMXBean.getUsage().
--- Object identifiers in the range jvmMemPoolEntry.[14..19] are not
--- used but are reserved for future evolution of this MIB.
---
-jvmMemPoolInitSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Initial size of this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getUsage().getInit()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 10 }
-
-
-jvmMemPoolUsed OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Amount of used memory in this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getUsage().getUsed()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 11 }
-
-jvmMemPoolCommitted OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Amount of committed memory in this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getUsage().getCommitted()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 12 }
-
-jvmMemPoolMaxSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Maximal size of this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getUsage().getMax()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 13 }
-
--- We use the range jvmMemPoolEntry.[20..29] for objects related to
--- this pool peak memory usage, as returned by
---      java.lang.management.MemoryPoolMXBean.getPeakUsage().
--- The object identifier arc jvmMemPoolEntry.20 which would have been
--- used for the initial size is not used because the notion of initial
--- size in the context of peak usage is meaningless.
--- Therefore, we start numbering objects at 21.
--- Object identifiers in the range jvmMemPoolEntry.[24..29] are not
--- used but are reserved for future evolution of this MIB.
---
-jvmMemPoolPeakUsed OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Amount of used memory in this memory pool when the peak usage
-	was reached.
-
-	See java.lang.management.MemoryPoolMXBean.getPeakUsage().getUsed()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 21 }
-
-jvmMemPoolPeakCommitted OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Amount of committed memory in this memory pool when the peak usage
-	was reached.
-
-	See java.lang.management.MemoryPoolMXBean.getPeakUsage().getCommitted()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 22 }
-
-jvmMemPoolPeakMaxSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-        Maximal size of this memory pool when the peak usage
-	was reached.
-
-	See java.lang.management.MemoryPoolMXBean.getPeakUsage().getMax()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 23 }
-
--- We use the range jvmMemPoolEntry.[30..39] for objects related to this
--- pool collection memory usage, as returned by
---      java.lang.management.MemoryPoolMXBean.getCollectionUsage().
--- The object identifier arc jvmMemPoolEntry.30 which would have been used
--- for the initial size is not used because the notion of initial size in the
--- context of collection usage is meaningless.
--- Therefore, we start numbering objects at 31.
--- Object identifiers in the range jvmMemPoolEntry.[34..39] are not used
--- but are reserved for future evolution of this MIB.
---
-jvmMemPoolCollectUsed OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-         The amount of used memory at the most recent time that the
-	 Java virtual machine has expended effort in recycling unused objects
-	 in this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getCollectionUsage().getUsed()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 31 }
-
-jvmMemPoolCollectCommitted OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-         The amount of committed memory at the most recent time that the
-	 Java virtual machine has expended effort in recycling unused objects
-	 in this memory pool.
-
-	 See java.lang.management.MemoryPoolMXBean.getCollectionUsage().
-            getCommitted()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 32 }
-
-jvmMemPoolCollectMaxSize OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"
-         The value of the maximum amount of memory at the most recent time
-	 that the Java virtual machine has expended effort in recycling
-	 unused objects in this memory pool.
-
-	See java.lang.management.MemoryPoolMXBean.getCollectionUsage().getMax()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-              java.lang.management.MemoryUsage"
-    ::= { jvmMemPoolEntry 33 }
-
--- Object identifiers in the range jvmMemPoolEntry.[40-109] are reserved
--- for future evolution of this MIB.
---
--- We use the range jvmMemPoolEntry.[110..119] for objects related to this
--- pool memory usage thresholds (range jvmMemPoolEntry.[10..19] was used for
--- this pool memory usage).
--- Object identifier arcs in the range jvmMemPoolEntry.[113..119] are not
--- used but are reserved for future evolution of this MIB.
---
-jvmMemPoolThreshold OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"The threshold value for the memory usage of this memory pool,
-	 in bytes. A zero value (0) indicates that no threshold value is
-         configured.
-	 When the amount of used memory crosses over this threshold
-	 value the JVM will trigger a usage memory threshold exceeded
-	 notification, and the jvmMemPoolThreshdCount increases.
-
-	 If memory usage threshold is not supported, then this object, if
-	 implemented, will always be equals to 0. In that case, attempting
-         to set this object will trigger an inconsistentValue error.
-
-	 See also jvmMemPoolThreshdSupport.
-
-	 See java.lang.management.MemoryPoolMXBean.getUsageThreshold(),
-             java.lang.management.MemoryPoolMXBean.setUsageThreshold(long),
-             java.lang.management.MemoryPoolMXBean.getUsageThresholdCount(),
-             java.lang.management.MemoryPoolMXBean.isUsageThresholdSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    DEFVAL { 0 }
-    ::= { jvmMemPoolEntry 110 }
-
-jvmMemPoolThreshdCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The number of times that the memory usage has crossed
-	 the usage threshold, as detected by the Java virtual machine.
-
-	 If memory usage threshold is not supported, then this object, if
-	 implemented, will always be equals to 0.
-
-	 See also jvmMemPoolThresholdSupport.
-
-	 See java.lang.management.MemoryPoolMXBean.getUsageThresholdCount(),
-             java.lang.management.MemoryPoolMXBean.isUsageThresholdSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 111 }
-
-jvmMemPoolThreshdSupport OBJECT-TYPE
-    SYNTAX      JvmImplSupportStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Tells whether this memory pool supports usage threshold.
-
-	 See java.lang.management.MemoryPoolMXBean.isUsageThresholdSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 112 }
-
--- Object identifiers in the range jvmMemPoolEntry.[120-129] are reserved
--- for future evolution of this MIB.
---
--- We use the range jvmMemPoolEntry.[130..139] for objects related to
--- this pool memory collection usage thresholds (range
--- jvmMemPoolEntry.[30..39] was used for this pool collection memory usage).
--- Object identifiers in the range jvmMemPoolEntry.[133..139] are not used
--- but are reserved for future evolution of this MIB.
---
-jvmMemPoolCollectThreshold OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    UNITS       "bytes"
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"The threshold value for the collection usage of this memory pool,
-	 in bytes. A zero value (0) indicates that no threshold value is
-         configured.
-	 When the amount of used memory crosses over this threshold
-	 value the JVM will trigger a collection memory threshold exceeded
-	 notification, and the jvmMemPoolCollectThreshdCount increases.
-
-	 If collection usage threshold is not supported, then this object, if
-	 implemented, will always be equals to 0. In that case, attempting
-         to set this object will trigger an inconsistentValue error.
-
-	 See also jvmMemPoolCollectThreshdSupport.
-
-	 See java.lang.management.MemoryPoolMXBean.
-                                  getCollectionUsageThreshold(),
-             java.lang.management.MemoryPoolMXBean.
-                                  setCollectionUsageThreshold(long),
-	     java.lang.management.MemoryPoolMXBean.
-	                          isCollectionUsageThresholdSupported(),
-	     java.lang.management.MemoryPoolMXBean.
-	                          getCollectionUsageThresholdCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    DEFVAL { 0 }
-    ::= { jvmMemPoolEntry 131 }
-
-jvmMemPoolCollectThreshdCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The number of times that the memory usage has crossed
-	 the collection usage threshold, as detected by the Java virtual
-	 machine.
-
-	 If memory usage threshold is not supported, then this object, if
-	 implemented, will always be equals to 0.
-
-	 See also jvmMemPoolCollectThreshdSupport.
-
-	 See java.lang.management.MemoryPoolMXBean.
-                                  getCollectionUsageThresholdCount(),
-             java.lang.management.MemoryPoolMXBean.
-                                  isCollectionUsageThresholdSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 132 }
-
-jvmMemPoolCollectThreshdSupport OBJECT-TYPE
-    SYNTAX      JvmImplSupportStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Tells whether this memory pool supports collection usage threshold.
-
-	 See java.lang.management.MemoryPoolMXBean.
-                       isCollectionUsageThresholdSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemPoolEntry 133 }
-
--- The JVM Memory Manager-Pool Relation Table
------------------------------------------------------------------------
--- The JVM Memory Pool Table
---
--- The jvmMemPoolTable represent memory pool abstract entities.
--- The jvmMemPoolTable contains one row per memory pool.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryMXBean for
---     a detailed description of the memory subsystem.
---
--- See J2SE 5.0 API Specification, java.lang.management.MemoryPoolMXBean
---     for more information on memory pool.
---
------------------------------------------------------------------------
---
--- We use the range jvmMemory.[110..119] for objects related to memory pools.
--- Object identifier arcs in the range jvmMemory.[111-119] are not used
--- but are reserved for future evolution of this MIB.
---
-
-jvmMemMgrPoolRelTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmMemMgrPoolRelEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Memory Manager-Pool Relation Table shows the
-         Memory Manager / Memory Pool relations, as returned by
-         MemoryPoolMXBean.getMemoryManagerNames() and
-         MemoryManagerMXBean.getMemoryPoolNames().
-         This table imports the indexes from the jvmMemManagerTable table
-         and jvmMemPoolTable table. The jvmMemMgrRelManagerName and
-         jvmMemMgrRelPoolName objects are not actually necessary since
-         the indexes are self-sufficient to express the relationship -
-         but the names  will make the table more understandable when displayed
-         in a management console.
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-	      java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemory 120 }
-
-jvmMemMgrPoolRelEntry OBJECT-TYPE
-    SYNTAX      JvmMemMgrPoolRelEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"A row in this table indicates that the Memory Manager identified
-         by jvmMemManagerIndex manages the Memory Pool identified by
-         jvmMemPoolIndex. Note that a pool may be managed by several
-         memory managers, and a memory manager can manage several
-         memory pool.
-
-	 See java.lang.management.MemoryManagerMXBean.getMemoryPoolNames(),
-	     java.lang.management.MemoryPoolMXBean.getMemoryManagerNames()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean,
-	      java.lang.management.MemoryManagerMXBean"
-    INDEX { jvmMemManagerIndex, jvmMemPoolIndex }
-    ::= { jvmMemMgrPoolRelTable 1 }
-
-JvmMemMgrPoolRelEntry ::= SEQUENCE {
-       jvmMemMgrRelManagerName JvmJavaObjectNameTC,
-       jvmMemMgrRelPoolName    JvmJavaObjectNameTC
-}
-
-jvmMemMgrRelManagerName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name of the memory manager.
-
-	 See java.manangement.MemoryManagerMXBean.getName();
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-	      java.lang.management.MemoryManagerMXBean"
-    ::= { jvmMemMgrPoolRelEntry 2 }
-
-jvmMemMgrRelPoolName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name of the memory pool.
-
-	 See java.manangement.MemoryPoolMXBean.getName();
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryPoolMXBean"
-    ::= { jvmMemMgrPoolRelEntry 3 }
-
-
------------------------------------------------------------------------
---
--- The JVM Thread group
---
--- A collection of objects used to monitor threads in the
--- Java Virtual Machine. These objects define the SNMP management
--- interface for the thread system of the Java virtual machine.
---
--- The jvmThreadInstanceTable represents the threads which are currently
--- alive in the system. The representation of a thread is derived from the
--- set of methods in the ThreadMXBean that return information about a
--- given thread.
---
--- See J2SE 5.0 API Specification, java.lang.management.ThreadMXBean for
---     a detailed description of the threading subsystem.
---
------------------------------------------------------------------------
-
---
------------------------------------------------------------------------
-
-jvmThreading   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 3 }
-
--- The following objects are mapped from the ThreadMXBean interface.
------------------------------------------------------------------------
-
-jvmThreadCount OBJECT-TYPE
-    SYNTAX      Gauge32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The current number of live threads.
-
-	 See java.lang.management.ThreadMXBean.getThreadCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 1 }
-
-jvmThreadDaemonCount OBJECT-TYPE
-    SYNTAX      Gauge32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The current number of daemon threads.
-
-	 See java.lang.management.ThreadMXBean.getDaemonThreadCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 2 }
-
-jvmThreadPeakCount OBJECT-TYPE
-    SYNTAX      Counter32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The peak thread count since the execution of the application.
-
-	 See java.lang.management.ThreadMXBean.getPeakThreadCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 3 }
-
-jvmThreadTotalStartedCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The total number of threads created and started since the Java
-	 Virtual Machine started.
-
-	 See java.lang.management.ThreadMXBean.getTotalStartedThreadCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 4 }
-
-jvmThreadContentionMonitoring OBJECT-TYPE
-    SYNTAX      JvmImplOptFeatureStateTC
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"The state of the Thread Contention Monitoring feature.
-         This feature can be:
-
-	 unsupported: The JVM does not support Thread Contention Monitoring.
-	 enabled    : The JVM supports Thread Contention Monitoring, and it
-	              is enabled.
-	 disabled   : The JVM supports Thread Contention Monitoring, and it
-	              is disabled.
-
-         Only enabled(3) and disabled(4) may be supplied as values to a
-         SET request. unsupported(1) can only be set internally by the
-         agent.
-
-	 When the feature is unsupported(1), any attempt to change
-	 that value will fail: trying to set this object to
-         enabled(3) or disabled(4) will result in an `inconsistentValue'
-         error. Trying to set it to any other value will result in an
-	 `wrongValue' error.
-
-	 See java.lang.management.ThreadMXBean.
-	                     isThreadContentionMonitoringSupported(),
-	     java.lang.management.ThreadMXBean.
-                             isThreadContentionMonitoringEnabled(),
-             java.lang.management.ThreadMXBean.
-                             setThreadContentionMonitoringEnabled()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 5 }
-
-jvmThreadCpuTimeMonitoring OBJECT-TYPE
-    SYNTAX      JvmImplOptFeatureStateTC
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"The state of the Thread CPU Time Monitoring feature.
-         This feature can be:
-
-	 unsupported: The JVM does not support Thread CPU Time Monitoring.
-	 enabled    : The JVM supports Thread CPU Time Monitoring, and it
-	              is enabled.
-	 disabled   : The JVM supports Thread CPU Time Monitoring, and it
-	              is disabled.
-
-         Only enabled(3) and disabled(4) may be supplied as values to a
-         SET request. unsupported(1) can only be set internally by the
-         agent.
-
-	 When the feature is unsupported(1), any attempt to change
-	 that value will fail: trying to set this object to
-         enabled(3) or disabled(4) will result in an `inconsistentValue'
-         error. Trying to set it to any other value will result in an
-	 `wrongValue' error.
-
-	 See java.lang.management.ThreadMXBean.
-	                     isThreadCpuTimeSupported(),
-	     java.lang.management.ThreadMXBean.
-                             isThreadCpuTimeEnabled(),
-             java.lang.management.ThreadMXBean.
-                             setThreadCpuTimeEnabled()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 6 }
-
-jvmThreadPeakCountReset OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-write
-    STATUS      current
-    DESCRIPTION
-	"
-        This object indicates the last time - in milliseconds - at which
-        the peak thread count was reset to the current thread count.
-	This corresponds to a time stamp as returned by
-	java.lang.System.currentTimeMillis().
-
-	Setting this object to a time earlier than its current time value
-	has no effect. Setting this object to a time later than its current
-	time value causes the peak thread count statistic to be reset to
-        the current thread count. The new value of this object will be
-        the time at which the reset operation is triggered.
-
-	There could be a delay between the time at which the reset operation
-	is triggered and the time at which the actual resetting happens, so
-	this value is only indicative.
-
-	 See java.lang.management.ThreadMXBean.resetPeakThreadCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 7 }
-
-
--- Object identifiers in the range jvmThreading.[8-10] are reserved
--- for future evolution of this MIB.
---
------------------------------------------------------------------------
--- The JVM Thread Instance Table
---
--- The jvmThreadInstanceTable represents the threads which are currently
--- alive in the system. The representation of a thread is derived from the
--- set of methods in the ThreadMXBean that return information about a
--- given thread.
---
--- See J2SE 5.0 API Specification, java.lang.management.ThreadMXBean for
---     a detailed description of the threading subsystem.
--- See also J2SE 5.0 API Specification, java.lang.management.ThreadInfo,
---     and java.lang.Thread
---
------------------------------------------------------------------------
-
-jvmThreadInstanceTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmThreadInstanceEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Thread Instance Table is built from all the methods of
-	 ThreadMXBean that take a ThreadID as parameter.
-
-	 See java.lang.management.ThreadMXBean.getAllThreadIds()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreading 10 }
-
-jvmThreadInstanceEntry OBJECT-TYPE
-    SYNTAX      JvmThreadInstanceEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"A row in this table represents a live thread.
-	 Attributes in this row are built from all the methods of
-	 ThreadMXBean that take a ThreadID as parameter.
-
-	 See java.lang.management.ThreadMXBean
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    INDEX { jvmThreadInstIndex }
-    ::= { jvmThreadInstanceTable 1 }
-
-JvmThreadInstanceEntry ::= SEQUENCE {
-        jvmThreadInstIndex            JvmIndex64TC,
-	jvmThreadInstId               JvmUnsigned64TC,
-	jvmThreadInstState            JvmThreadStateTC,
-        jvmThreadInstBlockCount       Counter64,
-        jvmThreadInstBlockTimeMs      JvmTimeMillis64TC,
-        jvmThreadInstWaitCount        Counter64,
-        jvmThreadInstWaitTimeMs       JvmTimeMillis64TC,
-        jvmThreadInstCpuTimeNs        JvmTimeNanos64TC,
-	jvmThreadInstLockName         JvmJavaObjectNameTC,
-	jvmThreadInstLockOwnerPtr     RowPointer,
-	jvmThreadInstName             JvmJavaObjectNameTC
-}
-
-jvmThreadInstIndex OBJECT-TYPE
-    SYNTAX      JvmIndex64TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"An index uniquely identifying a live thread, and directly
-         derived from the value of jvmThreadInstId. The jvmThreadInstId
-	 cannot be used directly as index in the table, because integer
-	 indexes cannot exceed an unsigned 32 int.
-
-	 The jvmThreadInstIndex index is an 8 byte octet string as
-         defined by the JvmIndex64TC TEXTUAL-CONVENTION. Its value is
-         directly derived from the value of the corresponding ThreadID
-         returned by jvmThreadInstId.
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean, java.lang.Thread"
-    ::= { jvmThreadInstanceEntry 1 }
-
-jvmThreadInstId OBJECT-TYPE
-    SYNTAX      JvmUnsigned64TC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The thread ID, as returned by Thread.getId().
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getThreadId()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean, java.lang.Thread"
-    ::= { jvmThreadInstanceEntry 2 }
-
-jvmThreadInstState OBJECT-TYPE
-    SYNTAX      JvmThreadStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The state of this thread instance.
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getThreadState()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 3 }
-
-jvmThreadInstBlockCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The total number of times that this thread has blocked to enter
-         or re-enter a monitor..
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getBlockedCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 4 }
-
-jvmThreadInstBlockTimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate accumulated elapsed time (in millisecond)
-	 that a thread has blocked to enter or re-enter a monitor since
-         it has started - or since thread contention monitoring was
-	 enabled.
-
-	 This object is always set to 0 if thread contention monitoring
-	 is disabled or not supported.
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getBlockedTime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 5 }
-
-jvmThreadInstWaitCount OBJECT-TYPE
-    SYNTAX      Counter64
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The total number of times that this thread has waited for
-         notification.
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getWaitedCount()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 6 }
-
-jvmThreadInstWaitTimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate accumulated elapsed time (in millisecond)
-	 that a thread has waited on a monitor through a
-         java.lang.Object.wait method since it has started - or since
-	 thread contention monitoring wasenabled.
-
-	 This object is always set to 0 if thread contention monitoring
-	 is disabled or not supported.
-
-	 See java.lang.management.ThreadMXBean.getThreadInfo(long,boolean).
-	                          getWaitedTime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 7 }
-
-jvmThreadInstCpuTimeNs OBJECT-TYPE
-    SYNTAX      JvmTimeNanos64TC
-    UNITS       "nanoseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate accumulated CPU time (in nanosecond) for a thread
-         since it has started - or since thread CPU time monitoring was
-	 enabled.
-
-	 If the thread of the specified ID is not alive or does not exist,
-	 or the CPU time measurement is disabled or not supported,
-	 this object is set to 0.
-
-	 See java.lang.management.ThreadMXBean.getThreadCpuTime(long),
-	     java.lang.management.ThreadMXBean.isThreadCpuTimeSupported(),
-	     java.lang.management.ThreadMXBean.isThreadCpuTimeEnabled()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean"
-    ::= { jvmThreadInstanceEntry 8 }
-
-jvmThreadInstName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"This thread name - as returned by Thread.getThreadName().
-
-	 See java.lang.management.ThreadInfo.getThreadName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean,
-              java.lang.management.ThreadInfo"
-    ::= { jvmThreadInstanceEntry 9 }
-
-jvmThreadInstLockName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The string representation of the monitor lock that this thread
-	 is blocked to enter or waiting to be notified through the
-	 Object.wait method.
-
-	 See J2SE 5.0 API Specification,
-             java.lang.management.ThreadInfo.getLockName()
-         for more information on the format of this string.
-
-	 If this thread is not blocked then a zero-length string is returned.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the JvmJavaObjectNameTC
-	 (1023 bytes max).
-
-	 See java.lang.management.ThreadInfo.getLockName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean,
-              java.lang.management.ThreadInfo"
-    ::= { jvmThreadInstanceEntry 10 }
-
-jvmThreadInstLockOwnerPtr OBJECT-TYPE
-    SYNTAX      RowPointer
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"A pointer to the thread which owns the monitor of the
-	 object on which this thread instance is blocked.
-         This object will point to jvmThreadInstId of the
-	 lock owner thread.
-
-	 If this thread is not blocked then 0.0 is returned.
-
-	 See java.lang.management.ThreadInfo.getLockOwnerId()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.ThreadMXBean,
-              java.lang.management.ThreadInfo"
-    ::= { jvmThreadInstanceEntry 11 }
-
------------------------------------------------------------------------
---
--- The JVM Runtime group
---
--- A collection of objects used to monitor the Java Virtual Machine
--- Runtime. These objects define the SNMP management interface for the
--- runtime system of the Java virtual machine.
---
--- The JVM Runtime group defines object mapped from the
--- java.lang.management.RuntimeMXBean interface.
---
--- See J2SE 5.0 API Specification, java.lang.management.RuntimeMXBean for
---     a detailed description of the runtime system.
---
------------------------------------------------------------------------
-
-jvmRuntime   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 4 }
-
--- The following objects are mapped from the RuntimeMXBean interface.
------------------------------------------------------------------------
-
-jvmRTName OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name representing the running Java virtual machine.
-
-	 Note that the SNMP agent may have to truncate the name returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 1 }
-
-jvmRTVMName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine implementation name.
-
-	 See java.lang.management.RuntimeMXBean.getVmName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 2 }
-
-jvmRTVMVendor OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine implementation vendor.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getVmVendor()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 3 }
-
-jvmRTVMVersion OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine implementation version.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getVmVersion()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 4 }
-
-jvmRTSpecName OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine specification name.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getSpecName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 5 }
-
-jvmRTSpecVendor OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine specification vendor.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-         See java.lang.management.RuntimeMXBean.getSpecVendor()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 6 }
-
-jvmRTSpecVersion OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The Java virtual machine specification version.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-         See java.lang.management.RuntimeMXBean.getSpecVersion()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 7 }
-
-jvmRTManagementSpecVersion OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The version of the management specification for the Java virtual
-	 machine implementation.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-         See java.lang.management.RuntimeMXBean.getManagementSpecVersion()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 8 }
-
-jvmRTBootClassPathSupport OBJECT-TYPE
-    SYNTAX      JvmImplSupportStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Indicates whether the Java virtual machine supports the
-	 boot class path mechanism used by the bootstrap class loader
-         to search for class files.
-
-	 See java.lang.management.RuntimeMXBean.isBootClassPathSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 9 }
-
-jvmRTInputArgsCount OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The number of input arguments passed to the Java Virtual Machine.
-
-	 See java.lang.management.RuntimeMXBean.getInputArguments()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 10 }
-
-jvmRTUptimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Uptime of the Java virtual machine, in milliseconds. This is
-         equivalent to ( System.currentTimeMillis() - jvmStartTimeMs ).
-
-         See also jvmRTStartTimeMs.
-
-         See java.lang.management.RuntimeMXBean.getUptime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 11 }
-
-jvmRTStartTimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The approximate time when the Java virtual machine started, in
-         milliseconds. This is a time stamp as returned by
-         System.currentTimeMillis(). This time will not change unless
-         the Java Virtual Machine is restarted.
-
-         See also jvmRTUptimeMs.
-
-         See java.lang.management.RuntimeMXBean.getStartTime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 12 }
-
-
--- Object identifiers in the range jvmRuntime.[13-19] are reserved
--- for future evolution of this MIB.
---
------------------------------------------------------------------------
---
--- The JVM Input Argument Table
---
--- The jvmRTInputArgsTable contains one row per input argument given on
--- the Java command line.
---
--- See J2SE 5.0 API Specification,
---     java.lang.management.RuntimeMXBean.getInputArguments()
---     for more information.
------------------------------------------------------------------------
-
-jvmRTInputArgsTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmRTInputArgsEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The Input Argument Table lists the input arguments passed
-	 to the Java Virtual Machine.
-
-	 The jvmRTInputArgsIndex is the index of the argument in
-	 the array returned by RuntimeMXBean.getInputArguments().
-
-	 See java.lang.management.RuntimeMXBean.getInputArguments()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 20 }
-
-jvmRTInputArgsEntry OBJECT-TYPE
-    SYNTAX      JvmRTInputArgsEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"Represent an input argument passed to the Java Virtual Machine.
-
-	 See java.lang.management.RuntimeMXBean.getInputArguments()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    INDEX { jvmRTInputArgsIndex }
-    ::= { jvmRTInputArgsTable 1 }
-
-JvmRTInputArgsEntry ::= SEQUENCE {
-        jvmRTInputArgsIndex JvmPositive32TC,
-	jvmRTInputArgsItem  JvmArgValueTC
-}
-
-jvmRTInputArgsIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The index of the input argument, as in the array returned
-	 by RuntimeMXBean.getInputArguments().
-
-	 See java.lang.management.RuntimeMXBean.getInputArguments()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTInputArgsEntry 1 }
-
-jvmRTInputArgsItem OBJECT-TYPE
-    SYNTAX      JvmArgValueTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"An input argument at index jvmRTInputArgsIndex, as in the array
-	 returned by RuntimeMXBean.getInputArguments().
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the JvmArgValueTC
-         (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getInputArguments()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTInputArgsEntry 2 }
-
-
------------------------------------------------------------------------
---
--- The JVM Boot Class Path Table
---
--- The jvmRTBootClassPathTable contains one row per path element in the
--- bootclasspath. This table may not be implemented (or may be empty) if
--- the bootclasspath feature is not supported by the underlying
--- implementation.
---
--- See J2SE 5.0 API Specification,
---     java.lang.management.RuntimeMXBean.getBootClassPath()
---     java.lang.management.RuntimeMXBean.isBootClassPathSupported()
---     for more information.
------------------------------------------------------------------------
-
-jvmRTBootClassPathTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmRTBootClassPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The boot class path that is used by the bootstrap class loader
-	 to search for a class file for loading.
-
-	 Note that the SNMP agent may have to truncate the bootclasspath
-	 elements contained in the string returned by the underlying API
-	 if it does not fit in the JvmPathElementTC (1023 bytes max).
-
-	 This table is not implemented (or empty) if jvmRTBootClassPathSupport
-         is unsupported(1).
-
-	 See java.lang.management.RuntimeMXBean.getBootClassPath()
-	     java.lang.management.RuntimeMXBean.isBootClassPathSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 21 }
-
-jvmRTBootClassPathEntry OBJECT-TYPE
-    SYNTAX      JvmRTBootClassPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"Represent a path element in the Java Virtual Machine bootclasspath.
-
-	 See java.lang.management.RuntimeMXBean.getBootClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    INDEX { jvmRTBootClassPathIndex }
-    ::= { jvmRTBootClassPathTable 1 }
-
-JvmRTBootClassPathEntry ::= SEQUENCE {
-        jvmRTBootClassPathIndex JvmPositive32TC,
-	jvmRTBootClassPathItem  JvmPathElementTC
-}
-
-jvmRTBootClassPathIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The index of the path element, as in the array obtained
-	 by splitting RuntimeMXBean.getBootClassPath() in its elementary path
-	 constituents.
-
-	 See java.lang.management.RuntimeMXBean.getBootClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTBootClassPathEntry 1 }
-
-jvmRTBootClassPathItem OBJECT-TYPE
-    SYNTAX      JvmPathElementTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"An path element at index jvmRTBootClassPathIndex, as in the
-	 array obtained by splitting RuntimeMXBean.getBootClassPath() in
-	 its elementary path constituents.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the JvmPathElementTC
-	 (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getBootClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTBootClassPathEntry 2 }
-
------------------------------------------------------------------------
---
--- The JVM Class Path Table
---
--- The jvmRTClassPathTable contains one row per path element in the
--- classpath.
---
--- See J2SE 5.0 API Specification,
---     java.lang.management.RuntimeMXBean.getClassPath()
---     for more information.
------------------------------------------------------------------------
-
-jvmRTClassPathTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmRTClassPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The  class path that is used by the system class loader
-	 to search for a class file.
-
-	 Note that the SNMP agent may have to truncate the classpath
-	 elements contained in the string returned by the underlying API
-	 if it does not fit in the JvmPathElementTC (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 22 }
-
-jvmRTClassPathEntry OBJECT-TYPE
-    SYNTAX      JvmRTClassPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"Represent a path element in the Java Virtual Machine classpath.
-
-	 See java.lang.management.RuntimeMXBean.getClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    INDEX { jvmRTClassPathIndex }
-    ::= { jvmRTClassPathTable 1 }
-
-JvmRTClassPathEntry ::= SEQUENCE {
-        jvmRTClassPathIndex JvmPositive32TC,
-	jvmRTClassPathItem  JvmPathElementTC
-}
-
-jvmRTClassPathIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The index of the path element, as in the array obtained
-	 by splitting RuntimeMXBean.getClassPath() in its elementary
-	 path constituents.
-
-	 See java.lang.management.RuntimeMXBean.getClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTClassPathEntry 1 }
-
-jvmRTClassPathItem OBJECT-TYPE
-    SYNTAX      JvmPathElementTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"An path element at index jvmRTClassPathIndex, as in the array
-	 obtained by splitting RuntimeMXBean.getClassPath() in its elementary
-	 path constituents.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the JvmPathElementTC
-	 (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getClassPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTClassPathEntry 2 }
-
------------------------------------------------------------------------
---
--- The JVM Library Path Table
---
--- The jvmRTLibraryPathTable contains one row per path element in the
--- librarypath.
---
--- See J2SE 5.0 API Specification,
---     java.lang.management.RuntimeMXBean.getLibraryPath()
---     for more information.
------------------------------------------------------------------------
-
-jvmRTLibraryPathTable OBJECT-TYPE
-    SYNTAX      SEQUENCE OF JvmRTLibraryPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The  library path.
-
-	 Note that the SNMP agent may have to truncate the librarypath
-	 elements contained in the string returned by the underlying API
-	 if it does not fit in the JvmPathElementTC (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getLibraryPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRuntime 23 }
-
-jvmRTLibraryPathEntry OBJECT-TYPE
-    SYNTAX      JvmRTLibraryPathEntry
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"Represent a path element in the Java Virtual Machine librarypath.
-
-	 See java.lang.management.RuntimeMXBean.getLibraryPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    INDEX { jvmRTLibraryPathIndex }
-    ::= { jvmRTLibraryPathTable 1 }
-
-JvmRTLibraryPathEntry ::= SEQUENCE {
-        jvmRTLibraryPathIndex JvmPositive32TC,
-	jvmRTLibraryPathItem  JvmPathElementTC
-}
-
-jvmRTLibraryPathIndex OBJECT-TYPE
-    SYNTAX      JvmPositive32TC
-    MAX-ACCESS  not-accessible
-    STATUS      current
-    DESCRIPTION
-	"The index of the path element, as in the array obtained
-	 by splitting RuntimeMXBean.getLibraryPath() in its elementary
-	 constituents.
-
-	 See java.lang.management.RuntimeMXBean.getLibraryPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTLibraryPathEntry 1 }
-
-jvmRTLibraryPathItem OBJECT-TYPE
-    SYNTAX      JvmPathElementTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"An path element at index jvmRTLibraryPathIndex, as in the array
-	 obtained by splitting RuntimeMXBean.getLibraryPath() in its elementary
-	 path constituents.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the JvmPathElementTC
-	 (1023 bytes max).
-
-	 See java.lang.management.RuntimeMXBean.getLibraryPath()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.RuntimeMXBean"
-    ::= { jvmRTLibraryPathEntry 2 }
-
------------------------------------------------------------------------
---
--- The JVM Compilation group
---
--- A collection of objects used to monitor the Java Virtual Machine
--- Runtime Compiler (JIT). These objects define the SNMP management
--- interface for the compilation system of the Java virtual machine.
---
--- The JVM Compilation group defines object mapped from the
--- java.lang.management.CompilationMXBean interface.
---
--- See J2SE 5.0 API Specification, java.lang.management.CompilationMXBean for
---     a detailed description of the runtime system.
---
------------------------------------------------------------------------
-
-jvmCompilation   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 5 }
-
--- The following objects are mapped from the CompilationMXBean interface.
------------------------------------------------------------------------
-
-jvmJITCompilerName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The name of the Just-in-time (JIT) compiler.
-
-	 See java.lang.management.CompilationMXBean.getName()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.CompilationMXBean"
-    ::= { jvmCompilation 1 }
-
-jvmJITCompilerTimeMs OBJECT-TYPE
-    SYNTAX      JvmTimeMillis64TC
-    UNITS       "milliseconds"
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Gets the approximate accumulated elapsed time (in milliseconds)
-	 spent in compilation since the Java virtual machine has started.
-	 If multiple threads are used for compilation, this value is
-	 the summation of the approximate time that each thread
-	 spent in compilation.
-
-	 If compiler time monitoring is not supported, then this object
-	 remains set to 0.
-
-	 See java.lang.management.CompilationMXBean.getTotalCompilationTime()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.CompilationMXBean"
-    ::= { jvmCompilation 2 }
-
-
-jvmJITCompilerTimeMonitoring OBJECT-TYPE
-    SYNTAX      JvmImplSupportStateTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"Indicates whether the Java virtual machine supports
-	 compilation time monitoring.
-
-	 See java.lang.management.CompilationMXBean.
-                             isCompilationTimeMonitoringSupported()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.CompilationMXBean"
-    ::= { jvmCompilation 3 }
-
------------------------------------------------------------------------
---
--- The JVM Operating System group
---
--- A collection of objects used to monitor some resource of the
--- Operating System the Java Virtual Machine is running on. These objects
--- define the SNMP management interface offered by the Java virtual machine
--- for the operating system on which it is running.
---
--- The JVM Operating System group defines object mapped from the
--- java.lang.management.OperatingSystemMXBean interface.
---
--- See J2SE 5.0 API Specification, java.lang.management.OperatingSystemMXBean
---     for a detailed description of the operating system.
---
------------------------------------------------------------------------
-
-jvmOS   OBJECT IDENTIFIER ::= { jvmMgtMIBObjects 6 }
-
--- The following objects are mapped from the OperatingSystemMXBean interface.
------------------------------------------------------------------------
-
-jvmOSName OBJECT-TYPE
-    SYNTAX      JvmJavaObjectNameTC
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The operating system name.
-
-	 See java.lang.management.OperatingSystemMXBean.getName()
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.OperatingSystemMXBean"
-    ::= { jvmOS 1 }
-
-jvmOSArch OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The operating system architecture.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.OperatingSystemMXBean.getArch()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.OperatingSystemMXBean"
-    ::= { jvmOS 2 }
-
-jvmOSVersion OBJECT-TYPE
-    SYNTAX      DisplayString
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The operating system version.
-
-	 Note that the SNMP agent may have to truncate the string returned
-         by the underlying API if it does not fit in the DisplayString
-	 (255 bytes max).
-
-	 See java.lang.management.OperatingSystemMXBean.getVersion()
-	"
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.OperatingSystemMXBean"
-    ::= { jvmOS 3 }
-
-jvmOSProcessorCount OBJECT-TYPE
-
-    SYNTAX      Integer32
-    MAX-ACCESS  read-only
-    STATUS      current
-    DESCRIPTION
-	"The number of processors available to the Java virtual machine.
-
-         See java.lang.management.OperatingSystemMXBean.getAvailableProcessors()
-        "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.OperatingSystemMXBean"
-    ::= { jvmOS 4 }
-
---
--- NOTIFICATIONS
---
------------------------------------------------------------------------
-
---
--- Low Memory Notifications
---
-
-jvmMgtMIBMemoryNotifs    OBJECT IDENTIFIER ::= { jvmMgtMIBNotifications 2 }
-jvmMgtMIBLowMemoryNotifs OBJECT IDENTIFIER ::= { jvmMgtMIBMemoryNotifs  1 }
-
-jvmLowMemoryPrefix OBJECT IDENTIFIER
-    ::= { jvmMgtMIBLowMemoryNotifs 0 }
-
--- Not used at this time, but reserved for future evolution of this MIB:
---
--- jvmLowMemoryData OBJECT IDENTIFIER
---    ::= { jvmMgtMIBLowMemoryNotifs 1 }
---
-
-jvmLowMemoryPoolUsageNotif NOTIFICATION-TYPE
-    OBJECTS {  jvmMemPoolName, jvmMemPoolUsed, jvmMemPoolThreshdCount }
-    STATUS current
-    DESCRIPTION
-           "This notification is sent when the memory usage threshold of
-	    a memory pool is exceeded.
-           "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryNotification,
-	      java.lang.management.MemoryPoolMXBean"
-    ::= { jvmLowMemoryPrefix  1 }
-
-jvmLowMemoryPoolCollectNotif NOTIFICATION-TYPE
-    OBJECTS {  jvmMemPoolName, jvmMemPoolCollectUsed,
-               jvmMemPoolCollectThreshdCount }
-    STATUS current
-    DESCRIPTION
-           "This notification is sent when the collection memory usage
-	    threshold of a memory pool is exceeded.
-           "
-    REFERENCE "J2SE 5.0 API Specification,
-              java.lang.management.MemoryNotification,
-	      java.lang.management.MemoryPoolMXBean"
-    ::= { jvmLowMemoryPrefix  2 }
-
---
--- Conformance Section
---
------------------------------------------------------------------------
-
--- conformance information
-
-jvmMgtMIBCompliances
-               OBJECT IDENTIFIER ::= { jvmMgtMIBConformance 1 }
-jvmMgtMIBGroups
-               OBJECT IDENTIFIER ::= { jvmMgtMIBConformance 2 }
-
-
--- compliance statements
-
-jvmManagementCompliance MODULE-COMPLIANCE
-    STATUS  current
-    DESCRIPTION
-            "The compliance statement for SNMP entities which
-            implement this MIB."
-    MODULE  -- this module
-    MANDATORY-GROUPS {
-                     jvmClassLoadingBasicGroup,
-		     jvmClassLoadingSetGroup,
-		     jvmMemoryBasicGroup,
-		     jvmMemoryHeapUsageGroup,
-		     jvmMemoryNonHeapUsageGroup,
-		     jvmMemorySetGroup,
-		     jvmMemManagerGroup,
-		     jvmMemGCGroup,
-		     jvmMemPoolBasicGroup,
-		     jvmMemPoolUsageGroup,
-		     jvmMemPoolPeakUsageGroup,
-		     jvmMemPoolCollectUsageGroup,
-		     jvmMemMgrPoolRelationGroup,
-		     jvmThreadBasicGroup,
-		     jvmThreadInstanceBasicGroup,
-		     jvmRuntimeBasicGroup,
-		     jvmOSGroup
-    }
-
-    -- optional/conditional groups
-    GROUP  jvmMemPoolMonitoringGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support low memory detection in memory usage.
-	    "
-    GROUP  jvmMemPoolCollectMonitoringGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support low memory detection in collection
-	     memory usage.
-	    "
-    GROUP  jvmLowMemoryUsageNotifGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support low memory usage detection.
-	    "
-    GROUP  jvmLowMemoryCollectNotifGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support low collection memory usage detection.
-	    "
-    GROUP  jvmThreadInstanceCpuGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support CPU time measurement for other threads.
-	    "
-    GROUP  jvmThreadInstanceBlockGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine does not support thread contention monitoring.
-	    "
-    GROUP  jvmRuntimeBootCPGroup
-        DESCRIPTION
-            "This group may not be implemented if the underlying
-	     implementation does not support the bootclasspath feature.
-            "
-    GROUP  jvmJITCompilerBasicGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine has no compilation system.
-	    "
-    GROUP  jvmJITCompilerTimeStatGroup
-        DESCRIPTION
-            "This group may not be implemented if the Java virtual
-             machine has no compilation system, or does not support
-             JIT Compiler time statistics.
-	    "
-    ::= { jvmMgtMIBCompliances 1 }
-
-
--- units of conformance
-
-jvmClassLoadingGroups OBJECT IDENTIFIER ::= { jvmMgtMIBGroups 1 }
-
-jvmClassLoadingBasicGroup  OBJECT-GROUP
-    OBJECTS {
-             jvmClassesLoadedCount,
-	     jvmClassesTotalLoadedCount,
-	     jvmClassesUnloadedCount
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of  objects that are mapped from JSR 163
-	 java.lang.management.ClassLoadingMXBean interface.
-        "
-    ::= { jvmClassLoadingGroups 1 }
-
-jvmClassLoadingSetGroup  OBJECT-GROUP
-    OBJECTS {
-             jvmClassesVerboseLevel
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of writable scalar objects that are mapped from JSR 163
-	 java.lang.management.ClassLoadingMXBean interface, and make it possible
-	 to act on class loading. Accessing these objects may
-	 require special permissions - the agent implementation is
-	 responsible for puting in place the appropriate access control
-	 if needed.
-        "
-    ::= { jvmClassLoadingGroups 2 }
-
-jvmMemoryGroups OBJECT IDENTIFIER ::= { jvmMgtMIBGroups 2 }
-
-jvmMemoryBasicGroup  OBJECT-GROUP
-    OBJECTS {
-             jvmMemoryPendingFinalCount
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.MemoryManagerMXBean interface.
-        "
-    ::= { jvmMemoryGroups 1 }
-
-jvmMemoryHeapUsageGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemoryHeapInitSize,
-	     jvmMemoryHeapUsed,
-	     jvmMemoryHeapCommitted,
-	     jvmMemoryHeapMaxSize
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.MemoryMXBean.getHeapMemoryUsage().
-	 When several of these objects are requested within a single
-	 SNMP request, the agent must ensure that
-         java.lang.management.MemoryPoolMXBean.getHeapMemoryUsage() is
-	 called only once, in order to guarantee that the set of
-	 values returned for these objects remain coherent and give
-	 a consistent snapshot of the heap memory usage made by
-	 Heap Memory Pools.
-        "
-    ::= { jvmMemoryGroups 2 }
-
-jvmMemoryNonHeapUsageGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemoryNonHeapInitSize,
-	     jvmMemoryNonHeapUsed,
-	     jvmMemoryNonHeapCommitted,
-	     jvmMemoryNonHeapMaxSize
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.MemoryMXBean.getNonHeapMemoryUsage().
-	 When several of these objects are requested within a single
-	 SNMP request, the agent must ensure that
-         java.lang.management.MemoryPoolMXBean.getNonHeapMemoryUsage() is
-	 called only once, in order to guarantee that the set of
-	 values returned for these objects remain coherent and give
-	 a consistent snapshot of the non heap memory usage made by
-	 Non Heap Memory Pools.
-        "
-    ::= { jvmMemoryGroups 3 }
-
-jvmMemorySetGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemoryGCVerboseLevel,
-	     jvmMemoryGCCall
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of writable scalar objects that are mapped from JSR 163
-	 java.lang.management.MemoryMXBean interface, and make it possible
-	 to act on the Garbage Collector. Accessing these objects may
-	 require special permissions - the agent implementation is
-	 responsible for puting in place the appropriate access control
-	 if needed.
-        "
-    ::= { jvmMemoryGroups 4 }
-
-jvmMemManagerGroup  OBJECT-GROUP
-    OBJECTS {
-	     jvmMemManagerName,
-	     jvmMemManagerState
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.MemoryManagerMXBean interface.
-        "
-    ::= { jvmMemoryGroups 5 }
-
-jvmMemGCGroup  OBJECT-GROUP
-    OBJECTS {
-             jvmMemGCCount,
-             jvmMemGCTimeMs
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.GarbageCollectorMXBean interface, and are
-	 specific to GarbageCollector MXBeans.
-	 These objects are used to model the inheritence link between
-	 GarbageCollectorMXBean and its super interface - MemoryManagerMXBean.
-        "
-    ::= { jvmMemoryGroups 6 }
-
-jvmMemPoolGroups OBJECT IDENTIFIER ::= { jvmMemoryGroups 7 }
-
-jvmMemPoolBasicGroup  OBJECT-GROUP
-    OBJECTS {
-	     jvmMemPoolName,
-	     jvmMemPoolType,
-	     jvmMemPoolState,
-	     jvmMemPoolPeakReset,
-	     jvmMemPoolThreshdSupport,
-	     jvmMemPoolCollectThreshdSupport
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean interface.
-        "
-    ::= { jvmMemPoolGroups 1 }
-
-jvmMemPoolMonitoringGroup OBJECT-GROUP
-     OBJECTS {
-	     jvmMemPoolThreshold,
-	     jvmMemPoolThreshdCount
-     }
-    STATUS current
-    DESCRIPTION
-	"Memory usage threshold objects mapped from
-	 JSR 163 java.lang.management.MemoryPoolMXBean interface, which makes
-	 it possible to configure low memory detection.
-	 Accessing this object may require special permissions - the agent
-	 implementation is responsible for puting in place the appropriate
-	 access control if needed.
-        "
-    ::= { jvmMemPoolGroups 2 }
-
-jvmMemPoolUsageGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemPoolInitSize,
-	     jvmMemPoolUsed,
-	     jvmMemPoolCommitted,
-	     jvmMemPoolMaxSize
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean.getUsage().
-	 When several of these objects are requested within a single
-	 SNMP request, the agent must ensure that
-         java.lang.management.MemoryPoolMXBean.getUsage() is
-	 called only once, in order to guarantee that the set of
-	 values returned for these objects remain coherent and give
-	 a consistent snapshot of the memory used by this Memory
-	 Pool.
-        "
-    ::= { jvmMemPoolGroups 3 }
-
-jvmMemPoolPeakUsageGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemPoolPeakUsed,
-	     jvmMemPoolPeakCommitted,
-	     jvmMemPoolPeakMaxSize
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean.getPeakUsage().
-	 When several of these objects are requested within a single
-	 SNMP request, the agent must ensure that
-         java.lang.management.MemoryPoolMXBean.getPeakUsage() is
-	 called only once, in order to guarantee that the set of
-	 values returned for these objects remain coherent and give
-	 a consistent snapshot of the peak memory usage made by
-	 this Memory Pool.
-        "
-    ::= { jvmMemPoolGroups 4 }
-
-jvmMemPoolCollectUsageGroup OBJECT-GROUP
-    OBJECTS {
-             jvmMemPoolCollectUsed,
-	     jvmMemPoolCollectCommitted,
-	     jvmMemPoolCollectMaxSize
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean.getCollectionUsage().
-	 When several of these objects are requested within a single
-	 SNMP request, the agent must ensure that
-         java.lang.management.MemoryPoolMXBean.getCollectionUsage() is
-	 called only once, in order to guarantee that the set of
-	 values returned for these objects remain coherent and give
-	 a consistent snapshot of the collection memory usage made by
-	 this Memory Pool.
-        "
-    ::= { jvmMemPoolGroups 5 }
-
-jvmMemPoolCollectMonitoringGroup OBJECT-GROUP
-     OBJECTS {
-	     jvmMemPoolCollectThreshold,
-	     jvmMemPoolCollectThreshdCount
-     }
-    STATUS current
-    DESCRIPTION
-	"Memory collection usage threshold objects mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean interface, which makes
-	 it possible to configure low memory detection.
-	 Accessing this object may require special permissions - the agent
-	 implementation is responsible for putting in place the appropriate
-	 access control if needed.
-        "
-    ::= { jvmMemPoolGroups 6 }
-
-
-jvmMemMgrPoolRelationGroup  OBJECT-GROUP
-    OBJECTS {
-             jvmMemMgrRelManagerName,
-	     jvmMemMgrRelPoolName
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.MemoryPoolMXBean and
-         java.lang.management.MemoryManagerMXBean interface, and show the
-	 relationship between Memory Managers and Memory Pools.
-        "
-    ::= { jvmMemoryGroups 8 }
-
-jvmThreadGroups OBJECT IDENTIFIER ::= { jvmMgtMIBGroups 3 }
-
-jvmThreadBasicGroup OBJECT-GROUP
-    OBJECTS {
-             jvmThreadCount,
-	     jvmThreadDaemonCount,
-	     jvmThreadPeakCount,
-	     jvmThreadTotalStartedCount,
-	     jvmThreadContentionMonitoring,
-	     jvmThreadCpuTimeMonitoring,
-	     jvmThreadPeakCountReset
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of scalar objects that are mapped from JSR 163
-	 java.lang.management.ThreadMXBean interface.
-        "
-    ::= { jvmThreadGroups 1 }
-
-jvmThreadInstanceGroups OBJECT IDENTIFIER ::= { jvmThreadGroups 2 }
-
-jvmThreadInstanceBasicGroup OBJECT-GROUP
-    OBJECTS {
-	     jvmThreadInstId,
-	     jvmThreadInstState,
-	     jvmThreadInstName,
-	     jvmThreadInstLockName,
-	     jvmThreadInstLockOwnerPtr
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.ThreadMXBean interface, and are
-	 relative to an instance of java.lang.Thread.
-        "
-    ::= { jvmThreadInstanceGroups 1}
-
-jvmThreadInstanceCpuGroup OBJECT-GROUP
-    OBJECTS {
-	     jvmThreadInstCpuTimeNs
-    }
-    STATUS current
-    DESCRIPTION
-	"A columnar object mapped from JSR 163
-	 java.lang.management.ThreadMXBean interface which provides CPU
-	 time statistics about an instance of java.lang.Thread.
-        "
-    ::= { jvmThreadInstanceGroups 2 }
-
-
-jvmThreadInstanceBlockGroup OBJECT-GROUP
-    OBJECTS {
-	     jvmThreadInstBlockCount,
-	     jvmThreadInstBlockTimeMs,
-	     jvmThreadInstWaitCount,
-	     jvmThreadInstWaitTimeMs
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of columnar objects that are mapped from JSR 163
-	 java.lang.management.ThreadMXBean interface, and which provide
-         synchronization statistics about an instance of java.lang.Thread.
-        "
-    ::= { jvmThreadInstanceGroups 3 }
-
-
-jvmRuntimeGroups OBJECT IDENTIFIER ::= { jvmMgtMIBGroups 4 }
-
-jvmRuntimeBasicGroup OBJECT-GROUP
-    OBJECTS {
-             jvmRTName,
-	     jvmRTVMName,
-	     jvmRTVMVendor,
-	     jvmRTVMVersion,
-	     jvmRTSpecName,
-	     jvmRTSpecVendor,
-	     jvmRTSpecVersion,
-	     jvmRTManagementSpecVersion,
-	     jvmRTUptimeMs,
-	     jvmRTStartTimeMs,
-	     jvmRTBootClassPathSupport,
-	     jvmRTInputArgsCount,
-	     jvmRTInputArgsItem,
-	     jvmRTClassPathItem,
-	     jvmRTLibraryPathItem
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.RuntimeMXBean interface.
-        "
-    ::= { jvmRuntimeGroups 1 }
-
-
-jvmRuntimeBootCPGroup OBJECT-GROUP
-    OBJECTS {
-	     jvmRTBootClassPathItem
-    }
-    STATUS current
-    DESCRIPTION
-	"A columnar object that is mapped from JSR 163
-	 java.lang.management.RuntimeMXBean.getBootClassPath() interface,
-	 and provide information about bootclasspath elements.
-        "
-    ::= { jvmRuntimeGroups 2 }
-
-jvmJITCompilerGroups OBJECT IDENTIFIER ::= { jvmMgtMIBGroups 5 }
-
-jvmJITCompilerBasicGroup OBJECT-GROUP
-    OBJECTS {
-             jvmJITCompilerName,
-             jvmJITCompilerTimeMonitoring
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.CompilationMXBean interface.
-        "
-    ::= { jvmJITCompilerGroups 1 }
-
-jvmJITCompilerTimeStatGroup OBJECT-GROUP
-    OBJECTS {
-             jvmJITCompilerTimeMs
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.CompilationMXBean interface and provide
-	 time statistic about the JIT Compiler.
-        "
-    ::= { jvmJITCompilerGroups 2 }
-
-jvmOSGroup OBJECT-GROUP
-    OBJECTS {
-             jvmOSName,
-	     jvmOSArch,
-	     jvmOSVersion,
-	     jvmOSProcessorCount
-    }
-    STATUS current
-    DESCRIPTION
-	"A collection of objects that are mapped from JSR 163
-	 java.lang.management.OperatingSystemMXBean interface.
-        "
-    ::= { jvmMgtMIBGroups 6 }
-
-jvmLowMemoryUsageNotifGroup NOTIFICATION-GROUP
-    NOTIFICATIONS  {
-             jvmLowMemoryPoolUsageNotif
-    }
-    STATUS current
-    DESCRIPTION
-           "A collection of notifications emitted when low
-            memory usage conditions are detected.
-           "
-    ::= { jvmMgtMIBGroups 7 }
-
-jvmLowMemoryCollectNotifGroup NOTIFICATION-GROUP
-    NOTIFICATIONS  {
-             jvmLowMemoryPoolCollectNotif
-    }
-    STATUS current
-    DESCRIPTION
-           "A collection of notifications emitted when low
-            collection memory usage conditions are detected.
-           "
-    ::= { jvmMgtMIBGroups 8 }
-
-END
--- a/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 import java.util.Hashtable;
 import java.util.Vector;
 import java.util.EventObject;
+import java.util.Iterator;
+import java.util.Map;
 
 import javax.naming.*;
 import javax.naming.event.*;
@@ -204,31 +206,35 @@
      * Removes {@code l} from all notifiers in this context.
      */
     synchronized void removeNamingListener(NamingListener l) {
-        if (debug) System.err.println("EventSupport removing listener");
-
+        if (debug) {
+            System.err.println("EventSupport removing listener");
+        }
         // Go through list of notifiers, remove 'l' from each.
         // If 'l' is notifier's only listener, remove notifier too.
-        for (NamingEventNotifier notifier : notifiers.values()) {
+        Iterator<NamingEventNotifier> iterator = notifiers.values().iterator();
+        while (iterator.hasNext()) {
+            NamingEventNotifier notifier = iterator.next();
             if (notifier != null) {
-                if (debug)
+                if (debug) {
                     System.err.println("EventSupport removing listener from notifier");
+                }
                 notifier.removeNamingListener(l);
                 if (!notifier.hasNamingListeners()) {
-                    if (debug)
+                    if (debug) {
                         System.err.println("EventSupport stopping notifier");
+                    }
                     notifier.stop();
-                    notifiers.remove(notifier.info);
+                    iterator.remove();
                 }
             }
         }
-
         // Remove from list of unsolicited notifier
-        if (debug) System.err.println("EventSupport removing unsolicited: " +
-            unsolicited);
+        if (debug) {
+            System.err.println("EventSupport removing unsolicited: " + unsolicited);
+        }
         if (unsolicited != null) {
             unsolicited.removeElement(l);
         }
-
     }
 
     synchronized boolean hasUnsolicited() {
--- a/jdk/src/java.prefs/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.prefs/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the Preferences API.
  *
+ * @uses java.util.prefs.PreferencesFactory
+ *
  * @moduleGraph
  * @since 9
  */
@@ -35,4 +37,3 @@
     exports java.util.prefs;
     uses java.util.prefs.PreferencesFactory;
 }
-
--- a/jdk/src/java.rmi/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.rmi/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,21 @@
 /**
  * Defines the Remote Method Invocation (RMI) API.
  *
+ * <p> The JDK implementation of this module includes
+ * the <em>{@index rmiregistry rmiregistry tool}</em> tool to start a remote
+ * object registry, and the <em>{@index rmid rmid tool}</em> tool to start
+ * the activation system daemon.
+ *
+ * <p>
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:</dt>
+ * <dd> {@extLink rmiregistry_tool_reference rmiregistry},
+ *      {@extLink rmid_tool_reference rmid}
+ * </dd>
+ * </dl>
+ *
+ * @uses java.rmi.server.RMIClassLoaderSpi
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -102,10 +102,10 @@
     private static final String REGISTRY_FILTER_PROPNAME = "sun.rmi.registry.registryFilter";
 
     /** Registry max depth of remote invocations. **/
-    private static int REGISTRY_MAX_DEPTH = 5;
+    private static final int REGISTRY_MAX_DEPTH = 20;
 
     /** Registry maximum array size in remote invocations. **/
-    private static int REGISTRY_MAX_ARRAY_SIZE = 10000;
+    private static final int REGISTRY_MAX_ARRAY_SIZE = 10000;
 
     /**
      * The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"}
--- a/jdk/src/java.scripting/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.scripting/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,19 @@
 /**
  * Defines the Scripting API.
  *
+ * <p> The JDK implementation of this module includes a language-independent
+ * command-line script shell, <em>{@index jrunscript jrunscript tool}</em>,
+ * that supports executing JavaScript and other languages if its corresponding
+ * script engine is installed.
+ *
+ * <p>
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd> {@extLink jrunscript_tool_reference jrunscript}</dd>
+ * </dl>
+ *
+ * @uses javax.script.ScriptEngineFactory
+ *
  * @moduleGraph
  * @since 9
  */
@@ -33,4 +46,3 @@
     exports javax.script;
     uses javax.script.ScriptEngineFactory;
 }
-
--- a/jdk/src/java.se.ee/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.se.ee/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -34,6 +34,7 @@
  */
 @SuppressWarnings({"deprecation",
                    "removal"}) // java.corba and other modules
+@Deprecated(since="9", forRemoval=true)
 module java.se.ee {
 
     requires transitive java.se;
--- a/jdk/src/java.se/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.se/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,15 @@
  * The modules defining CORBA and Java EE APIs are not required by
  * this module, but they are required by {@code java.se.ee}.
  *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Optional for Java SE Platform:</dt>
+ * <dd>
+ *   <a href="../specs/jni/index.html">Java Native Interface (JNI)</a><br>
+ *   <a href="../specs/jvmti.html">Java Virtual Machine Tool Interface (JVM TI)</a><br>
+ *   <a href="../specs/jdwp/jdwp-spec.html">Java Debug Wire Protocol (JDWP)</a><br>
+ * </dd>
+ * </dl>
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/java.sql.rowset/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.sql.rowset/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the JDBC RowSet API.
  *
+ * @uses javax.sql.rowset.RowSetFactory
+ *
  * @moduleGraph
  * @since 9
  */
@@ -39,4 +41,3 @@
     exports javax.sql.rowset.spi;
     uses javax.sql.rowset.RowSetFactory;
 }
-
--- a/jdk/src/java.sql/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/java.sql/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the JDBC API.
  *
+ * @uses java.sql.Driver
+ *
  * @moduleGraph
  * @since 9
  */
@@ -38,4 +40,3 @@
     exports javax.transaction.xa;
     uses java.sql.Driver;
 }
-
--- a/jdk/src/jdk.attach/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.attach/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the attach API.
  *
+ * @uses com.sun.tools.attach.spi.AttachProvider
+ *
  * @moduleGraph
  * @since 9
  */
@@ -39,4 +41,3 @@
     uses com.sun.tools.attach.spi.AttachProvider;
     provides com.sun.tools.attach.spi.AttachProvider with sun.tools.attach.AttachProviderImpl;
 }
-
--- a/jdk/src/jdk.charsets/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.charsets/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,9 +24,11 @@
  */
 
 /**
- * {@link java.nio.charset.Charset Charset} provider for the charsets that
+ * Provides {@link java.nio.charset.Charset charsets} that
  * are not in {@code java.base} (mostly double byte and IBM charsets).
  *
+ * @provides java.nio.charset.spi.CharsetProvider
+ *
  * @moduleGraph
  * @since 9
  */
@@ -34,4 +36,3 @@
     provides java.nio.charset.spi.CharsetProvider
         with sun.nio.cs.ext.ExtendedCharsets;
 }
-
--- a/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.crypto.cryptoki/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,9 @@
  */
 
 /**
- * The SunPKCS11 security provider.
+ * Provides the implementation of the SunPKCS11 security provider.
+ *
+ * @provides java.security.Provider
  *
  * @moduleGraph
  * @since 9
@@ -34,4 +36,3 @@
     requires jdk.crypto.ec;
     provides java.security.Provider with sun.security.pkcs11.SunPKCS11;
 }
-
--- a/jdk/src/jdk.crypto.ec/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.crypto.ec/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,9 @@
  */
 
 /**
- * The SunEC security provider.
+ * Provides the implementation of the SunEC security provider.
+ *
+ * @provides java.security.Provider
  *
  * @moduleGraph
  * @since 9
@@ -32,4 +34,3 @@
 module jdk.crypto.ec {
     provides java.security.Provider with sun.security.ec.SunEC;
 }
-
--- a/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.crypto.mscapi/windows/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,9 @@
  */
 
 /**
- * The SunMSCAPI security provider.
+ * Provides the implementation of the SunMSCAPI security provider.
  *
+ * @provides java.security.Provider
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,9 @@
  */
 
 /**
- * The OracleUCrypto security provider.
+ * Provides the implementation of the OracleUCrypto security provider.
  *
+ * @provides java.security.Provider
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/jdk.editpad/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.editpad/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,7 @@
  */
 
 /**
- * Implementation of the edit pad service.
+ * Provides the implementation of the edit pad service used by {@link jdk.jshell}.
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.httpserver/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.httpserver/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
 /**
  * Defines the JDK-specific API for HTTP server.
  *
+ * @uses com.sun.net.httpserver.spi.HttpServerProvider
+ *
  * @moduleGraph
  * @since 9
  */
@@ -35,4 +37,3 @@
     exports com.sun.net.httpserver.spi;
     uses com.sun.net.httpserver.spi.HttpServerProvider;
 }
-
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,47 +111,56 @@
      */
 
 
-    // A small class that allows to control the state of
-    // the connection preface. This is just a thin wrapper
-    // over a CountDownLatch.
-    private final class PrefaceController {
+    // A small class that allows to control frames with respect to the state of
+    // the connection preface. Any data received before the connection
+    // preface is sent will be buffered.
+    private final class FramesController {
         volatile boolean prefaceSent;
-        private final CountDownLatch latch = new CountDownLatch(1);
+        volatile List<ByteBufferReference> pending;
 
-        // This method returns immediately if the preface is sent,
-        // and blocks until the preface is sent if not.
-        // In the common case this where the preface is already sent
-        // this will cost not more than a volatile read.
-        void waitUntilPrefaceSent() {
+        boolean processReceivedData(FramesDecoder decoder, ByteBufferReference buf)
+                throws IOException
+        {
+            // if preface is not sent, buffers data in the pending list
             if (!prefaceSent) {
-                try {
-                    // If the preface is not sent then await on the latch
-                    Log.logTrace("Waiting until connection preface is sent");
-                    latch.await();
-                    Log.logTrace("Preface sent: resuming reading");
-                    assert prefaceSent;
-                 } catch (InterruptedException e) {
-                    String msg = Utils.stackTrace(e);
-                    Log.logTrace(msg);
-                    shutdown(e);
+                synchronized (this) {
+                    if (!prefaceSent) {
+                        if (pending == null) pending = new ArrayList<>();
+                        pending.add(buf);
+                        return false;
+                    }
                 }
             }
+
+            // Preface is sent. Checks for pending data and flush it.
+            // We rely on this method being called from within the readlock,
+            // so we know that no other thread could execute this method
+            // concurrently while we're here.
+            // This ensures that later incoming buffers will not
+            // be processed before we have flushed the pending queue.
+            // No additional synchronization is therefore necessary here.
+            List<ByteBufferReference> pending = this.pending;
+            this.pending = null;
+            if (pending != null) {
+                // flush pending data
+                for (ByteBufferReference b : pending) {
+                    decoder.decode(b);
+                }
+            }
+
+            // push the received buffer to the frames decoder.
+            decoder.decode(buf);
+            return true;
         }
 
         // Mark that the connection preface is sent
         void markPrefaceSent() {
             assert !prefaceSent;
-            prefaceSent = true;
-            // Release the latch. If asyncReceive was scheduled it will
-            // be waiting for the release and will be woken up by this
-            // call. If not, then the semaphore will no longer be used after
-            // this.
-            latch.countDown();
+            synchronized (this) {
+                prefaceSent = true;
+            }
         }
 
-        boolean isPrefaceSent() {
-            return prefaceSent;
-        }
     }
 
     volatile boolean closed;
@@ -176,7 +185,7 @@
      * Each of this connection's Streams MUST use this controller.
      */
     private final WindowController windowController = new WindowController();
-    private final PrefaceController prefaceController = new PrefaceController();
+    private final FramesController framesController = new FramesController();
     final WindowUpdateSender windowUpdater;
 
     static final int DEFAULT_FRAME_SIZE = 16 * 1024;
@@ -409,11 +418,11 @@
         // SettingsFrame sent by the server) before the connection
         // preface is fully sent might result in the server
         // sending a GOAWAY frame with 'invalid_preface'.
-        prefaceController.waitUntilPrefaceSent();
         synchronized (readlock) {
-            assert prefaceController.isPrefaceSent();
             try {
-                framesDecoder.decode(buffer);
+                // the readlock ensures that the order of incoming buffers
+                // is preserved.
+                framesController.processReceivedData(framesDecoder, buffer);
             } catch (Throwable e) {
                 String msg = Utils.stackTrace(e);
                 Log.logTrace(msg);
@@ -646,7 +655,8 @@
         Log.logFrames(sf, "OUT");
         // send preface bytes and SettingsFrame together
         connection.write(ref.get());
-
+        // mark preface sent.
+        framesController.markPrefaceSent();
         Log.logTrace("PREFACE_BYTES sent");
         Log.logTrace("Settings Frame sent");
 
@@ -654,8 +664,10 @@
         // minus the initial 64 K specified in protocol
         final int len = client2.client().getReceiveBufferSize() - (64 * 1024 - 1);
         windowUpdater.sendWindowUpdate(len);
+        // there will be an ACK to the windows update - which should
+        // cause any pending data stored before the preface was sent to be
+        // flushed (see PrefaceController).
         Log.logTrace("finished sending connection preface");
-        prefaceController.markPrefaceSent();
     }
 
     /**
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -344,7 +344,13 @@
                                 c.configureBlocking(false);
                                 SelectionKey key = c.keyFor(selector);
                                 SelectorAttachment sa;
-                                if (key == null) {
+                                if (key == null || !key.isValid()) {
+                                    if (key != null) {
+                                        // key is canceled.
+                                        // invoke selectNow() to purge it
+                                        // before registering the new event.
+                                        selector.selectNow();
+                                    }
                                     sa = new SelectorAttachment(c, selector);
                                 } else {
                                     sa = (SelectorAttachment) key.attachment();
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java	Tue Jun 27 16:00:14 2017 -0400
@@ -316,13 +316,14 @@
                 })
             // 5. Handle errors and cancel any timer set
             .handle((response, ex) -> {
-                if (response != null) {
+                cancelTimer();
+                if (ex == null) {
+                    assert response != null;
                     return MinimalFuture.completedFuture(response);
                 }
                 // all exceptions thrown are handled here
                 CompletableFuture<Response> error = getExceptionalCF(ex);
                 if (error == null) {
-                    cancelTimer();
                     return responseAsyncImpl();
                 } else {
                     return error;
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -62,6 +62,7 @@
     private volatile Consumer<ByteBufferReference> asyncReceiver;
     private volatile Consumer<Throwable> errorReceiver;
     private volatile Supplier<ByteBufferReference> readBufferSupplier;
+    private boolean asyncReading;
 
     private final AsyncWriteQueue asyncOutputQ = new AsyncWriteQueue(this::asyncOutput);
 
@@ -70,6 +71,9 @@
     @Override
     public void startReading() {
         try {
+            synchronized(reading) {
+                asyncReading = true;
+            }
             client.registerEvent(new ReadEvent());
         } catch (IOException e) {
             shutdown();
@@ -78,6 +82,9 @@
 
     @Override
     public void stopAsyncReading() {
+        synchronized(reading) {
+            asyncReading = false;
+        }
         client.cancelRegistration(chan);
     }
 
@@ -279,7 +286,7 @@
     void asyncRead() {
         synchronized (reading) {
             try {
-                while (true) {
+                while (asyncReading) {
                     ByteBufferReference buf = readBufferSupplier.get();
                     int n = chan.read(buf.get());
                     if (n == -1) {
@@ -325,7 +332,7 @@
             return -1;
         }
         Utils.flipToMark(buf, mark);
-        String s = "Receive (" + n + " bytes) ";
+        // String s = "Receive (" + n + " bytes) ";
         //debugPrint(s, buf);
         return n;
     }
@@ -393,6 +400,10 @@
             shutdown();
         }
 
+        @Override
+        public String toString() {
+            return super.toString() + "/" + chan;
+        }
     }
 
     // used in blocking channels only
@@ -422,6 +433,11 @@
         public void abort() {
             close();
         }
+
+        @Override
+        public String toString() {
+            return super.toString() + "/" + chan;
+        }
     }
 
     @Override
@@ -447,7 +463,8 @@
     CompletableFuture<Void> whenReceivingResponse() {
         CompletableFuture<Void> cf = new MinimalFuture<>();
         try {
-            client.registerEvent(new ReceiveResponseEvent(cf));
+            ReceiveResponseEvent evt = new ReceiveResponseEvent(cf);
+            client.registerEvent(evt);
         } catch (IOException e) {
             cf.completeExceptionally(e);
         }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java	Tue Jun 27 16:00:14 2017 -0400
@@ -274,9 +274,7 @@
                 int x;
                 do {
                     if (needData) {
-                        do {
-                            x = chan.read (unwrap_src);
-                        } while (x == 0);
+                        x = chan.read (unwrap_src);
                         if (x == -1) {
                             throw new IOException ("connection closed for reading");
                         }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -803,7 +803,9 @@
         completeResponseExceptionally(e);
         try {
             // will send a RST_STREAM frame
-            connection.resetStream(streamid, ResetFrame.CANCEL);
+            if (streamid != 0) {
+                connection.resetStream(streamid, ResetFrame.CANCEL);
+            }
         } catch (IOException ex) {
             Log.logError(ex);
         }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,7 +28,6 @@
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.channels.SelectionKey;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 
 /*
@@ -58,23 +57,24 @@
     private final Frame.Reader reader = new Frame.Reader();
     private final RawChannel.RawEvent event = createHandler();
     private final AtomicLong demand = new AtomicLong();
-    private final CooperativeHandler handler =
-              new CooperativeHandler(this::pushContinuously);
-    /*
-     * Used to ensure registering the channel event at most once (i.e. to avoid
-     * multiple registrations).
-     */
-    private final AtomicBoolean readable = new AtomicBoolean();
+    private final CooperativeHandler handler;
+
     private ByteBuffer data;
+    private volatile int state;
+
+    private static final int UNREGISTERED = 0;
+    private static final int AVAILABLE    = 1;
+    private static final int WAITING      = 2;
 
     Receiver(MessageStreamConsumer messageConsumer, RawChannel channel) {
         this.messageConsumer = messageConsumer;
         this.channel = channel;
+        this.frameConsumer = new FrameConsumer(this.messageConsumer);
         this.data = channel.initialByteBuffer();
-        this.frameConsumer = new FrameConsumer(this.messageConsumer);
-        // To ensure the initial non-final `data` will be read correctly
-        // (happens-before) by reader after executing readable.get()
-        readable.set(true);
+        // To ensure the initial non-final `data` will be visible
+        // (happens-before) when `handler` invokes `pushContinuously`
+        // the following assignment is done last:
+        handler = new CooperativeHandler(this::pushContinuously);
     }
 
     private RawChannel.RawEvent createHandler() {
@@ -87,7 +87,7 @@
 
             @Override
             public void handle() {
-                readable.set(true);
+                state = AVAILABLE;
                 handler.handle();
             }
         };
@@ -110,54 +110,63 @@
 
     /*
      * Stops the machinery from reading and delivering messages permanently,
-     * regardless of the current demand.
+     * regardless of the current demand and data availability.
      */
     void close() {
         handler.stop();
     }
 
     private void pushContinuously() {
-        while (readable.get() && demand.get() > 0 && !handler.isStopped()) {
-            pushOnce();
-        }
-    }
-
-    private void pushOnce() {
-        if (data == null && !readData()) {
-            return;
-        }
-        try {
-            reader.readFrame(data, frameConsumer); // Pushing frame parts to the consumer
-        } catch (FailWebSocketException e) {
-            messageConsumer.onError(e);
-            return;
-        }
-        if (!data.hasRemaining()) {
-            data = null;
+        while (!handler.isStopped()) {
+            if (data.hasRemaining()) {
+                if (demand.get() > 0) {
+                    try {
+                        int oldPos = data.position();
+                        reader.readFrame(data, frameConsumer);
+                        int newPos = data.position();
+                        assert oldPos != newPos : data; // reader always consumes bytes
+                    } catch (FailWebSocketException e) {
+                        handler.stop();
+                        messageConsumer.onError(e);
+                    }
+                    continue;
+                }
+                break;
+            }
+            switch (state) {
+                case WAITING:
+                    return;
+                case UNREGISTERED:
+                    try {
+                        state = WAITING;
+                        channel.registerEvent(event);
+                    } catch (IOException e) {
+                        handler.stop();
+                        messageConsumer.onError(e);
+                    }
+                    return;
+                case AVAILABLE:
+                    try {
+                        data = channel.read();
+                    } catch (IOException e) {
+                        handler.stop();
+                        messageConsumer.onError(e);
+                        return;
+                    }
+                    if (data == null) { // EOF
+                        handler.stop();
+                        messageConsumer.onComplete();
+                        return;
+                    } else if (!data.hasRemaining()) { // No data at the moment
+                        // Pretty much a "goto", reusing the existing code path
+                        // for registration
+                        state = UNREGISTERED;
+                    }
+                    continue;
+                default:
+                    throw new InternalError(String.valueOf(state));
+            }
         }
     }
+}
 
-    private boolean readData() {
-        try {
-            data = channel.read();
-        } catch (IOException e) {
-            messageConsumer.onError(e);
-            return false;
-        }
-        if (data == null) { // EOF
-            messageConsumer.onComplete();
-            return false;
-        } else if (!data.hasRemaining()) { // No data in the socket at the moment
-            data = null;
-            readable.set(false);
-            try {
-                channel.registerEvent(event);
-            } catch (IOException e) {
-                messageConsumer.onError(e);
-            }
-            return false;
-        }
-        assert data.hasRemaining();
-        return true;
-    }
-}
--- a/jdk/src/jdk.jartool/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jartool/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,7 +25,21 @@
 
 /**
  * Defines tools for manipulating Java Archive (JAR) files,
- * including the jar and jarsigner tools.
+ * including the <em>{@index jar jar tool}</em> and
+ * <em>{@index jarsigner jarsigner tool}</em> tools.
+ *
+ * <p> This module provides the equivalent of command-line access to
+ * <em>jar</em> via the {@link java.util.spi.ToolProvider ToolProvider} SPI.
+ * Instances of the tool can be obtained by calling
+ * {@link java.util.spi.ToolProvider#findFirst ToolProvider.findFirst}
+ * or the {@link java.util.ServiceLoader service loader} with the name
+ * {@code "jar"}.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jar_tool_reference jar},
+ *     {@extLink jarsigner_tool_reference jarsigner}
+ * </dl>
  *
  * @moduleGraph
  * @since 9
@@ -36,4 +50,3 @@
 
     provides java.util.spi.ToolProvider with sun.tools.jar.JarToolProvider;
 }
-
--- a/jdk/src/jdk.jcmd/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jcmd/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,20 @@
  */
 
 /**
- * Defines tools for diagnostics and troubleshooting a JVM,
- * including the jcmd, jps, jstat and other diagnostics tools.
+ * Defines tools for diagnostics and troubleshooting a JVM
+ * such as the <em>{@index jcmd jcmd tool}</em>, <em>{@index jps jps tool}</em>,
+ * <em>{@index jstat jstat tool}</em> tools.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>
+ * {@extLink jcmd_tool_reference jcmd},
+ * {@extLink jinfo_tool_reference jinfo},
+ * {@extLink jmap_tool_reference jmap},
+ * {@extLink jps_tool_reference jps},
+ * {@extLink jstack_tool_reference jstack},
+ * {@extLink jstat_tool_reference jstat}
+ * </dl>
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.jconsole/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jconsole/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,16 @@
  */
 
 /**
- * Defines the JMX graphical tool, jconsole, for monitoring and managing
- * a running application.
+ * Defines the JMX graphical tool, <em>{@index jconsole jconsole}</em>,
+ * for monitoring and managing a running application.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jconsole_tool_reference jconsole},
+ *     {@extLink using_jconsole Using JConsole}
+ * </dl>
+ *
+ * @uses com.sun.tools.jconsole.JConsolePlugin
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/AbsentInformationException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/AbsentInformationException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,16 +31,15 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class AbsentInformationException extends Exception
-{
+public class AbsentInformationException extends Exception {
+
     private static final long serialVersionUID = 4988939309582416373L;
-    public AbsentInformationException()
-    {
+
+    public AbsentInformationException() {
         super();
     }
 
-    public AbsentInformationException(String s)
-    {
+    public AbsentInformationException(String s) {
         super(s);
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ArrayType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ArrayType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package com.sun.jdi;
 
-import java.util.List;
-
 /**
  * Provides access to the class of an array and the type of
  * its components in the target VM.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
 
 package com.sun.jdi;
 
+import com.sun.jdi.connect.Connector;
+import com.sun.tools.jdi.VirtualMachineManagerImpl;
+
 /**
  * Initial class that provides access to the default implementation
  * of JDI interfaces. A debugger application uses this class to access the
@@ -40,9 +43,8 @@
      * Returns the virtual machine manager.
      *
      * <p> May throw an unspecified error if initialization of the
-     * {@link com.sun.jdi.VirtualMachineManager} fails or if
-     * the virtual machine manager is unable to locate or create
-     * any {@link com.sun.jdi.connect.Connector Connectors}.
+     * {@link VirtualMachineManager} fails or if the virtual machine manager
+     * is unable to locate or create any {@link Connector Connectors}.
      *
      * @throws java.lang.SecurityException if a security manager has been
      * installed and it denies {@link JDIPermission}
@@ -50,6 +52,6 @@
      * permissions required by the implementation.
      */
     static public synchronized VirtualMachineManager virtualMachineManager() {
-        return com.sun.tools.jdi.VirtualMachineManagerImpl.virtualMachineManager();
+        return VirtualMachineManagerImpl.virtualMachineManager();
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotLoadedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -67,9 +67,10 @@
  * @author Gordon Hirsch
  * @since  1.3
  */
-public class ClassNotLoadedException extends Exception
-{
+public class ClassNotLoadedException extends Exception {
+
     private static final long serialVersionUID = -6242978768444298722L;
+
     private String className;
 
     public ClassNotLoadedException(String className) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotPreparedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassNotPreparedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,14 +33,14 @@
  * @since  1.3
  */
 public class ClassNotPreparedException extends RuntimeException {
+
     private static final long serialVersionUID = -6120698967144079642L;
-    public ClassNotPreparedException()
-    {
+
+    public ClassNotPreparedException() {
         super();
     }
 
-    public ClassNotPreparedException(String s)
-    {
+    public ClassNotPreparedException(String s) {
         super(s);
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,6 +42,7 @@
  * @since  1.3
  */
 public interface ClassType extends ReferenceType {
+
     /**
      * Gets the superclass of this class.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/IncompatibleThreadStateException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/IncompatibleThreadStateException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @since  1.3
  */
 public class IncompatibleThreadStateException extends Exception {
+
     private static final long serialVersionUID = 6199174323414551389L;
 
     public IncompatibleThreadStateException() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InconsistentDebugInfoException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InconsistentDebugInfoException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,9 @@
  * @since  1.3
  */
 public class InconsistentDebugInfoException extends RuntimeException {
+
     private static final long serialVersionUID = 7964236415376861808L;
+
     public InconsistentDebugInfoException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,7 @@
  * @since  1.3
  */
 public interface InterfaceType extends ReferenceType {
+
     /**
      * Gets the interfaces directly extended by this interface.
      * The returned list contains only those interfaces this
@@ -187,11 +188,12 @@
      * @since 1.8
      */
     default Value invokeMethod(ThreadReference thread, Method method,
-                       List<? extends Value> arguments, int options)
+                               List<? extends Value> arguments, int options)
             throws InvalidTypeException,
-            ClassNotLoadedException,
-            IncompatibleThreadStateException,
-            InvocationException {
+                   ClassNotLoadedException,
+                   IncompatibleThreadStateException,
+                   InvocationException
+    {
         throw new UnsupportedOperationException();
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InternalException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InternalException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,18 +33,20 @@
  * @since  1.3
  */
 public class InternalException extends RuntimeException {
-     private static final long serialVersionUID = -9171606393104480607L;
-     private int errorCode;
+
+    private static final long serialVersionUID = -9171606393104480607L;
+
+    private int errorCode;
 
-     public InternalException() {
-         super();
-         this.errorCode = 0;
-     }
+    public InternalException() {
+        super();
+        this.errorCode = 0;
+    }
 
-     public InternalException(String s) {
-         super(s);
-         this.errorCode = 0;
-     }
+    public InternalException(String s) {
+        super(s);
+        this.errorCode = 0;
+    }
 
     public InternalException(int errorCode) {
         super();
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidCodeIndexException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidCodeIndexException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,9 @@
  */
 @Deprecated
 public class InvalidCodeIndexException extends RuntimeException {
+
     private static final long serialVersionUID = 7416010225133747805L;
+
     public InvalidCodeIndexException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidLineNumberException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidLineNumberException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,9 @@
  */
 @Deprecated
 public class InvalidLineNumberException extends RuntimeException {
+
     private static final long serialVersionUID = 4048709912372692875L;
+
     public InvalidLineNumberException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidModuleException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidModuleException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @since  9
  */
 public class InvalidModuleException extends RuntimeException {
+
     private static final long serialVersionUID = 7907359387320658039L;
 
     /**
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidStackFrameException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidStackFrameException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  * @since  1.3
  */
 public class InvalidStackFrameException extends RuntimeException {
+
     private static final long serialVersionUID = -1919378296505827922L;
+
     public InvalidStackFrameException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidTypeException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidTypeException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
  * @since  1.3
  */
 public class InvalidTypeException extends Exception {
+
     private static final long serialVersionUID = 2256667231949650806L;
 
     public InvalidTypeException() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvocationException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  * @since  1.3
  */
 public class InvocationException extends Exception {
+
     private static final long serialVersionUID = 6066780907971918568L;
+
     ObjectReference exception;
 
     public InvocationException(ObjectReference exception) {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Tue Jun 27 16:00:14 2017 -0400
@@ -70,7 +70,7 @@
  * @author  Tim Bell
  * @since   1.5
  *
- * @see com.sun.jdi.Bootstrap
+ * @see Bootstrap
  * @see java.security.BasicPermission
  * @see java.security.Permission
  * @see java.security.Permissions
@@ -80,7 +80,9 @@
  */
 
 public final class JDIPermission extends java.security.BasicPermission {
+
     private static final long serialVersionUID = -6988461416938786271L;
+
     /**
      * The {@code JDIPermission} class represents access rights to the
      * {@code VirtualMachineManager}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Locatable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
  * @since  1.3
  */
 public interface Locatable {
+
     /**
      * Returns the {@link Location} of this mirror, if there is
      * executable code associated with it. Note that both Java&trade;
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Location.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Location.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,7 +25,9 @@
 
 package com.sun.jdi;
 
-import java.util.List;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.ExceptionEvent;
+import com.sun.jdi.request.EventRequestManager;
 
 /**
  * A point within the executing code of the target VM.
@@ -75,10 +77,10 @@
  * returned as the default.  To determine the available strata
  * use {@link ReferenceType#availableStrata()}.
  *
- * @see com.sun.jdi.request.EventRequestManager
+ * @see EventRequestManager
  * @see StackFrame
- * @see com.sun.jdi.event.BreakpointEvent
- * @see com.sun.jdi.event.ExceptionEvent
+ * @see BreakpointEvent
+ * @see ExceptionEvent
  * @see Locatable
  *
  * @author Robert Field
@@ -128,7 +130,6 @@
      */
     String sourceName() throws AbsentInformationException;
 
-
     /**
      * Gets an identifing name for the source corresponding to
      * this location. Interpretation of this string is the
@@ -154,8 +155,7 @@
      *
      * @since 1.4
      */
-    String sourceName(String stratum)
-                        throws AbsentInformationException;
+    String sourceName(String stratum) throws AbsentInformationException;
 
     /**
      * Gets the path to the source corresponding to this
@@ -173,7 +173,6 @@
      */
     String sourcePath() throws AbsentInformationException;
 
-
     /**
      * Gets the path to the source corresponding to this
      * location. Interpretation of this string is the
@@ -206,8 +205,7 @@
      *
      * @since 1.4
      */
-    String sourcePath(String stratum)
-                         throws AbsentInformationException;
+    String sourcePath(String stratum) throws AbsentInformationException;
 
     /**
      * Gets the line number of this Location.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Mirror.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Mirror.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 package com.sun.jdi;
 
+import com.sun.jdi.request.BreakpointRequest;
+
 /**
  * A proxy used by a debugger to examine or manipulate some entity
  * in another virtual machine. Mirror is the root of the
@@ -33,10 +35,9 @@
  * (for example, {@link IntegerValue}), types (for example,
  * {@link ReferenceType}), dynamic application state (for example,
  * {@link StackFrame}), and even debugger-specific constructs (for example,
- * {@link com.sun.jdi.request.BreakpointRequest}).
- * The {@link VirtualMachine} itself is also
- * considered a mirror, representing the composite state of the
- * target VM.
+ * {@link BreakpointRequest}).
+ * The {@link VirtualMachine} itself is also considered a mirror,
+ * representing the composite state of the target VM.
  * <P>
  * There is no guarantee that a particular entity in the target VM will map
  * to a single instance of Mirror. Implementors are free to decide
@@ -44,9 +45,9 @@
  * of this interface should always use <code>equals</code> to compare
  * two mirrors for equality.
  * <p>
- * Any method on a {@link com.sun.jdi.Mirror} that takes a <code>Mirror</code> as an
+ * Any method on a {@link Mirror} that takes a <code>Mirror</code> as an
  * parameter directly or indirectly (e.g., as a element in a <code>List</code>) will
- * throw {@link com.sun.jdi.VMMismatchException} if the mirrors are from different
+ * throw {@link VMMismatchException} if the mirrors are from different
  * virtual machines.
  *
  * @see VirtualMachine
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ModuleReference.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ModuleReference.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,24 +25,24 @@
 
 package com.sun.jdi;
 
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.VMDisconnectEvent;
 
 /**
  * A module in the target VM.
  * <p>
- * Any method on {@code ModuleReference} which directly or
- * indirectly takes {@code ModuleReference} as a parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * Any method on {@code ModuleReference} which directly or indirectly takes
+ * {@code ModuleReference} as a parameter may throw {@link VMDisconnectedException}
+ * if the target VM is disconnected and the {@link VMDisconnectEvent} has been or is
+ * available to be read from the {@link EventQueue}.
  * <p>
- * Any method on {@code ModuleReference} which directly or
- * indirectly takes {@code ModuleReference} as a parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * Any method on {@code ModuleReference} which directly or indirectly takes
+ * {@code ModuleReference} as a parameter may throw {@link VMOutOfMemoryException}
+ * if the target VM has run out of memory.
  * <p>
  * Any method on {@code ModuleReference} or which directly or indirectly takes
- * {@code ModuleReference} as a parameter may throw
- * {@link com.sun.jdi.InvalidModuleException} if the mirrored module
- * has been unloaded.
+ * {@code ModuleReference} as a parameter may throw {@link InvalidModuleException}
+ * if the mirrored module has been unloaded.
  *
  * Not all target virtual machines support this class.
  * Use {@link VirtualMachine#canGetModuleInfo()}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/NativeMethodException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/NativeMethodException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
 public class NativeMethodException extends RuntimeException {
 
     private static final long serialVersionUID = 3924951669039469992L;
+
     public NativeMethodException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ObjectCollectedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ObjectCollectedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  * @since  1.3
  */
 public class ObjectCollectedException extends RuntimeException {
+
     private static final long serialVersionUID = -1928428056197269588L;
+
     public ObjectCollectedException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,26 +28,29 @@
 import java.util.List;
 import java.util.Map;
 
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.VMDisconnectEvent;
+
 /**
  * An object that currently exists in the target VM. An ObjectReference
  * mirrors only the object itself and is not specific to any
  * {@link Field} or {@link LocalVariable} to which it is currently
- * assigned. An ObjectReference can
- * have 0 or more references from field(s) and/or variable(s).
+ * assigned. An ObjectReference can have 0 or more references from
+ * field(s) and/or variable(s).
  * <p>
- * Any method on <code>ObjectReference</code> which directly or
- * indirectly takes <code>ObjectReference</code> as an parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * Any method on <code>ObjectReference</code> which directly or indirectly
+ * takes <code>ObjectReference</code> as a parameter may throw
+ * {@link VMDisconnectedException} if the target VM is disconnected and the
+ * {@link VMDisconnectEvent} has been or is available to be read from the
+ * {@link EventQueue}.
  * <p>
- * Any method on <code>ObjectReference</code> which directly or
- * indirectly takes <code>ObjectReference</code> as an parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * Any method on <code>ObjectReference</code> which directly or indirectly
+ * takes <code>ObjectReference</code> as a parameter may throw
+ * {@link VMOutOfMemoryException} if the target VM has run out of memory.
  * <p>
- * Any method on <code>ObjectReference</code> or which directly or indirectly takes
- * <code>ObjectReference</code> as parameter may throw
- * {@link com.sun.jdi.ObjectCollectedException} if the mirrored object has been
+ * Any method on <code>ObjectReference</code> or which directly or indirectly
+ * takes <code>ObjectReference</code> as parameter may throw
+ * {@link ObjectCollectedException} if the mirrored object has been
  * garbage collected.
  *
  * @author Robert Field
@@ -422,7 +425,6 @@
      */
     List<ObjectReference> referringObjects(long maxReferrers);
 
-
     /**
      * Compares the specified Object with this ObjectReference for equality.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/PathSearchingVirtualMachine.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
  * @since  1.3
  */
 public interface PathSearchingVirtualMachine extends VirtualMachine {
+
     /**
      * Get the class path for this virtual machine.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ReferenceType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
 import java.util.List;
 import java.util.Map;
 
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.VMDisconnectEvent;
+
 /**
  * The type of an object in a target VM. ReferenceType encompasses
  * classes, interfaces, and array types as defined in
@@ -55,17 +58,17 @@
  * <p>
  * Any method on <code>ReferenceType</code> which directly or
  * indirectly takes <code>ReferenceType</code> as an parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * {@link VMDisconnectedException} if the target VM is
+ * disconnected and the {@link VMDisconnectEvent} has been or is
+ * available to be read from the {@link EventQueue}.
  * <p>
  * Any method on <code>ReferenceType</code> which directly or
  * indirectly takes <code>ReferenceType</code> as an parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * {@link VMOutOfMemoryException} if the target VM has run out of memory.
  * <p>
  * Any method on <code>ReferenceType</code> or which directly or indirectly takes
  * <code>ReferenceType</code> as parameter may throw
- * {@link com.sun.jdi.ObjectCollectedException} if the mirrored type has been unloaded.
+ * {@link ObjectCollectedException} if the mirrored type has been unloaded.
  *
  * @see ObjectReference
  * @see ObjectReference#referenceType
@@ -80,7 +83,6 @@
 public interface ReferenceType
     extends Type, Comparable<ReferenceType>, Accessible
 {
-
     /**
      * Gets the fully qualified name of this type. The returned name
      * is formatted as it might appear in a Java programming langauge
@@ -615,7 +617,7 @@
      * @since 1.4
      */
     List<Location> allLineLocations(String stratum, String sourceName)
-                             throws AbsentInformationException;
+        throws AbsentInformationException;
 
     /**
      * Returns a List containing all {@link Location} objects
@@ -685,7 +687,7 @@
     List<Location> locationsOfLine(String stratum,
                                    String sourceName,
                                    int lineNumber)
-                     throws AbsentInformationException;
+        throws AbsentInformationException;
 
     /**
      * Return the available strata for this reference type.
@@ -777,7 +779,6 @@
      */
     int majorVersion();
 
-
     /**
      * Returns the class minor version number, as defined in the class file format
      * of the Java Virtual Machine Specification.
@@ -850,5 +851,4 @@
      * @since 1.6
      */
      byte[] constantPool();
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/StackFrame.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,9 @@
 import java.util.List;
 import java.util.Map;
 
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.VMDisconnectEvent;
+
 /**
  * The state of one method invocation on a thread's call stack.
  * As a thread executes, stack frames are pushed and popped from
@@ -45,13 +48,13 @@
  * <p>
  * Any method on <code>StackFrame</code> which
  * takes <code>StackFrame</code> as an parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * {@link VMDisconnectedException} if the target VM is
+ * disconnected and the {@link VMDisconnectEvent} has been or is
+ * available to be read from the {@link EventQueue}.
  * <p>
  * Any method on <code>StackFrame</code> which
  * takes <code>StackFrame</code> as an parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * {@link VMOutOfMemoryException} if the target VM has run out of memory.
  *
  * @author Robert Field
  * @author Gordon Hirsch
@@ -235,5 +238,4 @@
      * @since 1.6
      */
     List<Value> getArgumentValues();
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/StringReference.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/StringReference.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
  * @since  1.3
  */
 public interface StringReference extends ObjectReference {
+
     /**
      * Returns the StringReference as a String. The returned string
      * is the equivalent of the mirrored string, but is an entity in the
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,11 @@
  */
 
 package com.sun.jdi;
+
 import java.util.List;
 
+import com.sun.jdi.event.EventSet;
+
 /**
  * A thread object from the target VM.
  * A ThreadReference is an {@link ObjectReference} with additional
@@ -37,6 +40,7 @@
  * @since  1.3
  */
 public interface ThreadReference extends ObjectReference {
+
     /** Thread status is unknown */
     public final int THREAD_STATUS_UNKNOWN  =-1;
     /** Thread has completed execution */
@@ -82,6 +86,7 @@
      * through {@link java.lang.Thread#resume}.
      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
      */
+    @SuppressWarnings("javadoc")
     void suspend();
 
     /**
@@ -92,7 +97,7 @@
      * suspends on this thread is decremented. If it is decremented to 0,
      * the thread will continue to execute.
      * Note: the normal way to resume from an event related suspension is
-     * via {@link com.sun.jdi.event.EventSet#resume}.
+     * via {@link EventSet#resume}.
      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
      */
     void resume();
@@ -115,6 +120,7 @@
      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}.
      * @see java.lang.Thread#stop(Throwable)
      */
+    @SuppressWarnings("javadoc")
     void stop(ObjectReference throwable) throws InvalidTypeException;
 
     /**
@@ -390,7 +396,6 @@
      * @since 1.4 */
     void popFrames(StackFrame frame) throws IncompatibleThreadStateException;
 
-
     /**
      * Force a method to return before it reaches a return
      * statement.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMCannotBeModifiedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMCannotBeModifiedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  * @since  1.5
  */
 public class VMCannotBeModifiedException extends UnsupportedOperationException {
+
     private static final long serialVersionUID = -4063879815130164009L;
+
     public VMCannotBeModifiedException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMDisconnectedException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMDisconnectedException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,9 +36,11 @@
 public class VMDisconnectedException extends RuntimeException {
 
     private static final long serialVersionUID = 2892975269768351637L;
+
     public VMDisconnectedException() {
         super();
     }
+
     public VMDisconnectedException(String message) {
         super(message);
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMMismatchException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMMismatchException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,9 @@
  * @since  1.3
  */
 public class VMMismatchException extends RuntimeException {
+
     private static final long serialVersionUID = 289169358790459564L;
+
     public VMMismatchException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMOutOfMemoryException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VMOutOfMemoryException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,9 @@
  * @since  1.3
  */
 public class VMOutOfMemoryException extends RuntimeException {
+
     private static final long serialVersionUID = 71504228548910686L;
+
     public VMOutOfMemoryException() {
         super();
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
 
 package com.sun.jdi;
 
+import com.sun.jdi.event.ModificationWatchpointEvent;
+
 /**
  * The mirror for a value in the target VM.
  * This interface is the root of a
@@ -33,11 +35,11 @@
  * Some examples of where values may be accessed:
  * <BLOCKQUOTE><TABLE><CAPTION style="display:none">layout</CAPTION>
  * <TR>
- *   <TD>{@link ObjectReference#getValue(com.sun.jdi.Field)
+ *   <TD>{@link ObjectReference#getValue(Field)
  *                 ObjectReference.getValue(Field)}
  *   <TD>- value of a field
  * <TR>
- *   <TD>{@link StackFrame#getValue(com.sun.jdi.LocalVariable)
+ *   <TD>{@link StackFrame#getValue(LocalVariable)
  *                 StackFrame.getValue(LocalVariable)}
  *   <TD>- value of a variable
  * <TR>
@@ -45,7 +47,7 @@
  *                 VirtualMachine.mirrorOf(double)}
  *   <TD>- created in the target VM by the JDI client
  * <TR>
- *   <TD>{@link com.sun.jdi.event.ModificationWatchpointEvent#valueToBe()
+ *   <TD>{@link ModificationWatchpointEvent#valueToBe()
  *                 ModificationWatchpointEvent.valueToBe()}
  *   <TD>- returned with an event
  * </TABLE></BLOCKQUOTE>
@@ -170,6 +172,7 @@
  */
 
 public interface Value extends Mirror {
+
     /**
      * Returns the run-time type of this value.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachine.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,26 @@
 
 package com.sun.jdi;
 
-import com.sun.jdi.event.EventQueue;
-import com.sun.jdi.ModuleReference;
-import com.sun.jdi.request.EventRequestManager;
-
 import java.util.List;
 import java.util.Map;
 
+import com.sun.jdi.connect.AttachingConnector;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.LaunchingConnector;
+import com.sun.jdi.connect.spi.Connection;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.MethodExitEvent;
+import com.sun.jdi.event.VMDisconnectEvent;
+import com.sun.jdi.event.VMStartEvent;
+import com.sun.jdi.request.BreakpointRequest;
+import com.sun.jdi.request.ClassPrepareRequest;
+import com.sun.jdi.request.EventRequestManager;
+import com.sun.jdi.request.MonitorContendedEnterRequest;
+import com.sun.jdi.request.MonitorContendedEnteredRequest;
+import com.sun.jdi.request.MonitorWaitRequest;
+import com.sun.jdi.request.MonitorWaitedRequest;
+import com.sun.jdi.request.VMDeathRequest;
+
 /**
  * A virtual machine targeted for debugging.
  * More precisely, a {@link Mirror mirror} representing the
@@ -44,27 +57,27 @@
  * are supported directly by this interface.
  * <P>
  * Instances of this interface are created by instances of
- * {@link com.sun.jdi.connect.Connector}. For example,
- * an {@link com.sun.jdi.connect.AttachingConnector AttachingConnector}
+ * {@link Connector}. For example,
+ * an {@link AttachingConnector AttachingConnector}
  * attaches to a target VM and returns its virtual machine mirror.
  * A Connector will typically create a VirtualMachine by invoking
  * the VirtualMachineManager's {@link
- * com.sun.jdi.VirtualMachineManager#createVirtualMachine(Connection)}
+ * VirtualMachineManager#createVirtualMachine(Connection)}
  * createVirtualMachine(Connection) method.
  * <p>
  * Note that a target VM launched by a launching connector is not
- * guaranteed to be stable until after the {@link com.sun.jdi.event.VMStartEvent} has been
+ * guaranteed to be stable until after the {@link VMStartEvent} has been
  * received.
  * <p>
  * Any method on <code>VirtualMachine</code> which
  * takes <code>VirtualMachine</code> as an parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * {@link VMDisconnectedException} if the target VM is
+ * disconnected and the {@link VMDisconnectEvent} has been or is
+ * available to be read from the {@link EventQueue}.
  * <p>
  * Any method on <code>VirtualMachine</code> which
  * takes <code>VirtualMachine</code> as an parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * {@link VMOutOfMemoryException} if the target VM has run out of memory.
  *
  * @author Robert Field
  * @author Gordon Hirsch
@@ -431,12 +444,10 @@
 
     /**
      * Returns the {@link java.lang.Process} object for this
-     * virtual machine if launched
-     * by a {@link com.sun.jdi.connect.LaunchingConnector}
+     * virtual machine if launched by a {@link LaunchingConnector}
      *
      * @return the {@link java.lang.Process} object for this virtual
-     * machine, or null if it was not launched by a
-     * {@link com.sun.jdi.connect.LaunchingConnector}.
+     * machine, or null if it was not launched by a {@link LaunchingConnector}.
      * @throws VMCannotBeModifiedException if the VirtualMachine is read-only
      * -see {@link VirtualMachine#canBeModified()}.
      */
@@ -552,7 +563,7 @@
     /**
      * Determines if the target VM supports filtering
      * events by specific instance object.  For example,
-     * see {@link com.sun.jdi.request.BreakpointRequest#addInstanceFilter}.
+     * see {@link BreakpointRequest#addInstanceFilter}.
      *
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
@@ -621,8 +632,8 @@
 
     /**
      * Determines if the target VM supports the creation of
-     * {@link com.sun.jdi.request.VMDeathRequest}s.
-     * @see com.sun.jdi.request.EventRequestManager#createVMDeathRequest
+     * {@link VMDeathRequest}s.
+     * @see EventRequestManager#createVMDeathRequest
      *
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
@@ -634,8 +645,8 @@
     /**
      * Determines if the target VM supports the inclusion of return values
      * in
-     * {@link com.sun.jdi.event.MethodExitEvent}s.
-     * @see com.sun.jdi.request.EventRequestManager#createMethodExitRequest
+     * {@link MethodExitEvent}s.
+     * @see EventRequestManager#createMethodExitRequest
      *
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
@@ -659,12 +670,11 @@
      */
     boolean canGetInstanceInfo();
 
-
     /**
      * Determines if the target VM supports the filtering of
      * class prepare events by source name.
      *
-     * see {@link com.sun.jdi.request.ClassPrepareRequest#addSourceNameFilter}.
+     * see {@link ClassPrepareRequest#addSourceNameFilter}.
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
      *
@@ -700,14 +710,14 @@
 
     /**
      * Determines if the target VM supports the creation of
-     * {@link com.sun.jdi.request.MonitorContendedEnterRequest}s.
-     * {@link com.sun.jdi.request.MonitorContendedEnteredRequest}s.
-     * {@link com.sun.jdi.request.MonitorWaitRequest}s.
-     * {@link com.sun.jdi.request.MonitorWaitedRequest}s.
-     * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnterRequest
-     * @see com.sun.jdi.request.EventRequestManager#createMonitorContendedEnteredRequest
-     * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitRequest
-     * @see com.sun.jdi.request.EventRequestManager#createMonitorWaitedRequest
+     * {@link MonitorContendedEnterRequest}s.
+     * {@link MonitorContendedEnteredRequest}s.
+     * {@link MonitorWaitRequest}s.
+     * {@link MonitorWaitedRequest}s.
+     * @see EventRequestManager#createMonitorContendedEnterRequest
+     * @see EventRequestManager#createMonitorContendedEnteredRequest
+     * @see EventRequestManager#createMonitorWaitRequest
+     * @see EventRequestManager#createMonitorWaitedRequest
      *
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
@@ -720,7 +730,7 @@
     /**
      * Determines if the target VM supports getting which
      * frame has acquired a monitor.
-     * @see com.sun.jdi.ThreadReference#ownedMonitorsAndFrames
+     * @see ThreadReference#ownedMonitorsAndFrames
      *
      * @return <code>true</code> if the feature is supported,
      * <code>false</code> otherwise.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,10 +25,18 @@
 
 package com.sun.jdi;
 
-import com.sun.jdi.connect.*;
+import java.io.IOException;
+import java.util.List;
+
+import com.sun.jdi.connect.AttachingConnector;
+import com.sun.jdi.connect.Connector;
+import com.sun.jdi.connect.LaunchingConnector;
+import com.sun.jdi.connect.ListeningConnector;
+import com.sun.jdi.connect.Transport;
 import com.sun.jdi.connect.spi.Connection;
-import java.util.List;
-import java.io.IOException;
+import com.sun.jdi.connect.spi.TransportService;
+import com.sun.jdi.event.VMDisconnectEvent;
+import com.sun.jdi.event.VMStartEvent;
 
 /**
  * A manager of connections to target virtual machines. The
@@ -41,14 +49,14 @@
  * mirror for available target VMs.
  * <p>
  * Connections can be made using one of several different
- * {@link com.sun.jdi.connect.Connector} objects. Each connector encapsulates
+ * {@link Connector} objects. Each connector encapsulates
  * a different way of connecting the debugger with a target VM.
  * <p>
  * The VirtualMachineManager supports many different scenarios for
  * connecting a debugger to a virtual machine. Four examples
  * are presented in the table below. The
  * examples use the command line syntax in Sun's implementation.
- * Some {@link com.sun.jdi.connect.Connector} implementations may require slightly
+ * Some {@link Connector} implementations may require slightly
  * different handling than presented below.
  *
  * <TABLE BORDER="1" style="width:75%">
@@ -59,8 +67,7 @@
  * <TR>
  * <TD>Debugger launches target VM (simplest, most-common scenario)</TD>
  *
- * <TD>Debugger calls the
- * {@link com.sun.jdi.connect.LaunchingConnector#launch(java.util.Map)}
+ * <TD>Debugger calls the {@link LaunchingConnector#launch(java.util.Map)}
  * method of the default connector, obtained with {@link #defaultConnector}. The
  * target VM is launched, and a connection between that VM and the
  * debugger is established. A {@link VirtualMachine} mirror is returned.
@@ -71,8 +78,7 @@
  * {@link #launchingConnectors} with desired characteristics
  * (for example, transport type, etc.).
  * <LI>
- * Debugger calls the
- * {@link com.sun.jdi.connect.LaunchingConnector#launch(java.util.Map)}
+ * Debugger calls the {@link LaunchingConnector#launch(java.util.Map)}
  * method of the selected connector. The
  * target VM is launched, and a connection between that VM and the
  * debugger is established. A {@link VirtualMachine} mirror is returned.
@@ -96,11 +102,10 @@
  * the name "xxx".
  * <LI>
  * Debugger presents the default connector parameters (obtained through
- * {@link com.sun.jdi.connect.Connector#defaultArguments()}) to the end user,
- * allowing the user to
+ * {@link Connector#defaultArguments()}) to the end user, allowing the user to
  * fill in the transport-specific address generated by the target VM.
  * <LI>
- * Debugger calls the {@link com.sun.jdi.connect.AttachingConnector#attach(java.util.Map)} method
+ * Debugger calls the {@link AttachingConnector#attach(java.util.Map)} method
  * of the selected to attach to the target VM. A {@link VirtualMachine}
  * mirror is returned.
  * </UL>
@@ -116,13 +121,13 @@
  * the list returned by {@link #listeningConnectors} for one or more
  * transports.</LI>
  * <LI>
- * Debugger calls the {@link com.sun.jdi.connect.ListeningConnector#startListening(java.util.Map)} method for each selected
+ * Debugger calls the {@link ListeningConnector#startListening(java.util.Map)} method for each selected
  * connector. For each call, a transport-specific address string is
  * generated and returned. The debugger makes the transport names and
  * corresponding address strings available to the end user.
  * <LI>
  * Debugger calls
- * {@link com.sun.jdi.connect.ListeningConnector#accept(java.util.Map)}
+ * {@link ListeningConnector#accept(java.util.Map)}
  * for each selected connector to wait for
  * a target VM to connect.</LI>
  * <LI>
@@ -131,10 +136,10 @@
  * where "xxx" the transport for one of the connectors selected by the
  * the debugger and "yyy"
  * is the address generated by
- * {@link com.sun.jdi.connect.ListeningConnector#accept(java.util.Map)} for that
+ * {@link ListeningConnector#accept(java.util.Map)} for that
  * transport.</LI>
  * <LI>
- * Debugger's call to {@link com.sun.jdi.connect.ListeningConnector#accept(java.util.Map)} returns
+ * Debugger's call to {@link ListeningConnector#accept(java.util.Map)} returns
  * a {@link VirtualMachine} mirror.</LI>
  * </UL>
  * </TD>
@@ -166,12 +171,12 @@
  * the name "xxx".
  * <LI>
  * Debugger changes the default connector parameters (obtained through
- * {@link com.sun.jdi.connect.Connector#defaultArguments()}) to specify
+ * {@link Connector#defaultArguments()}) to specify
  * the transport specific address at which the VM is listenig. Optionally,
  * other connector arguments can be presented to the user.
  * <LI>
  * Debugger calls the
- * {@link com.sun.jdi.connect.AttachingConnector#attach(java.util.Map)} method
+ * {@link AttachingConnector#attach(java.util.Map)} method
  * of the selected to attach to the target VM. A {@link VirtualMachine}
  * mirror is returned.
  * </UL>
@@ -181,7 +186,7 @@
  *
  * <p> Connectors are created at start-up time. That is, they
  * are created the first time that {@link
- * com.sun.jdi.Bootstrap#virtualMachineManager()} is invoked.
+ * Bootstrap#virtualMachineManager()} is invoked.
  * The list of all Connectors created at start-up time can be
  * obtained from the VirtualMachineManager by invoking the
  * {@link #allConnectors allConnectors} method.
@@ -189,23 +194,23 @@
  * <p> Connectors are created at start-up time if they are
  * installed on the platform. In addition, Connectors are created
  * automatically by the VirtualMachineManager to encapsulate any
- * {@link com.sun.jdi.connect.spi.TransportService} implementations
+ * {@link TransportService} implementations
  * that are installed on the platform. These two mechanisms for
  * creating Connectors are described here.
  *
  * <p> A Connector is installed on the platform if it is installed
  * in a jar file that is visible to the defining class loader of
- * the {@link com.sun.jdi.connect.Connector} type,
+ * the {@link Connector} type,
  * and that jar file contains a provider configuration file named
- * {@code com.sun.jdi.connect.Connector} in the resource directory
+ * {@code Connector} in the resource directory
  * {@code META-INF/services}, and the provider configuration file
  * lists the full-qualified class name of the Connector
  * implementation. A Connector is a class that implements the
- * {@link com.sun.jdi.connect.Connector Connector} interface. More
+ * {@link Connector Connector} interface. More
  * appropriately the class implements one of the specific Connector
- * types, namely {@link com.sun.jdi.connect.AttachingConnector
- * AttachingConnector}, {@link com.sun.jdi.connect.ListeningConnector
- * ListeningConnector}, or {@link com.sun.jdi.connect.LaunchingConnector
+ * types, namely {@link AttachingConnector
+ * AttachingConnector}, {@link ListeningConnector
+ * ListeningConnector}, or {@link LaunchingConnector
  * LaunchingConnector}. The format of the provider configuration file
  * is one fully-qualified class name per line. Space and tab characters
  * surrounding each class, as well as blank lines are ignored. The
@@ -221,40 +226,37 @@
  *
  * <p> In addition to Connectors installed on the platform the
  * VirtualMachineManager will also create Connectors to encapsulate
- * any {@link com.sun.jdi.connect.spi.TransportService} implementations
+ * any {@link TransportService} implementations
  * that are installed on the platform. A TransportService is
  * installed on the platform if it installed in a jar file that is
  * visible to the defining class loader for the
- * {@link com.sun.jdi.connect.spi.TransportService} type, and that jar
+ * {@link TransportService} type, and that jar
  * file contains a provider configuration file named
- * {@code com.sun.jdi.connect.spi.TransportService} in the resource
+ * {@code TransportService} in the resource
  * directory {@code META-INF/services}, and the provider
  * configuration file lists the full-qualified class name of the
  * TransportService implementation. A TransportService is a concrete
- * sub-class of {@link com.sun.jdi.connect.spi.TransportService
+ * sub-class of {@link TransportService
  * TransportService}. The format of the provider configuration file
  * is the same as the provider configuration file for Connectors
  * except that each class listed must be the fully-qualified class
  * name of a class that implements the TransportService interface.
  *
  * <p> For each TransportService installed on the platform, the
- * VirtualMachineManager creates a corresponding
- * {@link com.sun.jdi.connect.AttachingConnector} and
- * {@link com.sun.jdi.connect.ListeningConnector}. These
- * Connectors are created to encapsulate a {@link
- * com.sun.jdi.connect.Transport Transport} that in turn
- * encapsulates the TransportService.
+ * VirtualMachineManager creates a corresponding {@link AttachingConnector} and
+ * {@link ListeningConnector}. These Connectors are created to encapsulate a
+ * {@link Transport Transport} that in turn encapsulates the TransportService.
  * The AttachingConnector will be named based on the name of the
  * transport service concatenated with the string {@code Attach}.
  * For example, if the transport service {@link
- * com.sun.jdi.connect.spi.TransportService#name() name()} method
+ * TransportService#name() name()} method
  * returns {@code telepathic} then the AttachingConnector will
  * be named {@code telepathicAttach}. Similiarly the ListeningConnector
  * will be named with the string {@code Listen} tagged onto the
  * name of the transport service. The {@link
- * com.sun.jdi.connect.Connector#description() description()} method
+ * Connector#description() description()} method
  * of both the AttachingConnector, and the ListeningConnector, will
- * delegate to the {@link com.sun.jdi.connect.spi.TransportService#description()
+ * delegate to the {@link TransportService#description()
  * description()} method of the underlying transport service. Both
  * the AttachingConnector and the ListeningConnector will have two
  * Connector {@link com.sun.jdi.connect.Connector.Argument Arguments}.
@@ -268,7 +270,7 @@
  * timeout or accept timeout.
  *
  * <p> Initialization of the virtual machine manager will fail, that is
- * {@link com.sun.jdi.Bootstrap#virtualMachineManager()} will throw an
+ * {@link Bootstrap#virtualMachineManager()} will throw an
  * error if the virtual machine manager is unable to create any
  * connectors.
  *
@@ -282,45 +284,44 @@
      * be used as the launching connector when selection of a
      * connector with specific characteristics is unnecessary.
      *
-     * @return the default {@link com.sun.jdi.connect.LaunchingConnector}
+     * @return the default {@link LaunchingConnector}
      */
     LaunchingConnector defaultConnector();
 
     /**
-     * Returns the list of known {@link com.sun.jdi.connect.LaunchingConnector} objects.
+     * Returns the list of known {@link LaunchingConnector} objects.
      * Any of the returned objects can be used to launch a new target
      * VM and immediately create a {@link VirtualMachine} mirror for it.
      *
-     * Note that a target VM launched by a launching connector is not
-     * guaranteed to be stable until after the {@link com.sun.jdi.event.VMStartEvent} has been
-     * received.
-     * @return a list of {@link com.sun.jdi.connect.LaunchingConnector} objects.
+     * Note that a target VM launched by a launching connector is not guaranteed
+     * to be stable until after the {@link VMStartEvent} has been received.
+     * @return a list of {@link LaunchingConnector} objects.
      */
     List<LaunchingConnector> launchingConnectors();
 
     /**
-     * Returns the list of known {@link com.sun.jdi.connect.AttachingConnector} objects.
+     * Returns the list of known {@link AttachingConnector} objects.
      * Any of the returned objects can be used to attach to an existing target
      * VM and create a {@link VirtualMachine} mirror for it.
      *
-     * @return a list of {@link com.sun.jdi.connect.AttachingConnector} objects.
+     * @return a list of {@link AttachingConnector} objects.
      */
     List<AttachingConnector> attachingConnectors();
 
     /**
-     * Returns the list of known {@link com.sun.jdi.connect.ListeningConnector} objects.
+     * Returns the list of known {@link ListeningConnector} objects.
      * Any of the returned objects can be used to listen for a
      * connection initiated by a target VM
      * and create a {@link VirtualMachine} mirror for it.
      *
-     * @return a list of {@link com.sun.jdi.connect.ListeningConnector} objects.
+     * @return a list of {@link ListeningConnector} objects.
      */
     List<ListeningConnector> listeningConnectors();
 
     /**
-     * Returns the list of all known {@link com.sun.jdi.connect.Connector} objects.
+     * Returns the list of all known {@link Connector} objects.
      *
-     * @return a list of {@link com.sun.jdi.connect.Connector} objects.
+     * @return a list of {@link Connector} objects.
      */
      List<Connector> allConnectors();
 
@@ -332,7 +333,7 @@
      * target VMs to which this manager has initiated a connection.
      * A target VM will remain in this list
      * until the VM is disconnected.
-     * {@link com.sun.jdi.event.VMDisconnectEvent} is placed in the event queue
+     * {@link VMDisconnectEvent} is placed in the event queue
      * after the VM is removed from the list.
      *
      * @return a list of {@link VirtualMachine} objects, each mirroring
@@ -364,9 +365,9 @@
       * Create a virtual machine mirror for a target VM.
       *
       * <p> Creates a virtual machine mirror for a target VM
-      * for which a {@link com.sun.jdi.connect.spi.Connection Connection}
+      * for which a {@link Connection Connection}
       * already exists. A Connection is created when a {@link
-      * com.sun.jdi.connect.Connector Connector} establishes
+      * Connector Connector} establishes
       * a connection and successfully handshakes with a target VM.
       * A Connector can then use this method to create a virtual machine
       * mirror to represent the composite state of the target VM.
@@ -374,9 +375,9 @@
       * <p> The {@code process} argument specifies the
       * {@link java.lang.Process} object for the taget VM. It may be
       * specified as {@code null}. If the target VM is launched
-      * by a {@link com.sun.jdi.connect.LaunchingConnector
+      * by a {@link LaunchingConnector
       * LaunchingConnector} the {@code process} argument should be
-      * specified, otherwise calling {@link com.sun.jdi.VirtualMachine#process()}
+      * specified, otherwise calling {@link VirtualMachine#process()}
       * on the created virtual machine will return {@code null}.
       *
       * <p> This method exists so that Connectors may create
@@ -400,8 +401,8 @@
       * @throws IllegalStateException
       *         if the connection is not open
       *
-      * @see com.sun.jdi.connect.spi.Connection#isOpen()
-      * @see com.sun.jdi.VirtualMachine#process()
+      * @see Connection#isOpen()
+      * @see VirtualMachine#process()
       *
       * @since 1.5
       */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,10 @@
 
 package com.sun.jdi.connect;
 
-import com.sun.jdi.VirtualMachine;
+import java.io.IOException;
 import java.util.Map;
-import java.io.IOException;
+
+import com.sun.jdi.VirtualMachine;
 
 /**
  * A connector which attaches to a previously running target VM.
@@ -36,6 +37,7 @@
  * @since  1.3
  */
 public interface AttachingConnector extends Connector {
+
     /**
      * Attaches to a running application and returns a
      * mirror of its VM.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/Connector.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/Connector.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
 
 package com.sun.jdi.connect;
 
-import java.util.Map;
+import java.io.Serializable;
 import java.util.List;
-import java.io.Serializable;
+import java.util.Map;
 
 /**
  * A method of connection between a debugger and a target VM.
@@ -46,6 +46,7 @@
  * @since  1.3
  */
 public interface Connector {
+
     /**
      * Returns a short identifier for the connector. Connector implementors
      * should follow similar naming conventions as are used with packages
@@ -82,7 +83,7 @@
      * @return the map associating argument names with argument
      * information and default value.
      */
-    Map<String,Connector.Argument> defaultArguments();
+    Map<String, Connector.Argument> defaultArguments();
 
     /**
      * Specification for and value of a Connector argument.
@@ -92,6 +93,7 @@
      * or {@link Connector.SelectedArgument}.
      */
     public interface Argument extends Serializable {
+
         /**
          * Returns a short, unique identifier for the argument.
          * Not intended for exposure to end-user.
@@ -157,6 +159,7 @@
      * by the localized versions of the strings "true" and "false".
      */
     public interface BooleanArgument extends Argument {
+
         /**
          * Sets the value of the argument.
          */
@@ -197,6 +200,7 @@
      * by their corresponding strings.
      */
     public interface IntegerArgument extends Argument {
+
         /**
          * Sets the value of the argument.
          * The value should be checked with {@link #isValid(int)}
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/IllegalConnectorArgumentsException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,7 @@
 public class IllegalConnectorArgumentsException extends Exception {
 
     private static final long serialVersionUID = -3042212603611350941L;
+
     List<String> names;
 
     /**
@@ -48,8 +49,7 @@
      * @param s the detailed message.
      * @param name the name of the invalid or inconsistent argument.
      */
-    public IllegalConnectorArgumentsException(String s,
-                                              String name) {
+    public IllegalConnectorArgumentsException(String s, String name) {
         super(s);
         names = new ArrayList<String>(1);
         names.add(name);
@@ -65,7 +65,6 @@
      */
     public IllegalConnectorArgumentsException(String s, List<String> names) {
         super(s);
-
         this.names = new ArrayList<String>(names);
     }
 
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/LaunchingConnector.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/LaunchingConnector.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,11 @@
 
 package com.sun.jdi.connect;
 
-import com.sun.jdi.VirtualMachine;
+import java.io.IOException;
 import java.util.Map;
-import java.io.IOException;
+
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.VMStartEvent;
 
 /**
  * A connector which can launch a target VM before connecting to it.
@@ -36,6 +38,7 @@
  * @since  1.3
  */
 public interface LaunchingConnector extends Connector {
+
     /**
      * Launches an application and connects to its VM. Properties
      * of the launch (possibly including options,
@@ -47,14 +50,14 @@
      * Argument map values can be changed, but map entries should not be
      * added or deleted.
      * <p>A target VM launched by a launching connector is not
-     * guaranteed to be stable until after the {@link com.sun.jdi.event.VMStartEvent} has been
+     * guaranteed to be stable until after the {@link VMStartEvent} has been
      * received.
      * <p>
      * <b>Important note:</b> If a target VM is launched through this
      * funcctions, its output and error streams must be read as it
      * executes. These streams are available through the
      * {@link java.lang.Process Process} object returned by
-     * {@link com.sun.jdi.VirtualMachine#process}. If the streams are not periodically
+     * {@link VirtualMachine#process}. If the streams are not periodically
      * read, the target VM will stop executing when the buffers for these
      * streams are filled.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/ListeningConnector.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/ListeningConnector.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,9 @@
 
 package com.sun.jdi.connect;
 
+import java.io.IOException;
 import java.util.Map;
-import java.io.IOException;
+
 import com.sun.jdi.VirtualMachine;
 
 /**
@@ -36,6 +37,7 @@
  * @since  1.3
  */
 public interface ListeningConnector extends Connector {
+
     /**
      * Indicates whether this listening connector supports multiple
      * connections for a single argument map. If so, a call to
@@ -96,7 +98,6 @@
     void stopListening(Map<String,? extends Connector.Argument> arguments)
         throws IOException, IllegalConnectorArgumentsException;
 
-
     /**
      * Waits for a target VM to attach to this connector.
      *
@@ -113,5 +114,4 @@
      */
     VirtualMachine accept(Map<String,? extends Connector.Argument> arguments)
         throws IOException, IllegalConnectorArgumentsException;
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/Transport.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/Transport.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,24 +25,24 @@
 
 package com.sun.jdi.connect;
 
-import com.sun.jdi.connect.spi.TransportService;        // for javadoc
+import com.sun.jdi.connect.spi.TransportService;
 
 /**
  * A method of communication between a debugger and a target VM.
  *
  * <p> A Transport represents the transport mechanism used by a
- * {@link com.sun.jdi.connect.Connector Connector} to establish a
- * connection with a target VM. It consists of a name which is obtained
- * by invoking the {@link #name} method. Furthermore, a Transport
- * encapsulates a {@link com.sun.jdi.connect.spi.TransportService
- * TransportService} which is the underlying service used
- * to establish connections and exchange Java Debug Wire Protocol
- * (JDWP) packets with a target VM.
+ * {@link Connector Connector} to establish a connection with a
+ * target VM. It consists of a name which is obtained by invoking
+ * the {@link #name} method. Furthermore, a Transport encapsulates a
+ * {@link TransportService TransportService} which is the underlying
+ * service used to establish connections and exchange
+ * Java Debug Wire Protocol (JDWP) packets with a target VM.
  *
  * @author Gordon Hirsch
  * @since  1.3
  */
 public interface Transport {
+
     /**
      * Returns a short identifier for the transport.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/TransportTimeoutException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/TransportTimeoutException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,8 @@
 
 package com.sun.jdi.connect;
 
+import com.sun.jdi.connect.spi.TransportService;
+
 /**
  * This exception may be thrown as a result of a timeout
  * when attaching to a target VM, or waiting to accept a
@@ -39,23 +41,23 @@
  * exception may be thrown if the connector supports a
  * timeout connector argument when accepting.
  *
- * <p> In addition, for developers creating {@link
- * com.sun.jdi.connect.spi.TransportService TransportService}
- * implementations this exception is thrown when
- * {@link com.sun.jdi.connect.spi.TransportService#attach attach}
- * times out when establishing a connection to a target VM,
- * or {@link com.sun.jdi.connect.spi.TransportService#accept
- * accept} times out while waiting for a target VM to connect. </p>
+ * <p> In addition, for developers creating {@link TransportService
+ * TransportService} implementations this exception is thrown when
+ * {@link TransportService#attach attach} times out when establishing a
+ * connection to a target VM, or {@link TransportService#accept accept}
+ * times out while waiting for a target VM to connect. </p>
  *
  * @see AttachingConnector#attach
  * @see ListeningConnector#accept
- * @see com.sun.jdi.connect.spi.TransportService#attach
- * @see com.sun.jdi.connect.spi.TransportService#accept
+ * @see TransportService#attach
+ * @see TransportService#accept
  *
  * @since 1.5
  */
 public class TransportTimeoutException extends java.io.IOException {
+
     private static final long serialVersionUID = 4107035242623365074L;
+
     /**
      * Constructs a {@code TransportTimeoutException} with no detail
      * message.
@@ -63,7 +65,6 @@
     public TransportTimeoutException() {
     }
 
-
     /**
      * Constructs a {@code TransportTimeoutException} with the
      * specified detail message.
@@ -73,5 +74,4 @@
     public TransportTimeoutException(String message) {
         super(message);
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/VMStartException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
 public class VMStartException extends Exception {
 
     private static final long serialVersionUID = 6408644824640801020L;
+
     Process process;
 
     public VMStartException(Process process) {
@@ -44,8 +45,7 @@
         this.process = process;
     }
 
-    public VMStartException(String message,
-                            Process process) {
+    public VMStartException(String message, Process process) {
         super(message);
         this.process = process;
     }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/ClosedConnectionException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,9 @@
  * @since 1.5
  */
 public class ClosedConnectionException extends java.io.IOException {
+
     private static final long serialVersionUID = 3877032124297204774L;
+
     /**
      * Constructs a {@code ClosedConnectionException} with no detail
      * message.
@@ -63,5 +65,4 @@
     public ClosedConnectionException(String message) {
         super(message);
     }
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,14 +32,13 @@
  *
  * <p> A Connection represents a bi-directional communication channel
  * between a debugger and a target VM. A Connection is created when
- * {@link com.sun.jdi.connect.spi.TransportService TransportService}
- * establishes a connection and successfully handshakes with a target
- * VM. A TransportService implementation provides a reliable
- * JDWP packet transportation service and consequently a Connection
- * provides a reliable flow of JDWP packets between the debugger
- * and the target VM. A Connection is stream oriented, that is, the
- * JDWP packets written to a connection are read by the target VM
- * in the order in which they were written. Similiarly packets written
+ * {@link TransportService TransportService} establishes a connection
+ * and successfully handshakes with a target VM. A TransportService
+ * implementation provides a reliable JDWP packet transportation service
+ * and consequently a Connection provides a reliable flow of JDWP packets
+ * between the debugger and the target VM. A Connection is stream oriented,
+ * that is, the JDWP packets written to a connection are read by the target VM
+ * in the order in which they were written. Similarly packets written
  * to a Connection by the target VM are read by the debugger in the
  * order in which they were written.
  *
@@ -55,7 +54,6 @@
  *
  * @since 1.5
  */
-
 public abstract class Connection {
 
     /**
@@ -82,7 +80,7 @@
      * thrown. The first byte of the packet is stored in element
      * {@code 0} of the byte array, the second in element {@code 1},
      * and so on. The bytes in the byte array are laid out as per the
-     * <a href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
+     * <a href="{@docRoot}/../specs/jdwp/jdwp-spec.html">
      * JDWP specification</a>. That is, all fields in the packet
      * are in big endian order as per the JDWP specification.
      *
@@ -119,7 +117,7 @@
      *
      * <p> The byte array provided to this method should be laid out
      * as per the <a
-     * href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
+     * href="{@docRoot}/../specs/jdwp/jdwp-spec.html">
      * JDWP specification</a>. That is, all fields in the packet
      * are in big endian order. The first byte, that is element
      * {@code pkt[0]}, is the first byte of the {@code length} field.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/TransportService.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/TransportService.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,8 @@
 package com.sun.jdi.connect.spi;
 
 import java.io.IOException;
+
+import com.sun.jdi.connect.Transport;
 import com.sun.jdi.connect.TransportTimeoutException;
 
 /**
@@ -35,15 +37,15 @@
  * <p> A transport service is a concrete subclass of this class
  * that has a zero-argument constructor and implements the abstract
  * methods specified below. It is the underlying service
- * used by a {@link com.sun.jdi.connect.Transport} for
- * connections between a debugger and a target VM.
+ * used by a {@link Transport} for connections between a debugger
+ * and a target VM.
  *
  * <p> A transport service is used to establish a connection
  * between a debugger and a target VM, and to transport Java
  * Debug Wire Protocol (JDWP) packets over an underlying
  * communication protocol. In essence a transport service
  * implementation binds JDWP (as specified in the
- * <a href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
+ * <a href="{@docRoot}/../specs/jdwp/jdwp-spec.html">
  * JDWP specification</a>) to an underlying communication
  * protocol. A transport service implementation provides
  * a reliable JDWP packet transportation service. JDWP
@@ -76,7 +78,6 @@
  *
  * @since 1.5
  */
-
 public abstract class TransportService {
 
     /**
@@ -108,7 +109,6 @@
          */
         public abstract boolean supportsMultipleConnections();
 
-
         /**
          * Tell whether or not this transport service supports a timeout
          * when attaching to a target VM.
@@ -144,7 +144,6 @@
          * @see #accept(TransportService.ListenKey,long,long)
          */
         public abstract boolean supportsHandshakeTimeout();
-
     }
 
     /**
@@ -166,7 +165,7 @@
      * is followed by a handshake to ensure that the connection is
      * to a target VM. The handshake involves the exchange
      * of a string <i>JDWP-Handshake</i> as specified in the <a
-     * href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
+     * href="{@docRoot}/../specs/jdwp/jdwp-spec.html">
      * Java Debug Wire Protocol</a> specification.
      *
      * @param   address
@@ -315,7 +314,7 @@
      * connection is indeed to a target VM. The handshake involves
      * the exchange of a string <i>JDWP-Handshake</i> as specified
      * in the <a
-     * href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
+     * href="{@docRoot}/../specs/jdwp/jdwp-spec.html">
      * Java Debug Wire Protocol</a> specification.
      *
      * @param   listenKey
@@ -373,5 +372,4 @@
      */
     public abstract Connection accept(ListenKey listenKey, long acceptTimeout,
         long handshakeTimeout) throws IOException;
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/AccessWatchpointEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a field access in the target VM. Field modifications
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/BreakpointEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/BreakpointEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,24 +25,20 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
-
-import java.util.List;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.BreakpointRequest;
 
 /**
  * Notification of a breakpoint in the target VM.
- * The breakpoint event
- * is generated before the code at its location is executed.
- * When a location
- * is reached which satisfies a currently enabled
- * {@link com.sun.jdi.request.BreakpointRequest breakpoint request},
- * an {@link EventSet event set}
- * containing an instance of this class will be added
- * to the VM's event queue.
+ *
+ * The breakpoint event is generated before the code at its location
+ * is executed. When a location is reached which satisfies a currently enabled
+ * {@link BreakpointRequest breakpoint request}, an {@link EventSet event set}
+ * containing an instance of this class will be added to the VM's event queue.
  *
  * @see EventQueue
  * @see VirtualMachine
- * @see com.sun.jdi.request.BreakpointRequest
+ * @see BreakpointRequest
  *
  * @author Robert Field
  * @since  1.3
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassPrepareEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassPrepareEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,15 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.EventRequest;
 
 /**
  * Notification of a class prepare in the target VM. See the JVM
  * specification for a definition of class preparation. Class prepare
- * events are not generated for primtiive classes (for example,
+ * events are not generated for primitive classes (for example,
  * java.lang.Integer.TYPE).
  *
  * @see EventQueue
@@ -40,6 +43,7 @@
  * @since  1.3
  */
 public interface ClassPrepareEvent extends Event {
+
     /**
      * Returns the thread in which this event has occurred.
      * <p>
@@ -51,7 +55,7 @@
      * If the event was generated by a debugger system thread, the
      * value returned by this method is null, and if the requested
      * suspend policy for the event was
-     * {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD},
+     * {@link EventRequest#SUSPEND_EVENT_THREAD},
      * all threads will be suspended instead, and the
      * {@link EventSet#suspendPolicy} will reflect this change.
      * <p>
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassUnloadEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ClassUnloadEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a class unload in the target VM.
@@ -40,6 +40,7 @@
  * @since  1.3
  */
 public interface ClassUnloadEvent extends Event {
+
     /**
      * Returns the name of the class that has been unloaded.
      */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/Event.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/Event.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Mirror;
+import com.sun.jdi.VirtualMachine;
 import com.sun.jdi.request.EventRequest;
 
 /**
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventIterator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventIterator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
-
 import java.util.Iterator;
 
 /**
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventQueue.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventQueue.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,28 +25,29 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Mirror;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.EventRequest;
 
 /**
  * Manager of incoming debugger events for a target VM.
  * Events are always grouped in {@link EventSet}s.
  * EventSets generated by the debugger back end can be read
  * here. There is one instance of EventQueue assigned to a particular
- * {@link com.sun.jdi.VirtualMachine VirtualMachine}.
+ * {@link VirtualMachine VirtualMachine}.
  * <P>
  * Some events cause the suspension of the target VM - event requests
  * ({@link com.sun.jdi.request}) with a
- * {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
- * of {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL}
- * or {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD
- * SUSPEND_EVENT_THREAD} and sometimes
- * {@link VMStartEvent}.
+ * {@link EventRequest#suspendPolicy() suspend policy}
+ * of {@link EventRequest#SUSPEND_ALL SUSPEND_ALL}
+ * or {@link EventRequest#SUSPEND_EVENT_THREAD
+ * SUSPEND_EVENT_THREAD} and sometimes {@link VMStartEvent}.
  * If these suspensions are not resumed the target VM will hang.
  * Thus, it is always good policy to
- * {@link #remove() remove()} every EventSet from the
- * event queue until an EventSet containing a
- * {@link VMDisconnectEvent} is read.
- * Unless {@link com.sun.jdi.VirtualMachine#resume() resume} is
+ * {@link #remove() remove()} every EventSet from the event queue until
+ * an EventSet containing a {@link VMDisconnectEvent} is read.
+ * Unless {@link VirtualMachine#resume() resume} is
  * being handled in another way, each EventSet should invoke
  * {@link EventSet#resume()}.
  *
@@ -56,18 +57,16 @@
  * @author Robert Field
  * @since  1.3
  */
-
 public interface EventQueue extends Mirror {
 
     /**
      * Waits forever for the next available event.
      *
      * @return the next {@link EventSet}.
-     * @throws InterruptedException if any thread has interrupted
-     * this thread.
-     * @throws com.sun.jdi.VMDisconnectedException if the connection
-     * to the target VM is no longer available.  Note this will always
-     * be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}.
+     * @throws InterruptedException if any thread has interrupted this thread.
+     * @throws VMDisconnectedException if the connection
+     * to the target VM is no longer available. Note this will always
+     * be preceded by a {@link VMDisconnectEvent}.
      */
     EventSet remove() throws InterruptedException;
 
@@ -78,9 +77,9 @@
      * @return the next {@link EventSet}, or null if there is a timeout.
      * @throws InterruptedException if any thread has interrupted
      * this thread.
-     * @throws com.sun.jdi.VMDisconnectedException if the connection
-     * to the target VM is no longer available.  Note this will always
-     * be preceded by a {@link com.sun.jdi.event.VMDisconnectEvent}.
+     * @throws VMDisconnectedException if the connection
+     * to the target VM is no longer available. Note this will always
+     * be preceded by a {@link VMDisconnectEvent}.
      * @throws IllegalArgumentException if the timeout argument
      * contains an illegal value.
      */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,19 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import java.util.Set;
 
-import java.util.Set;
+import com.sun.jdi.Location;
+import com.sun.jdi.Mirror;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.BreakpointRequest;
+import com.sun.jdi.request.EventRequest;
 
 /**
  * Several {@link Event} objects may be created at a given time by
  * the target {@link VirtualMachine}. For example, there may be
- * more than one {@link com.sun.jdi.request.BreakpointRequest}
- * for a given {@link Location}
+ * more than one {@link BreakpointRequest} for a given {@link Location}
  * or you might single step to the same location as a
  * BreakpointRequest.  These {@link Event} objects are delivered
  * together as an EventSet.  For uniformity, an EventSet is always used
@@ -125,18 +129,15 @@
  * @author Robert Field
  * @since  1.3
  */
-
 public interface EventSet extends Mirror, Set<Event> {
 
     /**
      * Returns the policy used to suspend threads in the target VM
      * for this event set. This policy is selected from the suspend
      * policies for each event's request; the target VM chooses the
-     * policy which suspends the most threads.  The target VM
-     * suspends threads according to that policy
-     * and that policy is returned here. See
-     * {@link com.sun.jdi.request.EventRequest} for the possible
-     * policy values.
+     * policy which suspends the most threads.  The target VM suspends
+     * threads according to that policy and that policy is returned here.
+     * See {@link EventRequest} for the possible policy values.
      * <p>
      * In rare cases, the suspend policy may differ from the requested
      * value if a {@link ClassPrepareEvent} has occurred in a
@@ -144,9 +145,9 @@
      * for details.
      *
      * @return the suspendPolicy which is either
-     * {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL},
-     * {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD SUSPEND_EVENT_THREAD} or
-     * {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE SUSPEND_NONE}.
+     * {@link EventRequest#SUSPEND_ALL SUSPEND_ALL},
+     * {@link EventRequest#SUSPEND_EVENT_THREAD SUSPEND_EVENT_THREAD} or
+     * {@link EventRequest#SUSPEND_NONE SUSPEND_NONE}.
      */
     int suspendPolicy();
 
@@ -157,13 +158,11 @@
 
     /**
      * Resumes threads suspended by this event set. If the {@link #suspendPolicy}
-     * is {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL}, a call
-     * to this method is equivalent to
-     * {@link com.sun.jdi.VirtualMachine#resume}. If the
-     * suspend policy is
-     * {@link com.sun.jdi.request.EventRequest#SUSPEND_EVENT_THREAD},
+     * is {@link EventRequest#SUSPEND_ALL}, a call to this method is equivalent to
+     * {@link VirtualMachine#resume}. If the suspend policy is
+     * {@link EventRequest#SUSPEND_EVENT_THREAD},
      * a call to this method is equivalent to
-     * {@link com.sun.jdi.ThreadReference#resume} for the event thread.
+     * {@link ThreadReference#resume} for the event thread.
      * Otherwise, a call to this method is a no-op.
      */
     void resume();
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ExceptionEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ExceptionEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,14 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Location;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.request.ExceptionRequest;
 
 /**
  * Notification of an exception in the target VM. When an exception
  * is thrown which satisfies a currently enabled
- * {@link com.sun.jdi.request.ExceptionRequest exception request},
+ * {@link ExceptionRequest exception request},
  * an {@link EventSet event set}
  * containing an instance of this class will be added
  * to the VM's event queue.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/LocatableEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/LocatableEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
-
-import java.util.List;
-
+import com.sun.jdi.Locatable;
+import com.sun.jdi.ThreadReference;
 /**
  * Abstract superinterface of events which have both location
  * and thread.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodEntryEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodEntryEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Method;
 
 /**
  * Notification of a method invocation in the target VM. This event
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodExitEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MethodExitEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Method;
+import com.sun.jdi.ObjectCollectedException;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a method return in the target VM. This event
@@ -68,6 +71,5 @@
      *
      * @since 1.6
      */
-
     public Value returnValue();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ModificationWatchpointEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,9 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.ModificationWatchpointRequest;
 
 /**
  * Notification of a field modification in the
@@ -33,7 +35,7 @@
  *
  * @see EventQueue
  * @see VirtualMachine
- * @see com.sun.jdi.request.ModificationWatchpointRequest
+ * @see ModificationWatchpointRequest
  *
  * @author Robert Field
  * @since  1.3
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
 
 /**
  *
@@ -54,5 +55,5 @@
      *
      * @return an {@link ObjectReference} for the monitor.
      */
-    public ObjectReference  monitor();
+    public ObjectReference monitor();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
 
 /**
  *
@@ -53,6 +54,5 @@
      *
      * @return an {@link ObjectReference} for the monitor.
      */
-    public ObjectReference  monitor();
-
+    public ObjectReference monitor();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
 
 /**
  * Notification that a thread in the target VM is about to
@@ -52,12 +53,12 @@
      *
      * @return an {@link ObjectReference} for the monitor.
      */
-    public ObjectReference  monitor();
+    public ObjectReference monitor();
 
     /**
      * Returns the number of millisecond the thread will wait.
      *
      * @return a {@code jlong} containing monitor wait time in milliseconds.
      */
-    public long  timeout();
+    public long timeout();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
 
 /**
  * Notification that a thread in the target VM has finished
@@ -52,14 +53,12 @@
      *
      * @return an {@link ObjectReference} for the monitor.
      */
-    public ObjectReference  monitor();
+    public ObjectReference monitor();
 
     /**
      * Returns whether the wait has timed out or been interrupted.
      *
      * @return {@code true} if the wait is timed out.
      */
-    public boolean  timedout();
-
-
+    public boolean timedout();
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/StepEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/StepEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,20 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.request.StepRequest;
 
 /**
  * Notification of step completion in the target VM.
- * The step event
- * is generated immediately before the code at its location is executed;
- * thus, if the step is entering a new method (as might occur with
- * {@link com.sun.jdi.request.StepRequest#STEP_INTO StepRequest.STEP_INTO})
+ * The step event is generated immediately before the code at its location
+ * is executed. Thus, if the step is entering a new method (as might occur
+ * with {@link StepRequest#STEP_INTO StepRequest.STEP_INTO})
  * the location of the event is the first instruction of the method.
  * When a step leaves a method, the location of the event will be the
  * first instruction after the call in the calling method; note that
  * this location may not be at a line boundary, even if
- * {@link com.sun.jdi.request.StepRequest#STEP_LINE StepRequest.STEP_LINE}
- * was used.
+ * {@link StepRequest#STEP_LINE StepRequest.STEP_LINE} was used.
  *
- * @see com.sun.jdi.request.StepRequest
+ * @see StepRequest
  * @see EventQueue
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadDeathEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadDeathEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a completed thread in the target VM. The
@@ -46,6 +47,7 @@
  * @since  1.3
  */
 public interface ThreadDeathEvent extends Event {
+
     /**
      * Returns the thread which is terminating.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadStartEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/ThreadStartEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a new running thread in the target VM.
@@ -53,6 +54,7 @@
  * @since  1.3
  */
 public interface ThreadStartEvent extends Event {
+
     /**
      * Returns the thread which has started.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDeathEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDeathEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,43 +25,41 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.EventRequest;
+import com.sun.jdi.request.EventRequestManager;
+import com.sun.jdi.request.VMDeathRequest;
 
 /**
  * Notification of target VM termination.
  * This event occurs if the target VM terminates before the
  * VM disconnects ({@link VMDisconnectEvent}).
- * Thus, this event will NOT occur if
- * external forces terminate the connection (e.g. a crash)
- * or if the connection is intentionally terminated with
- * {@link com.sun.jdi.VirtualMachine#dispose()
- *      VirtualMachine.dispose()}
+ * Thus, this event will NOT occur if external forces terminate
+ * the connection (e.g. a crash) or if the connection is intentionally
+ * terminated with {@link VirtualMachine#dispose() VirtualMachine.dispose()}
  * <P>
- * On VM termination, a single unsolicited VMDeathEvent
- * will always be sent with a
- * {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
- * of {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE SUSPEND_NONE}.
+ * On VM termination, a single unsolicited VMDeathEvent will always be sent with a
+ * {@link EventRequest#suspendPolicy() suspend policy}
+ * of {@link EventRequest#SUSPEND_NONE SUSPEND_NONE}.
  * Additional VMDeathEvents will be sent in the same event set if they are
- * requested with a
- * {@link com.sun.jdi.request.VMDeathRequest VMDeathRequest}.
+ * requested with a {@link VMDeathRequest VMDeathRequest}.
  * <P>
  * The VM is still intact and can be queried at the point this
  * event was initiated but immediately thereafter it is not
  * considered intact and cannot be queried.
  * Note: If the enclosing {@link EventSet} has a
- * {@link com.sun.jdi.request.EventRequest#suspendPolicy() suspend policy}
- * other than
- * {@link com.sun.jdi.request.EventRequest#SUSPEND_ALL SUSPEND_ALL}
+ * {@link EventRequest#suspendPolicy() suspend policy} other than
+ * {@link EventRequest#SUSPEND_ALL SUSPEND_ALL}
  * the initiating point may be long past.
  * <P>
  * All VMDeathEvents will be in a single {@link EventSet},
- * no other events will be in the event set.  A resume
+ * no other events will be in the event set. A resume
  * must occur to continue execution after any event set which
  * performs suspensions - in this case to allow proper shutdown.
  *
  * @see VMDisconnectEvent
- * @see com.sun.jdi.request.EventRequestManager#createVMDeathRequest
- * @see com.sun.jdi.request.VMDeathRequest
+ * @see EventRequestManager#createVMDeathRequest
+ * @see VMDeathRequest
  * @see EventQueue
  * @see VirtualMachine
  *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDisconnectEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMDisconnectEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,14 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.request.EventRequest;
 
 /**
  * Notification of disconnection from target VM.
  * May be caused by normal termination of a VM,
  * VM termination by uncaught exception or other error,
- * debugger action (
- * {@link VirtualMachine#dispose} or
+ * debugger action ({@link VirtualMachine#dispose} or
  * {@link VirtualMachine#exit}) or by external events
  * (for example, target process termination by the
  * operating system, transport termination, etc).
@@ -41,9 +41,9 @@
  * will be preceded by a {@link VMDeathEvent}.
  * <p>
  * This event is always sent.
- * There is no corresponding {@link com.sun.jdi.request.EventRequest}.
+ * There is no corresponding {@link EventRequest}.
  * The enclosing singleton {@link EventSet} always has a
- * suspend policy of {@link com.sun.jdi.request.EventRequest#SUSPEND_NONE}.
+ * suspend policy of {@link EventRequest#SUSPEND_NONE}.
  *
  * @see VMDeathEvent
  * @see EventQueue
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMStartEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/VMStartEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of initialization of a target VM.  This event is
@@ -44,6 +45,7 @@
  * @since  1.3
  */
 public interface VMStartEvent extends Event {
+
     /**
      * Returns the initial thread of the VM which has started.
      *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/WatchpointEvent.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/event/WatchpointEvent.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,11 @@
 
 package com.sun.jdi.event;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Field;
+import com.sun.jdi.ObjectCollectedException;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.Value;
+import com.sun.jdi.VirtualMachine;
 
 /**
  * Notification of a field triggered event encountered by a thread in the
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/AccessWatchpointRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,9 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.event.AccessWatchpointEvent;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
 
 /**
  * Request for notification when the contents of a field are accessed
@@ -36,20 +38,19 @@
  * GetStatic&lt;Type&gt;Field</code>).
  * Access by JDI does not trigger this event.
  * When an enabled AccessWatchpointRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing an
- * {@link com.sun.jdi.event.AccessWatchpointEvent AccessWatchpointEvent} will be placed
- * on the {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing an
+ * {@link AccessWatchpointEvent AccessWatchpointEvent} will be placed
+ * on the {@link EventQueue EventQueue}.
  * The collection of existing ExceptionRequests is
  * managed by the {@link EventRequestManager}
- * The collection of existing
- * watchpoints is
+ * The collection of existing watchpoints is
  * managed by the {@link EventRequestManager}.
  * <p>
  * Note that the modification
  * of a Field is not considered an access.
  *
  * @see ModificationWatchpointRequest
- * @see com.sun.jdi.event.EventQueue
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/BreakpointRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/BreakpointRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,29 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Locatable;
+import com.sun.jdi.Location;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
 
 /**
  * Identifies a {@link Location} in the target VM at which
  * execution should be stopped. When an enabled BreakpointRequest is
  * satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing an
- * {@link com.sun.jdi.event.BreakpointEvent BreakpointEvent}
+ * {@link EventSet event set} containing an
+ * {@link BreakpointEvent BreakpointEvent}
  * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue} and
+ * {@link EventQueue EventQueue} and
  * the application is interrupted. The collection of existing breakpoints is
  * managed by the {@link EventRequestManager}
  *
  * @see Location
- * @see com.sun.jdi.event.BreakpointEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see BreakpointEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassPrepareRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassPrepareRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,23 +25,27 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.ClassPrepareEvent;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
 
 /**
  * Request for notification when a class is prepared in the target VM.
  * When an enabled ClassPrepareRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.ClassPrepareEvent ClassPrepareEvent}
+ * {@link EventSet event set} containing a
+ * {@link ClassPrepareEvent ClassPrepareEvent}
  * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventQueue EventQueue}.
  * The collection of existing ClassPrepareRequests is
  * managed by the {@link EventRequestManager}
  * <p>
  * Class preparation is defined in the Java Virtual Machine
  * Specification.
  *
- * @see com.sun.jdi.event.ClassPrepareEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see ClassPrepareEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassUnloadRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ClassUnloadRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,24 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.event.ClassUnloadEvent;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
 
 /**
  * Request for notification when a class is unloaded in the target VM.
  * When an enabled ClassUnloadRequest is satisfied, a
- * {@link com.sun.jdi.event.EventSet event set} containing an
- * {@link com.sun.jdi.event.ClassUnloadEvent ClassUnloadEvent} will
- * be placed on the {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing an
+ * {@link ClassUnloadEvent ClassUnloadEvent} will
+ * be placed on the {@link EventQueue EventQueue}.
  * The collection of existing ClassUnloadRequests is
  * managed by the {@link EventRequestManager}
  * <p>
  * Refer to the Java Virtual Machine Specification for more information
  * on class unloading.
  *
- * @see com.sun.jdi.event.ClassUnloadEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see ClassUnloadEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/DuplicateRequestException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/DuplicateRequestException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
  * @since  1.3
  */
 public class DuplicateRequestException extends RuntimeException {
+
     private static final long serialVersionUID = -3719784920313411060L;
 
     public DuplicateRequestException() {
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,22 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Mirror;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VMDisconnectedException;
+import com.sun.jdi.VMOutOfMemoryException;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.VMDisconnectEvent;
 
 /**
  * Represents a request for notification of an event.  Examples include
  * {@link BreakpointRequest} and {@link ExceptionRequest}.
  * When an event occurs for which an enabled request is present,
- * an  {@link com.sun.jdi.event.EventSet EventSet} will
- * be placed on the {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * an  {@link EventSet EventSet} will
+ * be placed on the {@link EventQueue EventQueue}.
  * The collection of existing event requests is
  * managed by the {@link EventRequestManager}.
  * <p>
@@ -63,16 +71,16 @@
  * <p>
  * Any method on {@code EventRequest} which
  * takes {@code EventRequest} as an parameter may throw
- * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
- * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
- * available to be read from the {@link com.sun.jdi.event.EventQueue}.
+ * {@link VMDisconnectedException} if the target VM is
+ * disconnected and the {@link VMDisconnectEvent} has been or is
+ * available to be read from the {@link EventQueue}.
  * <p>
  * Any method on {@code EventRequest} which
  * takes {@code EventRequest} as an parameter may throw
- * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
+ * {@link VMOutOfMemoryException} if the target VM has run out of memory.
  *
- * @see com.sun.jdi.event.BreakpointEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see BreakpointEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
@@ -159,8 +167,8 @@
      * <p>
      * Thread suspensions through events have the same functionality
      * as explicitly requested suspensions. See
-     * {@link com.sun.jdi.ThreadReference#suspend} and
-     * {@link com.sun.jdi.VirtualMachine#suspend} for details.
+     * {@link ThreadReference#suspend} and
+     * {@link VirtualMachine#suspend} for details.
      *
      * @param policy the selected suspend policy.
      * @throws InvalidRequestStateException if this request is currently
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,30 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import java.util.List;
 
-import java.util.List;
+import com.sun.jdi.Field;
+import com.sun.jdi.Location;
+import com.sun.jdi.Mirror;
+import com.sun.jdi.NativeMethodException;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.BreakpointEvent;
+import com.sun.jdi.event.Event;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ExceptionEvent;
+import com.sun.jdi.event.VMDeathEvent;
 
 /**
  * Manages the creation and deletion of {@link EventRequest}s. A single
- * implementor of this interface exists in a particuar VM and
+ * implementor of this interface exists in a particular VM and
  * is accessed through {@link VirtualMachine#eventRequestManager()}
  *
  * @see EventRequest
- * @see com.sun.jdi.event.Event
+ * @see Event
  * @see BreakpointRequest
- * @see com.sun.jdi.event.BreakpointEvent
+ * @see BreakpointEvent
  * @see VirtualMachine
  *
  * @author Robert Field
@@ -97,7 +108,7 @@
      * or both can be selected. Note, however, that
      * at the time an exception is thrown, it is not always
      * possible to determine whether it is truly caught. See
-     * {@link com.sun.jdi.event.ExceptionEvent#catchLocation} for
+     * {@link ExceptionEvent#catchLocation} for
      * details.
      * @param refType If non-null, specifies that exceptions which are
      *                instances of refType will be reported. Note: this
@@ -217,19 +228,19 @@
      * <p>
      * The returned request will control stepping only in the specified
      * {@code thread}; all other threads will be unaffected.
-     * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_MIN} will generate a
+     * A {@code size} value of {@link StepRequest#STEP_MIN} will generate a
      * step event each time the code index changes. It represents the
      * smallest step size available and often maps to the instruction
      * level.
-     * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_LINE} will generate a
+     * A {@code size} value of {@link StepRequest#STEP_LINE} will generate a
      * step event each time the source line changes unless line number information is not available,
      * in which case a STEP_MIN will be done instead.  For example, no line number information is
      * available during the execution of a method that has been rendered obsolete by
-     * by a {@link com.sun.jdi.VirtualMachine#redefineClasses} operation.
-     * A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_INTO} will generate
+     * by a {@link VirtualMachine#redefineClasses} operation.
+     * A {@code depth} value of {@link StepRequest#STEP_INTO} will generate
      * step events in any called methods.  A {@code depth} value
-     * of {@link com.sun.jdi.request.StepRequest#STEP_OVER} restricts step events to the current frame
-     * or caller frames. A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_OUT}
+     * of {@link StepRequest#STEP_OVER} restricts step events to the current frame
+     * or caller frames. A {@code depth} value of {@link StepRequest#STEP_OUT}
      * restricts step events to caller frames only. All depth
      * restrictions are relative to the call stack immediately before the
      * step takes place.
@@ -327,7 +338,7 @@
      * activate this event request.
      * <P>
      * This request (if enabled) will cause a
-     * {@link com.sun.jdi.event.VMDeathEvent}
+     * {@link VMDeathEvent}
      * to be sent on termination of the target VM.
      * <P>
      * A VMDeathRequest with a suspend policy of
@@ -338,8 +349,8 @@
      * events before VM death.  If all event processing is being
      * done in the same thread as event sets are being read,
      * enabling the request is all that is needed since the VM
-     * will be suspended until the {@link com.sun.jdi.event.EventSet}
-     * containing the {@link com.sun.jdi.event.VMDeathEvent}
+     * will be suspended until the {@link EventSet}
+     * containing the {@link VMDeathEvent}
      * is resumed.
      * <P>
      * Not all target virtual machines support this operation.
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ExceptionRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ExceptionRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,25 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ExceptionEvent;
 
 /**
  * Request for notification when an exception occurs in the target VM.
  * When an enabled ExceptionRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing an
- * {@link com.sun.jdi.event.ExceptionEvent ExceptionEvent} will be placed
- * on the {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing an
+ * {@link ExceptionEvent ExceptionEvent} will be placed
+ * on the {@link EventQueue EventQueue}.
  * The collection of existing ExceptionRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.ExceptionEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see ExceptionEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
@@ -60,7 +66,7 @@
      * <p>
      * Note that at the time an exception is thrown, it is not always
      * possible to determine whether it is truly caught. See
-     * {@link com.sun.jdi.event.ExceptionEvent#catchLocation} for
+     * {@link ExceptionEvent#catchLocation} for
      * details.
      * @return
      * boolean true if caught exceptions will be reported, false
@@ -74,7 +80,7 @@
      * <p>
      * Note that at the time an exception is thrown, it is not always
      * possible to determine whether it is truly uncaught. See
-     * {@link com.sun.jdi.event.ExceptionEvent#catchLocation} for
+     * {@link ExceptionEvent#catchLocation} for
      * details.
      * @return
      * boolean true if caught exceptions will be reported, false
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/InvalidRequestStateException.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/InvalidRequestStateException.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,14 +36,14 @@
  * @since  1.3
  */
 public class InvalidRequestStateException extends RuntimeException {
+
     private static final long serialVersionUID = -3774632428543322148L;
-    public InvalidRequestStateException()
-    {
+
+    public InvalidRequestStateException() {
         super();
     }
 
-    public InvalidRequestStateException(String s)
-    {
+    public InvalidRequestStateException(String s) {
         super(s);
     }
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodEntryRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodEntryRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,25 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MethodEntryEvent;
 
 /**
  * Request for notification when a method is invoked in the target VM.
  * When an enabled MethodEntryRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MethodEntryEvent MethodEntryEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MethodEntryEvent MethodEntryEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MethodEntryRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MethodEntryEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MethodEntryEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodExitRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MethodExitRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,25 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MethodExitEvent;
 
 /**
  * Request for notification when a method returns in the target VM.
  * When an enabled MethodExitRequest is hit, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MethodExitEvent MethodExitEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MethodExitEvent MethodExitEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MethodExitRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MethodExitEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MethodExitEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ModificationWatchpointRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,9 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ModificationWatchpointEvent;
 
 /**
  * Request for notification when a field is set.
@@ -37,19 +39,16 @@
  * Setting a field to a value which is the same as the previous value
  * still triggers this event.
  * Modification by JDI does not trigger this event.
- * When an enabled
- * ModificationWatchpointRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.ModificationWatchpointEvent ModificationWatchpointEvent}
- * will be placed on
- * the {@link com.sun.jdi.event.EventQueue EventQueue}.
- * The collection of existing
- * watchpoints is
+ * When an enabled ModificationWatchpointRequest is satisfied, an
+ * {@link EventSet event set} containing a
+ * {@link ModificationWatchpointEvent ModificationWatchpointEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
+ * The collection of existing watchpoints is
  * managed by the {@link EventRequestManager}.
  *
- * @see com.sun.jdi.event.ModificationWatchpointEvent
+ * @see ModificationWatchpointEvent
  * @see AccessWatchpointRequest
- * @see com.sun.jdi.event.EventQueue
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnterRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,26 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MonitorContendedEnterEvent;
 
 /**
  * Request for notification of a thread in the target VM
  * attempting to enter a monitor already acquired by another thread.
  * When an enabled MonitorContededEnterRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MonitorContendedEnterEvent MonitorContendedEnterEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MonitorContendedEnterEvent MonitorContendedEnterEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MonitorContendedEnterEvents is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MonitorContendedEnterEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MonitorContendedEnterEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Swamy Venkataramanappa
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorContendedEnteredRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,26 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MonitorContendedEnteredEvent;
 
 /**
  * Request for notification of a thread in the target VM entering a monitor
  * after waiting for it to be released by another thread.
  * When an enabled MonitorContededEnteredRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MonitorContendedEnteredEvent MonitorContendedEnteredEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MonitorContendedEnteredEvent MonitorContendedEnteredEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MonitorContendedEnteredEvents is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MonitorContendedEnteredEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MonitorContendedEnteredEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Swamy Venkataramanappa
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,26 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MonitorWaitEvent;
 
 /**
  * Request for notification when a thread in the target VM is about to
  * wait on a monitor object. That is, a thread is entering Object.wait().
  * When an enabled MonitorWaitRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MonitorWaitEvent MonitorWaitEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MonitorWaitEvent MonitorWaitEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MonitorWaitEvents is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MonitorWaitEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MonitorWaitEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Swamy Venkataramanappa
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/MonitorWaitedRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,21 +25,26 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.MonitorWaitedEvent;
 
 /**
  * Request for notification when a thread in the target VM has finished waiting on
  * a monitor object. That is, a thread is leaving Object.wait(). "
  * When an enabled MonitorWaitedRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.MonitorWaitedEvent MonitorWaitedEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link MonitorWaitedEvent MonitorWaitedEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing MonitorWaitedEvents is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.MonitorWaitedEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see MonitorWaitedEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Swamy Venkataramanappa
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/StepRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/StepRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,25 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.StepEvent;
 
 /**
  * Request for notification when a step occurs in the target VM.
  * When an enabled StepRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.StepEvent StepEvent} will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link StepEvent StepEvent} will be placed on the
+ * {@link EventQueue EventQueue}.
  * The collection of existing StepRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.StepEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see StepEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadDeathRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadDeathRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,23 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ThreadDeathEvent;
 
 /**
  * Request for notification when a thread terminates in the target VM.
  * When an enabled ThreadDeathRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.ThreadDeathEvent ThreadDeathEvent}
+ * {@link EventSet event set} containing a
+ * {@link ThreadDeathEvent ThreadDeathEvent}
  * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventQueue EventQueue}.
  * The collection of existing ThreadDeathRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.ThreadDeathEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see ThreadDeathEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadStartRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/ThreadStartRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,23 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.ThreadStartEvent;
 
 /**
  * Request for notification when a thread starts execution in the target VM.
  * When an enabled ThreadStartRequest is hit, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.ThreadStartEvent ThreadStartEvent}
+ * {@link EventSet event set} containing a
+ * {@link ThreadStartEvent ThreadStartEvent}
  * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventQueue EventQueue}.
  * The collection of existing ThreadStartRequests is
  * managed by the {@link EventRequestManager}
  *
- * @see com.sun.jdi.event.ThreadStartEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see ThreadStartEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/VMDeathRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/VMDeathRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,16 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.event.EventQueue;
+import com.sun.jdi.event.EventSet;
+import com.sun.jdi.event.VMDeathEvent;
 
 /**
  * Request for notification when the target VM terminates.
  * When an enabled VMDeathRequest is satisfied, an
- * {@link com.sun.jdi.event.EventSet event set} containing a
- * {@link com.sun.jdi.event.VMDeathEvent VMDeathEvent}
- * will be placed on the
- * {@link com.sun.jdi.event.EventQueue EventQueue}.
+ * {@link EventSet event set} containing a
+ * {@link VMDeathEvent VMDeathEvent}
+ * will be placed on the {@link EventQueue EventQueue}.
  * The collection of existing VMDeathRequests is
  * managed by the {@link EventRequestManager}
  * <P>
@@ -49,13 +50,12 @@
  * to be alive (e.g. event processing).  Note: the
  * unsolicited VMDeathEvent will still be sent.
  *
- * @see com.sun.jdi.event.VMDeathEvent
- * @see com.sun.jdi.event.EventQueue
+ * @see VMDeathEvent
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
  * @since  1.4
  */
 public interface VMDeathRequest extends EventRequest {
-
 }
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/WatchpointRequest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/request/WatchpointRequest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,19 @@
 
 package com.sun.jdi.request;
 
-import com.sun.jdi.*;
+import com.sun.jdi.Field;
+import com.sun.jdi.ObjectReference;
+import com.sun.jdi.ReferenceType;
+import com.sun.jdi.ThreadReference;
+import com.sun.jdi.VirtualMachine;
+import com.sun.jdi.event.EventQueue;
 
 /**
  * Identifies a {@link Field} in the target VM being watched.
  *
  * @see AccessWatchpointRequest
  * @see ModificationWatchpointRequest
- * @see com.sun.jdi.event.EventQueue
+ * @see EventQueue
  * @see EventRequestManager
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdi/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -45,8 +45,7 @@
  * Platform Debugger Architecture documentation</a> for this release and the <a
  * href="http://java.sun.com/products/jpda">Java Platform Debugger Architecture
  * website</a>.
- * <p style="font-size:larger">
- * <b>Global Exceptions:</b>
+ * <h3>Global Exceptions</h3>
  * <p>
  * This section documents exceptions which apply to the entire API and are thus
  * not documented on individual methods.
@@ -103,6 +102,21 @@
  *   unloaded.
  * </blockquote>
  *
+ * <h3>jdb</h3>
+ *
+ * <em>{@index jdb jdb tool}</em> is a simple command-line debugger provided
+ * in this module.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jdb_tool_reference jdb}
+ * </dl>
+ *
+ * @provides com.sun.jdi.connect.Connector
+ *
+ * @uses com.sun.jdi.connect.Connector
+ * @uses com.sun.jdi.connect.spi.TransportService
+ *
  * @moduleGraph
  * @since 9
  */
@@ -127,4 +141,3 @@
         com.sun.tools.jdi.SocketListeningConnector,
         com.sun.tools.jdi.SunCommandLineLauncher;
 }
-
--- a/jdk/src/jdk.jdwp.agent/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdwp.agent/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,11 +24,12 @@
  */
 
 /**
- * Java Debug Wire Protocol.
+ * Provides the implementation of the Java Debug Wire Protocol (JDWP) agent.
  *
  * @moduleGraph
  * @since 9
+ * @see <a href="../specs/jdwp/jdwp-spec.html">JDWP Specification</a>
+ * @see <a href="../specs/jdwp/jdwp-transport.html">JDWP Transport Specification</a>
  */
 module jdk.jdwp.agent {
 }
-
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/invoker.c	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/invoker.c	Tue Jun 27 16:00:14 2017 -0400
@@ -212,30 +212,6 @@
 }
 
 /*
- * Delete saved global references - if any - for:
- * - a potentially thrown Exception
- * - a returned refernce/array value
- * See invoker_doInvoke() and invoke* methods where global references
- * are being saved.
- */
-static void
-deletePotentiallySavedGlobalRefs(JNIEnv *env, InvokeRequest *request)
-{
-    /* Delete potentially saved return value */
-    if ((request->invokeType == INVOKE_CONSTRUCTOR) ||
-        (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) ||
-        (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) {
-        if (request->returnValue.l != NULL) {
-            tossGlobalRef(env, &(request->returnValue.l));
-        }
-    }
-    /* Delete potentially saved exception */
-    if (request->exception != NULL) {
-        tossGlobalRef(env, &(request->exception));
-    }
-}
-
-/*
  * Delete global argument references from the request which got put there before a
  * invoke request was carried out. See fillInvokeRequest().
  */
@@ -782,6 +758,7 @@
     jint id;
     InvokeRequest *request;
     jboolean detached;
+    jboolean mustReleaseReturnValue = JNI_FALSE;
 
     JDI_ASSERT(thread);
 
@@ -825,6 +802,13 @@
         id = request->id;
         exc = request->exception;
         returnValue = request->returnValue;
+
+        /* Release return value and exception references, but delay the release
+         * until after the return packet was sent. */
+        mustReleaseReturnValue = request->invokeType == INVOKE_CONSTRUCTOR ||
+           returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT) ||
+           returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY);
+
     }
 
     /*
@@ -839,6 +823,12 @@
      */
     deleteGlobalArgumentRefs(env, request);
 
+    /* From now on, do not access the request structure anymore
+     * for this request id, because once we give up the invokerLock it may
+     * be immediately reused by a new invoke request.
+     */
+    request = NULL;
+
     /*
      * Give up the lock before I/O operation
      */
@@ -859,7 +849,12 @@
      */
     eventHandler_lock(); // for proper lock order
     debugMonitorEnter(invokerLock);
-    deletePotentiallySavedGlobalRefs(env, request);
+    if (mustReleaseReturnValue && returnValue.l != NULL) {
+        tossGlobalRef(env, &returnValue.l);
+    }
+    if (exc != NULL) {
+        tossGlobalRef(env, &exc);
+    }
     debugMonitorExit(invokerLock);
     eventHandler_unlock();
 }
--- a/jdk/src/jdk.jlink/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jlink/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,31 @@
  */
 
 /**
- * Defines the Java linker tool, jlink.
+ * Defines the <em>{@index jlink jlink tool}</em> tool for creating run-time
+ * images, the <em>{@index jmod jmod tool}</em> tool for creating and manipulating
+ * JMOD files, and the <em>{@index jimage jimage tool}</em> tool for inspecting
+ * the JDK implementation-specific container file for classes and resources.
+ *
+ * <p> This module provides the equivalent of command-line access to the
+ * <em>{@extLink jlink_tool_reference jlink}</em> and
+ * <em>{@extLink jmod_tool_reference jmod}</em> tools via the
+ * {@link java.util.spi.ToolProvider ToolProvider} SPI.
+ * Instances of the tools can be obtained by calling
+ * {@link java.util.spi.ToolProvider#findFirst ToolProvider.findFirst}
+ * or the {@link java.util.ServiceLoader service loader} with the name
+ * {@code "jlink"} or {@code "jmod"} as appropriate.
+ *
+ * <p> <em>{@extLink jimage_tool_reference jimage}</em> only exists
+ * as a command-line tool, and does not provide any direct API.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jlink_tool_reference jlink},
+ *     {@extLink jmod_tool_reference jmod},
+ *     {@extLink jimage_tool_reference jimage}
+ * </dl>
+ *
+ * @provides java.util.spi.ToolProvider
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.jstatd/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.jstatd/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,13 @@
  */
 
 /**
- * Defines the tool for starting a daemon for the jstat tool to monitor
- * JVM statistics remotely.
+ * Defines the <em>{@index jstatd jstatd tool}</em> tool for starting a daemon
+ * for the jstat tool to monitor JVM statistics remotely.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jstatd_tool_reference jstatd}
+ * </dl>
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.localedata/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.localedata/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,7 @@
  */
 
 /**
- * Locale data provider for locales other than {@linkplain java.util.Locale#US US locale}.
+ * Provides the locale data for locales other than {@linkplain java.util.Locale#US US locale}.
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.management.agent/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.management.agent/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,12 @@
  */
 
 /**
- * Define the JMX management agent.
+ * Defines the JMX management agent.
+ *
+ * <p> This module allows a Java Virtual Machine to be monitored and managed
+ * via JMX API.  See more information from the
+ * {@extLink monitoring_and_management_using_jmx_technology
+ * Monitoring and Management Using JMX} guide.
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.naming.dns/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.naming.dns/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,9 @@
  */
 
 /**
- * DNS Java Naming provider.
+ * Provides the implementation of the DNS Java Naming provider.
  *
+ * @provides javax.naming.spi.InitialContextFactory
  * @moduleGraph
  * @since 9
  */
@@ -38,4 +39,3 @@
     provides javax.naming.spi.InitialContextFactory
         with com.sun.jndi.dns.DnsContextFactory;
 }
-
--- a/jdk/src/jdk.naming.rmi/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.naming.rmi/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,9 @@
  */
 
 /**
- * RMI Java Naming provider.
+ * Provides the implementation of the RMI Java Naming provider.
  *
+ * @provides javax.naming.spi.InitialContextFactory
  * @moduleGraph
  * @since 9
  */
@@ -39,4 +40,3 @@
     exports com.sun.jndi.url.rmi to java.naming;
     exports com.sun.jndi.rmi.registry to java.rmi;
 }
-
--- a/jdk/src/jdk.pack/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.pack/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,8 +25,15 @@
 
 /**
  * Defines tools for transforming a JAR file into a compressed pack200 file
- * and transforming a packed file into a JAR file, including the pack200,
- * and unpack200 tools.
+ * and transforming a packed file into a JAR file, including the
+ * <em>{@index pack200 pack200 tool}</em> and
+ * <em>{@index unpack200 unpack200 tool}</em> tools.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink pack200_tool_reference pack200},
+ *     {@extLink unpack200_tool_reference unpack200}
+ * </dl>
  *
  * @moduleGraph
  * @since 9
--- a/jdk/src/jdk.policytool/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.policytool/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,13 @@
  */
 
 /**
- * GUI tool for managing policy files.
+ * Defines the GUI tool for managing policy files
+ * called <em>{@index policytool policytool}</em>.
+ *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink policytool_tool_reference policytool}
+ * </dl>
  *
  * @since 9
  * @deprecated
@@ -39,4 +45,3 @@
     requires java.security.jgss;
     requires jdk.security.jgss;
 }
-
--- a/jdk/src/jdk.rmic/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.rmic/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,10 +24,15 @@
  */
 
 /**
- * Defines the rmic compiler for generating stubs and skeletons using
- * the Java Remote Method Protocol (JRMP) and
+ * Defines the <em>{@index rmic rmic}</em> compiler for generating stubs and
+ * skeletons using the Java Remote Method Protocol (JRMP) and
  * stubs and tie class files (IIOP protocol) for remote objects.
  *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink rmic_tool_reference rmic}
+ * </dl>
+ *
  * @moduleGraph
  * @since 9
  */
--- a/jdk/src/jdk.security.auth/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.security.auth/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,9 +24,10 @@
  */
 
 /**
- * Contains the implementation of the javax.security.auth.* interfaces and
- * various authentication modules.
+ * Provides the implementation of the {@code javax.security.auth.*}
+ * interfaces and various authentication modules.
  *
+ * @provides javax.security.auth.spi.LoginModule
  * @moduleGraph
  * @since 9
  */
@@ -47,4 +48,3 @@
         com.sun.security.auth.module.LdapLoginModule,
         com.sun.security.auth.module.NTLoginModule;
 }
-
--- a/jdk/src/jdk.zipfs/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/src/jdk.zipfs/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,12 +24,17 @@
  */
 
 /**
- * Zip file system provider.
+ * Provides the implementation of the zip file system provider.
  *
+ * <p> The zip file system provider treats a zip or JAR file as a file system
+ * and provides the ability to manipulate the contents of the file.
+ * The zip file system provider can be created by
+ * {@link java.nio.file.FileSystems#newFileSystem} if installed.
+ *
+ * @provides java.nio.file.spi.FileSystemProvider
  * @moduleGraph
  * @since 9
  */
 module jdk.zipfs {
     provides java.nio.file.spi.FileSystemProvider with jdk.nio.zipfs.ZipFileSystemProvider;
 }
-
--- a/jdk/test/ProblemList.txt	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/ProblemList.txt	Tue Jun 27 16:00:14 2017 -0400
@@ -126,6 +126,8 @@
 
 jdk/internal/misc/JavaLangAccess/NewUnsafeString.java           8176188 generic-all
 
+java/lang/String/nativeEncoding/StringPlatformChars.java        8182569 windows-all,solaris-all
+
 ############################################################################
 
 # jdk_instrument
--- a/jdk/test/TEST.ROOT	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/TEST.ROOT	Tue Jun 27 16:00:14 2017 -0400
@@ -10,7 +10,7 @@
 # randomness tests.
 #
 # A "headful" test requires a graphical environment to meaningfully
-# run. Tests that are not headful are "headless." 
+# run. Tests that are not headful are "headless."
 
 keys=2d dnd i18n intermittent randomness headful
 
@@ -18,7 +18,7 @@
 othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle
 
 # Tests that cannot run concurrently
-exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream java/util/BitSet/stream javax/rmi com/sun/corba/cachedSocket
+exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream java/util/Arrays/largeMemory java/util/BitSet/stream javax/rmi com/sun/corba/cachedSocket
 
 # Group definitions
 groups=TEST.groups [closed/TEST.groups]
--- a/jdk/test/TEST.groups	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/TEST.groups	Tue Jun 27 16:00:14 2017 -0400
@@ -1,4 +1,4 @@
-#  Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+#  Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
 #  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 #  This code is free software; you can redistribute it and/or modify it
@@ -554,7 +554,6 @@
   java/nio/charset/Charset/NIOCharsetAvailabilityTest.java \
   java/nio/charset/Charset/RegisteredCharsets.java \
   java/nio/charset/CharsetEncoder/Flush.java \
-  java/nio/charset/coders/CheckSJISMappingProp.sh \
   java/nio/charset/coders/ResetISO2022JP.java \
   java/util/Locale/InternationalBAT.java \
   java/util/Locale/LocaleProviders.sh \
@@ -641,6 +640,7 @@
   java/security/PermissionCollection/Concurrent.java \
   java/security/Principal/Implies.java \
   java/security/cert/GetInstance.java \
+  java/util/Arrays/largeMemory/ParallelPrefix.java  \
   java/util/logging/DrainFindDeadlockTest.java \
   java/util/logging/LoggingMXBeanTest.java \
   java/util/logging/TestLogConfigurationDeadLock.java \
@@ -709,7 +709,6 @@
   java/nio/Buffer/Chars.java  \
   java/nio/file/Files/StreamTest.java  \
   java/security/BasicPermission/Wildcard.java \
-  java/util/Arrays/ParallelPrefix.java  \
   java/util/Arrays/SetAllTest.java  \
   java/util/BitSet/stream/BitSetStreamTest.java  \
   java/util/Collection/CollectionDefaults.java  \
--- a/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,8 +26,10 @@
  * @bug 7130985
  * @summary Four helper classes missing in Sun JDK
  * @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.*
  * @modules java.corba
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.testlibrary.*
  * @run main CorbaExceptionsCompileTest
  */
 
--- a/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @test
  * @bug 8048604
  * @library ../ /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main CipherNCFuncTest
  * @summary This test verifies the assertion "There should be no transformation
  *          on the plaintext/ciphertext in encryption/decryption mechanism" for
  *          feature "NullCipher".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/jndi/ldap/RemoveNamingListenerTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.BufferedInputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.nio.charset.StandardCharsets;
+import java.util.ConcurrentModificationException;
+import java.util.Hashtable;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.naming.event.EventContext;
+import javax.naming.event.NamingEvent;
+import javax.naming.event.NamingExceptionEvent;
+import javax.naming.event.NamingListener;
+import javax.naming.event.ObjectChangeListener;
+
+/**
+ * @test
+ * @bug 8176192
+ * @summary Incorrect usage of Iterator in Java 8 In com.sun.jndi.ldap.
+ * EventSupport.removeNamingListener
+ * @modules java.naming
+ * @run main RemoveNamingListenerTest
+ */
+public class RemoveNamingListenerTest {
+
+    private static volatile Exception exception;
+
+    public static void main(String args[]) throws Exception {
+        // start the LDAP server
+        TestLDAPServer server = new TestLDAPServer();
+        server.start();
+
+        // Set up environment for creating initial context
+        Hashtable<String, Object> env = new Hashtable<>(3);
+        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
+        env.put(Context.PROVIDER_URL, "ldap://localhost:" + server.getPort() + "/o=example");
+        env.put("com.sun.jndi.ldap.connect.timeout", "2000");
+        EventContext ctx = null;
+
+        try {
+            ctx = (EventContext) (new InitialContext(env).lookup(""));
+            String target = "cn=Vyom Tewari";
+
+            // Create listeners
+            NamingListener oneListener = new SampleListener();
+            NamingListener objListener = new SampleListener();
+            NamingListener subListener = new SampleListener();
+
+            // Register listeners using different scopes
+            ctx.addNamingListener(target, EventContext.ONELEVEL_SCOPE, oneListener);
+            ctx.addNamingListener(target, EventContext.OBJECT_SCOPE, objListener);
+            ctx.addNamingListener(target, EventContext.SUBTREE_SCOPE, subListener);
+
+            //remove a listener in different thread
+            Thread t = new Thread(new RemoveNamingListener(ctx, subListener));
+            t.start();
+            t.join();
+
+            if (exception != null) {
+                throw exception;
+            }
+            System.out.println("Test run OK!!!");
+        } finally {
+            if (ctx != null) {
+                ctx.close();
+            }
+            server.stopServer();
+        }
+    }
+
+    /**
+     * Helper thread that removes the naming listener.
+     */
+    static class RemoveNamingListener implements Runnable {
+
+        final EventContext ctx;
+        final NamingListener listener;
+
+        RemoveNamingListener(EventContext ctx, NamingListener listener) {
+            this.ctx = ctx;
+            this.listener = listener;
+        }
+
+        @Override
+        public void run() {
+            try {
+                ctx.removeNamingListener(listener);
+            } catch (NamingException | ConcurrentModificationException ex) {
+                exception = ex;
+            }
+        }
+    }
+
+    static class SampleListener implements ObjectChangeListener {
+
+        @Override
+        public void objectChanged(NamingEvent ne) {
+            //do nothing
+        }
+
+        @Override
+        public void namingExceptionThrown(NamingExceptionEvent nee) {
+            //do nothing
+        }
+    }
+}
+
+class TestLDAPServer extends Thread {
+
+    private final int LDAP_PORT;
+    private final ServerSocket serverSocket;
+    private volatile boolean isRunning;
+
+    TestLDAPServer() throws IOException {
+        serverSocket = new ServerSocket(0);
+        isRunning = true;
+        LDAP_PORT = serverSocket.getLocalPort();
+        setDaemon(true);
+    }
+
+    public int getPort() {
+        return LDAP_PORT;
+    }
+
+    public void stopServer() {
+        isRunning = false;
+        if (serverSocket != null && !serverSocket.isClosed()) {
+            try {
+                // this will cause ServerSocket.accept() to throw SocketException.
+                serverSocket.close();
+            } catch (IOException ignored) {
+            }
+        }
+    }
+
+    @Override
+    public void run() {
+        try {
+            while (isRunning) {
+                Socket clientSocket = serverSocket.accept();
+                Thread handler = new Thread(new LDAPServerHandler(clientSocket));
+                handler.setDaemon(true);
+                handler.start();
+            }
+        } catch (IOException iOException) {
+            //do not throw exception if server is not running.
+            if (isRunning) {
+                throw new RuntimeException(iOException);
+            }
+        } finally {
+            stopServer();
+        }
+    }
+}
+
+class LDAPServerHandler implements Runnable {
+
+    private final Socket clientSocket;
+
+    public LDAPServerHandler(final Socket clientSocket) {
+        this.clientSocket = clientSocket;
+    }
+
+    @Override
+    public void run() {
+        BufferedInputStream in = null;
+        PrintWriter out = null;
+        byte[] bindResponse = {0x30, 0x0C, 0x02, 0x01, 0x01, 0x61, 0x07, 0x0A, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00};
+        byte[] searchResponse = {0x30, 0x0C, 0x02, 0x01, 0x02, 0x65, 0x07, 0x0A, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00};
+        try {
+            in = new BufferedInputStream(clientSocket.getInputStream());
+            out = new PrintWriter(new OutputStreamWriter(
+                    clientSocket.getOutputStream(), StandardCharsets.UTF_8), true);
+            while (true) {
+
+                // Read the LDAP BindRequest
+                while (in.read() != -1) {
+                    in.skip(in.available());
+                    break;
+                }
+
+                // Write an LDAP BindResponse
+                out.write(new String(bindResponse));
+                out.flush();
+
+                // Read the LDAP SearchRequest
+                while (in.read() != -1) {
+                    in.skip(in.available());
+                    break;
+                }
+
+                // Write an LDAP SearchResponse
+                out.write(new String(searchResponse));
+                out.flush();
+            }
+        } catch (IOException iOException) {
+            throw new RuntimeException(iOException);
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException ignored) {
+                }
+            }
+            if (out != null) {
+                out.close();
+            }
+            if (clientSocket != null) {
+                try {
+                    clientSocket.close();
+                } catch (IOException ignored) {
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/net/httpserver/EchoHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.logging.*;
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import javax.net.ssl.*;
+import com.sun.net.httpserver.*;
+
+/**
+ * Implements a basic static EchoHandler for an HTTP server
+ */
+public class EchoHandler implements HttpHandler {
+
+    byte[] read(InputStream is) throws IOException {
+        byte[] buf = new byte[1024];
+        byte[] result = new byte[0];
+
+        while (true) {
+            int n = is.read(buf);
+            if (n > 0) {
+                byte[] b1 = new byte[result.length + n];
+                System.arraycopy(result, 0, b1, 0, result.length);
+                System.arraycopy(buf, 0, b1, result.length, n);
+                result = b1;
+            } else if (n == -1) {
+                return result;
+            }
+        }
+    }
+
+    public void handle (HttpExchange t)
+        throws IOException
+    {
+        InputStream is = t.getRequestBody();
+        Headers map = t.getRequestHeaders();
+        String fixedrequest = map.getFirst ("XFixed");
+
+        // return the number of bytes received (no echo)
+        String summary = map.getFirst ("XSummary");
+        if (fixedrequest != null && summary == null)  {
+            byte[] in = read(is);
+            t.sendResponseHeaders(200, in.length);
+            OutputStream os = t.getResponseBody();
+            os.write(in);
+            close(os);
+            close(is);
+        } else {
+            OutputStream os = t.getResponseBody();
+            byte[] buf = new byte[64 * 1024];
+            t.sendResponseHeaders(200, 0);
+            int n, count=0;;
+
+            while ((n = is.read(buf)) != -1) {
+                if (summary == null) {
+                    os.write(buf, 0, n);
+                }
+                count += n;
+            }
+            if (summary != null) {
+                String s = Integer.toString(count);
+                os.write(s.getBytes());
+            }
+            close(os);
+            close(is);
+        }
+    }
+
+    protected void close(OutputStream os) throws IOException {
+            os.close();
+    }
+    protected void close(InputStream is) throws IOException {
+            is.close();
+    }
+}
--- a/jdk/test/com/sun/net/httpserver/FileServerHandler.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/com/sun/net/httpserver/FileServerHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,210 +31,122 @@
 import com.sun.net.httpserver.*;
 
 /**
- * Implements a basic static content HTTP server
+ * Implements a basic static content HTTP file server handler
  * which understands text/html, text/plain content types
  *
  * Must be given an abs pathname to the document root.
  * Directory listings together with text + html files
  * can be served.
  *
- * File Server created on files sub-path
- *
- * Echo server created on echo sub-path
  */
 public class FileServerHandler implements HttpHandler {
 
-        public static void main (String[] args) throws Exception {
-            if (args.length != 3) {
-                System.out.println ("usage: java FileServerHandler rootDir port logfilename");
-                System.exit(1);
-            }
-            Logger logger = Logger.getLogger("com.sun.net.httpserver");
-            ConsoleHandler ch = new ConsoleHandler();
-            logger.setLevel(Level.ALL);
-            ch.setLevel(Level.ALL);
-            logger.addHandler(ch);
+    String docroot;
+
+    public FileServerHandler (String docroot) {
+        this.docroot = docroot;
+    }
+
+    int invocation = 1;
+    public void handle (HttpExchange t)
+        throws IOException
+    {
+        InputStream is = t.getRequestBody();
+        Headers map = t.getRequestHeaders();
+        Headers rmap = t.getResponseHeaders();
+        URI uri = t.getRequestURI();
+        String path = uri.getPath();
 
-            String rootDir = args[0];
-            int port = Integer.parseInt (args[1]);
-            String logfile = args[2];
-            HttpServer server = HttpServer.create (new InetSocketAddress (port), 0);
-            HttpHandler h = new FileServerHandler (rootDir);
-            HttpHandler h1 = new EchoHandler ();
+        int x = 0;
+        while (is.read () != -1) x++;
+        is.close();
+        File f = new File (docroot, path);
+        if (!f.exists()) {
+            notfound (t, path);
+            return;
+        }
+        String fixedrequest = map.getFirst ("XFixed");
 
-            HttpContext c = server.createContext ("/files", h);
-            c.getFilters().add (new LogFilter (new File (logfile)));
-            HttpContext c1 = server.createContext ("/echo", h1);
-            c.getFilters().add (new LogFilter (new File (logfile)));
-            c1.getFilters().add (new LogFilter (new File (logfile)));
-            server.setExecutor (Executors.newCachedThreadPool());
-            server.start ();
-        }
-
-        String docroot;
-
-        FileServerHandler (String docroot) {
-            this.docroot = docroot;
+        String method = t.getRequestMethod();
+        if (method.equals ("HEAD")) {
+            rmap.set ("Content-Length", Long.toString (f.length()));
+            t.sendResponseHeaders (200, -1);
+            t.close();
+        } else if (!method.equals("GET")) {
+            t.sendResponseHeaders (405, -1);
+            t.close();
+            return;
         }
 
-        int invocation = 1;
-        public void handle (HttpExchange t)
-            throws IOException
-        {
-            InputStream is = t.getRequestBody();
-            Headers map = t.getRequestHeaders();
-            Headers rmap = t.getResponseHeaders();
-            URI uri = t.getRequestURI();
-            String path = uri.getPath();
-
-            int x = 0;
-            while (is.read () != -1) x++;
-            is.close();
-            File f = new File (docroot, path);
-            if (!f.exists()) {
-                notfound (t, path);
-                return;
-            }
-            String fixedrequest = map.getFirst ("XFixed");
-
-            String method = t.getRequestMethod();
-            if (method.equals ("HEAD")) {
-                rmap.set ("Content-Length", Long.toString (f.length()));
-                t.sendResponseHeaders (200, -1);
-                t.close();
-            } else if (!method.equals("GET")) {
-                t.sendResponseHeaders (405, -1);
-                t.close();
+        if (path.endsWith (".html") || path.endsWith (".htm")) {
+            rmap.set ("Content-Type", "text/html");
+        } else {
+            rmap.set ("Content-Type", "text/plain");
+        }
+        if (f.isDirectory()) {
+            if (!path.endsWith ("/")) {
+                moved (t);
                 return;
             }
-
-            if (path.endsWith (".html") || path.endsWith (".htm")) {
-                rmap.set ("Content-Type", "text/html");
-            } else {
-                rmap.set ("Content-Type", "text/plain");
+            rmap.set ("Content-Type", "text/html");
+            t.sendResponseHeaders (200, 0);
+            String[] list = f.list();
+            OutputStream os = t.getResponseBody();
+            PrintStream p = new PrintStream (os);
+            p.println ("<h2>Directory listing for: " + path+ "</h2>");
+            p.println ("<ul>");
+            for (int i=0; i<list.length; i++) {
+                p.println ("<li><a href=\""+list[i]+"\">"+list[i]+"</a></li>");
             }
-            if (f.isDirectory()) {
-                if (!path.endsWith ("/")) {
-                    moved (t);
-                    return;
-                }
-                rmap.set ("Content-Type", "text/html");
-                t.sendResponseHeaders (200, 0);
-                String[] list = f.list();
-                OutputStream os = t.getResponseBody();
-                PrintStream p = new PrintStream (os);
-                p.println ("<h2>Directory listing for: " + path+ "</h2>");
-                p.println ("<ul>");
-                for (int i=0; i<list.length; i++) {
-                    p.println ("<li><a href=\""+list[i]+"\">"+list[i]+"</a></li>");
-                }
-                p.println ("</ul><p><hr>");
-                p.flush();
-                p.close();
+            p.println ("</ul><p><hr>");
+            p.flush();
+            p.close();
+        } else {
+            int clen;
+            if (fixedrequest != null) {
+                clen = (int) f.length();
             } else {
-                int clen;
-                if (fixedrequest != null) {
-                    clen = (int) f.length();
-                } else {
-                    clen = 0;
-                }
-                t.sendResponseHeaders (200, clen);
-                OutputStream os = t.getResponseBody();
-                FileInputStream fis = new FileInputStream (f);
-                int count = 0;
-                try {
+                clen = 0;
+            }
+            t.sendResponseHeaders (200, clen);
+            OutputStream os = t.getResponseBody();
+            FileInputStream fis = new FileInputStream (f);
+            int count = 0;
+            try {
                 byte[] buf = new byte [16 * 1024];
                 int len;
                 while ((len=fis.read (buf)) != -1) {
                     os.write (buf, 0, len);
                     count += len;
                 }
-                } catch (IOException e) {
-                        e.printStackTrace();
-                }
-                fis.close();
-                os.close();
+            } catch (IOException e) {
+                e.printStackTrace();
             }
-        }
-
-        void moved (HttpExchange t) throws IOException {
-            Headers req = t.getRequestHeaders();
-            Headers map = t.getResponseHeaders();
-            URI uri = t.getRequestURI();
-            String host = req.getFirst ("Host");
-            String location = "http://"+host+uri.getPath() + "/";
-            map.set ("Content-Type", "text/html");
-            map.set ("Location", location);
-            t.sendResponseHeaders (301, -1);
-            t.close();
-        }
-
-        void notfound (HttpExchange t, String p) throws IOException {
-            t.getResponseHeaders().set ("Content-Type", "text/html");
-            t.sendResponseHeaders (404, 0);
-            OutputStream os = t.getResponseBody();
-            String s = "<h2>File not found</h2>";
-            s = s + p + "<p>";
-            os.write (s.getBytes());
+            fis.close();
             os.close();
-            t.close();
         }
     }
 
-class EchoHandler implements HttpHandler {
-
-    byte[] read(InputStream is) throws IOException {
-        byte[] buf = new byte[1024];
-        byte[] result = new byte[0];
-
-        while (true) {
-            int n = is.read(buf);
-            if (n > 0) {
-                byte[] b1 = new byte[result.length + n];
-                System.arraycopy(result, 0, b1, 0, result.length);
-                System.arraycopy(buf, 0, b1, result.length, n);
-                result = b1;
-            } else if (n == -1) {
-                return result;
-            }
-        }
+    void moved (HttpExchange t) throws IOException {
+        Headers req = t.getRequestHeaders();
+        Headers map = t.getResponseHeaders();
+        URI uri = t.getRequestURI();
+        String host = req.getFirst ("Host");
+        String location = "http://"+host+uri.getPath() + "/";
+        map.set ("Content-Type", "text/html");
+        map.set ("Location", location);
+        t.sendResponseHeaders (301, -1);
+        t.close();
     }
 
-    public void handle (HttpExchange t)
-        throws IOException
-    {
-        InputStream is = t.getRequestBody();
-        Headers map = t.getRequestHeaders();
-        String fixedrequest = map.getFirst ("XFixed");
-
-        // return the number of bytes received (no echo)
-        String summary = map.getFirst ("XSummary");
-        if (fixedrequest != null && summary == null)  {
-            byte[] in = read(is);
-            t.sendResponseHeaders(200, in.length);
-            OutputStream os = t.getResponseBody();
-            os.write(in);
-            os.close();
-            is.close();
-        } else {
-            OutputStream os = t.getResponseBody();
-            byte[] buf = new byte[64 * 1024];
-            t.sendResponseHeaders(200, 0);
-            int n, count=0;;
-
-            while ((n = is.read(buf)) != -1) {
-                if (summary == null) {
-                    os.write(buf, 0, n);
-                }
-                count += n;
-            }
-            if (summary != null) {
-                String s = Integer.toString(count);
-                os.write(s.getBytes());
-            }
-            os.close();
-            is.close();
-        }
+    void notfound (HttpExchange t, String p) throws IOException {
+        t.getResponseHeaders().set ("Content-Type", "text/html");
+        t.sendResponseHeaders (404, 0);
+        OutputStream os = t.getResponseBody();
+        String s = "<h2>File not found</h2>";
+        s = s + p + "<p>";
+        os.write (s.getBytes());
+        os.close();
+        t.close();
     }
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/net/httpserver/SimpleFileServer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.logging.*;
+import java.io.*;
+import java.net.*;
+import java.security.*;
+import javax.net.ssl.*;
+import com.sun.net.httpserver.*;
+
+/**
+ * Implements a basic static content HTTP server
+ * which understands text/html, text/plain content types
+ *
+ * Must be given an abs pathname to the document root.
+ * Directory listings together with text + html files
+ * can be served.
+ *
+ * File Server created on files sub-path
+ *
+ * Echo server created on echo sub-path
+ */
+public class SimpleFileServer {
+
+    public static void main (String[] args) throws Exception {
+        if (args.length != 3) {
+            System.out.println ("usage: java FileServerHandler rootDir port logfilename");
+            System.exit(1);
+        }
+        Logger logger = Logger.getLogger("com.sun.net.httpserver");
+        ConsoleHandler ch = new ConsoleHandler();
+        logger.setLevel(Level.ALL);
+        ch.setLevel(Level.ALL);
+        logger.addHandler(ch);
+
+        String rootDir = args[0];
+        int port = Integer.parseInt (args[1]);
+        String logfile = args[2];
+        HttpServer server = HttpServer.create (new InetSocketAddress (port), 0);
+        HttpHandler h = new FileServerHandler (rootDir);
+        HttpHandler h1 = new EchoHandler ();
+
+        HttpContext c = server.createContext ("/files", h);
+        c.getFilters().add (new LogFilter (new File (logfile)));
+        HttpContext c1 = server.createContext ("/echo", h1);
+        c.getFilters().add (new LogFilter (new File (logfile)));
+        c1.getFilters().add (new LogFilter (new File (logfile)));
+        server.setExecutor (Executors.newCachedThreadPool());
+        server.start ();
+    }
+}
--- a/jdk/test/java/awt/List/ItemEventTest/ItemEventTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/awt/List/ItemEventTest/ItemEventTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @key headful
- * @bug 8033936
+ * @bug 8033936 8172510
  * @summary Verify that correct ItemEvent is received while selection &
  *          deselection of multi select List items.
  */
@@ -109,14 +109,16 @@
         boolean isMac = osName.contains("Mac") || osName.contains("mac");
         if(isMac) {
             robot.keyPress(KeyEvent.VK_META);
+            robot.waitForIdle();
         }
 
         // First loop to select & Second loop to deselect the list items.
         for (int j = 0; j < 2; ++j) {
             for (int i = 0; i < list.getItemCount(); ++i) {
                 robot.mouseMove(loc.x, loc.y + i * dY);
+                robot.waitForIdle();
                 robot.mousePress(InputEvent.BUTTON1_MASK);
-                robot.delay(100);
+                robot.waitForIdle();
                 robot.mouseRelease(InputEvent.BUTTON1_MASK);
                 robot.waitForIdle();
             }
--- a/jdk/test/java/awt/print/PageFormat/WrongPaperPrintingTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/awt/print/PageFormat/WrongPaperPrintingTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /* @test
    @bug 8167102
    @summary PrintRequestAttributeSet breaks page size set using PageFormat
+   @ignore Exclude the test until 8167102 is resolved by a new reassessed fix
    @run main/manual WrongPaperPrintingTest
  */
 
--- a/jdk/test/java/io/File/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/File/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,13 +22,13 @@
  */
 
 /* @test
-   @bug 4165666 4203706 4288670 4290024
-   @summary Basic heartbeat test for File methods that access the filesystem
-
-   @build Basic Util
-   @run shell basic.sh
+ * @bug 4165666 4203706 4288670 4290024
+ * @summary Basic heartbeat test for File methods that access the filesystem
+ * @build Basic Util
+ * @run main/othervm Basic
  */
 
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.File;
 import java.io.PrintStream;
@@ -39,13 +39,13 @@
 
     static PrintStream out = System.err;
 
-    static File nonExistantFile = new File("x.Basic.non");
     static File rwFile = new File("x.Basic.rw");
     static File bigFile = new File("x.Basic.big");
     static File roFile = new File("x.Basic.ro");
     static File thisDir = new File(".");
     static File dir = new File("x.Basic.dir");
-    static File nonDir = new File("x.Basic.nonDir");
+    static File dir2 = new File("x.Basic.dir2");
+    static byte bytes[] = new byte[] {1, 2, 3, 4, 5, 6};
 
     static void showBoolean(String what, boolean value) {
         out.println("  " + what + ": " + value);
@@ -75,7 +75,6 @@
         if (!f.canRead()) fail(f, "is not readable");
         if (!Util.isPrivileged() && f.canWrite() != writeable)
             fail(f, writeable ? "is not writeable" : "is writeable");
-        int rwLen = 6;
         if (f.length() != length) fail(f, "has wrong length");
     }
 
@@ -83,16 +82,31 @@
         throw new Exception(f + " " + why);
     }
 
-    public static void main(String[] args) throws Exception {
+    static void setup() throws Exception {
+        rwFile.delete();
+        bigFile.delete();
+        roFile.delete();
+        thisDir.delete();
+        dir.delete();
+        dir2.delete();
 
-        show(nonExistantFile);
-        if (nonExistantFile.exists()) fail(nonExistantFile, "exists");
+        try (FileOutputStream fos = new FileOutputStream(rwFile)) {
+            fos.write(bytes);
+        }
+
+        roFile.createNewFile();
+        roFile.setReadOnly();
+    }
+
+    public static void main(String[] args) throws Exception {
+        setup();
 
         show(rwFile);
-        testFile(rwFile, true, 6);
+        testFile(rwFile, true, bytes.length);
         rwFile.delete();
-        if (rwFile.exists())
+        if (rwFile.exists()) {
             fail(rwFile, "could not delete");
+        }
 
         show(roFile);
         testFile(roFile, false, 0);
@@ -106,20 +120,21 @@
         String[] fs = thisDir.list();
         if (fs == null) fail(thisDir, "list() returned null");
         out.print("  [" + fs.length + "]");
-        for (int i = 0; i < fs.length; i++)
+        for (int i = 0; i < fs.length; i++) {
             out.print(" " + fs[i]);
+        }
         out.println();
         if (fs.length == 0) fail(thisDir, "is empty");
 
-        if (!nonExistantFile.createNewFile())
-            fail(nonExistantFile, "could not create");
-        nonExistantFile.deleteOnExit();
-
-        if (!nonDir.mkdir())
-            fail(nonDir, "could not create");
-
-        if (!dir.renameTo(new File("x.Basic.dir2")))
+        if (!dir.mkdir() || !dir.exists() || !dir.isDirectory()) {
+            fail(dir, "could not create");
+        }
+        if (!dir.renameTo(dir2)) {
             fail(dir, "failed to rename");
+        }
+        if (dir.exists() || !dir2.exists() || !dir2.isDirectory()) {
+            fail(dir, "not renamed");
+        }
 
         if (System.getProperty("os.name").equals("SunOS")
             && System.getProperty("os.version").compareTo("5.6") >= 0) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/File/MacPath.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7130915
+ * @summary Tests file path with nfc/nfd forms on MacOSX
+ * @requires (os.family == "mac")
+ * @library /test/lib
+ * @build jdk.test.lib.Asserts jdk.test.lib.process.ProcessTools MacPathTest
+ * @run main MacPath
+ */
+
+import java.util.Map;
+
+import jdk.test.lib.Asserts;
+import jdk.test.lib.process.ProcessTools;
+
+public class MacPath {
+    public static void main(String args[]) throws Exception {
+        final ProcessBuilder pb =
+                ProcessTools.createJavaProcessBuilder(true, MacPathTest.class.getName());
+        final Map<String, String> env = pb.environment();
+        env.put("LC_ALL", "en_US.UTF-8");
+        Process p = ProcessTools.startProcess("Mac Path Test", pb);
+        Asserts.assertTrue(p.waitFor() == 0, "test failed!");
+    }
+}
--- a/jdk/test/java/io/File/MacPathTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/File/MacPathTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,10 @@
  * questions.
  */
 
-/* @test
- * @bug 7130915
- * @summary Tests file path with nfc/nfd forms on MacOSX
- * @build MacPathTest
- * @run shell MacPathTest.sh
- */
-
-import java.io.*;
-import java.text.*;
-import java.util.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.text.Normalizer;
 
 public class MacPathTest {
 
--- a/jdk/test/java/io/File/MacPathTest.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-#
-OS=`uname -s`
-case "$OS" in
-  Darwin ) ;;
-  * )
-    exit 0
-    ;;
-esac
-
-if [ "x$TESTJAVA" = x ]; then
-  TESTJAVA=$1; shift
-  TESTCLASSES=.
-fi
-
-export LC_ALL=en_US.UTF-8 ;${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTCLASSES} MacPathTest
--- a/jdk/test/java/io/File/basic.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 [ "x$TESTJAVA" = x ]; then
-  TESTJAVA=$1; shift
-  TESTCLASSES=.
-fi
-
-rm -rf x.Basic.*
-rm -f x.Basic.non
-printf "%s" "xyzzyN" > x.Basic.rw
-touch x.Basic.ro
-OS=`uname -s`
-case "$OS" in
-  Windows_* | CYGWIN*)
-    attrib +R x.Basic.ro
-    ;;
-  *)
-    chmod ugo-w x.Basic.ro
-    ;;
-esac
-mkdir x.Basic.dir
-if $TESTJAVA/bin/java ${TESTVMOPTS} $* -classpath "$TESTCLASSES" Basic; then
-  [ -f x.Basic.rw ] && (echo "x.Basic.rw not deleted"; exit 1)
-  ([ -d x.Basic.dir ] || [ \! -d x.Basic.dir2 ]) \
-    && (echo "x.Basic.dir not renamed"; exit 1)
-  [ \! -d x.Basic.nonDir ] && (echo "x.Basic.nonDir not created"; exit 1)
-  [ -f x.Basic.non ] && (echo "x.Basic.non not deleted"; exit 1)
-  exit 0
-else
-  exit 1
-fi
--- a/jdk/test/java/io/FileOutputStream/FileOpen.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 6364894
-# @run shell FileOpen.sh
-# @summary Test to ensure that opening of hidden Vs non-hidden,
-# read/write Vs read-only files for writing works as expected.
-
-
-# We use a TMP directory on a local disk because this test
-# requires that the file to be tested be present on the local disk,
-# not on a samba mounted drive or on a drive that is mapped.
-# The cmd 'attrib' works only on the local files.
-TMP="C:\TEMP"
-hfile=${TMP}"\random_file1.txt"
-ATTRIB=${SystemRoot}"\system32\attrib.exe"
-
-OS=`uname -s`
-case "$OS" in
-    Windows_* )
-	if [ ! -d ${TMP} ] ; then 
-           echo "Could not find the directory-" ${TMP} "- passing test"
-	   exit 0;
-	fi
-	${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
-	    ${TESTSRC}\\FileOpenPos.java
-	${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
-	    ${TESTSRC}\\FileOpenNeg.java
-
-	echo "Opening Writable Normal File.."
-	${TESTJAVA}/bin/java ${TESTVMOPTS} FileOpenPos ${hfile}
-
-	echo "Opening Writable Hidden File.."
-	${ATTRIB} +h ${hfile}
-	${TESTJAVA}/bin/java ${TESTVMOPTS} FileOpenNeg ${hfile}
-
-	echo "Opening Read-Only Normal File.."
-	${ATTRIB} -h ${hfile}
-	${ATTRIB} +r ${hfile}
-	${TESTJAVA}/bin/java ${TESTVMOPTS} FileOpenNeg ${hfile}
-
-	echo "Opening Read-Only Hidden File.." 
-	${ATTRIB} +h ${hfile}
-	${TESTJAVA}/bin/java ${TESTVMOPTS} FileOpenNeg ${hfile}
-
-        rm -f ${hfile}
-	exit
-        ;;
-
-    * )
-        echo "This test is not intended for this OS - passing test"
-	exit 0
-        ;;
-esac
--- a/jdk/test/java/io/FileOutputStream/FileOpenNeg.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.*;
-
-public class FileOpenNeg {
-
-    public static void main( String[] args) throws Exception {
-        boolean openForWrite = true;
-
-        File f = new File(args[0]);
-        try {
-            FileOutputStream fs = new FileOutputStream(f);
-            fs.write(1);
-            fs.close();
-        } catch( IOException e ) {
-            System.out.println("Caught the Exception as expected");
-            e.printStackTrace(System.out);
-            openForWrite = false;
-        }
-        if (openForWrite && !f.canWrite()) {
-            throw new Exception("Able to open READ-ONLY file for WRITING!");
-        }
-    }
-}
--- a/jdk/test/java/io/FileOutputStream/FileOpenPos.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.*;
-
-public class FileOpenPos {
-
-    public static void main( String[] args)
-        throws IOException {
-        File f = new File(args[0]);
-        FileOutputStream fs = new FileOutputStream(f);
-        fs.write(1);
-        fs.close();
-        System.out.println("Can Write ?" + f.canWrite());
-        System.out.println("The File was successfully opened");
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/io/FileOutputStream/FileOpenTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6364894
+ * @requires (os.family == "windows")
+ * @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main FileOpenTest
+ * @summary Test to ensure that opening of hidden Vs non-hidden,
+ *          read/write Vs read-only files for writing works as expected.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileOutputStream;
+import java.nio.file.Files;
+
+import static jdk.test.lib.Asserts.assertTrue;
+
+public class FileOpenTest {
+
+    private static File tmpFile;
+
+    public static void main(String args[]) throws Exception {
+        try {
+            tmpFile = File.createTempFile("FileOpenTest", "suffix");
+
+            // Opening Writable Normal File..
+            test(true);
+
+            // Opening Writable Hidden File..
+            Files.setAttribute(tmpFile.toPath(), "dos:hidden", true);
+            test(false);
+
+            // Opening Read-Only Hidden File..
+            Files.setAttribute(tmpFile.toPath(), "dos:hidden", false);
+            tmpFile.setReadOnly();
+            test(false);
+
+            // Opening Read-Only Normal File..
+            Files.setAttribute(tmpFile.toPath(), "dos:hidden", true);
+            test(false);
+        } finally {
+            tmpFile.delete();
+        }
+    }
+
+    private static void test(boolean writable) throws Exception {
+
+        try (FileOutputStream fs = new FileOutputStream(tmpFile)) {
+            fs.write(1);
+            assertTrue(writable, "Able to open READ-ONLY file for WRITING!");
+            assertTrue(tmpFile.canWrite(), "Able to open READ-ONLY file for WRITING!");
+        } catch(IOException e) {
+            assertTrue(!writable, "Unable to open non-READ-ONLY file for WRITING!");
+            System.out.println("Caught the Exception as expected");
+            e.printStackTrace(System.out);
+        }
+    }
+}
--- a/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,8 @@
  * @summary FilePermissionCollection merges incorrectly
  * @modules java.base/sun.security.util
  * @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main FilePermissionCollectionMerge
  */
 
 import sun.security.util.FilePermCompat;
--- a/jdk/test/java/io/FilePermission/Invalid.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/FilePermission/Invalid.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,8 @@
  * @bug 8167646
  * @summary Better invalid FilePermission
  * @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main Invalid
  */
 
 import jdk.test.lib.Asserts;
--- a/jdk/test/java/io/FilePermission/MergeName.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/FilePermission/MergeName.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,13 @@
  * @bug 8170364
  * @summary FilePermission path modified during merge
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ * @run main MergeName
  */
 
 public class MergeName {
--- a/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/FilePermission/ReadFileOnPath.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,13 @@
  * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.compiler
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main ReadFileOnPath
  * @summary Still able to read file on the same path
  */
--- a/jdk/test/java/io/InputStream/ReadAllBytes.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/InputStream/ReadAllBytes.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @test
  * @bug 8080835
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main ReadAllBytes
  * @summary Basic test for InputStream.readAllBytes
  * @key randomness
--- a/jdk/test/java/io/InputStream/ReadNBytes.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/InputStream/ReadNBytes.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @test
  * @bug 8080835
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main ReadNBytes
  * @summary Basic test for InputStream.readNBytes
  * @key randomness
--- a/jdk/test/java/io/Serializable/class/NonSerializableTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/Serializable/class/NonSerializableTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,8 +25,13 @@
  * @test
  * @bug 4075221
  * @library /test/lib
- * @build jdk.test.lib.compiler.*
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng/timeout=300 NonSerializableTest
  * @summary Enable serialize of nonSerializable Class descriptor.
  */
--- a/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,7 +26,12 @@
  * @bug 4087295 4785472
  * @library /test/lib
  * @build jdk.test.lib.compiler.CompilerUtils
- * @build jdk.test.lib.process.ProcessTools
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @build RenamePackageTest
  * @run main RenamePackageTest
  * @summary Enable resolveClass() to accommodate package renaming.
--- a/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,8 @@
  * @summary Better failure atomicity for default read object.
  * @modules jdk.compiler
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @compile FailureAtomicity.java SerialRef.java
  * @run main failureAtomicity.FailureAtomicity
  */
--- a/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,8 +25,12 @@
  * @test
  * @bug 4035147 4785472
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ * @build jdk.test.lib.Asserts
+ * @build jdk.test.lib.JDKToolFinder
  * @build jdk.test.lib.JDKToolLauncher
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Platform
+ * @build jdk.test.lib.process.*
  * @build ClasspathTest
  * @run main serialver.ClasspathTest
  * @summary Test the use of the -classpath switch in the serialver application.
--- a/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,8 +25,12 @@
  * @test
  * @bug 4312217 4785473
  * @library /test/lib
- * @build jdk.test.lib.JDKToolLauncher
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @build NestedTest
  * @run main serialver.NestedTest
  * @summary  To test the use of nested class specification using the '.'
--- a/jdk/test/java/lang/Class/forName/modules/TestDriver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Class/forName/modules/TestDriver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,7 +43,10 @@
  * @summary Tests for Class.forName(Module,String)
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.ProcessTools
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.compiler.CompilerUtils
+ *        jdk.testlibrary.ProcessTools
  *        TestDriver TestMain TestLayer
  * @run testng TestDriver
  */
--- a/jdk/test/java/lang/Double/ParseHexFloatingPoint.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Double/ParseHexFloatingPoint.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main ParseHexFloatingPoint
  * @bug 4826774 8078672
  * @summary Numerical tests for hexadecimal inputs to parse{Double, Float} (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Integer/BitTwiddle.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Integer/BitTwiddle.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main BitTwiddle
  * @bug     4495754 8078672
  * @summary Basic test for int bit twiddling (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Long/BitTwiddle.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Long/BitTwiddle.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main BitTwiddle
  * @bug     4495754 8078672
  * @summary Basic test for long bit twiddling (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/CubeRootTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Math/CubeRootTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main CubeRootTests
  * @bug 4347132 4939441 8078672
  * @summary Tests for {Math, StrictMath}.cbrt (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/HypotTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Math/HypotTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main HypotTests
  * @bug 4851638 4939441 8078672
  * @summary Tests for {Math, StrictMath}.hypot (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/IeeeRecommendedTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Math/IeeeRecommendedTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main IeeeRecommendedTests
  * @bug 4860891 4826732 4780454 4939441 4826652 8078672
  * @summary Tests for IEEE 754[R] recommended functions and similar methods (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/Log1pTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Math/Log1pTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main Log1pTests
  * @bug 4851638 4939441 8078672
  * @summary Tests for {Math, StrictMath}.log1p (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/Math/MultiplicationTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Math/MultiplicationTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main MultiplicationTests
  * @bug 5100935
  * @summary Tests for multiplication methods (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/lang/ProcessHandle/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,12 @@
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng Basic
  * @summary Basic tests for ProcessHandler
  * @author Roger Riggs
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,7 +51,12 @@
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng InfoTest
  * @summary Functions of ProcessHandle.Info
  * @author Roger Riggs
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -40,10 +40,16 @@
 
 /*
  * @test
+ * @key intermittent
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng OnExitTest
  * @summary Functions of Process.onExit and ProcessHandle.onExit
  * @author Roger Riggs
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -48,6 +48,11 @@
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng/othervm TreeTest
  * @summary Test counting and JavaChild.spawning and counting of Processes.
  * @author Roger Riggs
--- a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,8 @@
  * @summary Basic test StackTraceElement with class loader names
  * @library lib /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build m1/* WithClassLoaderName
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        m1/* WithClassLoaderName
  * @run main/othervm m1/com.app.Main
  * @run main/othervm WithClassLoaderName
  */
--- a/jdk/test/java/lang/StackWalker/StackWalkTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StackWalker/StackWalkTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  * @bug 8140450
  * @summary Stack Walk Test (use -Dseed=X to set PRNG seed)
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @compile StackRecorderUtil.java
  * @run main/othervm StackWalkTest
  * @run main/othervm/java.security.policy=stackwalktest.policy StackWalkTest
--- a/jdk/test/java/lang/StrictMath/CubeRootTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StrictMath/CubeRootTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 4347132 8136799
  * @key randomness
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @build Tests
  * @build FdlibmTranslit
  * @build CubeRootTests
--- a/jdk/test/java/lang/StrictMath/ExpTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StrictMath/ExpTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 8139688
  * @key randomness
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @build Tests
  * @build FdlibmTranslit
  * @build ExpTests
--- a/jdk/test/java/lang/StrictMath/HypotTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StrictMath/HypotTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,7 @@
  * @key randomness
  * @summary Tests for StrictMath.hypot
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @build Tests
  * @build FdlibmTranslit
  * @build HypotTests
--- a/jdk/test/java/lang/String/CompactString/SerializationTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/String/CompactString/SerializationTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * @test
  * @bug 8077559
  * @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
  * @summary Tests Compact String. This one is testing String serialization
  *          among -XX:+CompactStrings/-XX:-CompactStrings/LegacyString
  * @run testng/othervm -XX:+CompactStrings SerializationTest
--- a/jdk/test/java/lang/String/LiteralReplace.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/String/LiteralReplace.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /* @test
  * @bug 8058779 8054307
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run testng LiteralReplace
  * @summary Basic tests of String.replace(CharSequence, CharSequence)
  * @key randomness
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/String/nativeEncoding/StringPlatformChars.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+ * @test
+ * @run main/othervm/native -Xcheck:jni StringPlatformChars
+ */
+import java.util.Arrays;
+
+public class StringPlatformChars {
+
+    private static final String JNU_ENCODING = System.getProperty("sun.jnu.encoding");
+
+    public static void main(String... args) throws Exception {
+        System.out.println("sun.jnu.encoding: " + JNU_ENCODING);
+        System.loadLibrary("stringPlatformChars");
+
+        // Test varying lengths, provoking different allocation paths
+        StringBuilder unicodeSb = new StringBuilder();
+        StringBuilder asciiSb = new StringBuilder();
+        StringBuilder latinSb = new StringBuilder();
+
+        for (int i = 0; i < 2000; i++) {
+            unicodeSb.append('\uFEFE');
+            testString(unicodeSb.toString());
+
+            asciiSb.append('x');
+            testString(asciiSb.toString());
+
+            latinSb.append('\u00FE');
+            testString(latinSb.toString());
+
+            testString(latinSb.toString() + asciiSb.toString() + unicodeSb.toString());
+        }
+
+        // Exhaustively test simple Strings made up of all possible chars:
+        for (char c = '\u0001'; c < Character.MAX_VALUE; c++) {
+            testString(String.valueOf(c));
+        }
+        // Special case: \u0000 is treated as end-of-string in the native code,
+        // so strings with it should be truncated:
+        if (getBytes("\u0000abcdef").length != 0 ||
+            getBytes("a\u0000bcdef").length != 1) {
+            System.out.println("Mismatching values for strings including \\u0000");
+            throw new AssertionError();
+        }
+    }
+
+    private static void testString(String s) throws Exception {
+        byte[] nativeBytes = getBytes(s);
+        byte[] stringBytes = s.getBytes(JNU_ENCODING);
+
+        if (!Arrays.equals(nativeBytes, stringBytes)) {
+            System.out.println("Mismatching values for: '" + s + "' " + Arrays.toString(s.chars().toArray()));
+            System.out.println("Native: " + Arrays.toString(nativeBytes));
+            System.out.println("String: " + Arrays.toString(stringBytes));
+            throw new AssertionError(s);
+        }
+
+        String javaNewS = new String(nativeBytes, JNU_ENCODING);
+        String nativeNewS = newString(nativeBytes);
+        if (!javaNewS.equals(nativeNewS)) {
+            System.out.println("New string via native doesn't match via java: '" + javaNewS + "' and '" + nativeNewS + "'");
+            throw new AssertionError(s);
+        }
+    }
+
+    static native byte[] getBytes(String string);
+
+    static native String newString(byte[] bytes);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/lang/String/nativeEncoding/libstringPlatformChars.c	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,76 @@
+/*
+ * 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.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "jni.h"
+#include "jni_util.h"
+
+JNIEXPORT jbyteArray JNICALL
+Java_StringPlatformChars_getBytes(JNIEnv *env, jclass unused, jstring value)
+{
+    const char* str;
+    int len;
+    jbyteArray bytes = NULL;
+
+    str = JNU_GetStringPlatformChars(env, value, NULL);
+    if (str == NULL) {
+        return NULL;
+    }
+    len = (int)strlen(str);
+    bytes = (*env)->NewByteArray(env, len);
+    if (bytes != 0) {
+        jclass strClazz = JNU_ClassString(env);
+        if (strClazz == NULL) {
+            return NULL;
+        }
+        (*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte *)str);
+
+        return bytes;
+    }
+    return NULL;
+}
+
+JNIEXPORT jstring JNICALL
+Java_StringPlatformChars_newString(JNIEnv *env, jclass unused, jbyteArray bytes)
+{
+    char* str;
+    int len = (*env)->GetArrayLength(env, bytes);
+    int i;
+    jbyte* jbytes;
+
+    str = (char*)malloc(len + 1);
+    jbytes = (*env)->GetPrimitiveArrayCritical(env, bytes, NULL);
+    if (jbytes == NULL) {
+        return NULL;
+    }
+    for (i = 0; i < len; i++) {
+        str[i] = (char)jbytes[i];
+    }
+    str[len] = '\0';
+    (*env)->ReleasePrimitiveArrayCritical(env, bytes, (void*)jbytes, 0);
+
+    return JNU_NewStringPlatform(env, str);
+}
+
--- a/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @test
  * @bug 8077559
  * @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
  * @summary Tests Compact String. This one is testing StringBuffer serialization
  *          among -XX:+CompactStrings/-XX:-CompactStrings/LegacyStringBuffer
  * @run testng/othervm -XX:+CompactStrings CompactStringBufferSerialization
--- a/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @test
  * @bug 8077559
  * @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
  * @summary Tests Compact String. This one is testing StringBuilder serialization
  *          among -XX:+CompactStrings/-XX:-CompactStrings/LegacyStringBuilder
  * @run testng/othervm -XX:+CompactStrings CompactStringBuilderSerialization
--- a/jdk/test/java/lang/Thread/ThreadStateTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/Thread/ThreadStateTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @library /lib/testlibrary
  * @library /test/lib
  * @build jdk.testlibrary.*
+ * @build jdk.test.lib.LockFreeLogger
  * @build ThreadStateTest ThreadStateController
  * @run main/othervm -Xmixed ThreadStateTest
  */
--- a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @summary Test verifies that lambda forms are garbage collected
  * @author kshefov
  * @library /lib/testlibrary /java/lang/invoke/common
+ * @build jdk.test.lib.TimeLimitedRunner
  * @build TestMethods
  * @build LambdaFormTestCase
  * @build LFGarbageCollectedTest
--- a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,10 +27,11 @@
  * @key randomness
  * @summary Test verifies that lambda forms are cached when run with multiple threads
  * @author kshefov
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
  * @modules java.base/java.lang.invoke:open
  *          java.base/java.lang.ref:open
  *          java.management
+ * @build jdk.test.lib.TimeLimitedRunner
  * @build TestMethods
  * @build LambdaFormTestCase
  * @build LFCachingTestCase
--- a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,10 +27,11 @@
  * @key randomness
  * @summary Test verifies that lambda forms are cached when run with single thread
  * @author kshefov
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
  * @modules java.base/java.lang.ref:open
  *          java.base/java.lang.invoke:open
  *          java.management
+ * @build jdk.test.lib.TimeLimitedRunner
  * @build TestMethods
  * @build LambdaFormTestCase
  * @build LFCachingTestCase
--- a/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java	Tue Jun 27 16:00:14 2017 -0400
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.testlibrary.TimeLimitedRunner;
+import jdk.test.lib.TimeLimitedRunner;
 import jdk.testlibrary.Utils;
 import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
 import test.java.lang.invoke.lib.Helper;
--- a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -23,8 +23,8 @@
 
 package test.java.lang.invoke.MethodHandles;
 
+import jdk.test.lib.TimeLimitedRunner;
 import jdk.testlibrary.Asserts;
-import jdk.testlibrary.TimeLimitedRunner;
 import jdk.testlibrary.Utils;
 import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
 import test.java.lang.invoke.lib.Helper;
@@ -43,7 +43,8 @@
 import java.util.function.Supplier;
 
 /* @test
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
+ * @build jdk.test.lib.TimeLimitedRunner
  * @compile CatchExceptionTest.java
  * @run main/othervm -esa test.java.lang.invoke.MethodHandles.CatchExceptionTest
  * @key intermittent randomness
--- a/jdk/test/java/lang/ref/CleanerTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/lang/ref/CleanerTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -51,7 +51,12 @@
  * @test
  * @library /lib/testlibrary /test/lib
  * @build sun.hotspot.WhiteBox
- * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @modules java.base/jdk.internal
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.ref
--- a/jdk/test/java/math/BigDecimal/StringConstructor.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/math/BigDecimal/StringConstructor.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main StringConstructor
  * @bug 4103117 4331084 4488017 4490929 6255285 6268365 8074460 8078672
  * @summary Tests the BigDecimal string constructor (use -Dseed=X to set PRNG seed).
--- a/jdk/test/java/math/BigInteger/BigIntegerTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main BigIntegerTest
  * @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 8074460 8078672 8032027
  * @summary tests methods in BigInteger (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/math/BigInteger/ModPow65537.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/math/BigInteger/ModPow65537.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main ModPow65537
  * @bug 4891312 8074460 8078672
  * @summary verify that modPow() not broken by the special case for 65537 (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/math/BigInteger/PrimeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/math/BigInteger/PrimeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
 /*
  * @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main PrimeTest
  * @bug 8026236 8074460 8078672
  * @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed)
--- a/jdk/test/java/net/Inet6Address/B6206527.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/Inet6Address/B6206527.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 6206527
  * @summary "cannot assign address" when binding ServerSocket on Suse 9
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main B6206527
  */
 
--- a/jdk/test/java/net/Inet6Address/B6558853.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/Inet6Address/B6558853.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 6558853
  * @summary  getHostAddress() on connections using IPv6 link-local addrs should have zone id
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main B6558853
  */
 
--- a/jdk/test/java/net/InetAddress/CheckJNI.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/InetAddress/CheckJNI.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @bug 4889870 4890033
  * @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main/othervm -Xcheck:jni CheckJNI
  */
 
--- a/jdk/test/java/net/InetAddress/ptr/Lookup.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/InetAddress/ptr/Lookup.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,8 +28,12 @@
  * @summary Test that reverse lookups of IPv4 addresses work when IPv6
  *          is enabled
  * @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- *        jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  *        Lookup
  * @run main Lookup root
  *
--- a/jdk/test/java/net/MulticastSocket/JoinLeave.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/MulticastSocket/JoinLeave.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 4091811 4148753 4102731
  * @summary Test java.net.MulticastSocket joinGroup and leaveGroup
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main JoinLeave
  */
 
--- a/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 4686717
  * @summary Test MulticastSocket.setLoopbackMode
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main/othervm SetLoopbackMode
  */
 
--- a/jdk/test/java/net/NetworkConfigurationProbe.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/NetworkConfigurationProbe.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,13 @@
  * @test
  * @summary NOT A TEST. Captures the network interface configuration.
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main NetworkConfigurationProbe
  */
 
--- a/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,8 +30,12 @@
  *          can cause fd leak
  * @requires (os.family != "windows")
  * @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- *        jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  *        AcceptCauseFileDescriptorLeak
  * @run main/othervm AcceptCauseFileDescriptorLeak root
  */
--- a/jdk/test/java/net/Socket/LinkLocal.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/Socket/LinkLocal.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,8 @@
  * @summary Connecting to a link-local IPv6 address should not
  *          causes a SocketException to be thrown.
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main LinkLocal
  */
 
--- a/jdk/test/java/net/Socket/OldSocketImplTestDriver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/Socket/OldSocketImplTestDriver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,7 +30,12 @@
  * @test
  * @bug 6449565
  * @library /test/lib
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main OldSocketImplTestDriver
  * @summary Test driver for OdlSocketImpl
  */
--- a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 8047031
  * @summary SocketPermission tests for legacy socket types
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run testng/othervm SocketPermissionTest
  */
 
--- a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,7 +30,10 @@
  * @library ../../../../com/sun/net/httpserver
  *          /lib/testlibrary
  *          /test/lib
- * @build FileServerHandler JarUtils jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
+ *        FileServerHandler JarUtils
  * @run main/othervm CloseTest
  * @summary URL-downloaded jar files can consume all available file descriptors
  */
--- a/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,7 +26,10 @@
  * @bug 6899919
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build JarUtils jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
+ *        JarUtils
  * @run main/othervm GetResourceAsStream
  */
 
--- a/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,8 +26,12 @@
  * @bug 5103449
  * @summary REGRESSION: getResourceAsStream is broken in JDK1.5.0-rc
  * @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- *        jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  *        Test
  * @run main/othervm TestDriver
  */
--- a/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,8 +26,12 @@
  * @bug 4244970
  * @summary Test to see if sealing violation is detected correctly
  * @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- *        jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main CheckSealedTest
  */
 
--- a/jdk/test/java/net/URLConnection/6212146/TestDriver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/URLConnection/6212146/TestDriver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,8 +27,12 @@
  * @summary URLConnection.connect() fails on JAR Entry it creates
  * file handler leak
  * @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- *        jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  *        Test
  * @run main/othervm TestDriver
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/HttpEchoHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.net.httpserver.*;
+import java.net.*;
+import jdk.incubator.http.*;
+import java.io.*;
+import java.util.concurrent.*;
+import javax.net.ssl.*;
+import java.nio.file.*;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+import jdk.testlibrary.SimpleSSLContext;
+import static jdk.incubator.http.HttpRequest.*;
+import static jdk.incubator.http.HttpResponse.*;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class HttpEchoHandler implements HttpHandler {
+    public HttpEchoHandler() {}
+
+    @Override
+    public void handle(HttpExchange t)
+            throws IOException {
+        try {
+            System.err.println("EchoHandler received request to " + t.getRequestURI());
+            InputStream is = t.getRequestBody();
+            Headers map = t.getRequestHeaders();
+            Headers map1 = t.getResponseHeaders();
+            map1.add("X-Hello", "world");
+            map1.add("X-Bye", "universe");
+            String fixedrequest = map.getFirst("XFixed");
+            File outfile = File.createTempFile("foo", "bar");
+            FileOutputStream fos = new FileOutputStream(outfile);
+            int count = (int) is.transferTo(fos);
+            is.close();
+            fos.close();
+            InputStream is1 = new FileInputStream(outfile);
+            OutputStream os = null;
+            // return the number of bytes received (no echo)
+            String summary = map.getFirst("XSummary");
+            if (fixedrequest != null && summary == null) {
+                t.sendResponseHeaders(200, count);
+                os = t.getResponseBody();
+                is1.transferTo(os);
+            } else {
+                t.sendResponseHeaders(200, 0);
+                os = t.getResponseBody();
+                is1.transferTo(os);
+
+                if (summary != null) {
+                    String s = Integer.toString(count);
+                    os.write(s.getBytes());
+                }
+            }
+            outfile.delete();
+            os.close();
+            is1.close();
+        } catch (Throwable e) {
+            e.printStackTrace();
+            throw new IOException(e);
+        }
+    }
+}
--- a/jdk/test/java/net/httpclient/LightWeightHttpServer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/LightWeightHttpServer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,9 @@
 
 /**
  * library /lib/testlibrary/ /
- * build jdk.testlibrary.SimpleSSLContext ProxyServer EchoHandler
+ * build jdk.testlibrary.SimpleSSLContext ProxyServer
  * compile ../../../com/sun/net/httpserver/LogFilter.java
+ * compile ../../../com/sun/net/httpserver/EchoHandler.java
  * compile ../../../com/sun/net/httpserver/FileServerHandler.java
  */
 import com.sun.net.httpserver.Headers;
--- a/jdk/test/java/net/httpclient/ManyRequests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/ManyRequests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,22 +23,30 @@
 
 /*
  * @test
- * @bug 8087112
+ * @bug 8087112 8180044
  * @modules jdk.incubator.httpclient
  *          java.logging
  *          jdk.httpserver
  * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext EchoHandler
+ * @build jdk.testlibrary.SimpleSSLContext
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
+ * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
  * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests
+ * @run main/othervm/timeout=40 -Dtest.insertDelay=true ManyRequests
+ * @run main/othervm/timeout=40 -Dtest.chunkSize=64 ManyRequests
+ * @run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests
  * @summary Send a large number of requests asynchronously
  */
+ // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests
 
 import com.sun.net.httpserver.HttpsConfigurator;
 import com.sun.net.httpserver.HttpsParameters;
 import com.sun.net.httpserver.HttpsServer;
+import com.sun.net.httpserver.HttpExchange;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 import jdk.incubator.http.HttpClient;
 import jdk.incubator.http.HttpRequest;
 import java.net.InetSocketAddress;
@@ -65,7 +73,10 @@
         Logger logger = Logger.getLogger("com.sun.net.httpserver");
         logger.setLevel(Level.ALL);
         logger.info("TEST");
-
+        System.out.println("Sending " + REQUESTS
+                         + " requests; delay=" + INSERT_DELAY
+                         + ", chunks=" + CHUNK_SIZE
+                         + ", XFixed=" + XFIXED);
         SSLContext ctx = new SimpleSSLContext().get();
 
         InetSocketAddress addr = new InetSocketAddress(0);
@@ -86,11 +97,36 @@
 
     //static final int REQUESTS = 1000;
     static final int REQUESTS = 20;
+    static final boolean INSERT_DELAY = Boolean.getBoolean("test.insertDelay");
+    static final int CHUNK_SIZE = Math.max(0,
+           Integer.parseInt(System.getProperty("test.chunkSize", "0")));
+    static final boolean XFIXED = Boolean.getBoolean("test.XFixed");
+
+    static class TestEchoHandler extends EchoHandler {
+        final Random rand = new Random();
+        @Override
+        public void handle(HttpExchange e) throws IOException {
+            System.out.println("Server: received " + e.getRequestURI());
+            super.handle(e);
+        }
+        protected void close(OutputStream os) throws IOException {
+            if (INSERT_DELAY) {
+                try { Thread.sleep(rand.nextInt(200)); } catch (InterruptedException e) {}
+            }
+            super.close(os);
+        }
+        protected void close(InputStream is) throws IOException {
+            if (INSERT_DELAY) {
+                try { Thread.sleep(rand.nextInt(200)); } catch (InterruptedException e) {}
+            }
+            super.close(is);
+        }
+    }
 
     static void test(HttpsServer server, HttpClient client) throws Exception {
         int port = server.getAddress().getPort();
-        URI uri = new URI("https://127.0.0.1:" + port + "/foo/x");
-        server.createContext("/foo", new EchoHandler());
+        URI baseURI = new URI("https://127.0.0.1:" + port + "/foo/x");
+        server.createContext("/foo", new TestEchoHandler());
         server.start();
 
         RequestLimiter limiter = new RequestLimiter(40);
@@ -99,24 +135,32 @@
         HashMap<HttpRequest,byte[]> bodies = new HashMap<>();
 
         for (int i=0; i<REQUESTS; i++) {
-            byte[] buf = new byte[i+1];  // different size bodies
+            byte[] buf = new byte[(i+1)*CHUNK_SIZE+i+1];  // different size bodies
             rand.nextBytes(buf);
+            URI uri = new URI(baseURI.toString() + String.valueOf(i+1));
             HttpRequest r = HttpRequest.newBuilder(uri)
+                                       .header("XFixed", "true")
                                        .POST(fromByteArray(buf))
                                        .build();
             bodies.put(r, buf);
 
             results[i] =
                 limiter.whenOkToSend()
-                       .thenCompose((v) -> client.sendAsync(r, asByteArray()))
+                       .thenCompose((v) -> {
+                           System.out.println("Client: sendAsync: " + r.uri());
+                           return client.sendAsync(r, asByteArray());
+                       })
                        .thenCompose((resp) -> {
                            limiter.requestComplete();
                            if (resp.statusCode() != 200) {
                                String s = "Expected 200, got: " + resp.statusCode();
+                               System.out.println(s + " from "
+                                                  + resp.request().uri().getPath());
                                return completedWithIOException(s);
                            } else {
                                counter++;
-                               System.out.println("Result from " + counter);
+                               System.out.println("Result (" + counter + ") from "
+                                                   + resp.request().uri().getPath());
                            }
                            return CompletableFuture.completedStage(resp.body())
                                       .thenApply((b) -> new Pair<>(resp, b));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/ManyRequests2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8087112 8180044
+ * @modules jdk.incubator.httpclient
+ *          java.logging
+ *          jdk.httpserver
+ * @library /lib/testlibrary/ /
+ * @build jdk.testlibrary.SimpleSSLContext
+ * @compile ../../../com/sun/net/httpserver/LogFilter.java
+ * @compile ../../../com/sun/net/httpserver/EchoHandler.java
+ * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
+ * @build ManyRequests ManyRequests2
+ * @run main/othervm/timeout=40 -Dtest.XFixed=true ManyRequests2
+ * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true ManyRequests2
+ * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64 ManyRequests2
+ * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests2
+ * @summary Send a large number of requests asynchronously. The server echoes back using known content length.
+ */
+ // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests
+
+public class ManyRequests2 {
+
+    public static void main(String[] args) throws Exception {
+        ManyRequests.main(args);
+    }
+}
--- a/jdk/test/java/net/httpclient/RequestBodyTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/RequestBodyTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,7 +28,10 @@
  *          jdk.httpserver
  * @library /lib/testlibrary/ /test/lib
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
+ * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
+ * @build jdk.test.lib.Platform
+ * @build jdk.test.lib.util.FileUtils
  * @build LightWeightHttpServer
  * @build jdk.testlibrary.SimpleSSLContext
  * @run testng/othervm RequestBodyTest
--- a/jdk/test/java/net/httpclient/SmokeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/SmokeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
  *          java.logging
  *          jdk.httpserver
  * @library /lib/testlibrary/ /
- * @build jdk.testlibrary.SimpleSSLContext ProxyServer EchoHandler
+ * @build jdk.testlibrary.SimpleSSLContext ProxyServer
  * @compile ../../../com/sun/net/httpserver/LogFilter.java
+ * @compile ../../../com/sun/net/httpserver/EchoHandler.java
  * @compile ../../../com/sun/net/httpserver/FileServerHandler.java
  * @run main/othervm -Djdk.httpclient.HttpClient.log=errors,trace SmokeTest
  */
--- a/jdk/test/java/net/httpclient/http2/BasicTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/http2/BasicTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,11 +62,11 @@
             sslContext = sslct.get();
             client = getClient();
             httpServer = new Http2TestServer(false, 0, exec, sslContext);
-            httpServer.addHandler(new EchoHandler(), "/");
+            httpServer.addHandler(new Http2EchoHandler(), "/");
             httpPort = httpServer.getAddress().getPort();
 
             httpsServer = new Http2TestServer(true, 0, exec, sslContext);
-            httpsServer.addHandler(new EchoHandler(), "/");
+            httpsServer.addHandler(new Http2EchoHandler(), "/");
 
             httpsPort = httpsServer.getAddress().getPort();
             httpURIString = "http://127.0.0.1:" + httpPort + "/foo/";
--- a/jdk/test/java/net/httpclient/http2/ErrorTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/http2/ErrorTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,7 +83,7 @@
                                               0,
                                               exec,
                                               serverContext);
-            httpsServer.addHandler(new EchoHandler(), "/");
+            httpsServer.addHandler(new Http2EchoHandler(), "/");
             int httpsPort = httpsServer.getAddress().getPort();
             String httpsURIString = "https://127.0.0.1:" + httpsPort + "/bar/";
 
--- a/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/http2/FixedThreadPoolTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,11 +62,11 @@
             sslContext = sslct.get();
             client = getClient();
             httpServer = new Http2TestServer(false, 0, exec, sslContext);
-            httpServer.addHandler(new EchoHandler(), "/");
+            httpServer.addHandler(new Http2EchoHandler(), "/");
             httpPort = httpServer.getAddress().getPort();
 
             httpsServer = new Http2TestServer(true, 0, exec, sslContext);
-            httpsServer.addHandler(new EchoHandler(), "/");
+            httpsServer.addHandler(new Http2EchoHandler(), "/");
 
             httpsPort = httpsServer.getAddress().getPort();
             httpURIString = "http://127.0.0.1:" + httpPort + "/foo/";
--- a/jdk/test/java/net/httpclient/http2/RedirectTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/httpclient/http2/RedirectTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,7 +79,7 @@
 
             httpServer.addHandler(new RedirectHandler(sup(altURIString1)), "/foo");
             altServer.addHandler(new RedirectHandler(sup(altURIString2)), "/redir");
-            altServer.addHandler(new EchoHandler(), "/redir/again");
+            altServer.addHandler(new Http2EchoHandler(), "/redir/again");
 
             httpServer.start();
             altServer.start();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/http2/server/Http2EchoHandler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.*;
+import jdk.incubator.http.internal.common.HttpHeadersImpl;
+
+public class Http2EchoHandler implements Http2Handler {
+    public Http2EchoHandler() {}
+
+    @Override
+    public void handle(Http2TestExchange t)
+            throws IOException {
+        try {
+            System.err.println("EchoHandler received request to " + t.getRequestURI());
+            InputStream is = t.getRequestBody();
+            HttpHeadersImpl map = t.getRequestHeaders();
+            HttpHeadersImpl map1 = t.getResponseHeaders();
+            map1.addHeader("X-Hello", "world");
+            map1.addHeader("X-Bye", "universe");
+            String fixedrequest = map.firstValue("XFixed").orElse(null);
+            File outfile = File.createTempFile("foo", "bar");
+            //System.err.println ("QQQ = " + outfile.toString());
+            FileOutputStream fos = new FileOutputStream(outfile);
+            int count = (int) is.transferTo(fos);
+            System.err.printf("EchoHandler read %d bytes\n", count);
+            is.close();
+            fos.close();
+            InputStream is1 = new FileInputStream(outfile);
+            OutputStream os = null;
+            // return the number of bytes received (no echo)
+            String summary = map.firstValue("XSummary").orElse(null);
+            if (fixedrequest != null && summary == null) {
+                t.sendResponseHeaders(200, count);
+                os = t.getResponseBody();
+                int count1 = (int)is1.transferTo(os);
+                System.err.printf("EchoHandler wrote %d bytes\n", count1);
+            } else {
+                t.sendResponseHeaders(200, 0);
+                os = t.getResponseBody();
+                int count1 = (int)is1.transferTo(os);
+                System.err.printf("EchoHandler wrote %d bytes\n", count1);
+
+                if (summary != null) {
+                    String s = Integer.toString(count);
+                    os.write(s.getBytes());
+                }
+            }
+            outfile.delete();
+            os.close();
+            is1.close();
+        } catch (Throwable e) {
+            e.printStackTrace();
+            throw new IOException(e);
+        }
+    }
+}
--- a/jdk/test/java/net/ipv6tests/B6521014.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/ipv6tests/B6521014.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @bug 6521014 6543428
  * @summary IOException thrown when Socket tries to bind to an local IPv6 address on SuSE Linux
  * @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
  * @run main B6521014
  */
 
--- a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -56,7 +56,9 @@
  * @modules jdk.compiler
  * @summary Basic test for URLStreamHandlerProvider
  * @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.testlibrary.JDKToolFinder
  * @compile Basic.java Child.java
  * @run main Basic
  */
--- a/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,12 @@
  *          various bad values fail to launch the VM
  * @requires (os.arch == "x86_64") | (os.arch == "amd64") | (os.arch == "sparcv9")
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  *
  * @run main LimitDirectMemoryNegativeTest foo
  * @run main LimitDirectMemoryNegativeTest 10kmt
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,7 @@
  * @bug 4607272 6842687 6878369 6944810 7023403
  * @summary Unit test for AsynchronousSocketChannel(use -Dseed=X to set PRNG seed)
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main Basic -skipSlowConnectTest
  * @key randomness intermittent
  */
--- a/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,7 +25,9 @@
  * @bug 4527345
  * @summary Unit test for DatagramChannel's multicast support
  * @library /test/lib
- * @build BasicMulticastTests
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
+ *        BasicMulticastTests
  * @run main BasicMulticastTests
  */
 
--- a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,7 +25,9 @@
  * @bug 4527345 7026376 6633549
  * @summary Unit test for DatagramChannel's multicast support
  * @library /test/lib
- * @build MulticastSendReceiveTests
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
+ *        MulticastSendReceiveTests
  * @run main MulticastSendReceiveTests
  * @run main/othervm -Djava.net.preferIPv4Stack=true MulticastSendReceiveTests
  * @key randomness
--- a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,7 +26,9 @@
  * @summary Test for interference when two sockets are bound to the same
  *   port but joined to different multicast groups
  * @library /test/lib
- * @build Promiscuous
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
+ *        Promiscuous
  * @run main Promiscuous
  * @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
  * @key randomness
--- a/jdk/test/java/nio/channels/FileChannel/Transfer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed)
  * @library ..
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run testng/timeout=300 Transfer
  * @key randomness
  */
--- a/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,7 +28,13 @@
  *     Solaris if maximum number of file descriptors is less than 10000
  * @requires (os.family != "windows")
  * @library /test/lib
- * @build LotsOfUpdates
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        LotsOfUpdates
  * @run main LotsOfUpdatesTest
  */
 
--- a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 /* @test
  * @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed)
  * @library .. /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main VectorIO
  * @key randomness
  */
--- a/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/CheckProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,6 +21,15 @@
  * questions.
  */
 
+/*
+ * @test
+ * @summary Unit test for java.nio.channels.spi.AsynchronousChannelProvider
+ * @build Provider1 Provider2
+ * @run main/othervm CheckProvider Provider1
+ * @run main/othervm -Djava.nio.channels.spi.AsynchronousChannelProvider=Provider2
+ *                   CheckProvider Provider2
+ */
+
 import java.nio.channels.spi.AsynchronousChannelProvider;
 
 public class CheckProvider {
--- a/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider1.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,11 +21,13 @@
  * questions.
  */
 
+import java.io.IOException;
+import java.nio.channels.AsynchronousChannelGroup;
+import java.nio.channels.AsynchronousServerSocketChannel;
+import java.nio.channels.AsynchronousSocketChannel;
 import java.nio.channels.spi.AsynchronousChannelProvider;
-import java.nio.channels.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadFactory;
-import java.io.IOException;
 
 public class Provider1 extends AsynchronousChannelProvider {
     public Provider1() {
--- a/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/Provider2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,11 +21,13 @@
  * questions.
  */
 
+import java.io.IOException;
+import java.nio.channels.AsynchronousChannelGroup;
+import java.nio.channels.AsynchronousServerSocketChannel;
+import java.nio.channels.AsynchronousSocketChannel;
 import java.nio.channels.spi.AsynchronousChannelProvider;
-import java.nio.channels.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ThreadFactory;
-import java.io.IOException;
 
 public class Provider2 extends AsynchronousChannelProvider {
     public Provider2() {
--- a/jdk/test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-#
-# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 Unit test for java.nio.channels.spi.AsynchronousChannelProvider
-# @build Provider1 Provider2 CheckProvider
-# @run shell custom_provider.sh
-
-# if TESTJAVA isn't set then we assume an interactive run.
-
-if [ -z "$TESTJAVA" ]; then
-    TESTSRC=.
-    TESTCLASSES=.
-    JAVA=java
-else
-    JAVA="${TESTJAVA}/bin/java"
-fi
-
-OS=`uname -s`
-case "$OS" in
-    Windows_* | CYGWIN* )
-        CLASSPATH="${TESTCLASSES};${TESTSRC}"
-        ;;
-    * )
-        CLASSPATH=${TESTCLASSES}:${TESTSRC}
-        ;;
-esac
-export CLASSPATH
-
-failures=0
-
-go() {
-    echo ''
-    $JAVA ${TESTVMOPTS} $1 $2 $3 2>&1
-    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-}
-
-# Run the tests
-
-go CheckProvider Provider1
-go -Djava.nio.channels.spi.AsynchronousChannelProvider=Provider2 CheckProvider \
-  Provider2
-
-#
-# Results
-#
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures test(s) failed";
-  else echo "All test(s) passed"; fi
-exit $failures
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/CloseTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/CloseTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,9 @@
  * peer has closed the connection) in less than 15 seconds.
  */
 import java.nio.ByteBuffer;
-import java.nio.channels.*;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.SocketChannel;
 
 public class CloseTest {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoService.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoService.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,10 +55,15 @@
  * facilate testing that the channel is closed the "tcp nowait" service
  * can close the connection after a given number of bytes.
  */
-import java.nio.*;
-import java.nio.channels.*;
 import java.io.IOException;
-import java.net.*;
+import java.net.SocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channel;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 public class EchoService {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/EchoTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,10 +35,13 @@
  * the packet is correctly echoed.
  *
  */
-import java.net.*;
-import java.io.*;
+import java.io.IOException;
+import java.net.DatagramPacket;
 import java.nio.ByteBuffer;
-import java.nio.channels.*;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.SocketChannel;
 import java.util.Random;
 
 public class EchoTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4673940 4930794
+ * @summary Unit tests for inetd feature
+ * @requires (os.family == "linux" | os.family == "solaris")
+ * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
+ * @run testng/othervm InheritedChannelTest
+ * @key intermittent
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static java.util.Arrays.asList;
+
+public class InheritedChannelTest {
+
+    private static final String TEST_SRC = System.getProperty("test.src");
+    private static final String TEST_CLASSES = System.getProperty("test.classes");
+    private static final Path POLICY_PASS = Paths.get(TEST_SRC, "java.policy.pass");
+    private static final Path POLICY_FAIL = Paths.get(TEST_SRC, "java.policy.fail");
+
+    private static final String OS = System.getProperty("os.name").toLowerCase();
+    private static final String OS_NAME = OS.startsWith("sunos") ? "solaris" : OS;
+
+    private static final String ARCH = System.getProperty("os.arch");
+    private static final String OS_ARCH = ARCH.equals("i386") ? "i586" : ARCH;
+
+    private static final Path LD_LIBRARY_PATH
+            = Paths.get(TEST_SRC, "lib", OS_NAME + "-" + OS_ARCH);
+
+    private static final Path LAUNCHERLIB = LD_LIBRARY_PATH.resolve("libLauncher.so");
+
+    @DataProvider
+    public Object[][] testCases() {
+        return new Object[][]{
+            { "StateTest", List.of(StateTest.class.getName()) },
+            { "EchoTest",  List.of(EchoTest.class.getName())  },
+            { "CloseTest", List.of(CloseTest.class.getName()) },
+
+            // run StateTest with a SecurityManager set
+            // Note that the system properties are arguments to StateTest and not options.
+            // These system properties are passed to the launched service as options:
+            // java [-options] class [args...]
+            { "StateTest run with " + POLICY_PASS, List.of(StateTest.class.getName(),
+                                                           "-Djava.security.manager",
+                                                           "-Djava.security.policy="
+                                                           + POLICY_PASS)
+            },
+            { "StateTest run with " + POLICY_FAIL, List.of(StateTest.class.getName(),
+                                                           "-expectFail",
+                                                           "-Djava.security.manager",
+                                                           "-Djava.security.policy="
+                                                           + POLICY_FAIL)
+            }
+        };
+    }
+
+    @Test(dataProvider = "testCases")
+    public void test(String desc, List<String> opts) throws Throwable {
+        if (!Files.exists(LAUNCHERLIB)) {
+            System.out.println("Cannot find " + LAUNCHERLIB
+                    + " - library not available for this system");
+            return;
+        }
+        System.out.println("LD_LIBRARY_PATH=" + LD_LIBRARY_PATH);
+
+        List<String> args = new ArrayList<>();
+        args.add(JDKToolFinder.getJDKTool("java"));
+        args.addAll(asList(Utils.getTestJavaOpts()));
+        args.addAll(List.of("--add-opens", "java.base/java.io=ALL-UNNAMED",
+                            "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED"));
+        args.addAll(opts);
+
+        ProcessBuilder pb = new ProcessBuilder(args);
+
+        Map<String, String> env = pb.environment();
+        env.put("CLASSPATH", TEST_CLASSES);
+        env.put("LD_LIBRARY_PATH", LD_LIBRARY_PATH.toString());
+
+        ProcessTools.executeCommand(pb)
+                    .shouldHaveExitValue(0);
+    }
+}
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,12 @@
  * A Launcher to launch a java process with its standard input, output,
  * and error streams connected to a socket.
  */
-import java.net.*;
-import java.nio.channels.*;
 import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 public class Launcher {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,10 +33,14 @@
  * socket state and replies back to this class via an out-of-band
  * channel.
  */
-import java.io.*;
-import java.net.*;
+import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
-import java.nio.channels.*;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 public class StateTest {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/StateTestService.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,11 +37,14 @@
  * establishes a TCP connection to the port and sends a PASSED/FAILED
  * message to indicate the test result.
  */
-import java.nio.*;
-import java.nio.channels.*;
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channel;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 public class StateTestService {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Util.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Util.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,12 @@
  * A collection of utility methods used by the SelectorProvider.inheritedChannel
  * unit tests.
  */
-import java.net.*;
-import java.io.*;
-import java.nio.channels.*;
-import java.lang.reflect.*;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.lang.reflect.Field;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 
 public class Util {
 
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 4673940 4930794
-# @summary Unit tests for inetd feature
-#
-# @build StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
-# @run shell run_tests.sh
-# @key intermittent
-
-os=`uname -s`
-
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
-    echo "Test not designed to run on this operating system, skipping..."
-    exit 0
-fi
-
-# if TESTJAVA isn't set then we assume an interactive run. So that it's
-# clear which version of 'java' is running we do a 'which java' and
-# a 'java -version'.
-
-if [ -z "$TESTJAVA" ]; then
-    TESTSRC=`pwd`
-    TESTCLASSES=`pwd`
-    JAVA=java
-    which $JAVA
-	${JAVA} -version
-else
-    JAVA="${TESTJAVA}/bin/java"
-fi
-
-CLASSPATH=${TESTCLASSES}
-export CLASSPATH
-
-
-# Check that we have libLauncher.so for the right platform.
-# On Solaris we assume 64-bit
-
-DFLAG=
-if [ "$os" = "SunOS" ]; then
-    PLATFORM=solaris
-    case "`uname -p`" in
-	i[3-9]86) 
-	    ARCH=amd64
-	    ;;
-	sparc)
-	    ARCH=sparcv9
-	    ;;
-    esac 
-fi
-
-if [ "$os" = "Linux" ]; then
-    PLATFORM=linux
-    ARCH=unknown
-    case "`uname -m`" in
-	i[3-6]86)
-	    ARCH=i586
-	    ;;
-	ia64)
-	    ARCH=ia64
-	    ;;
-	x86_64)
-	    ARCH=amd64
-	    ;;
-    esac
-fi
-
-LIBDIR=lib/${PLATFORM}-${ARCH}
-LAUNCHERLIB=${LIBDIR}/libLauncher.so
-echo $LIBDIR
-
-if [ ! -f "${TESTSRC}/${LAUNCHERLIB}" ]; then
-    echo "Cannot find ${LAUNCHERLIB} - library not available for this system"
-    exit 0
-fi
-
-LD_LIBRARY_PATH=${TESTSRC}/${LIBDIR}
-export LD_LIBRARY_PATH
-
-failures=0
-
-go() {
-    echo ''
-    sh -xc "$JAVA ${TESTVMOPTS} --add-opens java.base/java.io=ALL-UNNAMED \
-            --add-opens java.base/sun.nio.ch=ALL-UNNAMED $DFLAG \
-        $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
-    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-}
-
-# Run the tests
-
-go StateTest
-go EchoTest
-go CloseTest
-
-# Re-run StateTest with a SecurityManager set
-# Note that the system properties are arguments to StateTest and not options.
-# These system properties are passed to the launched service as options:
-#   java [-options] class [args...]
-
-go StateTest -Djava.security.manager -Djava.security.policy=${TESTSRC}/java.policy.pass
-go StateTest -expectFail -Djava.security.manager -Djava.security.policy=${TESTSRC}/java.policy.fail
-
-
-#
-# Results
-#
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures test(s) failed";
-  else echo "All test(s) passed"; fi
-exit $failures
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/Charset/DefaultCharsetTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4772857
+ * @summary Unit test for Charset.defaultCharset
+ * @requires (os.family == "linux" | os.family == "solaris")
+ * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        Default
+ * @run testng DefaultCharsetTest
+ */
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertTrue;
+
+public class DefaultCharsetTest {
+
+    private static final ProcessBuilder pb
+            = ProcessTools.createJavaProcessBuilder(true, Default.class.getName());
+    private static final Map<String, String> env = pb.environment();
+    private static String UNSUPPORTED = null;
+
+    @BeforeClass
+    public static void checkSupports() throws Exception {
+        UNSUPPORTED = runWithLocale("nonexist");
+    }
+
+    @DataProvider
+    public static Iterator<Object[]> locales() {
+        List<Object[]> data = new ArrayList<>();
+        data.add(new String[]{"en_US", "iso-8859-1"});
+        data.add(new String[]{"ja_JP.utf8", "utf-8"});
+        data.add(new String[]{"tr_TR", "iso-8859-9"});
+        data.add(new String[]{"C", "us-ascii"});
+        if (Platform.isLinux()) {
+            data.add(new String[]{"ja_JP", "x-euc-jp-linux"});
+            data.add(new String[]{"ja_JP.eucjp", "x-euc-jp-linux"});
+            data.add(new String[]{"ja_JP.ujis", "x-euc-jp-linux"});
+            data.add(new String[]{"ja_JP.utf8", "utf-8"});
+        }
+        if (Platform.isSolaris()) {
+            data.add(new String[]{"ja", "x-eucjp-open"});
+            data.add(new String[]{"ja_JP.eucJP", "x-eucjp-open"});
+            data.add(new String[]{"ja_JP.PCK", "x-PCK"});
+            data.add(new String[]{"ja_JP.UTF-8", "utf-8"});
+        }
+        return data.iterator();
+    }
+
+    @Test(dataProvider = "locales")
+    public void testDefaultCharset(String locale, String expectedCharset)
+            throws Exception {
+        String actual = runWithLocale(locale);
+        if (UNSUPPORTED.equals(actual)) {
+            System.out.println(locale + ": Locale not supported, skipping...");
+        } else {
+            assertTrue(actual.equalsIgnoreCase(expectedCharset),
+                       String.format("LC_ALL = %s, got defaultCharset = %s, "
+                               + "NOT as expected %s",
+                               locale, actual, expectedCharset));
+        }
+    }
+
+    private static String runWithLocale(String locale) throws Exception {
+        env.remove("LC_ALL");
+        env.put("LC_ALL", locale);
+        return ProcessTools.executeProcess(pb)
+                           .shouldHaveExitValue(0)
+                           .getStdout()
+                           .replace(System.lineSeparator(), "");
+    }
+}
--- a/jdk/test/java/nio/charset/Charset/default.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-#
-# 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
-# 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 4772857
-# @summary Unit test for Charset.defaultCharset
-#
-# @build Default
-# @run shell default.sh
-#
-
-# Command-line usage: sh default.sh [/path/to/build]
-
-if [ -z "$TESTJAVA" ]; then
-  if [ $# -lt 1 ]; then exit 1; fi
-  TESTJAVA=$1; shift
-  TESTSRC=`pwd`
-  TESTCLASSES=`pwd`
-fi
-
-s="`uname -s`"
-if [ "$s" != Linux -a "$s" != SunOS ]; then
-  echo "$s: locale command not supported on this system, skipping..."
-  exit 0
-fi
-
-JAVA=$TESTJAVA/bin/java
-
-tolower() {
-  echo "$1" | tr '[A-Z]' '[a-z]'
-}
-
-go() {
-
-  L="$1"
-  shift
-  if [ "x`locale -a | grep \^$L\$`" != "x$L" ]; then
-    echo "$L: Locale not supported, skipping..."
-    return
-  fi
-
-  ecs="$1"; shift
-
-  echo -n "$L: "
-  cs="`LC_ALL=$L $JAVA ${TESTVMOPTS} -cp $TESTCLASSES Default`"
-  if [ $? != 0 ]; then
-    exit 1
-  elif [ "`tolower $cs`" != "`tolower $ecs`" ]; then
-    echo "$cs, expected $ecs -- ERROR"
-    exit 1
-  else
-    echo "$cs, as expected"
-  fi
-
-}
-
-go  en_US       iso-8859-1
-go  ja_JP.utf8  utf-8
-go  tr_TR       iso-8859-9
-go  C           us-ascii
-
-if [ "$s" = Linux ]; then
-  go  ja_JP        x-euc-jp-linux
-  go  ja_JP.eucjp  x-euc-jp-linux
-  go  ja_JP.ujis   x-euc-jp-linux
-  go  ja_JP.utf8   utf-8
-fi
-
-# Solaris
-if [ "$s" = SunOS ]; then
-  go  ja           x-eucjp-open
-  go  ja_JP.eucJP  x-eucjp-open
-  go  ja_JP.PCK    x-PCK
-  go  ja_JP.UTF-8  utf-8
-fi
--- a/jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 Verify that sun.nio.cs.map property interpreted in ja multibyte locales
-# @bug 4879123
-# @build SJISPropTest
-#
-# @run shell/timeout=300 CheckSJISMappingProp.sh
-
-# set platform-dependent variables
-
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux | Darwin | AIX ) ;;
-  # Skip locale test for Windows
-  Windows* | CYGWIN* )
-    echo "Passed"; exit 0 ;;
-  * ) echo "Unrecognized system!" ;  exit 1 ;;
-esac
-
-expectPass() {
-  if [ $1 -eq 0 ]
-  then echo "--- passed as expected"
-  else
-    echo "--- failed"
-    exit $1
-  fi
-}
-
-
-JAVA="${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTCLASSES}"
-runTest() {
-  echo "Testing:" ${1}
-  LC_ALL="$1" ; export LC_ALL
-  locale
-  # Firstly, test with property set
-  # (shift_jis should map to windows-31J charset) 
-  ${JAVA} -Dsun.nio.cs.map="Windows-31J/Shift_JIS" SJISPropTest MS932
-  expectPass $?
-
-  # Next, test without property set - "shift_jis" follows IANA conventions
-  # and should map to the sun.nio.cs.ext.Shift_JIS charset
-  ${JAVA} SJISPropTest Shift_JIS
-  expectPass $?
-}
-
-# Run the test in the common Solaris/Linux/Mac OS locales
-# Tests will simply run in current locale if locale isn't supported
-# on the test machine/platform
-
-for i in "ja" "ja_JP.PCK" "ja_JP.eucJP"  ; do
-  runTest ${i}
-done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/coders/SJISMappingPropTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4879123
+ * @summary Verify that sun.nio.cs.map property interpreted in ja multibyte locales
+ * @requires (os.family != "windows")
+ * @modules jdk.charsets
+ * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        SJISPropTest
+ * @run testng SJISMappingPropTest
+ */
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+
+public class SJISMappingPropTest {
+
+    @DataProvider
+    public static Iterator<Object[]> locales() {
+        List<Object[]> data = new ArrayList<>();
+        data.add(new String[]{"ja"});
+        data.add(new String[]{"ja_JP.PCK"});
+        data.add(new String[]{"ja_JP.eucJP"});
+        return data.iterator();
+    }
+
+    @Test(dataProvider = "locales")
+    public void testWithProperty(String locale) throws Exception {
+        // with property set, shift_jis should map to windows-31J charset
+        runTest(locale,
+                "-Dsun.nio.cs.map=Windows-31J/Shift_JIS",
+                SJISPropTest.class.getName(),
+                "MS932");
+    }
+
+    @Test(dataProvider = "locales")
+    public void testWithoutProperty(String locale) throws Exception {
+        // without property set - "shift_jis" follows IANA conventions
+        // and should map to the sun.nio.cs.ext.Shift_JIS charset
+        runTest(locale,
+                SJISPropTest.class.getName(),
+                "Shift_JIS");
+    }
+
+    private void runTest(String locale, String... cmd) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmd);
+        Map<String, String> env = pb.environment();
+        env.put("LC_ALL", locale);
+        OutputAnalyzer out = ProcessTools.executeProcess(pb)
+                                         .outputTo(System.out)
+                                         .errorTo(System.err);
+        assertEquals(out.getExitValue(), 0);
+    }
+}
--- a/jdk/test/java/nio/charset/coders/SJISPropTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/charset/coders/SJISPropTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,12 +22,9 @@
  */
 
 /*
- *
- *
- * Regression test class run by CheckSJISMappingProp.sh to verify
+ * Regression test class run by SJISMappingPropTest.java to verify
  * that sun.nio.cs.map property is correctly interpreted in
  * multibyte Japanese locales
- *
  */
 
 public class SJISPropTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/spi/CharsetProviderBasicTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4429040 4591027 4814743
+ * @summary Unit test for charset providers
+ * @library /test/lib
+ *          /lib/testlibrary
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        JarUtils
+ *        FooCharset FooProvider CharsetTest
+ * @run driver SetupJar
+ * @run testng CharsetProviderBasicTest
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static java.util.Arrays.asList;
+
+public class CharsetProviderBasicTest {
+
+    private static final String TEST_SRC = System.getProperty("test.src");
+
+    private static final List DEFAULT_CSS = List.of(
+        "US-ASCII", "8859_1", "iso-ir-6", "UTF-16", "windows-1252", "!BAR", "cp1252"
+    );
+
+    private static final List MINIMAL_POLICY = List.of(
+        "-Djava.security.manager",
+        "-Djava.security.policy=" + TEST_SRC + File.separator + "default-pol"
+    );
+
+    private static final List CP_POLICY = List.of(
+        "-Djava.security.manager",
+        "-Djava.security.policy=" + TEST_SRC + File.separator + "charsetProvider.sp"
+    );
+
+    private static boolean checkSupports(String locale) throws Throwable {
+        return ProcessTools.executeProcess("sh", "-c", "LC_ALL=" + locale + " && "
+                                           + "locale -a | grep " + locale)
+                           .getStdout()
+                           .replace(System.lineSeparator(), "")
+                           .equals(locale);
+    }
+
+    @DataProvider
+    public static Iterator<Object[]> testCases() {
+        return Stream.of("", "ja_JP.eucJP", "tr_TR")
+                     .flatMap(locale -> Stream.of(
+                             new Object[]{locale, List.of(""), "FOO"},
+                             new Object[]{locale, MINIMAL_POLICY, "!FOO"},
+                             new Object[]{locale, CP_POLICY, "FOO"}
+                     ))
+                     .iterator();
+    }
+
+    @Test(dataProvider = "testCases")
+    public void testDefaultCharset(String locale, List opts, String css) throws Throwable {
+        if ((System.getProperty("os.name").startsWith("Windows") || !checkSupports(locale))
+                && (!locale.isEmpty())) {
+            System.out.println(locale + ": Locale not supported, skipping...");
+            return;
+        }
+
+        List<String> args = new ArrayList<>();
+        args.add(JDKToolFinder.getJDKTool("java"));
+        args.addAll(asList(Utils.getTestJavaOpts()));
+        args.add("-cp");
+        args.add(System.getProperty("test.class.path") + File.pathSeparator + "test.jar");
+        args.addAll(opts);
+        args.add(CharsetTest.class.getName());
+        args.addAll(DEFAULT_CSS);
+        args.add(css);
+        args.removeIf(t -> t.isEmpty());
+
+        ProcessBuilder pb = new ProcessBuilder(args);
+
+        if (!locale.isEmpty()) {
+            pb.environment().put("LC_ALL", locale);
+        }
+
+        ProcessTools.executeCommand(pb)
+                    .shouldHaveExitValue(0);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/spi/CharsetTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.InputStreamReader;
+import java.io.PrintStream;
+import java.nio.charset.Charset;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.Iterator;
+import java.util.SortedMap;
+
+public class CharsetTest {
+
+    private static PrintStream out = System.err;
+    private static final SortedMap available = Charset.availableCharsets();
+
+    private static void fail(String csn, String msg) {
+        throw new RuntimeException(csn + ": " + msg);
+    }
+
+    private static void testPositive(String csn) {
+        if (!Charset.isSupported(csn))
+            fail(csn, "Not supported");
+
+        Charset cs = Charset.forName(csn);
+        out.println(csn + " --> " + cs.getClass().getName());
+        out.println("  " + cs.name() + " " + cs.aliases());
+
+        if (!available.containsKey(cs.name()))
+            fail(csn, "Not in available charsets: " + available.keySet());
+        if (!((Charset)available.get(cs.name())).equals(cs))
+            fail(csn, "Available charset != looked-up charset");
+
+        if (csn.equalsIgnoreCase("FOO")) {
+            if (!(cs instanceof FooCharset))
+                fail(csn, "instanceof failed");
+        }
+    }
+
+    private static void testNegative(String csn) {
+        if (Charset.isSupported(csn))
+            fail(csn, "Supported");
+        if (available.containsKey(csn))
+            fail(csn, "Available");
+        try {
+            Charset.forName(csn);
+        } catch (UnsupportedCharsetException x) {
+            out.println(csn + " not supported, as expected");
+            return;
+        }
+        fail(csn, "Lookup succeeded");
+    }
+
+    public static void main(String [] args) {
+
+        out.println("Default: "
+                    + new InputStreamReader(System.in).getEncoding());
+
+        out.print("Available:");
+        for (Iterator i = available.keySet().iterator(); i.hasNext();)
+            out.print(" " + (String)i.next());
+        out.println();
+
+        for (int i = 0; i < args.length; i++) {
+            String a = args[i];
+            boolean not = a.startsWith("!");
+            String csn = (not ? a.substring(1) : a);
+            if (not)
+                testNegative(csn);
+            else
+                testPositive(csn);
+        }
+    }
+
+}
--- a/jdk/test/java/nio/charset/spi/FooProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/charset/spi/FooProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,10 +21,10 @@
  * questions.
  */
 
-import java.util.*;
-import java.nio.charset.*;
-import java.nio.charset.spi.*;
-
+import java.nio.charset.Charset;
+import java.nio.charset.spi.CharsetProvider;
+import java.util.Collections;
+import java.util.Iterator;
 
 public class FooProvider
     extends CharsetProvider
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/charset/spi/SetupJar.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+import static java.nio.file.StandardOpenOption.CREATE;
+
+public class SetupJar {
+
+    private static final String PROVIDER
+            = "META-INF/services/java.nio.charset.spi.CharsetProvider";
+    private static final String TEST_DIR = System.getProperty("test.dir", ".");
+
+    public static void main(String args[]) throws Exception {
+        Path xdir = Files.createDirectories(Paths.get(TEST_DIR, "xdir"));
+        Path provider = xdir.resolve(PROVIDER);
+        Files.createDirectories(provider.getParent());
+        Files.write(provider, "FooProvider".getBytes(), CREATE);
+
+        String[] files = {"FooCharset.class", "FooProvider.class"};
+        for (String f : files) {
+            Path source = Paths.get(System.getProperty("test.classes")).resolve(f);
+            Path target = xdir.resolve(source.getFileName());
+            Files.copy(source, target, REPLACE_EXISTING);
+        }
+
+        JarUtils.createJarFile(Paths.get("test.jar"), xdir);
+    }
+}
--- a/jdk/test/java/nio/charset/spi/Test.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * 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
- * 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.*;
-import java.nio.charset.*;
-import java.util.*;
-
-
-public class Test {
-
-    private static PrintStream out = System.err;
-    private static final SortedMap available = Charset.availableCharsets();
-
-    private static void fail(String csn, String msg) {
-        throw new RuntimeException(csn + ": " + msg);
-    }
-
-    private static void testPositive(String csn) {
-        if (!Charset.isSupported(csn))
-            fail(csn, "Not supported");
-
-        Charset cs = Charset.forName(csn);
-        out.println(csn + " --> " + cs.getClass().getName());
-        out.println("  " + cs.name() + " " + cs.aliases());
-
-        if (!available.containsKey(cs.name()))
-            fail(csn, "Not in available charsets: " + available.keySet());
-        if (!((Charset)available.get(cs.name())).equals(cs))
-            fail(csn, "Available charset != looked-up charset");
-
-        if (csn.equalsIgnoreCase("FOO")) {
-            if (!(cs instanceof FooCharset))
-                fail(csn, "instanceof failed");
-        }
-    }
-
-    private static void testNegative(String csn) {
-        if (Charset.isSupported(csn))
-            fail(csn, "Supported");
-        if (available.containsKey(csn))
-            fail(csn, "Available");
-        try {
-            Charset.forName(csn);
-        } catch (UnsupportedCharsetException x) {
-            out.println(csn + " not supported, as expected");
-            return;
-        }
-        fail(csn, "Lookup succeeded");
-    }
-
-    public static void main(String [] args) {
-
-        out.println("Default: "
-                    + new InputStreamReader(System.in).getEncoding());
-
-        out.print("Available:");
-        for (Iterator i = available.keySet().iterator(); i.hasNext();)
-            out.print(" " + (String)i.next());
-        out.println();
-
-        for (int i = 0; i < args.length; i++) {
-            String a = args[i];
-            boolean not = a.startsWith("!");
-            String csn = (not ? a.substring(1) : a);
-            if (not)
-                testNegative(csn);
-            else
-                testPositive(csn);
-        }
-    }
-
-}
--- a/jdk/test/java/nio/charset/spi/basic.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 4429040 4591027 4814743
-# @summary Unit test for charset providers
-#
-# @build Test FooCharset FooProvider
-# @run shell basic.sh
-# @run shell basic.sh ja_JP.eucJP
-# @run shell basic.sh tr_TR
-#
-
-# Command-line usage: sh basic.sh /path/to/build [locale]
-
-if [ -z "$TESTJAVA" ]; then
-  if [ $# -lt 1 ]; then exit 1; fi
-  TESTJAVA=$1; shift
-  COMPILEJDK="${TESTJAVA}"
-  TESTSRC=`pwd`
-  TESTCLASSES=`pwd`
-fi
-
-JAVA=$TESTJAVA/bin/java
-JAR=$COMPILEJAVA/bin/jar
-
-DIR=`pwd`
-case `uname` in
-  SunOS | Linux | Darwin | AIX ) CPS=':' ;;
-  Windows* )      CPS=';' ;;
-  CYGWIN*  )
-    DIR=`/usr/bin/cygpath -a -s -m $DIR`
-    CPS=";";;
-  *)              echo "Unknown platform: `uname`"; exit 1 ;;
-esac
-
-JARD=$DIR/x.jar
-APPD=$DIR/x.ext
-TESTD=$DIR/x.test
-
-CSS='US-ASCII 8859_1 iso-ir-6 UTF-16 windows-1252 !BAR cp1252'
-
-
-if [ \! -d $APPD ]; then
-    # Initialize
-    echo Initializing...
-    rm -rf $JARD $APPD $TESTD
-    mkdir -p $JARD/META-INF/services x.ext
-    echo FooProvider \
-      >$JARD/META-INF/services/java.nio.charset.spi.CharsetProvider
-    cp $TESTCLASSES/FooProvider.class $TESTCLASSES/FooCharset.class $JARD
-    mkdir $TESTD
-    cp $TESTCLASSES/Test.class $TESTD
-    (cd $JARD; $JAR ${TESTTOOLVMOPTS} -cf $APPD/test.jar *)
-fi
-
-if [ $# -gt 0 ]; then
-    # Use locale specified on command line, if it's supported
-    L="$1"
-    shift
-    s=`uname -s`
-    if [ $s != Linux -a $s != SunOS -a $s != Darwin -a $s != AIX ]; then
-      echo "$L: Locales not supported on this system, skipping..."
-      exit 0
-    fi
-    if [ "x`locale -a | grep $L`" != "x$L" ]; then
-      echo "$L: Locale not supported, skipping..."
-      exit 0
-    fi
-    LC_ALL=$L; export LC_ALL
-fi
-
-TMP=${TMP:-$TEMP}; TMP=${TMP:-/tmp}
-cd $TMP
-
-failures=0
-for where in app; do
-  for security in none minimal-policy cp-policy; do
-    echo '';
-    echo "LC_ALL=$LC_ALL where=$where security=$security"
-    av=''
-    if [ $where = app ]; then
-      av="$av -cp $TESTD$CPS$APPD/test.jar";
-    fi
-    case $security in
-      none)          css="$CSS FOO";;
-      # Minimal policy in this case is more or less carbon copy of jre default
-      # security policy and doesn't give explicit runtime permission
-      # for user provided runtime loadable charsets
-      minimal-policy)  css="$CSS !FOO";
-		     av="$av -Djava.security.manager -Djava.security.policy==$TESTSRC/default-pol";;
-      cp-policy)     css="$CSS FOO";
-		     av="$av -Djava.security.manager
-		         -Djava.security.policy=$TESTSRC/charsetProvider.sp";;
-    esac
-    if (set -x; $JAVA ${TESTVMOPTS} $av Test $css) 2>&1; then
-      continue;
-    else
-      failures=`expr $failures + 1`
-    fi
-  done
-done
-
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures cases failed";
-  else echo "All cases passed"; fi
-exit $failures
--- a/jdk/test/java/nio/file/FileStore/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/FileStore/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,8 @@
  * @summary Unit test for java.nio.file.FileStore
  * @key intermittent
  * @library .. /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run main Basic
  */
 
--- a/jdk/test/java/nio/file/FileSystem/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/FileSystem/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @bug 4313887 6838333 8132497
  * @summary Unit test for java.nio.file.FileSystem
  * @library .. /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run main/othervm Basic
  */
 
--- a/jdk/test/java/nio/file/Files/CopyAndMove.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/Files/CopyAndMove.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,7 +25,8 @@
  * @bug 4313887 6838333 6917021 7006126 6950237 8006645
  * @summary Unit test for java.nio.file.Files copy and move methods (use -Dseed=X to set PRNG seed)
  * @library .. /test/lib
- * @build CopyAndMove PassThroughFileSystem
+ * @build jdk.test.lib.RandomFactory
+ *        CopyAndMove PassThroughFileSystem
  * @run main/othervm CopyAndMove
  * @key randomness
  */
--- a/jdk/test/java/nio/file/Files/DeleteOnClose.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/Files/DeleteOnClose.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,13 @@
  * @bug 4313887
  * @summary Unit test for DELETE_ON_CLOSE open option
  * @library /test/lib ..
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ * @run main DeleteOnClose
  */
 
 import java.io.IOException;
--- a/jdk/test/java/nio/file/Files/StreamLinesTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/Files/StreamLinesTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,7 @@
  * @bug 8072773
  * @library /test/lib /lib/testlibrary/bootlib
  * @build java.base/java.util.stream.OpTestCase
+ *        jdk.test.lib.RandomFactory
  * @run testng/othervm StreamLinesTest
  * @summary Tests streams returned from Files.lines, primarily focused on
  *          testing the file-channel-based stream stream with supported
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/file/Files/walkFileTree/FindTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 4313887 6907737
+ * @summary Tests that walkFileTree is consistent with the native find program
+ * @requires (os.family != "windows")
+ * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        CreateFileTree
+ * @run testng/othervm -Djava.io.tmpdir=. FindTest
+ */
+
+import java.io.IOException;
+import java.nio.file.FileSystemLoopException;
+import java.nio.file.FileVisitOption;
+import java.nio.file.FileVisitResult;
+import java.nio.file.FileVisitor;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Random;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+public class FindTest {
+
+    private static final Random rand = new Random();
+    private static final boolean isAIX = System.getProperty("os.name").equals("AIX");
+    private static Path top;
+    private static String TOP;
+
+    @BeforeClass
+    public static void createFileTree() throws Exception {
+        top = CreateFileTree.create();
+        TOP = top.toAbsolutePath().toString();
+    }
+
+    @Test
+    public void printTreeTest() throws Throwable {
+        // print the file tree and compare output with find(1)
+        assertOutputEquals(printFileTree(top), runFind("find", TOP));
+    }
+
+    @Test
+    public void printTreeFollowLinkTest() throws Throwable {
+        // print the file tree, following links, and compare output with find(1).
+
+        // On AIX "find -follow" may core dump on recursive links without '-L'
+        // see: http://www-01.ibm.com/support/docview.wss?uid=isg1IV28143
+        String[] cmds = isAIX
+                      ? new String[]{"find", "-L", TOP, "-follow"}
+                      : new String[]{"find", TOP, "-follow"};
+        OutputAnalyzer expected = runFind(cmds);
+
+        // Some versions of find(1) output cycles (sym links to ancestor
+        // directories), other versions do not. For that reason we run
+        // PrintFileTree with the -printCycles option when the output without
+        // this option differs to find(1).
+        try {
+            assertOutputEquals(printFileTree(top, "-follow"), expected);
+        } catch (AssertionError x) {
+            assertOutputEquals(printFileTree(top, "-follow", "-printCycles"), expected);
+        }
+    }
+
+    private void assertOutputEquals(List<String> actual, OutputAnalyzer expected)
+            throws IOException {
+        List<String> expectedList = Arrays.asList(expected.getStdout()
+                                          .split(System.lineSeparator()));
+        assertEquals(actual.size(), expectedList.size());
+        assertTrue(actual.removeAll(expectedList));
+    }
+
+    private OutputAnalyzer runFind(String... cmds) throws Throwable {
+        return ProcessTools.executeCommand(cmds);
+    }
+
+    /**
+     * Invokes Files.walkFileTree to traverse a file tree and prints
+     * each of the directories and files. The -follow option causes symbolic
+     * links to be followed and the -printCycles option will print links
+     * where the target of the link is an ancestor directory.
+     */
+    private static List<String> printFileTree(Path dir, String... opts) throws Exception {
+        List<Path> fileTreeList = new ArrayList<>();
+
+        List<String> optsList = Arrays.asList(opts);
+        boolean followLinks = optsList.contains("-follow");
+        boolean reportCycles = optsList.contains("-printCycles");
+
+        Set<FileVisitOption> options = new HashSet<>();
+        if (followLinks)
+            options.add(FileVisitOption.FOLLOW_LINKS);
+
+        Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor<Path>() {
+            @Override
+            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
+                fileTreeList.add(dir);
+                return FileVisitResult.CONTINUE;
+            }
+            @Override
+            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
+                fileTreeList.add(file);
+                return FileVisitResult.CONTINUE;
+            }
+            @Override
+            public FileVisitResult postVisitDirectory(Path dir, IOException exc)
+                throws IOException
+            {
+                if (exc != null)
+                    throw exc;
+                return FileVisitResult.CONTINUE;
+            }
+            @Override
+            public FileVisitResult visitFileFailed(Path file, IOException exc)
+                throws IOException
+            {
+                if (followLinks && (exc instanceof FileSystemLoopException)) {
+                    if (reportCycles)
+                        fileTreeList.add(file);
+                    return FileVisitResult.CONTINUE;
+                } else {
+                    throw exc;
+                }
+            }
+        });
+
+        return fileTreeList.stream()
+                           .map(f -> f.toAbsolutePath().toString())
+                           .collect(Collectors.toCollection(ArrayList::new));
+    }
+}
--- a/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.nio.file.*;
-import java.nio.file.attribute.*;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * Invokes Files.walkFileTree to traverse a file tree and prints
- * each of the directories and files. The -follow option causes symbolic
- * links to be followed and the -printCycles option will print links
- * where the target of the link is an ancestor directory.
- */
-
-public class PrintFileTree {
-
-    public static void main(String[] args) throws Exception {
-        boolean followLinks = false;
-        boolean printCycles = false;
-        int i = 0;
-        while (i < (args.length-1)) {
-            switch (args[i]) {
-                case "-follow"      : followLinks = true; break;
-                case "-printCycles" : printCycles = true;  break;
-                default:
-                    throw new RuntimeException(args[i] + " not recognized");
-            }
-            i++;
-        }
-        Path dir = Paths.get(args[i]);
-
-        Set<FileVisitOption> options = new HashSet<FileVisitOption>();
-        if (followLinks)
-            options.add(FileVisitOption.FOLLOW_LINKS);
-
-        final boolean follow = followLinks;
-        final boolean reportCycles = printCycles;
-        Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor<Path>() {
-            @Override
-            public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
-                System.out.println(dir);
-                return FileVisitResult.CONTINUE;
-            }
-            @Override
-            public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
-                System.out.println(file);
-                return FileVisitResult.CONTINUE;
-            }
-            @Override
-            public FileVisitResult postVisitDirectory(Path dir, IOException exc)
-                throws IOException
-            {
-                if (exc != null)
-                    throw exc;
-                return FileVisitResult.CONTINUE;
-            }
-            @Override
-            public FileVisitResult visitFileFailed(Path file, IOException exc)
-                throws IOException
-            {
-                if (follow && (exc instanceof FileSystemLoopException)) {
-                    if (reportCycles)
-                        System.out.println(file);
-                    return FileVisitResult.CONTINUE;
-                } else {
-                    throw exc;
-                }
-            }
-        });
-    }
-}
--- a/jdk/test/java/nio/file/Files/walkFileTree/find.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-#
-# Copyright (c) 2008, 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.
-#
-
-# @test
-# @bug 4313887 6907737
-# @summary Tests that walkFileTree is consistent with the native find program
-# @build CreateFileTree PrintFileTree
-# @run shell find.sh
-
-# if TESTJAVA isn't set then we assume an interactive run.
-
-if [ -z "$TESTJAVA" ]; then
-    TESTSRC=.
-    TESTCLASSES=.
-    JAVA=java
-else
-    JAVA="${TESTJAVA}/bin/java"
-fi
-
-OS=`uname -s`
-case "$OS" in
-    Windows_* | CYGWIN* )
-        echo "This test does not run on Windows" 
-        exit 0
-        ;;
-    AIX )
-        CLASSPATH=${TESTCLASSES}:${TESTSRC}
-        # On AIX "find -follow" may core dump on recursive links without '-L'
-        # see: http://www-01.ibm.com/support/docview.wss?uid=isg1IV28143
-        FIND_FOLLOW_OPT="-L"
-        ;;
-    * )
-        FIND_FOLLOW_OPT=
-        CLASSPATH=${TESTCLASSES}:${TESTSRC}
-        ;;
-esac
-export CLASSPATH
-
-# create the file tree
-ROOT=`$JAVA CreateFileTree`
-if [ $? != 0 ]; then exit 1; fi
-
-failures=0
-
-# print the file tree and compare output with find(1)
-$JAVA ${TESTVMOPTS} PrintFileTree "$ROOT" > out1
-find "$ROOT" > out2
-diff out1 out2
-if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-
-# repeat test following links. Some versions of find(1) output
-# cycles (sym links to ancestor directories), other versions do
-# not. For that reason we run PrintFileTree with the -printCycles
-# option when the output without this option differs to find(1).
-find $FIND_FOLLOW_OPT "$ROOT" -follow > out1
-$JAVA ${TESTVMOPTS} PrintFileTree -follow "$ROOT" > out2
-diff out1 out2
-if [ $? != 0 ];
-  then 
-    # re-run printing cycles to stdout
-    $JAVA ${TESTVMOPTS} PrintFileTree -follow -printCycles "$ROOT" > out2
-    diff out1 out2
-    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-  fi
-
-# clean-up
-rm -r "$ROOT"
-
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures test(s) failed";
-  else echo "Test passed"; fi
-exit $failures
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/nio/file/Path/MacPath.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.PosixFilePermission;
+import java.text.Normalizer;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+public class MacPath {
+
+    public static void main(String args[]) throws Throwable {
+        System.out.printf("sun.jnu.encoding=%s, file.encoding=%s%n",
+                          System.getProperty("file.encoding"),
+                          System.getProperty("sun.jnu.encoding"));
+        // English
+        test("TestDir_apple",                                    // test dir
+             "dir_macosx",                                       // dir
+             "file_macosx");                                     // file
+
+        // Japanese composite character
+        test("TestDir_\u30c8\u30a4\u30e4\u30cb\u30ca\u30eb/",
+             "dir_\u30a4\u30c1\u30b4\u306e\u30b1\u30fc\u30ad",
+             "file_\u30a4\u30c1\u30b4\u306e\u30b1\u30fc\u30ad");
+
+        // latin-1 supplementory
+        test("TestDir_K\u00f6rperlich\u00e4\u00df/",
+             "dir_Entt\u00e4uschung",
+             "file_Entt\u00e4uschung");
+
+        test("TestDir_K\u00f6rperlich\u00e4\u00df/",
+             "dir_Entt\u00c4uschung",
+             "file_Entt\u00c4uschung");
+
+        // Korean syblla
+        test("TestDir_\uac00\uac01\uac02",
+             "dir_\uac20\uac21\uac22",
+             "file_\uacc0\uacc1\uacc2");
+    }
+
+    private static boolean equal(Object x, Object y) {
+        return x == null ? y == null : x.equals(y);
+    }
+
+    private static boolean match(Path target, Path src) {
+        String fname = target.toString();
+        System.out.printf("    --> Trying  [%s], length=%d...", fname, fname.length());
+        if (target.equals(src)) {
+            System.out.println(" MATCHED!");
+            return true;
+        } else {
+            System.out.println(" NOT MATCHED!");
+        }
+        return false;
+    }
+
+    private static void test(String testdir, String dname, String fname_nfc)
+        throws Throwable
+    {
+        String fname = null;
+        String dname_nfd = Normalizer.normalize(dname, Normalizer.Form.NFD);
+        String fname_nfd = Normalizer.normalize(fname_nfc, Normalizer.Form.NFD);
+
+        System.out.printf("%n%n--------Testing...----------%n");
+        Path bpath = Paths.get(testdir);
+        Path dpath = Paths.get(testdir, dname);
+        Path dpath_nfd = Paths.get(testdir, dname_nfd);
+        Path fpath_nfc = Paths.get(testdir, fname_nfc);
+        Path fpath_nfd = Paths.get(testdir, fname_nfd);
+
+        if (Files.exists(bpath))
+            TestUtil.removeAll(bpath);
+        Files.createDirectories(dpath);
+
+        fname = dpath.toString();
+        System.out.printf(":Directory [%s][len=%d] created%n", fname, fname.length());
+
+        //////////////////////////////////////////////////////////////
+        if (!Files.isDirectory(dpath) || !Files.isDirectory(dpath_nfd)) {
+            throw new RuntimeException("Files.isDirectory(...) failed");
+        }
+
+        //////////////////////////////////////////////////////////////
+        // write out with nfd, read in with nfc + case
+        Files.write(fpath_nfd, new byte[] { 'n', 'f', 'd'});
+        System.out.println("    read in with nfc      (from nfd):" + new String(Files.readAllBytes(fpath_nfc)));
+
+        // check attrs with nfc + case
+        Set<PosixFilePermission> pfp = Files.getPosixFilePermissions(fpath_nfd);
+        if (!equal(pfp, Files.getPosixFilePermissions(fpath_nfc)) ) {
+            throw new RuntimeException("Files.getPosixfilePermission(...) failed");
+        }
+        Files.delete(fpath_nfd);
+
+        // write out with nfc, read in with nfd + case
+        Files.write(fpath_nfc, new byte[] { 'n', 'f', 'c'});
+        System.out.println("    read in with nfd      (from nfc):" + new String(Files.readAllBytes(fpath_nfd)));
+
+        // check attrs with nfc + case
+        pfp = Files.getPosixFilePermissions(fpath_nfc);
+        if (!equal(pfp, Files.getPosixFilePermissions(fpath_nfd))) {
+            throw new RuntimeException("Files.getPosixfilePermission(...) failed");
+        }
+        //////////////////////////////////////////////////////////////
+        boolean found_dir = false;
+        boolean found_file_nfc = false;
+        boolean found_file_nfd = false;
+        try (DirectoryStream<Path> stream = Files.newDirectoryStream(bpath)) {
+            for (Path path: stream) {
+                fname = path.toString();
+                System.out.printf("Found   : [%s], length=%d%n", fname, fname.length());
+                found_dir      |= match(dpath, path);
+                found_file_nfc |= match(fpath_nfc, path);
+                found_file_nfd |= match(fpath_nfd, path);
+            }
+        }
+        if (!found_dir || !found_file_nfc || !found_file_nfd) {
+            throw new RuntimeException("File.equal() failed");
+        }
+        // glob
+        String glob = "*" + fname_nfd.substring(2);  // remove leading "FI" from "FILE..."
+        System.out.println("glob=" + glob);
+        boolean globmatched = false;
+        try (DirectoryStream<Path> stream = Files.newDirectoryStream(bpath, glob)) {
+            for (Path path: stream) {
+                fname = path.toString();
+                System.out.printf("PathMatch : [%s], length=%d%n", fname, fname.length());
+                globmatched |= match(fpath_nfc, path);
+            }
+        }
+        if (!globmatched) {
+            //throw new RuntimeException("path matcher failed");
+            // it appears we have a regex.anon_eq bug in hangul syllable handling
+            System.out.printf("pathmatcher failed, glob=[%s]%n", glob);
+            System.out.printf("    -> fname_nfd.matches(fname_nfc)=%b%n",
+                              Pattern.compile(fname_nfd, Pattern.CANON_EQ)
+                                     .matcher(fname_nfc)
+                                     .matches());
+            System.out.printf("    -> fname_nfc.matches(fname_nfd)=%b%n",
+                              Pattern.compile(fname_nfc, Pattern.CANON_EQ)
+                                     .matcher(fname_nfd)
+                                     .matches());
+        }
+        TestUtil.removeAll(bpath);
+    }
+}
--- a/jdk/test/java/nio/file/Path/MacPathTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/Path/MacPathTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,154 +24,28 @@
 /* @test
  * @bug 7130915
  * @summary Tests file path with nfc/nfd forms on MacOSX
- * @library ../
- * @build MacPathTest
- * @run shell MacPathTest.sh
+ * @requires (os.family == "mac")
+ * @library /test/lib ..
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        TestUtil MacPath
+ * @run main MacPathTest
  */
 
-import java.nio.file.*;
-import java.nio.file.attribute.*;
-import java.text.*;
-import java.util.*;
-import java.util.regex.*;
+import jdk.test.lib.process.ProcessTools;
 
 public class MacPathTest {
 
-    public static void main(String args[]) throws Throwable {
-        String osname = System.getProperty("os.name");
-        if (!osname.contains("OS X") && !osname.contains("Darwin"))
-            return;
-        System.out.printf("sun.jnu.encoding=%s, file.encoding=%s%n",
-                          System.getProperty("file.encoding"),
-                          System.getProperty("sun.jnu.encoding"));
-        // English
-        test("TestDir_apple",                                    // test dir
-             "dir_macosx",                                       // dir
-             "file_macosx");                                     // file
-
-        // Japanese composite character
-        test("TestDir_\u30c8\u30a4\u30e4\u30cb\u30ca\u30eb/",
-             "dir_\u30a4\u30c1\u30b4\u306e\u30b1\u30fc\u30ad",
-             "file_\u30a4\u30c1\u30b4\u306e\u30b1\u30fc\u30ad");
-
-        // latin-1 supplementory
-        test("TestDir_K\u00f6rperlich\u00e4\u00df/",
-             "dir_Entt\u00e4uschung",
-             "file_Entt\u00e4uschung");
-
-        test("TestDir_K\u00f6rperlich\u00e4\u00df/",
-             "dir_Entt\u00c4uschung",
-             "file_Entt\u00c4uschung");
-
-        // Korean syblla
-        test("TestDir_\uac00\uac01\uac02",
-             "dir_\uac20\uac21\uac22",
-             "file_\uacc0\uacc1\uacc2");
-    }
-
-    private static boolean equal(Object x, Object y) {
-        return x == null ? y == null : x.equals(y);
-    }
-
-    private static boolean match(Path target, Path src) {
-        String fname = target.toString();
-        System.out.printf("    --> Trying  [%s], length=%d...", fname, fname.length());
-        if (target.equals(src)) {
-            System.out.println(" MATCHED!");
-            return true;
-        } else {
-            System.out.println(" NOT MATCHED!");
-        }
-        return false;
-    }
-
-    private static void test(String testdir, String dname, String fname_nfc)
-        throws Throwable
-    {
-        String fname = null;
-        String dname_nfd = Normalizer.normalize(dname, Normalizer.Form.NFD);
-        String fname_nfd = Normalizer.normalize(fname_nfc, Normalizer.Form.NFD);
-
-        System.out.printf("%n%n--------Testing...----------%n");
-        Path bpath = Paths.get(testdir);
-        Path dpath = Paths.get(testdir, dname);
-        Path dpath_nfd = Paths.get(testdir, dname_nfd);
-        Path fpath_nfc = Paths.get(testdir, fname_nfc);
-        Path fpath_nfd = Paths.get(testdir, fname_nfd);
-
-        if (Files.exists(bpath))
-            TestUtil.removeAll(bpath);
-        Files.createDirectories(dpath);
-
-        fname = dpath.toString();
-        System.out.printf(":Directory [%s][len=%d] created%n", fname, fname.length());
-
-        //////////////////////////////////////////////////////////////
-        if (!Files.isDirectory(dpath) || !Files.isDirectory(dpath_nfd)) {
-            throw new RuntimeException("Files.isDirectory(...) failed");
-        }
-
-        //////////////////////////////////////////////////////////////
-        // write out with nfd, read in with nfc + case
-        Files.write(fpath_nfd, new byte[] { 'n', 'f', 'd'});
-        System.out.println("    read in with nfc      (from nfd):" + new String(Files.readAllBytes(fpath_nfc)));
-
-        // check attrs with nfc + case
-        Set<PosixFilePermission> pfp = Files.getPosixFilePermissions(fpath_nfd);
-        if (!equal(pfp, Files.getPosixFilePermissions(fpath_nfc)) ) {
-            throw new RuntimeException("Files.getPosixfilePermission(...) failed");
-        }
-        Files.delete(fpath_nfd);
-
-        // write out with nfc, read in with nfd + case
-        Files.write(fpath_nfc, new byte[] { 'n', 'f', 'c'});
-        System.out.println("    read in with nfd      (from nfc):" + new String(Files.readAllBytes(fpath_nfd)));
-
-        // check attrs with nfc + case
-        pfp = Files.getPosixFilePermissions(fpath_nfc);
-        if (!equal(pfp, Files.getPosixFilePermissions(fpath_nfd))) {
-            throw new RuntimeException("Files.getPosixfilePermission(...) failed");
-        }
-        //////////////////////////////////////////////////////////////
-        boolean found_dir = false;
-        boolean found_file_nfc = false;
-        boolean found_file_nfd = false;
-        try (DirectoryStream<Path> stream = Files.newDirectoryStream(bpath)) {
-            for (Path path: stream) {
-                fname = path.toString();
-                System.out.printf("Found   : [%s], length=%d%n", fname, fname.length());
-                found_dir      |= match(dpath, path);
-                found_file_nfc |= match(fpath_nfc, path);
-                found_file_nfd |= match(fpath_nfd, path);
-            }
-        }
-        if (!found_dir || !found_file_nfc || !found_file_nfd) {
-            throw new RuntimeException("File.equal() failed");
-        }
-        // glob
-        String glob = "*" + fname_nfd.substring(2);  // remove leading "FI" from "FILE..."
-        System.out.println("glob=" + glob);
-        boolean globmatched = false;
-        try (DirectoryStream<Path> stream = Files.newDirectoryStream(bpath, glob)) {
-            for (Path path: stream) {
-                fname = path.toString();
-                System.out.printf("PathMatch : [%s], length=%d%n", fname, fname.length());
-                globmatched |= match(fpath_nfc, path);
-            }
-        }
-        if (!globmatched) {
-            //throw new RuntimeException("path matcher failed");
-            // it appears we have a regex.anon_eq bug in hangul syllable handling
-            System.out.printf("pathmatcher failed, glob=[%s]%n", glob);
-            System.out.printf("    -> fname_nfd.matches(fname_nfc)=%b%n",
-                              Pattern.compile(fname_nfd, Pattern.CANON_EQ)
-                                     .matcher(fname_nfc)
-                                     .matches());
-            System.out.printf("    -> fname_nfc.matches(fname_nfd)=%b%n",
-                              Pattern.compile(fname_nfc, Pattern.CANON_EQ)
-                                     .matcher(fname_nfd)
-                                     .matches());
-        }
-        TestUtil.removeAll(bpath);
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, MacPath.class.getName());
+        pb.environment().put("LC_ALL", "en_US.UTF-8");
+        ProcessTools.executeProcess(pb)
+                    .outputTo(System.out)
+                    .errorTo(System.err)
+                    .shouldHaveExitValue(0);
     }
 }
--- a/jdk/test/java/nio/file/Path/MacPathTest.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#! /bin/sh
-
-#
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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.
-#
-#
-OS=`uname -s`
-case "$OS" in
-  Darwin )  ;;
-  * )
-    exit 0
-    ;;
-esac
-
-if [ "x$TESTJAVA" = x ]; then
-  TESTJAVA=$1; shift
-  TESTCLASSES=.
-fi
-
-export LC_ALL=en_US.UTF-8; ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTCLASSES} MacPathTest
--- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @summary Tests WatchService behavior when lots of events are pending (use -Dseed=X to set PRNG seed)
  * @library ..
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main/timeout=180 LotsOfEvents
  * @key randomness
  */
--- a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,24 +21,18 @@
  * questions.
  */
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
-import java.io.ObjectOutputStream;
 import java.io.Serializable;
 
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
+import java.rmi.AlreadyBoundException;
 import java.rmi.MarshalledObject;
 import java.rmi.NotBoundException;
 import java.rmi.Remote;
 import java.rmi.RemoteException;
-import java.rmi.AlreadyBoundException;
 import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
+import java.security.Security;
 import java.util.Objects;
-import java.security.Security;
 
 import org.testng.Assert;
 import org.testng.TestNG;
@@ -57,7 +51,8 @@
  * @summary Test filters for the RMI Registry
  * @run testng/othervm RegistryFilterTest
  * @run testng/othervm
- *        -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass
+ *        -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass;maxdepth=19
+ *        -Dtest.maxdepth=19
  *        RegistryFilterTest
  * @run testng/othervm/policy=security.policy
  *        -Djava.security.properties=${test.src}/java.security-extra1
@@ -68,6 +63,8 @@
     private static int port;
     private static Registry registry;
 
+    static final int REGISTRY_MAX_DEPTH = 20;
+
     static final int REGISTRY_MAX_ARRAY = 10000;
 
     static final String registryFilter =
@@ -125,7 +122,7 @@
 
 
     /*
-     * Test registry rejects an object with the max array size  + 1.
+     * Test registry rejects an object with the max array size + 1.
      */
     @Test(dataProvider="bindData")
     public void simpleBind(String name, Remote obj, boolean blacklisted) throws RemoteException, AlreadyBoundException, NotBoundException {
@@ -139,9 +136,9 @@
     }
 
     /*
-    * Test registry rejects an object with a well known class
-    * if blacklisted in the security properties.
-    */
+     * Test registry rejects an object with a well known class
+     * if blacklisted in the security properties.
+     */
     @Test
     public void simpleRejectableClass() throws RemoteException, AlreadyBoundException, NotBoundException {
         RejectableClass r1 = null;
@@ -150,9 +147,46 @@
             r1 = new RejectableClass();
             registry.bind(name, r1);
             registry.unbind(name);
-            Assert.assertNull(registryFilter, "Registry filter should not have rejected");
+            Assert.assertNull(registryFilter, "Registry filter should have rejected");
+        } catch (Exception rex) {
+            Assert.assertNotNull(registryFilter, "Registry filter should not have rejected");
+        }
+    }
+
+    /*
+     * Test registry does not reject an object with depth at the built-in limit.
+     */
+    @Test
+    public void simpleDepthBuiltinNonRejectable() throws RemoteException, AlreadyBoundException, NotBoundException {
+        int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH);
+        depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH);
+        System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter);
+        try {
+            String name = "reject2";
+            DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride);
+            registry.bind(name, r1);
+            registry.unbind(name);
         } catch (Exception rex) {
-            Assert.assertNotNull(registryFilter, "Registry filter should have rejected");
+            Assert.fail("Registry filter should not have rejected depth: "
+                            + depthOverride);
+        }
+    }
+
+    /*
+     * Test registry rejects an object with depth at the limit + 1.
+     */
+    @Test
+    public void simpleDepthRejectable() throws RemoteException, AlreadyBoundException, NotBoundException {
+        int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH);
+        depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH);
+        System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter);
+        try {
+            String name = "reject3";
+            DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride + 1);
+            registry.bind(name, r1);
+            Assert.fail("Registry filter should have rejected depth: " + depthOverride + 1);
+        } catch (Exception rex) {
+            // Rejection expected
         }
     }
 
@@ -173,6 +207,7 @@
             return super.toString() + "//" + Objects.toString(obj);
         }
     }
+
     /**
      * A simple Serializable Remote object that is passed by value.
      * It and its contents are checked by the Registry serial filter.
@@ -183,4 +218,25 @@
         RejectableClass() {}
     }
 
+    /**
+     * A simple Serializable Remote object that is passed by value.
+     * It and its contents are checked by the Registry serial filter.
+     */
+    static class DepthRejectableClass implements Serializable, Remote {
+        private static final long serialVersionUID = 362498820763181264L;
+        private final DepthRejectableClass next;
+
+        private DepthRejectableClass(DepthRejectableClass next) {
+            this.next = next;
+        }
+
+        static DepthRejectableClass create(int depth) {
+            DepthRejectableClass next = new DepthRejectableClass(null);
+            for (int i = 1; i < depth; i++) {
+                next = new DepthRejectableClass(next);
+            }
+            return next;
+        }
+    }
+
 }
--- a/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,7 +42,13 @@
  * DoPrivAccmplice.jar.
  *
  * @library /test/lib
- *
+ * @build jdk.test.lib.util.JarUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main/othervm DoPrivAccompliceTest
  */
 
--- a/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,6 +42,8 @@
  * specified by different PBE algorithms (use -Dseed=X to set PRNG seed)
  * @library /test/lib /lib/testlibrary ../
  * @key randomness
+ * @build jdk.test.lib.RandomFactory
+ * @run main EntryProtectionTest
  */
 public class EntryProtectionTest {
     private static final char[] PASSWORD = "passwd".toCharArray();
--- a/jdk/test/java/security/MessageDigest/TestDigestIOStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/MessageDigest/TestDigestIOStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -41,6 +41,7 @@
  * @author Kevin Liu
  * @key randomness
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main/timeout=180 TestDigestIOStream
  */
 
--- a/jdk/test/java/security/MessageDigest/TestSameLength.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/MessageDigest/TestSameLength.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,8 @@
  * @author Kevin Liu
  * @key randomness
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main TestSameLength
  */
 
 public class TestSameLength {
--- a/jdk/test/java/security/MessageDigest/TestSameValue.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/MessageDigest/TestSameValue.java	Tue Jun 27 16:00:14 2017 -0400
@@ -37,6 +37,8 @@
  * @author Kevin Liu
  * @key randomness
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main TestSameValue
  */
 
 public class TestSameValue {
--- a/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -34,6 +34,7 @@
  * @bug 8050402
  * @summary Check policy is extensible with user defined permissions
  * @library /lib/testlibrary /test/lib
+ * @build jdk.test.lib.util.JarUtils
  * @compile TVJar/TVPermission.java
  * @run main ExtensiblePolicyWithJarTest
  */
--- a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @bug 8051408 8158534
  * @summary Make sure DrbgParameters coded as specified
  * @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main DrbgParametersSpec
  */
 
 import jdk.test.lib.Asserts;
--- a/jdk/test/java/security/Signature/Offsets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/security/Signature/Offsets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,6 +42,7 @@
  *          generation, the test tries to verify signature with the above API
  *          and passing in different signature offset (0, 33, 66, 99).
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main Offsets SUN NONEwithDSA
  * @run main Offsets SUN SHA1withDSA
  * @run main Offsets SUN SHA224withDSA
--- a/jdk/test/java/util/Arrays/ParallelPrefix.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,279 +0,0 @@
-/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * @test 8014076 8025067
- * @summary unit test for Arrays.ParallelPrefix().
- * @author Tristan Yan
- * @run testng ParallelPrefix
- */
-
-import java.util.Arrays;
-import java.util.function.BinaryOperator;
-import java.util.function.DoubleBinaryOperator;
-import java.util.function.Function;
-import java.util.function.IntBinaryOperator;
-import java.util.function.LongBinaryOperator;
-import java.util.stream.IntStream;
-import java.util.stream.LongStream;
-import static org.testng.Assert.*;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
-public class ParallelPrefix {
-    //Array size less than MIN_PARTITION
-    private static final int SMALL_ARRAY_SIZE = 1 << 3;
-
-    //Array size equals MIN_PARTITION
-    private static final int THRESHOLD_ARRAY_SIZE = 1 << 4;
-
-    //Array size greater than MIN_PARTITION
-    private static final int MEDIUM_ARRAY_SIZE = 1 << 8;
-
-    //Array size much greater than MIN_PARTITION
-    private static final int LARGE_ARRAY_SIZE = 1 << 14;
-
-    private static final int[] ARRAY_SIZE_COLLECTION  = new int[]{
-        SMALL_ARRAY_SIZE,
-        THRESHOLD_ARRAY_SIZE,
-        MEDIUM_ARRAY_SIZE,
-        LARGE_ARRAY_SIZE
-    };
-
-    @DataProvider(name = "intSet")
-    public static Object[][] intSet(){
-        return genericData(size -> IntStream.range(0, size).toArray(),
-                new IntBinaryOperator[]{
-                    Integer::sum,
-                    Integer::min});
-    }
-
-    @DataProvider(name = "longSet")
-    public static Object[][] longSet(){
-        return genericData(size -> LongStream.range(0, size).toArray(),
-                new LongBinaryOperator[]{
-                    Long::sum,
-                    Long::min});
-    }
-
-    @DataProvider(name = "doubleSet")
-    public static Object[][] doubleSet(){
-        return genericData(size -> IntStream.range(0, size).mapToDouble(i -> (double)i).toArray(),
-                new DoubleBinaryOperator[]{
-                    Double::sum,
-                    Double::min});
-    }
-
-    @DataProvider(name = "stringSet")
-    public static Object[][] stringSet(){
-        Function<Integer, String[]> stringsFunc = size ->
-                IntStream.range(0, size).mapToObj(Integer::toString).toArray(String[]::new);
-        BinaryOperator<String> concat = String::concat;
-        return genericData(stringsFunc,
-                (BinaryOperator<String>[]) new BinaryOperator[]{
-                    concat });
-    }
-
-    private static <T, OPS> Object[][] genericData(Function<Integer, T> generateFunc, OPS[] ops) {
-        //test arrays which size is equals n-1, n, n+1, test random data
-        Object[][] data = new Object[ARRAY_SIZE_COLLECTION.length * 3 * ops.length][4];
-        for(int n = 0; n < ARRAY_SIZE_COLLECTION.length; n++ ) {
-            for(int testValue = -1 ; testValue <= 1; testValue++) {
-                int array_size = ARRAY_SIZE_COLLECTION[n] + testValue;
-                for(int opsN = 0; opsN < ops.length; opsN++) {
-                    int index = n * 3 * ops.length + (testValue + 1) * ops.length + opsN;
-                    data[index][0] = generateFunc.apply(array_size);
-                    data[index][1] = array_size / 3;
-                    data[index][2] = 2 * array_size / 3;
-                    data[index][3] = ops[opsN];
-                }
-            }
-        }
-        return data;
-    }
-
-    @Test(dataProvider="intSet")
-    public void testParallelPrefixForInt(int[] data, int fromIndex, int toIndex, IntBinaryOperator op) {
-        int[] sequentialResult = data.clone();
-        for (int index = fromIndex + 1; index < toIndex; index++) {
-            sequentialResult[index ] = op.applyAsInt(sequentialResult[index  - 1], sequentialResult[index]);
-        }
-
-        int[] parallelResult = data.clone();
-        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertArraysEqual(parallelResult, sequentialResult);
-
-        int[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
-        Arrays.parallelPrefix(parallelRangeResult, op);
-        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
-    }
-
-    @Test(dataProvider="longSet")
-    public void testParallelPrefixForLong(long[] data, int fromIndex, int toIndex, LongBinaryOperator op) {
-        long[] sequentialResult = data.clone();
-        for (int index = fromIndex + 1; index < toIndex; index++) {
-            sequentialResult[index ] = op.applyAsLong(sequentialResult[index  - 1], sequentialResult[index]);
-        }
-
-        long[] parallelResult = data.clone();
-        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertArraysEqual(parallelResult, sequentialResult);
-
-        long[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
-        Arrays.parallelPrefix(parallelRangeResult, op);
-        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
-    }
-
-    @Test(dataProvider="doubleSet")
-    public void testParallelPrefixForDouble(double[] data, int fromIndex, int toIndex, DoubleBinaryOperator op) {
-        double[] sequentialResult = data.clone();
-        for (int index = fromIndex + 1; index < toIndex; index++) {
-            sequentialResult[index ] = op.applyAsDouble(sequentialResult[index  - 1], sequentialResult[index]);
-        }
-
-        double[] parallelResult = data.clone();
-        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertArraysEqual(parallelResult, sequentialResult);
-
-        double[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
-        Arrays.parallelPrefix(parallelRangeResult, op);
-        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
-    }
-
-    @Test(dataProvider="stringSet")
-    public void testParallelPrefixForStringr(String[] data , int fromIndex, int toIndex, BinaryOperator<String> op) {
-        String[] sequentialResult = data.clone();
-        for (int index = fromIndex + 1; index < toIndex; index++) {
-            sequentialResult[index ] = op.apply(sequentialResult[index  - 1], sequentialResult[index]);
-        }
-
-        String[] parallelResult = data.clone();
-        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
-        assertArraysEqual(parallelResult, sequentialResult);
-
-        String[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
-        Arrays.parallelPrefix(parallelRangeResult, op);
-        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
-    }
-
-    @Test
-    public void testNPEs() {
-        // null array
-        assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, Integer::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, Long::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, Double::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, String::concat));
-
-        // null array w/ range
-        assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max));
-        assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat));
-
-        // null op
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, null));
-
-        // null op w/ range
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, 0, 0, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, 0, 0, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, 0, 0, null));
-        assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, 0, 0, null));
-    }
-
-    @Test
-    public void testIAEs() {
-        assertThrowsIAE(() -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max));
-        assertThrowsIAE(() -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max));
-        assertThrowsIAE(() -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max));
-        assertThrowsIAE(() -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat));
-    }
-
-    @Test
-    public void testAIOOBEs() {
-        // bad "fromIndex"
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat));
-
-        // bad "toIndex"
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max));
-        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat));
-    }
-
-    // "library" code
-
-    private void assertThrowsNPE(ThrowingRunnable r) {
-        assertThrows(NullPointerException.class, r);
-    }
-
-    private void assertThrowsIAE(ThrowingRunnable r) {
-        assertThrows(IllegalArgumentException.class, r);
-    }
-
-    private void assertThrowsAIOOB(ThrowingRunnable r) {
-        assertThrows(ArrayIndexOutOfBoundsException.class, r);
-    }
-
-    static void assertArraysEqual(int[] actual, int[] expected) {
-        try {
-            assertEquals(actual, expected, "");
-        } catch (AssertionError x) {
-            throw new AssertionError(String.format("Expected:%s, actual:%s",
-                    Arrays.toString(expected), Arrays.toString(actual)), x);
-        }
-    }
-
-    static void assertArraysEqual(long[] actual, long[] expected) {
-        try {
-            assertEquals(actual, expected, "");
-        } catch (AssertionError x) {
-            throw new AssertionError(String.format("Expected:%s, actual:%s",
-                    Arrays.toString(expected), Arrays.toString(actual)), x);
-        }
-    }
-
-    static void assertArraysEqual(double[] actual, double[] expected) {
-        try {
-            assertEquals(actual, expected, "");
-        } catch (AssertionError x) {
-            throw new AssertionError(String.format("Expected:%s, actual:%s",
-                    Arrays.toString(expected), Arrays.toString(actual)), x);
-        }
-    }
-
-    static void assertArraysEqual(String[] actual, String[] expected) {
-        try {
-            assertEquals(actual, expected, "");
-        } catch (AssertionError x) {
-            throw new AssertionError(String.format("Expected:%s, actual:%s",
-                    Arrays.toString(expected), Arrays.toString(actual)), x);
-        }
-    }
-}
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/Arrays/largeMemory/ParallelPrefix.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,308 @@
+/*
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test 8014076 8025067
+ * @summary unit test for Arrays.ParallelPrefix().
+ * @author Tristan Yan
+ * @modules java.management jdk.management
+ * @run testng/othervm -Xms256m -Xmx1024m ParallelPrefix
+ */
+
+import java.lang.management.ManagementFactory;
+import java.util.Arrays;
+import java.util.function.BinaryOperator;
+import java.util.function.DoubleBinaryOperator;
+import java.util.function.Function;
+import java.util.function.IntBinaryOperator;
+import java.util.function.LongBinaryOperator;
+import java.util.stream.IntStream;
+import java.util.stream.LongStream;
+import com.sun.management.OperatingSystemMXBean;
+import static org.testng.Assert.*;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeSuite;
+
+public class ParallelPrefix {
+    //Array size less than MIN_PARTITION
+    private static final int SMALL_ARRAY_SIZE = 1 << 3;
+
+    //Array size equals MIN_PARTITION
+    private static final int THRESHOLD_ARRAY_SIZE = 1 << 4;
+
+    //Array size greater than MIN_PARTITION
+    private static final int MEDIUM_ARRAY_SIZE = 1 << 8;
+
+    //Array size much greater than MIN_PARTITION
+    private static final int LARGE_ARRAY_SIZE = 1 << 14;
+
+    private static int[] arraySizeCollection;
+
+    @BeforeSuite
+    public static void setup() {
+        java.lang.management.OperatingSystemMXBean bean =
+                ManagementFactory.getOperatingSystemMXBean();
+        if (bean instanceof OperatingSystemMXBean) {
+            OperatingSystemMXBean os = (OperatingSystemMXBean)bean;
+            long physicalMemorySize = os.getTotalPhysicalMemorySize() / (1024 * 1024);
+            System.out.println("System memory size: " + physicalMemorySize + "M");
+            // when we can get system memory size, and it's larger than 2G,
+            // then we enable large array size test below,
+            // else disable large array size test below.
+            if (physicalMemorySize > (2 * 1024)) {
+                arraySizeCollection  = new int[]{
+                        SMALL_ARRAY_SIZE,
+                        THRESHOLD_ARRAY_SIZE,
+                        MEDIUM_ARRAY_SIZE,
+                        LARGE_ARRAY_SIZE
+                    };
+                System.out.println("System memory is large enough, add large array size test");
+                return;
+            }
+        }
+        arraySizeCollection  = new int[]{
+                SMALL_ARRAY_SIZE,
+                THRESHOLD_ARRAY_SIZE,
+                MEDIUM_ARRAY_SIZE
+            };
+        System.out.println("System memory is not large enough, remove large array size test");
+    }
+
+    @DataProvider(name = "intSet")
+    public static Object[][] intSet(){
+        return genericData(size -> IntStream.range(0, size).toArray(),
+                new IntBinaryOperator[]{
+                    Integer::sum,
+                    Integer::min});
+    }
+
+    @DataProvider(name = "longSet")
+    public static Object[][] longSet(){
+        return genericData(size -> LongStream.range(0, size).toArray(),
+                new LongBinaryOperator[]{
+                    Long::sum,
+                    Long::min});
+    }
+
+    @DataProvider(name = "doubleSet")
+    public static Object[][] doubleSet(){
+        return genericData(size -> IntStream.range(0, size).mapToDouble(i -> (double)i).toArray(),
+                new DoubleBinaryOperator[]{
+                    Double::sum,
+                    Double::min});
+    }
+
+    @DataProvider(name = "stringSet")
+    public static Object[][] stringSet(){
+        Function<Integer, String[]> stringsFunc = size ->
+                IntStream.range(0, size).mapToObj(Integer::toString).toArray(String[]::new);
+        BinaryOperator<String> concat = String::concat;
+        return genericData(stringsFunc,
+                (BinaryOperator<String>[]) new BinaryOperator[]{
+                    concat });
+    }
+
+    private static <T, OPS> Object[][] genericData(Function<Integer, T> generateFunc, OPS[] ops) {
+        //test arrays which size is equals n-1, n, n+1, test random data
+        Object[][] data = new Object[arraySizeCollection.length * 3 * ops.length][4];
+        for(int n = 0; n < arraySizeCollection.length; n++ ) {
+            for(int testValue = -1 ; testValue <= 1; testValue++) {
+                int array_size = arraySizeCollection[n] + testValue;
+                for(int opsN = 0; opsN < ops.length; opsN++) {
+                    int index = n * 3 * ops.length + (testValue + 1) * ops.length + opsN;
+                    data[index][0] = generateFunc.apply(array_size);
+                    data[index][1] = array_size / 3;
+                    data[index][2] = 2 * array_size / 3;
+                    data[index][3] = ops[opsN];
+                }
+            }
+        }
+        return data;
+    }
+
+    @Test(dataProvider="intSet")
+    public void testParallelPrefixForInt(int[] data, int fromIndex, int toIndex, IntBinaryOperator op) {
+        int[] sequentialResult = data.clone();
+        for (int index = fromIndex + 1; index < toIndex; index++) {
+            sequentialResult[index ] = op.applyAsInt(sequentialResult[index  - 1], sequentialResult[index]);
+        }
+
+        int[] parallelResult = data.clone();
+        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
+        assertArraysEqual(parallelResult, sequentialResult);
+
+        int[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
+        Arrays.parallelPrefix(parallelRangeResult, op);
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+    }
+
+    @Test(dataProvider="longSet")
+    public void testParallelPrefixForLong(long[] data, int fromIndex, int toIndex, LongBinaryOperator op) {
+        long[] sequentialResult = data.clone();
+        for (int index = fromIndex + 1; index < toIndex; index++) {
+            sequentialResult[index ] = op.applyAsLong(sequentialResult[index  - 1], sequentialResult[index]);
+        }
+
+        long[] parallelResult = data.clone();
+        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
+        assertArraysEqual(parallelResult, sequentialResult);
+
+        long[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
+        Arrays.parallelPrefix(parallelRangeResult, op);
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+    }
+
+    @Test(dataProvider="doubleSet")
+    public void testParallelPrefixForDouble(double[] data, int fromIndex, int toIndex, DoubleBinaryOperator op) {
+        double[] sequentialResult = data.clone();
+        for (int index = fromIndex + 1; index < toIndex; index++) {
+            sequentialResult[index ] = op.applyAsDouble(sequentialResult[index  - 1], sequentialResult[index]);
+        }
+
+        double[] parallelResult = data.clone();
+        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
+        assertArraysEqual(parallelResult, sequentialResult);
+
+        double[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
+        Arrays.parallelPrefix(parallelRangeResult, op);
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+    }
+
+    @Test(dataProvider="stringSet")
+    public void testParallelPrefixForStringr(String[] data , int fromIndex, int toIndex, BinaryOperator<String> op) {
+        String[] sequentialResult = data.clone();
+        for (int index = fromIndex + 1; index < toIndex; index++) {
+            sequentialResult[index ] = op.apply(sequentialResult[index  - 1], sequentialResult[index]);
+        }
+
+        String[] parallelResult = data.clone();
+        Arrays.parallelPrefix(parallelResult, fromIndex, toIndex, op);
+        assertArraysEqual(parallelResult, sequentialResult);
+
+        String[] parallelRangeResult = Arrays.copyOfRange(data, fromIndex, toIndex);
+        Arrays.parallelPrefix(parallelRangeResult, op);
+        assertArraysEqual(parallelRangeResult, Arrays.copyOfRange(sequentialResult, fromIndex, toIndex));
+    }
+
+    @Test
+    public void testNPEs() {
+        // null array
+        assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, Integer::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, Long::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, Double::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, String::concat));
+
+        // null array w/ range
+        assertThrowsNPE(() -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max));
+        assertThrowsNPE(() -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat));
+
+        // null op
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, null));
+
+        // null op w/ range
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new int[] {}, 0, 0, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new long[] {}, 0, 0, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new double[] {}, 0, 0, null));
+        assertThrowsNPE(() -> Arrays.parallelPrefix(new String[] {}, 0, 0, null));
+    }
+
+    @Test
+    public void testIAEs() {
+        assertThrowsIAE(() -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max));
+        assertThrowsIAE(() -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max));
+        assertThrowsIAE(() -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max));
+        assertThrowsIAE(() -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat));
+    }
+
+    @Test
+    public void testAIOOBEs() {
+        // bad "fromIndex"
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat));
+
+        // bad "toIndex"
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max));
+        assertThrowsAIOOB(() -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat));
+    }
+
+    // "library" code
+
+    private void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
+    }
+
+    private void assertThrowsIAE(ThrowingRunnable r) {
+        assertThrows(IllegalArgumentException.class, r);
+    }
+
+    private void assertThrowsAIOOB(ThrowingRunnable r) {
+        assertThrows(ArrayIndexOutOfBoundsException.class, r);
+    }
+
+    static void assertArraysEqual(int[] actual, int[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(long[] actual, long[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(double[] actual, double[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+
+    static void assertArraysEqual(String[] actual, String[] expected) {
+        try {
+            assertEquals(actual, expected, "");
+        } catch (AssertionError x) {
+            throw new AssertionError(String.format("Expected:%s, actual:%s",
+                    Arrays.toString(expected), Arrays.toString(actual)), x);
+        }
+    }
+}
+
--- a/jdk/test/java/util/Base64/TestBase64.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/Base64/TestBase64.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  *       8014217 8025003 8026330 8028397 8129544 8165243
  * @summary tests java.util.Base64
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main TestBase64
  * @key randomness
  */
--- a/jdk/test/java/util/List/SubList.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/List/SubList.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,7 @@
  * @test
  * @bug 8079136
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run testng SubList
  * @summary Basic functionality of sublists
  * @key randomness
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import java.util.Set;
 import java.util.spi.AbstractResourceBundleProvider;
 
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesAsia extends AbstractResourceBundleProvider
     implements MyResourcesProvider
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module asiabundles {
     requires test;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.asia.MyResourcesAsia;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import java.util.Set;
 import java.util.spi.AbstractResourceBundleProvider;
 
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesEU extends AbstractResourceBundleProvider
     implements MyResourcesProvider
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module eubundles {
     requires test;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.eu.MyResourcesEU;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources;
-
-import java.util.spi.ResourceBundleProvider;
-
-public interface MyResourcesProvider extends ResourceBundleProvider {
-}
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 import java.util.Locale;
 import java.util.ResourceBundle;
 import java.util.spi.AbstractResourceBundleProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesProviderImpl extends AbstractResourceBundleProvider
     implements MyResourcesProvider
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.spi;
+
+import java.util.spi.ResourceBundleProvider;
+
+public interface MyResourcesProvider extends ResourceBundleProvider {
+}
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -22,7 +22,7 @@
  */
 
 module test {
-    exports jdk.test.resources to eubundles, asiabundles;
-    uses jdk.test.resources.MyResourcesProvider;
-    provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
+    exports jdk.test.resources.spi to eubundles, asiabundles;
+    uses jdk.test.resources.spi.MyResourcesProvider;
+    provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package jdk.test.resources.asia;
 
 import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesAsia extends MyResourcesProvider {
     public MyResourcesAsia() {
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module asiabundles {
     requires test;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.asia.MyResourcesAsia;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package jdk.test.resources.eu;
 
 import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesEU extends MyResourcesProvider {
     public MyResourcesEU() {
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module eubundles {
     requires test;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.eu.MyResourcesEU;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources;
-
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.spi.AbstractResourceBundleProvider;
-
-public abstract class MyResourcesProvider extends AbstractResourceBundleProvider {
-    protected MyResourcesProvider(String... formats) {
-        super(formats);
-    }
-
-    @Override
-    public ResourceBundle getBundle(String baseName, Locale locale) {
-        if (isSupportedInModule(locale)) {
-            return super.getBundle(baseName, locale);
-        }
-        return null;
-    }
-
-    protected abstract boolean isSupportedInModule(Locale locale);
-}
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 package jdk.test.resources;
 
 import java.util.Locale;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesProviderImpl extends MyResourcesProvider {
     public MyResourcesProviderImpl() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.spi;
+
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public abstract class MyResourcesProvider extends AbstractResourceBundleProvider {
+    protected MyResourcesProvider(String... formats) {
+        super(formats);
+    }
+
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        if (isSupportedInModule(locale)) {
+            return super.getBundle(baseName, locale);
+        }
+        return null;
+    }
+
+    protected abstract boolean isSupportedInModule(Locale locale);
+}
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 module test {
-    exports jdk.test.resources to eubundles, asiabundles;
-    uses jdk.test.resources.MyResourcesProvider;
-    provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
+    exports jdk.test.resources.spi to eubundles, asiabundles;
+    uses jdk.test.resources.spi.MyResourcesProvider;
+    provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package jdk.test.resources.asia;
 
 import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 /**
  *
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module asiabundles {
     requires mainbundles;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.asia.MyResourcesAsia;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package jdk.test.resources.eu;
 
 import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 /**
  *
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,6 @@
 module eubundles {
     requires mainbundles;
 
-    provides jdk.test.resources.MyResourcesProvider
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.eu.MyResourcesEU;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 package jdk.test.resources;
 
 import java.util.Locale;
+import jdk.test.resources.spi.MyResourcesProvider;
 
 public class MyResourcesMain extends MyResourcesProvider {
     public MyResourcesMain() {
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.ResourceBundle.Control;
-import java.util.Set;
-import java.util.spi.AbstractResourceBundleProvider;
-
-
-public class MyResourcesProvider extends AbstractResourceBundleProvider {
-    private final String region;
-    private final Set<Locale> supportedLocales;
-    private final List<String> formats;
-
-    protected MyResourcesProvider() {
-        region = "";
-        supportedLocales = null;
-        formats = Collections.emptyList();
-    }
-
-    protected MyResourcesProvider(String format, String region, Locale... locales) {
-        super(format);
-        this.region = region;
-        this.supportedLocales = new HashSet<>(Arrays.asList(locales));
-        this.formats = Collections.singletonList(format);
-    }
-
-    @Override
-    public ResourceBundle getBundle(String baseName, Locale locale) {
-        if (isSupportedInModule(locale)) {
-           return super.getBundle(baseName, locale);
-        }
-        return null;
-    }
-
-    @Override
-    protected String toBundleName(String baseName, Locale locale) {
-        String name = addRegion(baseName);
-        return Control.getControl(Control.FORMAT_DEFAULT).toBundleName(name, locale);
-    }
-
-    private String addRegion(String baseName) {
-        if (region.isEmpty()) {
-            return baseName;
-        }
-        int index = baseName.lastIndexOf('.');
-        return baseName.substring(0, index + 1) + region + baseName.substring(index);
-    }
-
-    protected boolean isSupportedInModule(Locale locale) {
-        return supportedLocales.contains(locale);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.spi;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.ResourceBundle.Control;
+import java.util.Set;
+import java.util.spi.AbstractResourceBundleProvider;
+
+
+public class MyResourcesProvider extends AbstractResourceBundleProvider {
+    private final String region;
+    private final Set<Locale> supportedLocales;
+    private final List<String> formats;
+
+    protected MyResourcesProvider() {
+        region = "";
+        supportedLocales = null;
+        formats = Collections.emptyList();
+    }
+
+    protected MyResourcesProvider(String format, String region, Locale... locales) {
+        super(format);
+        this.region = region;
+        this.supportedLocales = new HashSet<>(Arrays.asList(locales));
+        this.formats = Collections.singletonList(format);
+    }
+
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        if (isSupportedInModule(locale)) {
+           return super.getBundle(baseName, locale);
+        }
+        return null;
+    }
+
+    @Override
+    protected String toBundleName(String baseName, Locale locale) {
+        String name = addRegion(baseName);
+        return Control.getControl(Control.FORMAT_DEFAULT).toBundleName(name, locale);
+    }
+
+    private String addRegion(String baseName) {
+        if (region.isEmpty()) {
+            return baseName;
+        }
+        int index = baseName.lastIndexOf('.');
+        return baseName.substring(0, index + 1) + region + baseName.substring(index);
+    }
+
+    protected boolean isSupportedInModule(Locale locale) {
+        return supportedLocales.contains(locale);
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 module mainbundles {
-    exports jdk.test.resources to test, eubundles, asiabundles;
-    provides jdk.test.resources.MyResourcesProvider
+    exports jdk.test.resources.spi to test, eubundles, asiabundles;
+    provides jdk.test.resources.spi.MyResourcesProvider
         with jdk.test.resources.MyResourcesMain;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,5 +23,5 @@
 
 module test {
     requires mainbundles;
-    uses jdk.test.resources.MyResourcesProvider;
+    uses jdk.test.resources.spi.MyResourcesProvider;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/run.sh	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8180375
+# @summary Tests resource bundles are correctly loaded from
+#   modules through "<packageName>.spi.<simpleName>Provider" types.
+
+set -e
+
+if [ -z "$TESTJAVA" ]; then
+  if [ $# -lt 1 ]; then exit 1; fi
+  TESTJAVA="$1"; shift
+  COMPILEJAVA="${TESTJAVA}"
+  TESTSRC="`pwd`"
+  TESTCLASSES="`pwd`"
+fi
+
+JAVAC="$COMPILEJAVA/bin/javac"
+JAVA="$TESTJAVA/bin/java"
+
+rm -rf mods
+$JAVAC --module-source-path $TESTSRC/src -d mods --module m1,m2
+
+mkdir -p mods/m1/p/resources mods/m2/p/resources
+cp $TESTSRC/src/m1/p/resources/*.properties mods/m1/p/resources
+cp $TESTSRC/src/m2/p/resources/*.properties mods/m2/p/resources
+
+mkdir classes
+$JAVAC -d classes $TESTSRC/src/Main.java
+
+$JAVA -cp classes Main
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.module.Configuration;
+import java.lang.module.ModuleFinder;
+import java.lang.reflect.Method;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class Main {
+    public static void main(String... args) throws Exception {
+        ModuleFinder afterFinder = ModuleFinder.of(Paths.get("mods"));
+
+        Configuration cf = ModuleLayer.boot().configuration()
+                .resolveAndBind(ModuleFinder.of(), afterFinder,
+                    List.of("m1", "m2"));
+
+        System.out.println("Configuration: " + cf);
+
+        ModuleLayer l = ModuleLayer.defineModulesWithManyLoaders(cf,
+                List.of(ModuleLayer.boot()),
+                        ClassLoader.getPlatformClassLoader())
+                .layer();
+
+        Module m1 = l.findModule("m1").get();
+        ResourceBundle bundle =
+            ResourceBundle.getBundle("p.resources.MyResource",
+                                     Locale.US, m1);
+        ResourceBundle jabundle =
+            ResourceBundle.getBundle("p.resources.MyResource",
+                                     Locale.JAPANESE, m1);
+
+        String enResult = bundle.getString("key");
+        String jaResult = jabundle.getString("key");
+        if (!"hi".equals(enResult) || !"ja".equals(jaResult)) {
+            throw new RuntimeException("Unexpected resources loaded: en: " +
+                                        enResult + ", ja: " + jaResult);
+        }
+
+        Class<?> c = Class.forName(m1, "p.Main");
+        Method m = c.getDeclaredMethod("run");
+        m.invoke(null);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module m1 {
+    exports p;
+    exports p.resources.spi;
+    uses p.resources.spi.MyResourceProvider;
+    provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.io.InputStream;
+
+public class Main {
+    public static void main(String... args) {
+        run();
+    }
+
+    public static void run() {
+        ClassLoader loader =
+            Main.class.getModule().getLayer().findLoader("m1");
+        ClassLoader loader2 =
+            Main.class.getModule().getLayer().findLoader("m2");
+
+        ResourceBundle bundle =
+            ResourceBundle.getBundle("p.resources.MyResource", Locale.US);
+        ResourceBundle bundle1 =
+            ResourceBundle.getBundle("p.resources.MyResource", Locale.JAPANESE);
+
+        String enResult = bundle.getString("key");
+        String jaResult = bundle1.getString("key");
+        if (!"hi".equals(enResult) || !"ja".equals(jaResult)) {
+            throw new RuntimeException("Unexpected resources loaded: en: " +
+                                        enResult + ", ja: " + jaResult);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p.internal;
+
+import p.resources.spi.MyResourceProvider;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.util.Locale;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class BundleProvider extends AbstractResourceBundleProvider
+    implements MyResourceProvider {
+    public BundleProvider() {
+        super();
+    }
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        if (locale.equals(Locale.ENGLISH) || locale.equals(Locale.ROOT)) {
+            return super.getBundle(baseName, locale);
+        }
+
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+key=hi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p.resources.spi;
+
+import java.util.spi.ResourceBundleProvider;
+
+
+public interface MyResourceProvider extends ResourceBundleProvider {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module m2 {
+    requires m1;
+    provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package p.internal;
+
+import p.resources.spi.MyResourceProvider;
+
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class BundleProvider extends AbstractResourceBundleProvider
+    implements MyResourceProvider {
+    public BundleProvider() {
+        super();
+    }
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        if (locale.equals(Locale.JAPANESE)) {
+            return super.getBundle(baseName, locale);
+        }
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+key=ja
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources;
-
-import java.util.Locale;
-import java.util.spi.AbstractResourceBundleProvider;
-
-public class MyResourcesProvider extends AbstractResourceBundleProvider {
-    public MyResourcesProvider() {
-        super("java.class", "java.properties");
-        System.err.println("MyResourcesProvider called " + this);
-    }
-
-    @Override
-    protected String toBundleName(String baseName, Locale locale) {
-        StringBuilder sb = new StringBuilder(baseName);
-        String lang = locale.getLanguage();
-        if (!lang.isEmpty()) {
-            sb.append('_').append(lang);
-            String country = locale.getCountry();
-            if (!country.isEmpty()) {
-                sb.append('_').append(country);
-            }
-        }
-        return sb.toString();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.spi;
+
+import java.util.Locale;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class MyResourcesProvider extends AbstractResourceBundleProvider {
+    public MyResourcesProvider() {
+        super("java.class", "java.properties");
+        System.err.println("MyResourcesProvider called " + this);
+    }
+
+    @Override
+    protected String toBundleName(String baseName, Locale locale) {
+        StringBuilder sb = new StringBuilder(baseName);
+        String lang = locale.getLanguage();
+        if (!lang.isEmpty()) {
+            sb.append('_').append(lang);
+            String country = locale.getCountry();
+            if (!country.isEmpty()) {
+                sb.append('_').append(country);
+            }
+        }
+        return sb.toString();
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,6 @@
  */
 
 module bundles {
-    exports jdk.test.resources to test;
-    provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider;
+    exports jdk.test.resources.spi to test;
+    provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,5 +24,5 @@
 module test {
     requires bundles;
 
-    uses jdk.test.resources.MyResourcesProvider;
+    uses jdk.test.resources.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources.exported.classes;
-
-import java.util.Locale;
-import java.util.spi.AbstractResourceBundleProvider;
-
-public class MyResourcesProvider extends AbstractResourceBundleProvider {
-    public MyResourcesProvider() {
-        super("java.class", "java.properties");
-        System.err.println("MyResourcesProvider called " + this);
-    }
-
-    @Override
-    protected String toBundleName(String baseName, Locale locale) {
-        StringBuilder sb = new StringBuilder(baseName);
-        String lang = locale.getLanguage();
-        if (!lang.isEmpty()) {
-            sb.append('_').append(lang);
-            String country = locale.getCountry();
-            if (!country.isEmpty()) {
-                sb.append('_').append(country);
-            }
-        }
-        return sb.toString();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.exported.classes.spi;
+
+import java.util.Locale;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class MyResourcesProvider extends AbstractResourceBundleProvider {
+    public MyResourcesProvider() {
+        super("java.class", "java.properties");
+        System.err.println("MyResourcesProvider called " + this);
+    }
+
+    @Override
+    protected String toBundleName(String baseName, Locale locale) {
+        StringBuilder sb = new StringBuilder(baseName);
+        String lang = locale.getLanguage();
+        if (!lang.isEmpty()) {
+            sb.append('_').append(lang);
+            String country = locale.getCountry();
+            if (!country.isEmpty()) {
+                sb.append('_').append(country);
+            }
+        }
+        return sb.toString();
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,6 @@
     // unqualified exports to verify that resource bundles are not picked
     // up by other named modules
     exports jdk.test.resources.exported.classes;
-    provides jdk.test.resources.exported.classes.MyResourcesProvider
-        with jdk.test.resources.exported.classes.MyResourcesProvider;
+    provides jdk.test.resources.exported.classes.spi.MyResourcesProvider
+        with jdk.test.resources.exported.classes.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources.classes;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.spi.AbstractResourceBundleProvider;
-
-public class MyResourcesProvider extends AbstractResourceBundleProvider {
-    public MyResourcesProvider() {
-        super("java.class");
-    }
-
-    @Override
-    protected String toBundleName(String baseName, Locale locale) {
-        StringBuilder sb = new StringBuilder(baseName);
-        String lang = locale.getLanguage();
-        if (!lang.isEmpty()) {
-            sb.append('_').append(lang);
-            String country = locale.getCountry();
-            if (!country.isEmpty()) {
-                sb.append('_').append(country);
-            }
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public ResourceBundle getBundle(String baseName, Locale locale) {
-        ResourceBundle rb = super.getBundle(baseName, locale);
-        String tag = locale.toLanguageTag();
-        if (tag.equals("und")) {
-            tag = "ROOT"; // to a human friendly name
-        }
-        System.out.printf("    MyResourcesProvider.getBundle(%s, %s)%n         -> %s%n",
-                          baseName, tag, rb);
-        return rb;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.classes.spi;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class MyResourcesProvider extends AbstractResourceBundleProvider {
+    public MyResourcesProvider() {
+        super("java.class");
+    }
+
+    @Override
+    protected String toBundleName(String baseName, Locale locale) {
+        StringBuilder sb = new StringBuilder(baseName);
+        String lang = locale.getLanguage();
+        if (!lang.isEmpty()) {
+            sb.append('_').append(lang);
+            String country = locale.getCountry();
+            if (!country.isEmpty()) {
+                sb.append('_').append(country);
+            }
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        ResourceBundle rb = super.getBundle(baseName, locale);
+        String tag = locale.toLanguageTag();
+        if (tag.equals("und")) {
+            tag = "ROOT"; // to a human friendly name
+        }
+        System.out.printf("    MyResourcesProvider.getBundle(%s, %s)%n         -> %s%n",
+                          baseName, tag, rb);
+        return rb;
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources.props;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-import java.util.spi.AbstractResourceBundleProvider;
-
-public class MyResourcesProvider extends AbstractResourceBundleProvider {
-    public MyResourcesProvider() {
-        super("java.properties");
-    }
-
-    @Override
-    protected String toBundleName(String baseName, Locale locale) {
-        StringBuilder sb = new StringBuilder(baseName);
-        String lang = locale.getLanguage();
-        if (!lang.isEmpty()) {
-            sb.append('_').append(lang);
-            String country = locale.getCountry();
-            if (!country.isEmpty()) {
-                sb.append('_').append(country);
-            }
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public ResourceBundle getBundle(String baseName, Locale locale) {
-        ResourceBundle rb = super.getBundle(baseName, locale);
-        String tag = locale.toLanguageTag();
-        if (tag.equals("und")) {
-            tag = "ROOT"; // to a human friendly name
-        }
-        System.out.printf("    MyResourcesProvider.getBundle(%s, %s)%n         -> %s%n",
-                          baseName, tag, rb);
-        return rb;
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.props.spi;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class MyResourcesProvider extends AbstractResourceBundleProvider {
+    public MyResourcesProvider() {
+        super("java.properties");
+    }
+
+    @Override
+    protected String toBundleName(String baseName, Locale locale) {
+        StringBuilder sb = new StringBuilder(baseName);
+        String lang = locale.getLanguage();
+        if (!lang.isEmpty()) {
+            sb.append('_').append(lang);
+            String country = locale.getCountry();
+            if (!country.isEmpty()) {
+                sb.append('_').append(country);
+            }
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        ResourceBundle rb = super.getBundle(baseName, locale);
+        String tag = locale.toLanguageTag();
+        if (tag.equals("und")) {
+            tag = "ROOT"; // to a human friendly name
+        }
+        System.out.printf("    MyResourcesProvider.getBundle(%s, %s)%n         -> %s%n",
+                          baseName, tag, rb);
+        return rb;
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,10 @@
  */
 
 module named.bundles {
-    exports jdk.test.resources.classes to test; // exports only to test
-    exports jdk.test.resources.props to test;   // exports only to test
-    provides jdk.test.resources.classes.MyResourcesProvider
-        with jdk.test.resources.classes.MyResourcesProvider;
-    provides jdk.test.resources.props.MyResourcesProvider
-        with jdk.test.resources.props.MyResourcesProvider;
+    exports jdk.test.resources.classes.spi to test; // exports only to test
+    exports jdk.test.resources.props.spi to test;   // exports only to test
+    provides jdk.test.resources.classes.spi.MyResourcesProvider
+        with jdk.test.resources.classes.spi.MyResourcesProvider;
+    provides jdk.test.resources.props.spi.MyResourcesProvider
+        with jdk.test.resources.props.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,8 +22,8 @@
  */
 
 module test {
-    // jdk.test.resources.classes.MyResourcesProvider is in named.bundles.
+    // jdk.test.resources.classes.spi.MyResourcesProvider is in named.bundles.
     requires named.bundles;
-    uses jdk.test.resources.classes.MyResourcesProvider;
-    uses jdk.test.resources.props.MyResourcesProvider;
+    uses jdk.test.resources.classes.spi.MyResourcesProvider;
+    uses jdk.test.resources.props.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.resources;
-
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Properties;
-import java.util.ResourceBundle;
-import java.util.spi.ResourceBundleProvider;
-
-public class MyResourcesProvider implements ResourceBundleProvider {
-    @Override
-    public ResourceBundle getBundle(String baseName, Locale locale) {
-        String xmlName = toXMLName(baseName, locale);
-        try (InputStream is = this.getClass().getModule().getResourceAsStream(xmlName)) {
-            return new XMLResourceBundle(new BufferedInputStream(is));
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private String toXMLName(String baseName, Locale locale) {
-        StringBuilder sb = new StringBuilder(baseName.replace('.', '/'));
-        String lang = locale.getLanguage();
-        if (!lang.isEmpty()) {
-            sb.append('_').append(lang);
-            String country = locale.getCountry();
-            if (!country.isEmpty()) {
-                sb.append('_').append(country);
-            }
-        }
-        return sb.append(".xml").toString();
-    }
-
-    private static class XMLResourceBundle extends ResourceBundle {
-        private Properties props;
-
-        XMLResourceBundle(InputStream stream) throws IOException {
-            props = new Properties();
-            props.loadFromXML(stream);
-        }
-
-        @Override
-        protected Object handleGetObject(String key) {
-            if (key == null) {
-                throw new NullPointerException();
-            }
-            return props.get(key);
-        }
-
-        @Override
-        public Enumeration<String> getKeys() {
-            // Not implemented
-            return null;
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.resources.spi;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Properties;
+import java.util.ResourceBundle;
+import java.util.spi.ResourceBundleProvider;
+
+public class MyResourcesProvider implements ResourceBundleProvider {
+    @Override
+    public ResourceBundle getBundle(String baseName, Locale locale) {
+        String xmlName = toXMLName(baseName, locale);
+        try (InputStream is = this.getClass().getModule().getResourceAsStream(xmlName)) {
+            return new XMLResourceBundle(new BufferedInputStream(is));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private String toXMLName(String baseName, Locale locale) {
+        StringBuilder sb = new StringBuilder(baseName.replace('.', '/'));
+        String lang = locale.getLanguage();
+        if (!lang.isEmpty()) {
+            sb.append('_').append(lang);
+            String country = locale.getCountry();
+            if (!country.isEmpty()) {
+                sb.append('_').append(country);
+            }
+        }
+        return sb.append(".xml").toString();
+    }
+
+    private static class XMLResourceBundle extends ResourceBundle {
+        private Properties props;
+
+        XMLResourceBundle(InputStream stream) throws IOException {
+            props = new Properties();
+            props.loadFromXML(stream);
+        }
+
+        @Override
+        protected Object handleGetObject(String key) {
+            if (key == null) {
+                throw new NullPointerException();
+            }
+            return props.get(key);
+        }
+
+        @Override
+        public Enumeration<String> getKeys() {
+            // Not implemented
+            return null;
+        }
+    }
+}
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,6 @@
  */
 
 module bundles {
-    exports jdk.test.resources to test;
-    provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider;
+    exports jdk.test.resources.spi to test;
+    provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,5 +24,5 @@
 module test {
     requires bundles;
 
-    uses jdk.test.resources.MyResourcesProvider;
+    uses jdk.test.resources.spi.MyResourcesProvider;
 }
--- a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,7 @@
  * @test
  * @bug 6499848
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main GCDuringIteration
  * @summary Check that iterators work properly in the presence of
  *          concurrent finalization and removal of elements.
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 6450200
  * @summary Test proper handling of pool state changes
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm ConfigChanges
  * @key randomness
  * @author Martin Buchholz
--- a/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,8 @@
  * @summary Test the extended API and the aliasing additions in JarFile that
  *          support multi-release jar files
  * @library /lib/testlibrary/java/util/jar /test/lib
- * @build Compiler JarBuilder CreateMultiReleaseTestJars
+ * @build jdk.test.lib.RandomFactory
+ *        Compiler JarBuilder CreateMultiReleaseTestJars
  * @run testng MultiReleaseJarAPI
  */
 
--- a/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,8 @@
  *  "logging.properties" file with default value of 100. This property can be
  *  overriden by specifying this property in the custom config file.
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @author rpatil
  * @run main/othervm FileHandlerMaxLocksTest
  */
--- a/jdk/test/java/util/regex/RegExTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/regex/RegExTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -38,6 +38,7 @@
  * 8176029
  *
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main RegExTest
  * @key randomness
  */
--- a/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -23,6 +23,7 @@
 
 /* @test
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main TestAvailable
  * @bug 7031075 8161426
  * @summary Make sure that available() method behaves as expected.
--- a/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @bug 8038491
  * @summary Crash in ZipFile.read() when ZipFileInputStream is shared between threads
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run main MultiThreadedReadTest
  * @key randomness
  */
--- a/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,9 @@
  * @test
  * @bug 6374379
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ * @run main ReadLongZipFileName
  * @summary Verify that we can read zip file names > 255 chars long
  */
 
--- a/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @bug 6907252
  * @summary ZipFileInputStream Not Thread-Safe
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run main ZipEntryFreeTest
  */
 
--- a/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,7 @@
  *          (number of pages, sizes, colors). Use -Dseed=X to set
  *          the random generator seed.
  *
+ * @build   jdk.test.lib.RandomFactory
  * @run     main MultiPageTest
  * @key     randomness
  */
--- a/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=DTLS
  *      -Dtest.mode=norm DTLSIncorrectAppDataTest
  * @run main/othervm -Dtest.security.protocol=DTLS
--- a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=DTLS
  *      DTLSRehandshakeWithCipherChangeTest
  */
--- a/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=DTLS
  *      -Dtest.mode=norm DTLSSequenceNumberTest
  * @run main/othervm -Dtest.security.protocol=DTLS
--- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=DTLSv1.0
  *      DTLSv10RehandshakeWithCipherChangeTest
  */
--- a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=TLS TLSRehandshakeWithCipherChangeTest
  */
 
--- a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=TLSv1 TLSRehandshakeWithCipherChangeTest
  */
 
--- a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          java.security.jgss/sun.security.krb5.internal.crypto
  *          java.security.jgss/sun.security.krb5.internal.ktab
  *          java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Dtest.security.protocol=TLSv1.1 TLSRehandshakeWithCipherChangeTest
  */
 
--- a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,8 +27,12 @@
  * @library /test/lib
  * @modules java.base/jdk.internal.ref
  *          java.base/jdk.internal.misc
- * @build jdk.test.lib.*
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main ExitOnThrow
  * @summary Ensure that if a cleaner throws an exception then the VM exits
  */
--- a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,8 @@
  * @summary basic tests for multi-release jar versioned streams
  * @library /test/lib
  * @modules jdk.jartool/sun.tools.jar java.base/jdk.internal.util.jar
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run testng TestVersionedStream
  */
 
--- a/jdk/test/jdk/modules/incubator/ImageModules.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/jdk/modules/incubator/ImageModules.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,7 +28,9 @@
  * @library /lib/testlibrary /test/lib
  * @key intermittent
  * @modules jdk.compiler jdk.jartool jdk.jlink
- * @build jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng/othervm ImageModules
  */
 
--- a/jdk/test/jdk/security/jarsigner/Spec.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/jdk/security/jarsigner/Spec.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,8 @@
  *          java.base/sun.security.provider.certpath
  *          jdk.jartool
  *          jdk.crypto.ec
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Spec
  */
 
 import com.sun.jarsigner.ContentSigner;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/TimeLimitedRunner.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * 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.testlibrary;
-
-import java.util.Objects;
-import java.util.concurrent.Callable;
-
-/**
- * Auxiliary class to run target w/ given timeout.
- */
-public class TimeLimitedRunner implements Callable<Void> {
-    private final long              stoptime;
-    private final long              timeout;
-    private final double            factor;
-    private final Callable<Boolean> target;
-
-    /**
-     * @param timeout   a timeout. zero means no time limitation
-     * @param factor    a multiplier used to estimate next iteration time
-     * @param target    a target to run
-     * @throws NullPointerException     if target is null
-     * @throws IllegalArgumentException if timeout is negative or
-                                        factor isn't positive
-     */
-    public TimeLimitedRunner(long timeout, double factor,
-            Callable<Boolean> target) {
-        Objects.requireNonNull(target, "target must not be null");
-        if (timeout < 0) {
-            throw new IllegalArgumentException("timeout[" + timeout + "] < 0");
-        }
-        if (factor <= 0d) {
-            throw new IllegalArgumentException("factor[" + factor + "] <= 0");
-        }
-        this.stoptime = System.currentTimeMillis() + timeout;
-        this.timeout = timeout;
-        this.factor = factor;
-        this.target = target;
-    }
-
-    /**
-     * Runs @{linkplan target} while it returns true and timeout isn't exceeded
-     */
-    @Override
-    public Void call() throws Exception {
-        long maxDuration = 0L;
-        long iterStart = System.currentTimeMillis();
-        if (timeout != 0 && iterStart > stoptime) {
-            return null;
-        }
-        while (target.call()) {
-            if (timeout != 0) {
-                long iterDuration = System.currentTimeMillis() - iterStart;
-                maxDuration = Math.max(maxDuration, iterDuration);
-                iterStart = System.currentTimeMillis();
-                if (iterStart + (maxDuration * factor) > stoptime) {
-                    System.out.println("Not enough time to continue execution. "
-                            + "Interrupted.");
-                    break;
-                }
-            }
-        }
-        return null;
-    }
-
-}
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Tue Jun 27 16:00:14 2017 -0400
@@ -217,63 +217,6 @@
     }
 
     /**
-     * Uses "jcmd -l" to search for a jvm pid. This function will wait
-     * forever (until jtreg timeout) for the pid to be found.
-     * @param key Regular expression to search for
-     * @return The found pid.
-     */
-    public static int waitForJvmPid(String key) throws Throwable {
-        final long iterationSleepMillis = 250;
-        System.out.println("waitForJvmPid: Waiting for key '" + key + "'");
-        System.out.flush();
-        while (true) {
-            int pid = tryFindJvmPid(key);
-            if (pid >= 0) {
-                return pid;
-            }
-            Thread.sleep(iterationSleepMillis);
-        }
-    }
-
-    /**
-     * Searches for a jvm pid in the output from "jcmd -l".
-     *
-     * Example output from jcmd is:
-     * 12498 sun.tools.jcmd.JCmd -l
-     * 12254 /tmp/jdk8/tl/jdk/JTwork/classes/com/sun/tools/attach/Application.jar
-     *
-     * @param key A regular expression to search for.
-     * @return The found pid, or -1 if Enot found.
-     * @throws Exception If multiple matching jvms are found.
-     */
-    public static int tryFindJvmPid(String key) throws Throwable {
-        OutputAnalyzer output = null;
-        try {
-            JDKToolLauncher jcmdLauncher = JDKToolLauncher.create("jcmd");
-            jcmdLauncher.addToolArg("-l");
-            output = ProcessTools.executeProcess(jcmdLauncher.getCommand());
-            output.shouldHaveExitValue(0);
-
-            // Search for a line starting with numbers (pid), follwed by the key.
-            Pattern pattern = Pattern.compile("([0-9]+)\\s.*(" + key + ").*\\r?\\n");
-            Matcher matcher = pattern.matcher(output.getStdout());
-
-            int pid = -1;
-            if (matcher.find()) {
-                pid = Integer.parseInt(matcher.group(1));
-                System.out.println("findJvmPid.pid: " + pid);
-                if (matcher.find()) {
-                    throw new Exception("Found multiple JVM pids for key: " + key);
-                }
-            }
-            return pid;
-        } catch (Throwable t) {
-            System.out.println(String.format("Utils.findJvmPid(%s) failed: %s", key, t));
-            throw t;
-        }
-    }
-
-    /**
      * Adjusts the provided timeout value for the TIMEOUT_FACTOR
      * @param tOut the timeout value to be adjusted
      * @return The timeout value adjusted for the value of "test.timeout.factor"
--- a/jdk/test/sun/misc/SunMiscSignalTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/misc/SunMiscSignalTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -46,7 +46,12 @@
  * @library /test/lib
  * @modules jdk.unsupported
  *          java.base/jdk.internal.misc
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng/othervm -Xrs -DXrs=true SunMiscSignalTest
  * @run testng/othervm SunMiscSignalTest
  * @summary sun.misc.Signal test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/InetAddress/nameservice/dns/CNameTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.process.ProcessTools;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardOpenOption;
+
+/**
+ * @test
+ * @bug 4763315
+ * @modules java.naming
+ * @library /test/lib
+ * @build CanonicalName Lookup jdk.test.lib.process.*
+ * @run main/othervm/timeout=120 CNameTest
+ * @summary Test DNS provider's handling of CNAME records
+ */
+public class CNameTest {
+    private static final String HOST = "www-proxy.us.oracle.com";
+    private static final String POLICY = "grant {" + System.lineSeparator() +
+            " permission java.net .SocketPermission \"${HOST}\", \"resolve\";" +
+            System.lineSeparator() + "};";
+
+    public static void main(String[] args) throws Exception {
+        // Prerequisite check
+        int rc = ProcessTools.executeTestJava("CanonicalName", HOST)
+                             .outputTo(System.out)
+                             .errorTo(System.out)
+                             .getExitValue();
+        if (rc != 0) {
+            System.out.println("DNS not configured or host doesn't" +
+                    " resolve to CNAME record");
+            return;
+        }
+
+        // Tests - with & without security manager
+        Path policy = Paths.get(".", "java.policy");
+        Files.write(policy, POLICY.getBytes(), StandardOpenOption.CREATE_NEW);
+        String[] opts = new String[]{
+                "-Dsun.net.spi.nameservice.provider.1=dns,sun",
+                "-Djava.security.manager -Djava.security.policy=" + policy
+        };
+        for (String opt : opts) {
+            ProcessTools.executeTestJava(opt, "Lookup", HOST)
+                        .outputTo(System.out)
+                        .errorTo(System.err)
+                        .shouldHaveExitValue(0);
+        }
+    }
+}
+
--- a/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#!/bin/sh
-
-#
-# 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
-# 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 4763315
-# @modules java.naming
-# @build CanonicalName Lookup
-# @run shell/timeout=120 cname.sh
-# @summary Test DNS provider's handling of CNAME records
-
-
-# The host that we try to resolve
-
-HOST=www-proxy.us.oracle.com
-
-# fail gracefully if DNS is not configured or there
-# isn't a CNAME record.
-
-CLASSPATH=${TESTCLASSES}
-export CLASSPATH
-JAVA="${TESTJAVA}/bin/java"
-
-sh -xc "$JAVA ${TESTVMOPTS} CanonicalName $HOST" 2>&1
-if [ $? != 0 ]; then
-    echo "DNS not configured or host doesn't resolve to CNAME record"
-    exit 0
-fi
-
-failures=0
-
-go() {
-    echo ''
-    sh -xc "$JAVA ${TESTVMOPTS} $1 Lookup $2" 2>&1
-    if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-}
-
-# Tests - with & without security manager
-
-POLICY=java.policy
-echo "grant {" > ${POLICY}
-echo " permission java.net.SocketPermission \"${HOST}\", \"resolve\";" >> ${POLICY}
-echo "};" >> ${POLICY}
-
-np="-Dsun.net.spi.nameservice.provider.1=dns,sun"
-sm="-Djava.security.manager -Djava.security.policy=${POLICY}"
-
-go "" "$HOST"
-go "$sm" "$HOST"
-
-
-#
-# Results
-#
-echo ''
-if [ $failures -gt 0 ];
-  then echo "$failures test(s) failed";
-  else echo "All test(s) passed"; fi
-exit $failures
--- a/jdk/test/sun/net/ftp/MarkResetTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/ftp/MarkResetTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,15 +22,30 @@
  */
 
 /*
- *
- * run from MarkResetTest.sh
+ * @test
+ * @bug 4673103
+ * @run main/othervm/timeout=140 MarkResetTest
+ * @summary URLConnection.getContent() hangs over FTP for DOC, PPT, XLS files
  */
 
-import java.io.*;
-import java.net.*;
-import java.util.regex.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 public class MarkResetTest {
+    private static final String FILE_NAME = "EncDec.doc";
 
     /**
      * A class that simulates, on a separate, an FTP server.
@@ -388,7 +403,9 @@
     }
 
     public static void main(String[] args) throws Exception {
-        MarkResetTest test = new MarkResetTest();
+        Files.copy(Paths.get(System.getProperty("test.src"), FILE_NAME),
+                Paths.get(".", FILE_NAME));
+        new MarkResetTest();
     }
 
     public MarkResetTest() {
@@ -402,9 +419,8 @@
                 port = server.getPort();
             }
 
-            String filename = "EncDec.doc";
-            URL url = new URL("ftp://localhost:" + port + "/" +
-                                filename);
+
+            URL url = new URL("ftp://localhost:" + port + "/" + FILE_NAME);
 
             URLConnection con = url.openConnection();
             System.out.println("getContent: " + con.getContent());
@@ -438,7 +454,7 @@
             server.interrupt();
 
             // Did we pass ?
-            if (len != (new File(filename)).length()) {
+            if (len != (new File(FILE_NAME)).length()) {
                 throw new Exception("Failed to read the file correctly");
             }
             System.out.println("PASSED: File read correctly");
--- a/jdk/test/sun/net/ftp/MarkResetTest.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 4673103
-# @run shell/timeout=140 MarkResetTest.sh
-# @summary URLConnection.getContent() hangs over FTP for DOC, PPT, XLS files
-
-OS=`uname -s`
-case "$OS" in
-  SunOS | Linux | Darwin | AIX )
-    PS=":"
-    FS="/"
-    ;;
-  CYGWIN* )
-    PS=";"
-    FS="/"
-    ;;
-  Windows* )
-    PS=";"
-    FS="\\"
-    ;;
-  * )
-    echo "Unrecognized system!"
-    exit 1;
-    ;;
-esac
-
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}${FS}MarkResetTest.java
-
-# ftp server used by the test requires the file to be present
-# in this directory
-cp ${TESTSRC}${FS}EncDec.doc .
-
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} MarkResetTest
--- a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,36 @@
  * questions.
  */
 
+/**
+ * @test
+ * @bug 6977851
+ * @summary NPE from FileURLConnection.connect
+ * @library /test/lib
+ * @build DirPermissionDenied jdk.test.lib.process.*
+ *        jdk.test.lib.util.FileUtils
+ * @run testng DirPermissionDenied
+ */
+
+import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.util.FileUtils;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeTest;
 public class DirPermissionDenied {
-    public static void main(String[] args) throws Exception {
-        URL url = new URL("file:" + args[0]);
+    private static final Path TEST_DIR = Paths.get(
+            "DirPermissionDeniedDirectory");
 
+    @Test
+    public void doTest() throws MalformedURLException {
+        URL url = new URL(TEST_DIR.toUri().toString());
         try {
             URLConnection uc = url.openConnection();
             uc.connect();
@@ -56,4 +78,20 @@
             throw new RuntimeException("Failed " + e);
         }
     }
+
+    @BeforeTest
+    public void setup() throws Throwable {
+        // mkdir and chmod "333"
+        Files.createDirectories(TEST_DIR);
+        ProcessTools.executeCommand("chmod", "333", TEST_DIR.toString())
+                    .outputTo(System.out)
+                    .errorTo(System.out)
+                    .shouldHaveExitValue(0);
+    }
+
+    @AfterTest
+    public void tearDown() throws IOException {
+        FileUtils.deleteFileIfExistsWithRetry(TEST_DIR);
+    }
 }
+
--- a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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 6977851
-# @summary NPE from FileURLConnection.connect
-# @build DirPermissionDenied
-# @run shell DirPermissionDenied.sh
-
-TESTDIR="${TESTCLASSES}/DirPermissionDeniedDirectory"
-echo ${TESTDIR}
-
-rm -rf ${TESTDIR}
-mkdir -p ${TESTDIR}
-chmod 333 ${TESTDIR}
-
-$TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES DirPermissionDenied ${TESTDIR}
-result=$?
-
-# Add back read access for user, otherwise not removable on some systems
-chmod u+r ${TESTDIR}
-
-rm -rf ${TESTDIR}
-exit $result
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,7 +32,9 @@
  * @summary  Redirect problem with HttpsURLConnection using a proxy
  * @modules java.base/sun.net.www
  * @library .. /test/lib
- * @build HttpCallback TestHttpsServer ClosedChannelList
+ * @build jdk.test.lib.NetworkConfiguration
+ *        jdk.test.lib.Platform
+ *        HttpCallback TestHttpsServer ClosedChannelList
  *        HttpTransaction TunnelProxy
  * @key intermittent
  * @run main/othervm B6216082
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,12 @@
  *          that serves http POST method requests in secure channel, and a client
  *          that makes https POST request through a proxy.
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @compile OriginServer.java ProxyTunnelServer.java
  * @run main/othervm PostThruProxy
  */
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,12 @@
  *          http POST method requests in secure channel, and a client that
  *          makes https POST request through a proxy.
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @compile OriginServer.java ProxyTunnelServer.java
  * @run main/othervm -Djdk.http.auth.tunneling.disabledSchemes= PostThruProxyWithAuth
  */
--- a/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,9 +25,13 @@
  * @test
  * @bug 4274624
  * @library /test/lib
- * @build GetContentType GetContentTypeTest
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
  *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
  *        jdk.test.lib.process.*
+ *        GetContentType GetContentTypeTest
  * @run main/othervm GetContentTypeTest
  * @summary Test JarURLConnection.getContentType would
  *          would return default "content/unknown"
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,10 +27,14 @@
  * @library /test/lib
  *          /lib/testlibrary
  * @modules jdk.compiler
- * @build src.test.src.TestDriver JarUtils
- *        jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
  *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
  *        jdk.test.lib.process.*
+ *        src.test.src.TestDriver JarUtils
  * @summary various resource and classloading bugs related to jar files
  * @run main/othervm TestDriver
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/net/www/protocol/jrt/OtherResourcesTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import jdk.test.lib.JDKToolFinder;
+import static jdk.test.lib.process.ProcessTools.executeCommand;
+
+/**
+ * @test
+ * @bug 8142968
+ * @summary Access a jrt:/ resource in an observable module that is not in
+ *          the boot layer and hence not known to the built-in class loaders.
+ *          This test is intended to run with --limit-modules.
+ * @library /test/lib
+ * @build OtherResources OtherResourcesTest
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.process.*
+ * @run main OtherResourcesTest
+ */
+public class OtherResourcesTest {
+    public static void main(String[] args) throws Throwable {
+        String classes = System.getProperty("test.classes");
+        executeCommand(JDKToolFinder.getTestJDKTool("java"),
+                       "--limit-modules", "java.base",
+                       "-cp", classes, "OtherResources")
+                      .outputTo(System.out)
+                      .errorTo(System.out)
+                      .shouldHaveExitValue(0);
+    }
+}
+
--- a/jdk/test/sun/net/www/protocol/jrt/other_resources.sh	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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
-# @build OtherResources
-# @run shell other_resources.sh
-# @summary Access a jrt:/ resource in an observable module that is not in
-#  the boot layer and hence not known to the built-in class loaders. This
-#  test is a shell test because the run tag doesn't support --limit-modules.
-
-set -e
-
-if [ -z "$TESTJAVA" ]; then
-  if [ $# -lt 1 ]; then exit 1; fi
-  TESTJAVA="$1"; shift
-  COMPILEJAVA="${TESTJAVA}"
-  TESTSRC="`pwd`"
-  TESTCLASSES="`pwd`"
-fi
-
-JAVA="$TESTJAVA/bin/java ${TESTVMOPTS}"
-$JAVA --limit-modules java.base -cp $TESTCLASSES OtherResources
-
-exit 0
-
--- a/jdk/test/sun/nio/cs/FindDecoderBugs.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/nio/cs/FindDecoderBugs.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 6380723
  * @summary Decode many byte sequences in many ways (use -Dseed=X to set PRNG seed)
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main/timeout=1800 FindDecoderBugs
  * @author Martin Buchholz
  * @key randomness
--- a/jdk/test/sun/nio/cs/FindEncoderBugs.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/nio/cs/FindEncoderBugs.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 6233345 6381699 6381702 6381705 6381706
  * @summary Encode many char sequences in many ways
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @run main/timeout=1200 FindEncoderBugs
  * @author Martin Buchholz
  * @key randomness
--- a/jdk/test/sun/security/ec/SignatureOffsets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/ec/SignatureOffsets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          generation, the test tries to verify signature with the above API
  *          and passing in different signature offset (0, 33, 66, 99).
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @compile ../../../java/security/Signature/Offsets.java
  * @run main SignatureOffsets SunEC NONEwithECDSA
  * @run main SignatureOffsets SunEC SHA1withECDSA
--- a/jdk/test/sun/security/krb5/auto/KdcPolicy.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/krb5/auto/KdcPolicy.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
 
 /*
  * @test
- * @bug 8164656
+ * @bug 8164656 8181461
  * @run main/othervm KdcPolicy udp
  * @run main/othervm KdcPolicy tcp
  * @summary krb5.kdc.bad.policy test
@@ -110,7 +110,7 @@
         // It is possible the real KDC cannot fulfil the request
         // in 3s, so it might fail (either 1st time or 2nd time).
         writeConf(1, 3000, p1, p3);
-        test("a3000c3000c3000|a3000c3000-|a3000c3000c3000-");
+        test("a3000c3000c3000|a3000c3000-|a3000c3000c3000a3000-");
 
         // If a test case won't use a real KDC, it can be sped up.
         writeConf(3, 5, p1, p2);
--- a/jdk/test/sun/security/krb5/auto/ModuleName.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/krb5/auto/ModuleName.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,12 @@
  * @summary GSSContext type when jdk.security.jgss is not available
  * @library /test/lib
  * @compile -XDignore.symbol.file ModuleName.java
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main/othervm ModuleName
  */
 
--- a/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,7 @@
  * @bug 7152176 8168518 8172017
  * @summary More krb5 tests
  * @library ../../../../java/security/testlibrary/ /test/lib
+ * @build jdk.test.lib.Platform
  * @run main/othervm/timeout=300 ReplayCacheTestProc
  */
 
--- a/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
 # @test
 # @bug 8168518
 # @library ../../../../java/security/testlibrary/ /test/lib
+# @build jdk.test.lib.Platform
 # @run main/othervm/timeout=300 -Djdk.krb5.rcache.useMD5=true
 #           -Dtest.service=host ReplayCacheTestProc
 # @summary  testing jdk.krb5.rcache.useMD5. This action is put in a separate
--- a/jdk/test/sun/security/mscapi/SignatureOffsets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/mscapi/SignatureOffsets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          generation, the test tries to verify signature with the above API
  *          and passing in different signature offset (0, 33, 66, 99).
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @compile ../../../java/security/Signature/Offsets.java
  * @requires os.family == "windows"
  * @run main SignatureOffsets SunMSCAPI NONEwithRSA
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @library ..
  * @library /test/lib
  * @modules jdk.crypto.cryptoki
+ * @build jdk.test.lib.RandomFactory
  * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
  * @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
  *                                                   sm TestKeyPairGenerator.policy
--- a/jdk/test/sun/security/rsa/SignatureOffsets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/rsa/SignatureOffsets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          generation, the test tries to verify signature with the above API
  *          and passing in different signature offset (0, 33, 66, 99).
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @compile ../../../java/security/Signature/Offsets.java
  * @run main SignatureOffsets SunRsaSign MD2withRSA
  * @run main SignatureOffsets SunRsaSign MD5withRSA
--- a/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java	Tue Jun 27 16:00:14 2017 -0400
@@ -48,8 +48,15 @@
 
 /*
  * @test
+ * @bug 8165367
  * @summary Verify the restrictions for certificate path on JSSE with custom trust store.
  * @library /test/lib
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @compile JSSEClient.java
  * @run main/othervm -Djava.security.debug=certpath TLSRestrictions DEFAULT
  * @run main/othervm -Djava.security.debug=certpath TLSRestrictions C1
--- a/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,7 @@
  *          generation, the test tries to verify signature with the above API
  *          and passing in different signature offset (0, 33, 66, 99).
  * @library /test/lib
+ * @build jdk.test.lib.RandomFactory
  * @compile ../../../../java/security/Signature/Offsets.java
  * @run main SignatureOffsets SunJSSE MD2withRSA
  * @run main SignatureOffsets SunJSSE MD5withRSA
--- a/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,15 @@
  * @summary -providerPath, -providerClass, -addprovider, and -providerArg
  * @library /test/lib
  * @modules java.base/jdk.internal.misc
+ * @build jdk.test.lib.util.JarUtils
+ *        jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ * @run main AltProvider
  */
 
 import jdk.test.lib.JDKToolLauncher;
--- a/jdk/test/sun/security/tools/jarsigner/Options.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/Options.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,8 @@
  *          jdk.jartool/sun.security.tools.jarsigner
  *          java.base/sun.security.pkcs
  *          java.base/sun.security.x509
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Options
  */
 
 import com.sun.jarsigner.ContentSigner;
--- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java	Tue Jun 27 16:00:14 2017 -0400
@@ -68,6 +68,14 @@
  *          java.base/sun.security.tools.keytool
  * @library /lib/testlibrary
  * @library /test/lib
+ * @build jdk.test.lib.util.JarUtils
+ *        jdk.test.lib.SecurityTools
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main/timeout=600 TimestampCheck
  */
 public class TimestampCheck {
--- a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -36,6 +36,7 @@
  *          java.base/sun.security.util
  *          java.base/sun.security.x509
  *          java.management
+ * @build jdk.test.lib.util.JarUtils
  * @run main TsacertOptionTest
  */
 public class TsacertOptionTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/Warning.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/Warning.java	Tue Jun 27 16:00:14 2017 -0400
@@ -35,6 +35,8 @@
  * @bug 8024302 8026037 8130132
  * @summary warnings, errors and -strict
  * @library /lib/testlibrary /test/lib
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Warning
  */
 public class Warning {
 
--- a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,13 @@
  * @bug 8047305 8075618
  * @summary Tests jarsigner tool and JarSigner API work with multi-release JAR files.
  * @library /test/lib
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main MVJarSigningTest
  */
 
--- a/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for aliasNotInStore warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main AliasNotInStoreTest
  */
 public class AliasNotInStoreTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for badExtendedKeyUsage warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main BadExtendedKeyUsageTest
  */
 public class BadExtendedKeyUsageTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * @summary Test for badKeyUsage warning
  * @library /lib/testlibrary /test/lib ../
  * @ignore until 8026393 is fixed
+ * @build jdk.test.lib.util.JarUtils
  * @run main BadKeyUsageTest
  */
 public class BadKeyUsageTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,7 @@
  * @bug 8024302 8026037
  * @summary Test for badNetscapeCertType warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main BadNetscapeCertTypeTest
  */
 public class BadNetscapeCertTypeTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,7 @@
  * @bug 8024302 8026037
  * @summary Test for chainNotValidated warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main ChainNotValidatedTest
  */
 public class ChainNotValidatedTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for hasExpiredCert warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main HasExpiredCertTest
  */
 public class HasExpiredCertTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for hasExpiringCert warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main HasExpiringCertTest
  */
 public class HasExpiringCertTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for hasUnsignedEntry warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main HasUnsignedEntryTest
  */
 public class HasUnsignedEntryTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Checks if jarsigner prints appropriate warnings
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main MultipleWarningsTest
  */
 public class MultipleWarningsTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
  * @bug 8024302 8026037
  * @summary Checks warnings if -tsa and -tsacert options are not specified
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main NoTimestampTest
  */
 public class NoTimestampTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for notSignedByAlias warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main NotSignedByAliasTest
  */
 public class NotSignedByAliasTest extends Test {
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
  * @bug 8024302 8026037
  * @summary Test for notYetValidCert warning
  * @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
  * @run main NotYetValidCertTest
  */
 public class NotYetValidCertTest extends Test {
--- a/jdk/test/sun/security/tools/keytool/ImportPrompt.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/keytool/ImportPrompt.java	Tue Jun 27 16:00:14 2017 -0400
@@ -33,6 +33,14 @@
  * @bug 8172975
  * @summary SecurityTools.keytool() needs to accept user input
  * @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ * @run main ImportPrompt
  */
 
 public class ImportPrompt {
--- a/jdk/test/sun/security/tools/keytool/PrintSSL.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/keytool/PrintSSL.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,13 @@
  * @bug 6480981 8160624
  * @summary keytool should be able to import certificates from remote SSL server
  * @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main/othervm PrintSSL
  */
 
--- a/jdk/test/sun/security/tools/keytool/ReadJar.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/keytool/ReadJar.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,15 @@
  * @bug 6890872 8168882
  * @summary keytool -printcert to recognize signed jar files
  * @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ *        jdk.test.lib.util.JarUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ * @run main ReadJar
  */
 
 import java.nio.file.Files;
--- a/jdk/test/sun/security/tools/keytool/WeakAlg.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/tools/keytool/WeakAlg.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,13 @@
  * @modules java.base/sun.security.tools.keytool
  *          java.base/sun.security.tools
  *          java.base/sun.security.util
+ * @build jdk.test.lib.SecurityTools
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run main/othervm/timeout=600 -Duser.language=en -Duser.country=US WeakAlg
  */
 
--- a/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4558835 4915146
+ * @bug 4558835 4915146 8181841
  * @summary Verify timezone offset and fractional seconds are correctly parsed
  * @modules java.base/sun.security.util
  */
@@ -77,6 +77,10 @@
   private final static byte[] GEN_FRACT3_ZULU =
     {0x18, 0x13, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x37, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x5a};
 
+  // 20010810174351.7654Z
+  private final static byte[] GEN_FRACT4_ZULU =
+    {0x18, 0x14, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x37, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x34, 0x5a};
+
   // 20010810184351.7+0100
   private final static byte[] GEN_FRACT1_PLUS1 =
     {0x18, 0x15, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x2b, 0x30, 0x31, 0x30, 0x30};
@@ -89,10 +93,17 @@
   private final static byte[] GEN_FRACT3_PLUS1 =
     {0x18, 0x17, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x2b, 0x30, 0x31, 0x30, 0x30};
 
+  // 20010810184351.7654+0100
+  private final static byte[] GEN_FRACT4_PLUS1 =
+    {0x18, 0x18, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x34, 0x2b, 0x30, 0x31, 0x30, 0x30};
+
   // 20010810184351,765+0100
   private final static byte[] GEN_FRACT3_COMMA_PLUS1 =
     {0x18, 0x17, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2c, 0x37, 0x36, 0x35, 0x2b, 0x30, 0x31, 0x30, 0x30};
 
+  // 20010810184351,7654+0100
+  private final static byte[] GEN_FRACT4_COMMA_PLUS1 =
+    {0x18, 0x18, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2c, 0x37, 0x36, 0x35, 0x34, 0x2b, 0x30, 0x31, 0x30, 0x30};
 
   private static Date decodeUTC(byte[] b) throws IOException {
     DerInputStream derin = new DerInputStream(b);
@@ -146,6 +157,8 @@
     checkGeneralized(d3, GEN_FRACT3_ZULU, "fractional seconds (Zulu)");
     checkGeneralized(d3, GEN_FRACT3_PLUS1, "fractional seconds (+0100)");
     checkGeneralized(d3, GEN_FRACT3_COMMA_PLUS1, "fractional seconds (+0100)");
+    checkGeneralized(d3, GEN_FRACT4_ZULU, "fractional seconds (Zulu)");
+    checkGeneralized(d3, GEN_FRACT4_PLUS1, "fractional seconds (+0100)");
+    checkGeneralized(d3, GEN_FRACT4_COMMA_PLUS1, "fractional seconds (+0100)");
   }
-
 }
--- a/jdk/test/sun/text/resources/LocaleData.cldr	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/text/resources/LocaleData.cldr	Tue Jun 27 16:00:14 2017 -0400
@@ -8274,3 +8274,29 @@
 
 # bug #8075173
 FormatData/de/standalone.MonthAbbreviations/2=M\u00e4r
+
+# bug #8178872
+FormatData/pt_PT/latn.NumberElements/0=,
+FormatData/pt_PT/latn.NumberElements/1=\u00a0
+FormatData/pt_AO/latn.NumberElements/0=,
+FormatData/pt_AO/latn.NumberElements/1=\u00a0
+FormatData/pt_CH/latn.NumberElements/0=,
+FormatData/pt_CH/latn.NumberElements/1=\u00a0
+FormatData/pt_CV/latn.NumberElements/0=,
+FormatData/pt_CV/latn.NumberElements/1=\u00a0
+FormatData/pt_GQ/latn.NumberElements/0=,
+FormatData/pt_GQ/latn.NumberElements/1=\u00a0
+FormatData/pt_MO/latn.NumberElements/0=,
+FormatData/pt_MO/latn.NumberElements/1=\u00a0
+FormatData/pt_LU/latn.NumberElements/0=,
+FormatData/pt_LU/latn.NumberElements/1=\u00a0
+FormatData/pt_MZ/latn.NumberElements/0=,
+FormatData/pt_MZ/latn.NumberElements/1=\u00a0
+FormatData/pt_ST/latn.NumberElements/0=,
+FormatData/pt_ST/latn.NumberElements/1=\u00a0
+FormatData/pt_TL/latn.NumberElements/0=,
+FormatData/pt_TL/latn.NumberElements/1=\u00a0
+FormatData/kea/latn.NumberElements/0=,
+FormatData/kea/latn.NumberElements/1=\u00a0
+FormatData/kea_CV/latn.NumberElements/0=,
+FormatData/kea_CV/latn.NumberElements/1=\u00a0
--- a/jdk/test/sun/text/resources/LocaleDataTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/sun/text/resources/LocaleDataTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  *      7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
  *      7114053 7074882 7040556 8008577 8013836 8021121 6192407 6931564 8027695
  *      8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
- *      8145136 8145952 8164784 8037111 8081643 7037368
+ *      8145136 8145952 8164784 8037111 8081643 7037368 8178872
  * @summary Verify locale data
  * @modules java.base/sun.util.resources
  * @modules jdk.localedata
@@ -99,8 +99,15 @@
  *        LocaleNames/fr_FR/US=\u00c9tats-Unis
  *        LocaleNames/fr_FR/FR=France</pre>
  *
- *    You can use language tag with '-' in locale field like this:<pre>
- *        LocaleNames/sr-Latn/SR=Surinam
+ *    Second field which designates locale is in the form of:
+ *    1) Legacy locale notation using '_' as a locale component(language/country/variant) separator.
+ *    language is a mandatory component. country and variant are optional, however,
+ *    variant cannot exist without country. So for example, while "ja"/"ja_JP"/"ja_JP_JP" are valid,
+ *    "_JP"/"ja__JP" are invalid.
+ *
+ *    2) BCP47 language tag notation in which we can specify language tag with '-' as a subtag
+ *       separator. Language tag can be specified with '-' in locale field like this:
+ *       <pre>LocaleNames/sr-Latn/SR=Surinam
  *        FormatData/sr-Latn-BA/DayNames/2=utorak</pre>
  *
  *    The command-line syntax of this test is
@@ -276,16 +283,25 @@
             throw new Exception("Malformed input file: \"" + key + "\" is missing locale name");
         localeName = key.substring(oldIndex, index);
         boolean use_tag = localeName.indexOf("-") != -1;
-
         if (use_tag == false && localeName.length() > 0) {
-            language = localeName.substring(0, 2);
-            if (localeName.length() > 3) {
-                country = localeName.substring(3, 5);
-                if (localeName.length() > 5)
-                    variant = localeName.substring(6);
+            String[] locDetails = localeName.split("_");
+            switch (locDetails.length) {
+                case 1:
+                    language = locDetails[0];
+                    break;
+                case 2:
+                    language = locDetails[0];
+                    country = locDetails[1];
+                    break;
+                case 3:
+                    language = locDetails[0];
+                    country = locDetails[1];
+                    variant = locDetails[2];
+                    break;
+                default:
+                    throw new Exception("locale not specified properly " + locDetails);
             }
         }
-
         oldIndex = index + 1;
         index = key.indexOf("/", oldIndex);
         if (index == -1)
--- a/jdk/test/tools/jar/InputFilesTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/InputFilesTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,8 @@
  *          demonstrating identical behavior to JDK 8 jar tool.
  * @library /test/lib
  * @modules jdk.jartool
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run testng InputFilesTest
  */
 
--- a/jdk/test/tools/jar/ReleaseBeforeFiles.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/ReleaseBeforeFiles.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,8 @@
  *          not the --release option is preceded by a file name.
  * @library /test/lib
  * @modules jdk.jartool/sun.tools.jar
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run testng ReleaseBeforeFiles
  */
 
--- a/jdk/test/tools/jar/compat/CLICompatibility.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/compat/CLICompatibility.java	Tue Jun 27 16:00:14 2017 -0400
@@ -50,7 +50,9 @@
  * @test
  * @bug 8170952
  * @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.testlibrary.JDKToolFinder
  * @run testng CLICompatibility
  * @summary Basic test for compatibility of CLI options
  */
--- a/jdk/test/tools/jar/mmrjar/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/mmrjar/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,8 @@
  *          jdk.compiler
  *          jdk.jartool
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run testng Basic
  */
 
--- a/jdk/test/tools/jar/modularJar/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/modularJar/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -50,7 +50,9 @@
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  *          jdk.jartool
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.testlibrary.JDKToolFinder
  * @compile Basic.java
  * @run testng Basic
  * @summary Tests for plain Modular jars & Multi-Release Modular jars
--- a/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,7 +28,14 @@
  * @modules java.base/jdk.internal.misc
  *          jdk.compiler
  *          jdk.jartool
- * @build MRTestBase
+ * @build jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        MRTestBase
  * @run testng/timeout=1200 ApiValidatorTest
  */
 
--- a/jdk/test/tools/jar/multiRelease/Basic.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/multiRelease/Basic.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,14 @@
  * @modules java.base/jdk.internal.misc
  *          jdk.compiler
  *          jdk.jartool
- * @build MRTestBase
+ * @build jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        MRTestBase
  * @run testng Basic
  */
 
--- a/jdk/test/tools/jar/multiRelease/Basic1.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/multiRelease/Basic1.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,8 +27,13 @@
  * @modules java.base/jdk.internal.misc
  *          jdk.compiler
  *          jdk.jartool
- * @build jdk.test.lib.JDKToolFinder jdk.test.lib.Utils
- * @build MRTestBase
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
+ *        MRTestBase
  * @run testng Basic1
  */
 
--- a/jdk/test/tools/jar/multiRelease/RuntimeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jar/multiRelease/RuntimeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,13 @@
  * @summary Test Multi-Release jar usage in runtime
  * @library /test/lib
  * @modules jdk.compiler
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng RuntimeTest
  */
 
--- a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,9 +29,14 @@
  * @library /test/lib
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.module
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.Utils
+ *        jdk.test.lib.Asserts
+ *        jdk.test.lib.JDKToolFinder
+ *        jdk.test.lib.JDKToolLauncher
+ *        jdk.test.lib.Platform
+ *        jdk.test.lib.process.*
  * @run testng JLinkMultiReleaseJarTest
-*/
+ */
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,8 +42,10 @@
  * @test
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler jdk.jlink
- * @build CompiledVersionTest jdk.testlibrary.ProcessTools
- *        jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
+ *        CompiledVersionTest jdk.testlibrary.ProcessTools
  * @run testng CompiledVersionTest
  */
 
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -48,8 +48,10 @@
  * @modules jdk.compiler jdk.jlink
  * @modules java.base/jdk.internal.module
  * @modules java.base/jdk.internal.org.objectweb.asm
- * @build ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
- *        jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
+ *        ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
  * @run testng UserModuleTest
  */
 
--- a/jdk/test/tools/jmod/JmodNegativeTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jmod/JmodNegativeTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,8 @@
  * @modules jdk.compiler
  *          jdk.jlink
  * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
  * @run testng JmodNegativeTest
  * @summary Negative tests for jmod
  */
--- a/jdk/test/tools/jmod/JmodTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jmod/JmodTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,8 @@
  * @modules jdk.compiler
  *          jdk.jlink
  * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
  * @run testng/othervm -Djava.io.tmpdir=. JmodTest
  */
 
--- a/jdk/test/tools/jmod/hashes/HashesTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/jmod/hashes/HashesTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,6 +31,8 @@
  *          jdk.compiler
  *          jdk.jartool
  *          jdk.jlink
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ *        jdk.test.lib.compiler.CompilerUtils
  * @run testng HashesTest
  */
 
--- a/jdk/test/tools/launcher/LauncherMessageTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/launcher/LauncherMessageTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,6 +25,8 @@
  * @test
  * @bug 8167063
  * @library /test/lib
+ * @build jdk.test.lib.Platform
+ *        jdk.test.lib.util.FileUtils
  * @run main LauncherMessageTest
  * @summary LauncherHelper should not throw JNI error for LinkageError
  */
--- a/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,7 +27,9 @@
  * @summary Basic argument validation for --add-exports
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
- * @build jdk.testlibrary.*
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ *        jdk.test.lib.compiler.CompilerUtils
+ *        jdk.testlibrary.*
  * @run testng AddExportsTestWarningError
  */
 
--- a/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,8 +27,10 @@
  * @summary  Basic argument validation for --add-reads
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.testlibrary.*
  * @build AddReadsTestWarningError
- * @build jdk.testlibrary.*
  * @run testng AddReadsTestWarningError
  */
 
--- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,8 @@
  * @library /lib/testlibrary /test/lib
  * @modules jdk.compiler
  * @build jdk.test.lib.compiler.CompilerUtils
+ *        jdk.test.lib.util.FileUtils
+ *        jdk.test.lib.Platform
  * @run testng PatchSystemModules
  */
 
--- a/langtools/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -426,3 +426,7 @@
 aae59039c1f5701ae933c5eed30e75d6e3afaeee jdk-9+171
 48a87c3414d374e3a26ddb270318c9af10de4b32 jdk-10+10
 03669efa77f51852f5301623cad4a2e1bb4fb9f6 jdk-9+172
+daa70bfed35ecf0575884c954dc95135e0f94b29 jdk-10+11
+123eb0956a459bca29d0812c62fca50da563ee40 jdk-9+173
+50c077995aa249890ece698a2a2db4c4fba90e10 jdk-9+174
+2bd34895dda246cff9e713401f3544260dfbe80f jdk-10+12
--- a/langtools/make/src/classes/build/tools/listjdkinternals/ListJDKInternals.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
- * 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 build.tools.listjdkinternals;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.UncheckedIOException;
-import java.lang.module.ModuleDescriptor;
-import java.lang.module.ModuleFinder;
-import java.lang.module.ModuleReference;
-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.nio.file.attribute.BasicFileAttributes;
-import java.time.LocalDateTime;
-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.Set;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.stream.Collectors;
-
-/**
- * Run this tool to generate the JDK internal APIs in the previous releases
- * including platform-specific internal APIs.
- */
-public class ListJDKInternals {
-    // Filter non-interesting JAR files
-    private final static List<String> excludes = Arrays.asList(
-        "deploy.jar",
-        "javaws.jar",
-        "plugin.jar",
-        "cldrdata.jar",
-        "localedata.jar"
-    );
-    private static void usage() {
-        System.out.println("ListJDKInternals [-o <outfile>] <javaHome> [<javaHome>]*");
-    }
-
-    private static final Set<String> EXPORTED_PACKAGES = new HashSet<>();
-
-    public static void main(String... args) throws IOException {
-        List<Path> paths = new ArrayList<>();
-        Path outFile = null;
-        int i=0;
-        while (i < args.length) {
-            String arg = args[i++];
-            if (arg.equals("-o")) {
-                outFile = Paths.get(args[i++]);
-            } else {
-                Path p = Paths.get(arg);
-                if (Files.notExists(p))
-                    throw new IllegalArgumentException(p + " not exist");
-                paths.add(p);
-            }
-        }
-        if (paths.isEmpty()) {
-            usage();
-            System.exit(1);
-        }
-
-        // Get the exported APIs from the current JDK releases
-        Path javaHome = Paths.get(System.getProperty("java.home"));
-        ModuleFinder.ofSystem().findAll()
-            .stream()
-            .map(ModuleReference::descriptor)
-            .filter(md -> !md.name().equals("jdk.unsupported"))
-            .map(ModuleDescriptor::exports)
-            .flatMap(Set::stream)
-            .filter(exp -> !exp.isQualified())
-            .map(ModuleDescriptor.Exports::source)
-            .forEach(EXPORTED_PACKAGES::add);
-
-        ListJDKInternals listJDKInternals = new ListJDKInternals(paths);
-        if (outFile != null) {
-            try (OutputStream out = Files.newOutputStream(outFile);
-                 PrintStream pw = new PrintStream(out)) {
-                listJDKInternals.write(pw);
-            }
-        } else {
-            listJDKInternals.write(System.out);
-        }
-    }
-
-    private final Set<String> packages = new HashSet<>();
-    ListJDKInternals(List<Path> dirs) throws IOException {
-        for (Path p : dirs) {
-            packages.addAll(list(p));
-        }
-    }
-
-    private void write(PrintStream pw) {
-        pw.println("# This file is auto-generated by ListJDKInternals tool on " +
-                   LocalDateTime.now().toString());
-        packages.stream().sorted()
-                .forEach(pw::println);
-    }
-
-    private Set<String> list(Path javaHome) throws IOException {
-        Path jrt = javaHome.resolve("lib").resolve("modules");
-        Path jre = javaHome.resolve("jre");
-
-        if (Files.exists(jrt)) {
-            return listModularRuntime(javaHome);
-        } else if (Files.exists(jre.resolve("lib").resolve("rt.jar"))) {
-            return listLegacyRuntime(javaHome);
-        }
-        throw new IllegalArgumentException("invalid " + javaHome);
-    }
-
-    private Set<String> listModularRuntime(Path javaHome) throws IOException {
-        Map<String, String> env = new HashMap<>();
-        env.put("java.home", javaHome.toString());
-        FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), env);
-        Path root = fs.getPath("packages");
-        return Files.walk(root, 1)
-                    .map(Path::getFileName)
-                    .map(Path::toString)
-                    .filter(pn -> !EXPORTED_PACKAGES.contains(pn))
-                    .collect(Collectors.toSet());
-    }
-
-    private Set<String> listLegacyRuntime(Path javaHome) throws IOException {
-        List<Path> dirs = new ArrayList<>();
-        Path jre = javaHome.resolve("jre");
-        Path lib = javaHome.resolve("lib");
-
-        dirs.add(jre.resolve("lib"));
-        dirs.add(jre.resolve("lib").resolve("ext"));
-        dirs.add(lib.resolve("tools.jar"));
-        dirs.add(lib.resolve("jconsole.jar"));
-        Set<String> packages = new HashSet<>();
-        for (Path d : dirs) {
-            Files.find(d, 1, (Path p, BasicFileAttributes attr)
-                    -> p.getFileName().toString().endsWith(".jar") &&
-                       !excludes.contains(p.getFileName().toString()))
-                .map(ListJDKInternals::walkJarFile)
-                .flatMap(Set::stream)
-                .filter(pn -> !EXPORTED_PACKAGES.contains(pn))
-                .forEach(packages::add);
-        }
-        return packages;
-    }
-
-    static Set<String> walkJarFile(Path jarfile) {
-        try (JarFile jf = new JarFile(jarfile.toFile())) {
-            return jf.stream()
-                     .map(JarEntry::getName)
-                     .filter(n -> n.endsWith(".class"))
-                     .map(ListJDKInternals::toPackage)
-                .collect(Collectors.toSet());
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    static String toPackage(String name) {
-        int i = name.lastIndexOf('/');
-        if (i < 0) {
-            System.err.format("Warning: unnamed package %s%n", name);
-        }
-        return i >= 0 ? name.substring(0, i).replace("/", ".") : "";
-    }
-}
--- a/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/make/tools/crules/CodingRulesAnalyzerPlugin.java	Tue Jun 27 16:00:14 2017 -0400
@@ -67,7 +67,8 @@
         task.addTaskListener(new PostAnalyzeTaskListener(
                 new MutableFieldsAnalyzer(task),
                 new AssertCheckAnalyzer(task),
-                new DefinedByAnalyzer(task)
+                new DefinedByAnalyzer(task),
+                new LegacyLogMethodAnalyzer(task)
         ));
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/tools/crules/LegacyLogMethodAnalyzer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package crules;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent.Kind;
+import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.JCTree.JCExpression;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.Tag;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeScanner;
+import com.sun.tools.javac.util.AbstractLog;
+import com.sun.tools.javac.util.JCDiagnostic;
+
+/**This analyzer guards against legacy Log.error/warning/note methods that don't use the typed keys.*/
+public class LegacyLogMethodAnalyzer extends AbstractCodingRulesAnalyzer {
+
+    public LegacyLogMethodAnalyzer(JavacTask task) {
+        super(task);
+        treeVisitor = new LegacyLogMethodVisitor();
+        eventKind = Kind.ANALYZE;
+    }
+
+    private static final Set<String> LEGACY_METHOD_NAMES = new HashSet<>(
+            Arrays.asList("error", "mandatoryWarning", "warning", "mandatoryNote", "note", "fragment"));
+
+    class LegacyLogMethodVisitor extends TreeScanner {
+
+        @Override
+        public void visitClassDef(JCClassDecl tree) {
+            if (!tree.sym.packge().fullname.toString().startsWith("com.sun.tools.javac."))
+                return ;
+            super.visitClassDef(tree);
+        }
+
+        @Override
+        public void visitApply(JCMethodInvocation tree) {
+            checkLegacyLogMethod(tree);
+            super.visitApply(tree);
+        }
+
+        void checkLegacyLogMethod(JCMethodInvocation tree) {
+            Symbol method = TreeInfo.symbolFor(tree);
+            if (method == null ||
+                method.kind != Kinds.Kind.MTH ||
+                !typeToCheck(method.owner.type) ||
+                !LEGACY_METHOD_NAMES.contains(method.name.toString()) ||
+                !((MethodSymbol) method).isVarArgs() ||
+                method.type.getParameterTypes().size() < 2) {
+                return ;
+            }
+            JCExpression key = tree.args.get(method.type.getParameterTypes().size() - 2);
+            if (key.hasTag(Tag.LITERAL)) {
+                messages.error(tree, "crules.use.of.legacy.log.method", tree);
+            }
+        }
+
+        boolean typeToCheck(Type type) {
+            Symbol abstractLog = elements.getTypeElement(AbstractLog.class.getName());
+            Symbol diagnosticFactory = elements.getTypeElement(JCDiagnostic.Factory.class.getName().replace('$', '.'));
+            return types.isSubtype(type, abstractLog.type) ||
+                   types.isSubtype(type, diagnosticFactory.type);
+        }
+    }
+}
--- a/langtools/make/tools/crules/resources/crules.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/make/tools/crules/resources/crules.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -36,3 +36,5 @@
     This method implements a public API method, and is marked with incorrect @DefinedBy.
 crules.defined.by.no.api=\
     This method does not implement a public API method, and should not be marked with @DefinedBy.
+crules.use.of.legacy.log.method=\
+    Should not use legacy Log or JCDiagnostic.Factory methods when methods accepting an Error/Warning/Note/Fragment key can be used.
--- a/langtools/make/tools/propertiesparser/parser/MessageFile.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/make/tools/propertiesparser/parser/MessageFile.java	Tue Jun 27 16:00:14 2017 -0400
@@ -54,7 +54,7 @@
             if (line.startsWith(keyPrefix + ".")) {
                 int eq = line.indexOf("=");
                 if (eq > 0)
-                    messages.put(line.substring(0, eq), new Message(currLine));
+                    messages.put(line.substring(0, eq).trim(), new Message(currLine));
             }
         }
     }
--- a/langtools/make/tools/propertiesparser/parser/MessageLine.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/make/tools/propertiesparser/parser/MessageLine.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,7 +32,7 @@
 public class MessageLine {
 
     static final Pattern emptyOrCommentPattern = Pattern.compile("( *#.*)?");
-    static final Pattern typePattern = Pattern.compile("[-\\\\'A-Z\\.a-z ]+( \\([A-Za-z 0-9]+\\))?");
+    static final Pattern typePattern = Pattern.compile("[-\\\\'A-Z\\.a-z ]+( \\([-A-Za-z 0-9]+\\))?");
     static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
             typePattern.pattern(), typePattern.pattern()));
 
--- a/langtools/make/tools/propertiesparser/parser/MessageType.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/make/tools/propertiesparser/parser/MessageType.java	Tue Jun 27 16:00:14 2017 -0400
@@ -71,7 +71,10 @@
      */
     public enum SimpleType implements MessageType {
 
+        ANNOTATION("annotation", "Compound", "com.sun.tools.javac.code.Attribute"),
         BOOLEAN("boolean", "boolean", null),
+        COLLECTION("collection", "Collection", "java.util"),
+        FLAG("flag", "Flag", "com.sun.tools.javac.code.Flags"),
         FRAGMENT("fragment", "Fragment", null),
         DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
         MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
@@ -81,7 +84,7 @@
         NAME("name", "Name", "com.sun.tools.javac.util"),
         NUMBER("number", "int", null),
         OPTION_NAME("option name", "Option", "com.sun.tools.javac.main"),
-        SOURCE_VERSION("source version", "Source", "com.sun.tools.javac.code"),
+        SOURCE_VERSION("source version", "SourceVersion", "javax.lang.model"),
         STRING("string", "String", null),
         SYMBOL("symbol", "Symbol", "com.sun.tools.javac.code"),
         SYMBOL_KIND("symbol kind", "Kind", "com.sun.tools.javac.code.Kinds"),
@@ -131,6 +134,7 @@
          * Compound type kind.
          */
         public enum Kind {
+            COLLECTION("collection of", SimpleType.COLLECTION),
             LIST("list of", SimpleType.LIST),
             SET("set of", SimpleType.SET);
 
@@ -180,7 +184,7 @@
          */
         public enum Kind {
             MESSAGE_SEGMENT("message segment", SimpleType.DIAGNOSTIC, SimpleType.FRAGMENT),
-            FILE_NAME("file name", SimpleType.FILE, SimpleType.FILE_OBJECT);
+            FILE_NAME("file name", SimpleType.FILE, SimpleType.FILE_OBJECT, SimpleType.PATH);
 
             final String kindName;
             final SimpleType[] choices;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/source/doctree/package-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,8 @@
  *
  * @author Jonathan Gibbons
  * @since 1.8
- * @see <a href="http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDJGIJB">http://docs.oracle.com/javase/8/docs/technotes/tools/unix/javadoc.html#CHDJGIJB</a>
+ *
+ * @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ *      Documentation Comment Specification for the Standard Doclet</a>
  */
 package com.sun.source.doctree;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Tue Jun 27 16:00:14 2017 -0400
@@ -52,6 +52,7 @@
 import com.sun.tools.javac.platform.PlatformDescription;
 import com.sun.tools.javac.platform.PlatformDescription.PluginInfo;
 import com.sun.tools.javac.processing.JavacProcessingEnvironment;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.DefinedBy;
@@ -219,7 +220,7 @@
             }
         }
         for (List<String> p: pluginsToCall) {
-            Log.instance(context).error("plugin.not.found", p.head);
+            Log.instance(context).error(Errors.PluginNotFound(p.head));
         }
     }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java	Tue Jun 27 16:00:14 2017 -0400
@@ -102,6 +102,9 @@
 import com.sun.tools.javac.parser.Tokens.Comment;
 import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
 import com.sun.tools.javac.processing.JavacProcessingEnvironment;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Notes;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.DCTree;
 import com.sun.tools.javac.tree.DCTree.DCBlockTag;
 import com.sun.tools.javac.tree.DCTree.DCDocComment;
@@ -1129,19 +1132,19 @@
         try {
             switch (kind) {
             case ERROR:
-                log.error(DiagnosticFlag.MULTIPLE, pos, "proc.messager", msg.toString());
+                log.error(DiagnosticFlag.MULTIPLE, pos, Errors.ProcMessager(msg.toString()));
                 break;
 
             case WARNING:
-                log.warning(pos, "proc.messager", msg.toString());
+                log.warning(pos, Warnings.ProcMessager(msg.toString()));
                 break;
 
             case MANDATORY_WARNING:
-                log.mandatoryWarning(pos, "proc.messager", msg.toString());
+                log.mandatoryWarning(pos, Warnings.ProcMessager(msg.toString()));
                 break;
 
             default:
-                log.note(pos, "proc.messager", msg.toString());
+                log.note(pos, Notes.ProcMessager(msg.toString()));
             }
         } finally {
             if (oldSource != null)
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -56,6 +56,7 @@
 import com.sun.tools.javac.jvm.Profile;
 import com.sun.tools.javac.main.Option;
 import com.sun.tools.javac.platform.PlatformDescription;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 import com.sun.tools.javac.util.*;
 
 import static javax.tools.StandardLocation.*;
@@ -292,7 +293,9 @@
             try {
                 fillIn(p);
             } catch (IOException ex) {
-                throw new CompletionFailure(sym, ex.getLocalizedMessage()).initCause(ex);
+                JCDiagnostic msg =
+                        diagFactory.fragment(Fragments.ExceptionMessage(ex.getLocalizedMessage()));
+                throw new CompletionFailure(sym, msg).initCause(ex);
             }
         }
         if (!reader.filling)
@@ -329,7 +332,9 @@
      */
     void fillIn(ClassSymbol c) {
         if (completionFailureName == c.fullname) {
-            throw new CompletionFailure(c, "user-selected completion failure by class name");
+            JCDiagnostic msg =
+                    diagFactory.fragment(Fragments.UserSelectedCompletionFailure);
+            throw new CompletionFailure(c, msg);
         }
         currentOwner = c;
         JavaFileObject classfile = c.classfile;
@@ -365,7 +370,7 @@
     // where
         private CompletionFailure classFileNotFound(ClassSymbol c) {
             JCDiagnostic diag =
-                diagFactory.fragment("class.file.not.found", c.flatname);
+                diagFactory.fragment(Fragments.ClassFileNotFound(c.flatname));
             return newCompletionFailure(c, diag);
         }
         /** Static factory for CompletionFailure objects.
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -225,7 +225,7 @@
                 name = moduleNameFromSourceReader.readModuleName(fo);
                 if (name == null) {
                     JCDiagnostic diag =
-                        diags.fragment("file.does.not.contain.module");
+                        diags.fragment(Fragments.FileDoesNotContainModule);
                     ClassSymbol errModuleInfo = syms.defineClass(names.module_info, syms.errModule);
                     throw new ClassFinder.BadClassFile(errModuleInfo, fo, diag, diags);
                 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java	Tue Jun 27 16:00:14 2017 -0400
@@ -2148,18 +2148,6 @@
          */
         public JCDiagnostic diag;
 
-        /** A localized string describing the failure.
-         * @deprecated Use {@code getDetail()} or {@code getMessage()}
-         */
-        @Deprecated
-        public String errmsg;
-
-        public CompletionFailure(Symbol sym, String errmsg) {
-            this.sym = sym;
-            this.errmsg = errmsg;
-//          this.printStackTrace();//DEBUG
-        }
-
         public CompletionFailure(Symbol sym, JCDiagnostic diag) {
             this.sym = sym;
             this.diag = diag;
@@ -2172,14 +2160,11 @@
 
         @Override
         public String getMessage() {
-            if (diag != null)
-                return diag.getMessage(null);
-            else
-                return errmsg;
+            return diag.getMessage(null);
         }
 
-        public Object getDetailValue() {
-            return (diag != null ? diag : errmsg);
+        public JCDiagnostic getDetailValue() {
+            return diag;
         }
 
         @Override
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Tue Jun 27 16:00:14 2017 -0400
@@ -55,6 +55,7 @@
 import com.sun.tools.javac.comp.Attr;
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.tree.JCTree.JCBlock;
@@ -480,12 +481,12 @@
                             // The normal declaration annotation checks make sure that the use is valid.
                             break;
                         case 1:
-                            log.error(typetree.pos(), "cant.type.annotate.scoping.1",
-                                    onlyTypeAnnotations);
+                            log.error(typetree.pos(),
+                                      Errors.CantTypeAnnotateScoping1(onlyTypeAnnotations.head));
                             break;
                         default:
-                            log.error(typetree.pos(), "cant.type.annotate.scoping",
-                                    onlyTypeAnnotations);
+                            log.error(typetree.pos(),
+                                      Errors.CantTypeAnnotateScoping(onlyTypeAnnotations));
                     }
                     return type;
                 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Tue Jun 27 16:00:14 2017 -0400
@@ -58,6 +58,7 @@
 import static com.sun.tools.javac.code.Type.*;
 import static com.sun.tools.javac.code.TypeTag.*;
 import static com.sun.tools.javac.jvm.ClassFile.externalize;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 
 /**
  * Utility class containing various operations on types.
@@ -374,7 +375,7 @@
                 if (!chk.checkValidGenericType(site)) {
                     //if the inferred functional interface type is not well-formed,
                     //or if it's not a subtype of the original target, issue an error
-                    throw failure(diags.fragment("no.suitable.functional.intf.inst", site));
+                    throw failure(diags.fragment(Fragments.NoSuitableFunctionalIntfInst(site)));
                 }
                 return memberType(site, descSym);
             }
@@ -434,13 +435,13 @@
                 } else {
                     //the target method(s) should be the only abstract members of t
                     throw failure("not.a.functional.intf.1",  origin,
-                            diags.fragment("incompatible.abstracts", Kinds.kindName(origin), origin));
+                            diags.fragment(Fragments.IncompatibleAbstracts(Kinds.kindName(origin), origin)));
                 }
             }
             if (abstracts.isEmpty()) {
                 //t must define a suitable non-generic method
                 throw failure("not.a.functional.intf.1", origin,
-                            diags.fragment("no.abstracts", Kinds.kindName(origin), origin));
+                            diags.fragment(Fragments.NoAbstracts(Kinds.kindName(origin), origin)));
             } else if (abstracts.size() == 1) {
                 return new FunctionDescriptor(abstracts.first());
             } else { // size > 1
@@ -456,9 +457,11 @@
                                 desc.type.getReturnType(),
                                 desc.type.getThrownTypes()));
                     }
+                    JCDiagnostic msg =
+                            diags.fragment(Fragments.IncompatibleDescsInFunctionalIntf(Kinds.kindName(origin),
+                                                                                       origin));
                     JCDiagnostic.MultilineDiagnostic incompatibleDescriptors =
-                            new JCDiagnostic.MultilineDiagnostic(diags.fragment("incompatible.descs.in.functional.intf",
-                            Kinds.kindName(origin), origin), descriptors.toList());
+                            new JCDiagnostic.MultilineDiagnostic(msg, descriptors.toList());
                     throw failure(incompatibleDescriptors);
                 }
                 return descRes;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -30,6 +30,7 @@
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Types;
 import com.sun.tools.javac.comp.ArgumentAttr.LocalCacheContext;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCBlock;
 import com.sun.tools.javac.tree.JCTree.JCClassDecl;
@@ -246,7 +247,7 @@
                     explicitArgs = explicitArgs.tail;
                 }
                 //exact match
-                log.warning(oldTree.clazz, "diamond.redundant.args");
+                log.warning(oldTree.clazz, Warnings.DiamondRedundantArgs);
             }
         }
     }
@@ -294,7 +295,7 @@
         @Override
         void process (JCNewClass oldTree, JCLambda newTree, boolean hasErrors){
             if (!hasErrors) {
-                log.warning(oldTree.def, "potential.lambda.found");
+                log.warning(oldTree.def, Warnings.PotentialLambdaFound);
             }
         }
     }
@@ -322,7 +323,7 @@
         void process (JCMethodInvocation oldTree, JCMethodInvocation newTree, boolean hasErrors){
             if (!hasErrors) {
                 //exact match
-                log.warning(oldTree, "method.redundant.typeargs");
+                log.warning(oldTree, Warnings.MethodRedundantTypeargs);
             }
         }
     }
@@ -335,12 +336,28 @@
     };
 
     /**
+     * Create a copy of Env if needed.
+     */
+    Env<AttrContext> copyEnvIfNeeded(JCTree tree, Env<AttrContext> env) {
+        if (!analyzerModes.isEmpty() &&
+                !env.info.isSpeculative &&
+                TreeInfo.isStatement(tree)) {
+            Env<AttrContext> analyzeEnv =
+                    env.dup(env.tree, env.info.dup(env.info.scope.dupUnshared(env.info.scope.owner)));
+            analyzeEnv.info.returnResult = analyzeEnv.info.returnResult != null ?
+                    attr.new ResultInfo(analyzeEnv.info.returnResult.pkind,
+                                        analyzeEnv.info.returnResult.pt) : null;
+            return analyzeEnv;
+        } else {
+            return null;
+        }
+    }
+
+    /**
      * Analyze an AST node if needed.
      */
     void analyzeIfNeeded(JCTree tree, Env<AttrContext> env) {
-        if (!analyzerModes.isEmpty() &&
-                !env.info.isSpeculative &&
-                TreeInfo.isStatement(tree)) {
+        if (env != null) {
             JCStatement stmt = (JCStatement)tree;
             analyze(stmt, env);
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,6 +42,7 @@
 import com.sun.tools.javac.util.List;
 
 import javax.tools.JavaFileObject;
+
 import java.util.*;
 
 import static com.sun.tools.javac.code.Flags.SYNTHETIC;
@@ -56,8 +57,10 @@
 import static com.sun.tools.javac.tree.JCTree.Tag.ASSIGN;
 import static com.sun.tools.javac.tree.JCTree.Tag.IDENT;
 import static com.sun.tools.javac.tree.JCTree.Tag.NEWARRAY;
+
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 
+
 /** Enter annotations onto symbols and types (and trees).
  *
  *  This is also a pseudo stage in the compiler taking care of scheduling when annotations are
@@ -251,7 +254,7 @@
             Lint prevLint = deferPos != null ? null : chk.setLint(lint);
             try {
                 if (s.hasAnnotations() && annotations.nonEmpty())
-                    log.error(annotations.head.pos, "already.annotated", Kinds.kindName(s), s);
+                    log.error(annotations.head.pos, Errors.AlreadyAnnotated(Kinds.kindName(s), s));
 
                 Assert.checkNonNull(s, "Symbol argument to actualEnterAnnotations is null");
 
@@ -339,7 +342,7 @@
 
             if (annotated.containsKey(a.type.tsym)) {
                 if (!allowRepeatedAnnos) {
-                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), "repeatable.annotations.not.supported.in.source", sourceName);
+                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), Errors.RepeatableAnnotationsNotSupportedInSource(sourceName));
                 }
                 ListBuffer<T> l = annotated.get(a.type.tsym);
                 l = l.append(c);
@@ -453,8 +456,7 @@
 
         boolean isError = a.type.isErroneous();
         if (!a.type.tsym.isAnnotationType() && !isError) {
-            log.error(a.annotationType.pos(),
-                    "not.annotation.type", a.type.toString());
+            log.error(a.annotationType.pos(), Errors.NotAnnotationType(a.type));
             isError = true;
         }
 
@@ -483,13 +485,13 @@
             Type thisAnnotationType, boolean badAnnotation, Env<AttrContext> env, boolean elidedValue)
     {
         if (!nameValuePair.hasTag(ASSIGN)) {
-            log.error(nameValuePair.pos(), "annotation.value.must.be.name.value");
+            log.error(nameValuePair.pos(), Errors.AnnotationValueMustBeNameValue);
             attributeAnnotationValue(nameValuePair.type = syms.errType, nameValuePair, env);
             return null;
         }
         JCAssign assign = (JCAssign)nameValuePair;
         if (!assign.lhs.hasTag(IDENT)) {
-            log.error(nameValuePair.pos(), "annotation.value.must.be.name.value");
+            log.error(nameValuePair.pos(), Errors.AnnotationValueMustBeNameValue);
             attributeAnnotationValue(nameValuePair.type = syms.errType, nameValuePair, env);
             return null;
         }
@@ -502,7 +504,7 @@
         left.sym = method;
         left.type = method.type;
         if (method.owner != thisAnnotationType.tsym && !badAnnotation)
-            log.error(left.pos(), "no.annotation.member", left.name, thisAnnotationType);
+            log.error(left.pos(), Errors.NoAnnotationMember(left.name, thisAnnotationType));
         Type resultType = method.type.getReturnType();
 
         // Compute value part
@@ -523,7 +525,7 @@
         try {
             expectedElementType.tsym.complete();
         } catch(CompletionFailure e) {
-            log.error(tree.pos(), "cant.resolve", Kinds.kindName(e.sym), e.sym);
+            log.error(tree.pos(), Errors.CantResolve(Kinds.kindName(e.sym), e.sym.getQualifiedName(), null, null));
             expectedElementType = syms.errType;
         }
 
@@ -535,10 +537,10 @@
         //error recovery
         if (tree.hasTag(NEWARRAY)) {
             if (!expectedElementType.isErroneous())
-                log.error(tree.pos(), "annotation.value.not.allowable.type");
+                log.error(tree.pos(), Errors.AnnotationValueNotAllowableType);
             JCNewArray na = (JCNewArray)tree;
             if (na.elemtype != null) {
-                log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
+                log.error(na.elemtype.pos(), Errors.NewNotAllowedInAnnotation);
             }
             for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
                 attributeAnnotationValue(syms.errType,
@@ -552,7 +554,7 @@
             if (tree.hasTag(ANNOTATION)) {
                 return attributeAnnotation((JCAnnotation)tree, expectedElementType, env);
             } else {
-                log.error(tree.pos(), "annotation.value.must.be.annotation");
+                log.error(tree.pos(), Errors.AnnotationValueMustBeAnnotation);
                 expectedElementType = syms.errType;
             }
         }
@@ -560,11 +562,25 @@
         //error recovery
         if (tree.hasTag(ANNOTATION)) {
             if (!expectedElementType.isErroneous())
-                log.error(tree.pos(), "annotation.not.valid.for.type", expectedElementType);
+                log.error(tree.pos(), Errors.AnnotationNotValidForType(expectedElementType));
             attributeAnnotation((JCAnnotation)tree, syms.errType, env);
             return new Attribute.Error(((JCAnnotation)tree).annotationType.type);
         }
 
+        MemberEnter.InitTreeVisitor initTreeVisitor = new MemberEnter.InitTreeVisitor() {
+            // the methods below are added to allow class literals on top of constant expressions
+            @Override
+            public void visitTypeIdent(JCPrimitiveTypeTree that) {}
+
+            @Override
+            public void visitTypeArray(JCArrayTypeTree that) {}
+        };
+        tree.accept(initTreeVisitor);
+        if (!initTreeVisitor.result) {
+            log.error(tree.pos(), Errors.ExpressionNotAllowableAsAnnotationValue);
+            return new Attribute.Error(syms.errType);
+        }
+
         if (expectedElementType.isPrimitive() ||
                 (types.isSameType(expectedElementType, syms.stringType) && !expectedElementType.hasTag(TypeTag.ERROR))) {
             return getAnnotationPrimitiveValue(expectedElementType, tree, env);
@@ -581,7 +597,7 @@
 
         //error recovery:
         if (!expectedElementType.isErroneous())
-            log.error(tree.pos(), "annotation.value.not.allowable.type");
+            log.error(tree.pos(), Errors.AnnotationValueNotAllowableType);
         return new Attribute.Error(attr.attribExpr(tree, env, expectedElementType));
     }
 
@@ -592,7 +608,7 @@
                 TreeInfo.nonstaticSelect(tree) ||
                 sym.kind != VAR ||
                 (sym.flags() & Flags.ENUM) == 0) {
-            log.error(tree.pos(), "enum.annotation.must.be.enum.constant");
+            log.error(tree.pos(), Errors.EnumAnnotationMustBeEnumConstant);
             return new Attribute.Error(result.getOriginalType());
         }
         VarSymbol enumerator = (VarSymbol) sym;
@@ -614,12 +630,6 @@
             }
         }
 
-        // Class literals look like field accesses of a field named class
-        // at the tree level
-        if (TreeInfo.name(tree) != names._class) {
-            log.error(tree.pos(), "annotation.value.must.be.class.literal");
-            return new Attribute.Error(syms.errType);
-        }
         return new Attribute.Class(types,
                 (((JCFieldAccess) tree).selected).type);
     }
@@ -629,7 +639,7 @@
         if (result.isErroneous())
             return new Attribute.Error(result.getOriginalType());
         if (result.constValue() == null) {
-            log.error(tree.pos(), "attribute.value.must.be.constant");
+            log.error(tree.pos(), Errors.AttributeValueMustBeConstant);
             return new Attribute.Error(expectedElementType);
         }
         result = cfolder.coerce(result, expectedElementType);
@@ -645,7 +655,7 @@
 
         JCNewArray na = (JCNewArray)tree;
         if (na.elemtype != null) {
-            log.error(na.elemtype.pos(), "new.not.allowed.in.annotation");
+            log.error(na.elemtype.pos(), Errors.NewNotAllowedInAnnotation);
         }
         ListBuffer<Attribute> buf = new ListBuffer<>();
         for (List<JCExpression> l = na.elems; l.nonEmpty(); l=l.tail) {
@@ -740,7 +750,7 @@
         }
 
         if (!repeated.isEmpty() && targetContainerType == null) {
-            log.error(ctx.pos.get(annotations.head), "duplicate.annotation.invalid.repeated", origAnnoType);
+            log.error(ctx.pos.get(annotations.head), Errors.DuplicateAnnotationInvalidRepeated(origAnnoType));
             return null;
         }
 
@@ -787,7 +797,7 @@
                 }
 
                 if (!chk.validateAnnotationDeferErrors(annoTree))
-                    log.error(annoTree.pos(), "duplicate.annotation.invalid.repeated", origAnnoType);
+                    log.error(annoTree.pos(), Errors.DuplicateAnnotationInvalidRepeated(origAnnoType));
 
                 c = attributeAnnotation(annoTree, targetContainerType, ctx.env);
                 c.setSynthesized(true);
@@ -816,7 +826,7 @@
         Attribute.Compound ca = origAnnoDecl.getAnnotationTypeMetadata().getRepeatable();
         if (ca == null) { // has no Repeatable annotation
             if (reportError)
-                log.error(pos, "duplicate.annotation.missing.container", origAnnoType, syms.repeatableType);
+                log.error(pos, Errors.DuplicateAnnotationMissingContainer(origAnnoType));
             return null;
         }
 
@@ -844,17 +854,17 @@
 
         // Repeatable must have at least one element
         if (ca.values.isEmpty()) {
-            log.error(pos, "invalid.repeatable.annotation", annoDecl);
+            log.error(pos, Errors.InvalidRepeatableAnnotation(annoDecl));
             return null;
         }
         Pair<MethodSymbol,Attribute> p = ca.values.head;
         Name name = p.fst.name;
         if (name != names.value) { // should contain only one element, named "value"
-            log.error(pos, "invalid.repeatable.annotation", annoDecl);
+            log.error(pos, Errors.InvalidRepeatableAnnotation(annoDecl));
             return null;
         }
         if (!(p.snd instanceof Attribute.Class)) { // check that the value of "value" is an Attribute.Class
-            log.error(pos, "invalid.repeatable.annotation", annoDecl);
+            log.error(pos, Errors.InvalidRepeatableAnnotation(annoDecl));
             return null;
         }
 
@@ -889,14 +899,12 @@
         }
         if (error) {
             log.error(pos,
-                    "invalid.repeatable.annotation.multiple.values",
-                    targetContainerType,
-                    nr_value_elems);
+                      Errors.InvalidRepeatableAnnotationMultipleValues(targetContainerType,
+                                                                       nr_value_elems));
             return null;
         } else if (nr_value_elems == 0) {
             log.error(pos,
-                    "invalid.repeatable.annotation.no.value",
-                    targetContainerType);
+                      Errors.InvalidRepeatableAnnotationNoValue(targetContainerType));
             return null;
         }
 
@@ -904,8 +912,7 @@
         // probably "impossible" to fail this
         if (containerValueSymbol.kind != MTH) {
             log.error(pos,
-                    "invalid.repeatable.annotation.invalid.value",
-                    targetContainerType);
+                    Errors.InvalidRepeatableAnnotationInvalidValue(targetContainerType));
             fatalError = true;
         }
 
@@ -916,10 +923,9 @@
         if (!(types.isArray(valueRetType) &&
                 types.isSameType(expectedType, valueRetType))) {
             log.error(pos,
-                    "invalid.repeatable.annotation.value.return",
-                    targetContainerType,
-                    valueRetType,
-                    expectedType);
+                      Errors.InvalidRepeatableAnnotationValueReturn(targetContainerType,
+                                                                    valueRetType,
+                                                                    expectedType));
             fatalError = true;
         }
 
@@ -940,8 +946,7 @@
             ListBuffer<T> manualContainer = ctx.annotated.get(validRepeated.type.tsym);
             if (manualContainer != null) {
                 log.error(ctx.pos.get(manualContainer.first()),
-                        "invalid.repeatable.annotation.repeated.and.container.present",
-                        manualContainer.first().type.tsym);
+                          Errors.InvalidRepeatableAnnotationRepeatedAndContainerPresent(manualContainer.first().type.tsym));
             }
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Tue Jun 27 16:00:14 2017 -0400
@@ -41,6 +41,7 @@
 import com.sun.tools.javac.comp.DeferredAttr.LambdaReturnScanner;
 import com.sun.tools.javac.comp.Infer.PartiallyInferredMethodType;
 import com.sun.tools.javac.comp.Resolve.MethodResolutionPhase;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCConditional;
 import com.sun.tools.javac.tree.JCTree.JCExpression;
@@ -433,7 +434,7 @@
                 return localInfo.check(speculativeTree, speculativeTree.type);
             } else if (resultInfo.pt.hasTag(VOID)) {
                 //this means we are returning a poly conditional from void-compatible lambda expression
-                resultInfo.checkContext.report(tree, attr.diags.fragment("conditional.target.cant.be.void"));
+                resultInfo.checkContext.report(tree, attr.diags.fragment(Fragments.ConditionalTargetCantBeVoid));
                 return attr.types.createErrorType(resultInfo.pt);
             } else {
                 //poly
@@ -556,19 +557,16 @@
         Type overloadCheck(ResultInfo resultInfo, DeferredAttrContext deferredAttrContext) {
             Type mtype = methodType();
             ResultInfo localInfo = resultInfo(resultInfo);
+            Type t;
             if (mtype != null && mtype.hasTag(METHOD) && mtype.isPartial()) {
-                Type t = ((PartiallyInferredMethodType)mtype).check(localInfo);
-                if (!deferredAttrContext.inferenceContext.free(localInfo.pt)) {
-                    speculativeTypes.put(localInfo, t);
-                    return localInfo.check(tree.pos(), t);
-                } else {
-                    return t;
-                }
+                //poly invocation
+                t = ((PartiallyInferredMethodType)mtype).check(localInfo);
             } else {
-                Type t = localInfo.check(tree.pos(), speculativeTree.type);
-                speculativeTypes.put(localInfo, t);
-                return t;
+                //standalone invocation
+                t = localInfo.check(tree.pos(), speculativeTree.type);
             }
+            speculativeTypes.put(localInfo, t);
+            return t;
         }
 
         /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Jun 27 16:00:14 2017 -0400
@@ -53,6 +53,7 @@
 import static com.sun.tools.javac.resources.CompilerProperties.Fragments.DiamondInvalidArgs;
 import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.resources.CompilerProperties.Fragments;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.tree.JCTree.JCPolyExpression.*;
@@ -227,9 +228,9 @@
                 !resultInfo.pt.hasTag(METHOD) &&
                 !resultInfo.pt.hasTag(FORALL);
         if (shouldCheck && !ownkind.subset(resultInfo.pkind)) {
-            log.error(tree.pos(), "unexpected.type",
-            resultInfo.pkind.kindNames(),
-            ownkind.kindNames());
+            log.error(tree.pos(),
+                      Errors.UnexpectedType(resultInfo.pkind.kindNames(),
+                                            ownkind.kindNames()));
             owntype = types.createErrorType(found);
         } else if (allowPoly && inferenceContext.free(found)) {
             //delay the check if there are inference variables in the found type
@@ -292,9 +293,9 @@
                (base.hasTag(IDENT) && TreeInfo.name(base) == names._this)) &&
                isAssignableAsBlankFinal(v, env)))) {
             if (v.isResourceVariable()) { //TWR resource
-                log.error(pos, "try.resource.may.not.be.assigned", v);
+                log.error(pos, Errors.TryResourceMayNotBeAssigned(v));
             } else {
-                log.error(pos, "cant.assign.val.to.final.var", v);
+                log.error(pos, Errors.CantAssignValToFinalVar(v));
             }
         }
     }
@@ -717,8 +718,7 @@
     /** Derived visitor method: attribute a statement or definition tree.
      */
     public Type attribStat(JCTree tree, Env<AttrContext> env) {
-        Env<AttrContext> analyzeEnv =
-                env.dup(tree, env.info.dup(env.info.scope.dupUnshared(env.info.scope.owner)));
+        Env<AttrContext> analyzeEnv = analyzer.copyEnvIfNeeded(tree, env);
         try {
             return attribTree(tree, env, statInfo);
         } finally {
@@ -868,7 +868,7 @@
         final DiagnosticPosition pos = tree.hasTag(TYPEAPPLY) ?
                 (((JCTypeApply) tree).clazz).pos() : tree.pos();
         if (t.tsym.isAnonymous()) {
-            log.error(pos, "cant.inherit.from.anon");
+            log.error(pos, Errors.CantInheritFromAnon);
             return types.createErrorType(t);
         }
         if (t.isErroneous())
@@ -876,27 +876,27 @@
         if (t.hasTag(TYPEVAR) && !classExpected && !interfaceExpected) {
             // check that type variable is already visible
             if (t.getUpperBound() == null) {
-                log.error(pos, "illegal.forward.ref");
+                log.error(pos, Errors.IllegalForwardRef);
                 return types.createErrorType(t);
             }
         } else {
             t = chk.checkClassType(pos, t, checkExtensible);
         }
         if (interfaceExpected && (t.tsym.flags() & INTERFACE) == 0) {
-            log.error(pos, "intf.expected.here");
+            log.error(pos, Errors.IntfExpectedHere);
             // return errType is necessary since otherwise there might
             // be undetected cycles which cause attribution to loop
             return types.createErrorType(t);
         } else if (checkExtensible &&
                    classExpected &&
                    (t.tsym.flags() & INTERFACE) != 0) {
-            log.error(pos, "no.intf.expected.here");
+            log.error(pos, Errors.NoIntfExpectedHere);
             return types.createErrorType(t);
         }
         if (checkExtensible &&
             ((t.tsym.flags() & FINAL) != 0)) {
             log.error(pos,
-                      "cant.inherit.from.final", t.tsym);
+                      Errors.CantInheritFromFinal(t.tsym));
         }
         chk.checkNonCyclic(pos, t);
         return t;
@@ -980,7 +980,7 @@
             chk.checkOverride(env, tree, m);
 
             if (isDefaultMethod && types.overridesObjectMethod(m.enclClass(), m)) {
-                log.error(tree, "default.overrides.object.member", m.name, Kinds.kindName(m.location()), m.location());
+                log.error(tree, Errors.DefaultOverridesObjectMember(m.name, Kinds.kindName(m.location()), m.location()));
             }
 
             // Enter all type parameters into the local method scope.
@@ -994,7 +994,7 @@
                 log.error(tree.params.nonEmpty() ?
                         tree.params.head.pos() :
                         tree.recvparam.pos(),
-                        "intf.annotation.members.cant.have.params");
+                        Errors.IntfAnnotationMembersCantHaveParams);
 
             // Attribute all value parameters.
             for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
@@ -1025,12 +1025,12 @@
                 // annotation method cannot have throws clause
                 if (tree.thrown.nonEmpty()) {
                     log.error(tree.thrown.head.pos(),
-                            "throws.not.allowed.in.intf.annotation");
+                              Errors.ThrowsNotAllowedInIntfAnnotation);
                 }
                 // annotation method cannot declare type-parameters
                 if (tree.typarams.nonEmpty()) {
                     log.error(tree.typarams.head.pos(),
-                            "intf.annotation.members.cant.have.type.params");
+                              Errors.IntfAnnotationMembersCantHaveTypeParams);
                 }
                 // validate annotation method's return type (could be an annotation type)
                 chk.validateAnnotationType(tree.restype);
@@ -1048,18 +1048,18 @@
                 if (tree.defaultValue != null) {
                     if ((owner.flags() & ANNOTATION) == 0)
                         log.error(tree.pos(),
-                                  "default.allowed.in.intf.annotation.member");
+                                  Errors.DefaultAllowedInIntfAnnotationMember);
                 }
                 if (isDefaultMethod || (tree.sym.flags() & (ABSTRACT | NATIVE)) == 0)
-                    log.error(tree.pos(), "missing.meth.body.or.decl.abstract");
+                    log.error(tree.pos(), Errors.MissingMethBodyOrDeclAbstract);
             } else if ((tree.sym.flags() & (ABSTRACT|DEFAULT|PRIVATE)) == ABSTRACT) {
                 if ((owner.flags() & INTERFACE) != 0) {
-                    log.error(tree.body.pos(), "intf.meth.cant.have.body");
+                    log.error(tree.body.pos(), Errors.IntfMethCantHaveBody);
                 } else {
-                    log.error(tree.pos(), "abstract.meth.cant.have.body");
+                    log.error(tree.pos(), Errors.AbstractMethCantHaveBody);
                 }
             } else if ((tree.mods.flags & NATIVE) != 0) {
-                log.error(tree.pos(), "native.meth.cant.have.body");
+                log.error(tree.pos(), Errors.NativeMethCantHaveBody);
             } else {
                 // Add an implicit super() call unless an explicit call to
                 // super(...) or this(...) is given
@@ -1081,8 +1081,7 @@
                         // in enum constructors, except in the compiler
                         // generated one.
                         log.error(tree.body.stats.head.pos(),
-                                "call.to.super.not.allowed.in.enum.ctor",
-                                env.enclClass.sym);
+                                  Errors.CallToSuperNotAllowedInEnumCtor(env.enclClass.sym));
                     }
                 }
 
@@ -1252,9 +1251,8 @@
                 Type base = types.asSuper(exprType, syms.iterableType.tsym);
                 if (base == null) {
                     log.error(tree.expr.pos(),
-                            "foreach.not.applicable.to.type",
-                            exprType,
-                            diags.fragment("type.req.array.or.iterable"));
+                              Errors.ForeachNotApplicableToType(exprType,
+                                                                Fragments.TypeReqArrayOrIterable));
                     elemtype = types.createErrorType(exprType);
                 } else {
                     List<Type> iterableParams = base.allparams();
@@ -1279,8 +1277,8 @@
         while (env1 != null && !env1.tree.hasTag(CLASSDEF)) {
             if (env1.tree.hasTag(LABELLED) &&
                 ((JCLabeledStatement) env1.tree).label == tree.label) {
-                log.error(tree.pos(), "label.already.in.use",
-                          tree.label);
+                log.error(tree.pos(),
+                          Errors.LabelAlreadyInUse(tree.label));
                 break;
             }
             env1 = env1.next;
@@ -1301,7 +1299,7 @@
             boolean enumSwitch = (seltype.tsym.flags() & Flags.ENUM) != 0;
             boolean stringSwitch = types.isSameType(seltype, syms.stringType);
             if (stringSwitch && !allowStringsInSwitch) {
-                log.error(DiagnosticFlag.SOURCE_LEVEL, tree.selector.pos(), "string.switch.not.supported.in.source", sourceName);
+                log.error(DiagnosticFlag.SOURCE_LEVEL, tree.selector.pos(), Errors.StringSwitchNotSupportedInSource(sourceName));
             }
             if (!enumSwitch && !stringSwitch)
                 seltype = chk.checkType(tree.selector.pos(), seltype, syms.intType);
@@ -1316,9 +1314,9 @@
                     if (enumSwitch) {
                         Symbol sym = enumConstant(c.pat, seltype);
                         if (sym == null) {
-                            log.error(c.pat.pos(), "enum.label.must.be.unqualified.enum");
+                            log.error(c.pat.pos(), Errors.EnumLabelMustBeUnqualifiedEnum);
                         } else if (!labels.add(sym)) {
-                            log.error(c.pos(), "duplicate.case.label");
+                            log.error(c.pos(), Errors.DuplicateCaseLabel);
                         }
                     } else {
                         Type pattype = attribExpr(c.pat, switchEnv, seltype);
@@ -1327,12 +1325,12 @@
                                 log.error(c.pat.pos(),
                                           (stringSwitch ? "string.const.req" : "const.expr.req"));
                             } else if (!labels.add(pattype.constValue())) {
-                                log.error(c.pos(), "duplicate.case.label");
+                                log.error(c.pos(), Errors.DuplicateCaseLabel);
                             }
                         }
                     }
                 } else if (hasDefault) {
-                    log.error(c.pos(), "duplicate.default.label");
+                    log.error(c.pos(), Errors.DuplicateDefaultLabel);
                 } else {
                     hasDefault = true;
                 }
@@ -1401,7 +1399,7 @@
                     CheckContext twrContext = new Check.NestedCheckContext(resultInfo.checkContext) {
                         @Override
                         public void report(DiagnosticPosition pos, JCDiagnostic details) {
-                            chk.basicHandler.report(pos, diags.fragment("try.not.applicable.to.type", details));
+                            chk.basicHandler.report(pos, diags.fragment(Fragments.TryNotApplicableToType(details)));
                         }
                     };
                     ResultInfo twrResult =
@@ -1481,7 +1479,7 @@
                     close.overrides(syms.autoCloseableClose, resource.tsym, types, true) &&
                     chk.isHandled(syms.interruptedExceptionType, types.memberType(resource, close).getThrownTypes()) &&
                     env.info.lint.isEnabled(LintCategory.TRY)) {
-                log.warning(LintCategory.TRY, pos, "try.resource.throws.interrupted.exc", resource);
+                log.warning(LintCategory.TRY, pos, Warnings.TryResourceThrowsInterruptedExc(resource));
             }
         }
     }
@@ -1496,7 +1494,7 @@
 
         if (tree.polyKind == PolyKind.POLY && resultInfo.pt.hasTag(VOID)) {
             //this means we are returning a poly conditional from void-compatible lambda expression
-            resultInfo.checkContext.report(tree, diags.fragment("conditional.target.cant.be.void"));
+            resultInfo.checkContext.report(tree, diags.fragment(Fragments.ConditionalTargetCantBeVoid));
             result = tree.type = types.createErrorType(resultInfo.pt);
             return;
         }
@@ -1574,7 +1572,7 @@
                 //depending on whether boxing is allowed, we could have incompatibilities
                 @Override
                 public void report(DiagnosticPosition pos, JCDiagnostic details) {
-                    enclosingContext.report(pos, diags.fragment("incompatible.type.in.conditional", details));
+                    enclosingContext.report(pos, diags.fragment(Fragments.IncompatibleTypeInConditional(details)));
                 }
             };
         }
@@ -1640,8 +1638,9 @@
                 return thentype.baseType();
 
             if (thentype.hasTag(VOID) || elsetype.hasTag(VOID)) {
-                log.error(pos, "neither.conditional.subtype",
-                          thentype, elsetype);
+                log.error(pos,
+                          Errors.NeitherConditionalSubtype(thentype,
+                                                           elsetype));
                 return thentype.baseType();
             }
 
@@ -1720,7 +1719,7 @@
                                         !labelled.body.hasTag(WHILELOOP) &&
                                         !labelled.body.hasTag(FORLOOP) &&
                                         !labelled.body.hasTag(FOREACHLOOP))
-                                    log.error(pos, "not.loop.label", label);
+                                    log.error(pos, Errors.NotLoopLabel(label));
                                 // Found labelled statement target, now go inwards
                                 // to next non-labelled tree.
                                 return TreeInfo.referencedStatement(labelled);
@@ -1747,11 +1746,11 @@
                 env1 = env1.next;
             }
             if (label != null)
-                log.error(pos, "undef.label", label);
+                log.error(pos, Errors.UndefLabel(label));
             else if (tag == CONTINUE)
-                log.error(pos, "cont.outside.loop");
+                log.error(pos, Errors.ContOutsideLoop);
             else
-                log.error(pos, "break.outside.switch.loop");
+                log.error(pos, Errors.BreakOutsideSwitchLoop);
             return null;
         }
 
@@ -1759,20 +1758,20 @@
         // Check that there is an enclosing method which is
         // nested within than the enclosing class.
         if (env.info.returnResult == null) {
-            log.error(tree.pos(), "ret.outside.meth");
+            log.error(tree.pos(), Errors.RetOutsideMeth);
         } else {
             // Attribute return expression, if it exists, and check that
             // it conforms to result type of enclosing method.
             if (tree.expr != null) {
                 if (env.info.returnResult.pt.hasTag(VOID)) {
                     env.info.returnResult.checkContext.report(tree.expr.pos(),
-                              diags.fragment("unexpected.ret.val"));
+                              diags.fragment(Fragments.UnexpectedRetVal));
                 }
                 attribTree(tree.expr, env, env.info.returnResult);
             } else if (!env.info.returnResult.pt.hasTag(VOID) &&
                     !env.info.returnResult.pt.hasTag(NONE)) {
                 env.info.returnResult.checkContext.report(tree.pos(),
-                              diags.fragment("missing.ret.val"));
+                              diags.fragment(Fragments.MissingRetVal(env.info.returnResult.pt)));
             }
         }
         result = null;
@@ -1834,7 +1833,7 @@
                 Type site = env.enclClass.sym.type;
                 if (methName == names._super) {
                     if (site == syms.objectType) {
-                        log.error(tree.meth.pos(), "no.superclass", site);
+                        log.error(tree.meth.pos(), Errors.NoSuperclass(site));
                         site = types.createErrorType(syms.objectType);
                     } else {
                         site = types.supertype(site);
@@ -1865,8 +1864,8 @@
                                                    localEnv, site, true);
                         }
                     } else if (tree.meth.hasTag(SELECT)) {
-                        log.error(tree.meth.pos(), "illegal.qual.not.icls",
-                                  site.tsym);
+                        log.error(tree.meth.pos(),
+                                  Errors.IllegalQualNotIcls(site.tsym));
                     }
 
                     // if we're calling a java.lang.Enum constructor,
@@ -1968,8 +1967,8 @@
                     ((JCExpressionStatement) body.stats.head).expr == tree)
                     return true;
             }
-            log.error(tree.pos(),"call.must.be.first.stmt.in.ctor",
-                      TreeInfo.name(tree.meth));
+            log.error(tree.pos(),
+                      Errors.CallMustBeFirstStmtInCtor(TreeInfo.name(tree.meth)));
             return false;
         }
 
@@ -2080,9 +2079,9 @@
             }
             if (!clazztype.isErroneous()) {
                 if (cdef != null && clazztype.tsym.isInterface()) {
-                    log.error(tree.encl.pos(), "anon.class.impl.intf.no.qual.for.new");
+                    log.error(tree.encl.pos(), Errors.AnonClassImplIntfNoQualForNew);
                 } else if (clazztype.tsym.isStatic()) {
-                    log.error(tree.encl.pos(), "qualified.new.of.static.class", clazztype.tsym);
+                    log.error(tree.encl.pos(), Errors.QualifiedNewOfStaticClass(clazztype.tsym));
                 }
             }
         } else if (!clazztype.tsym.isInterface() &&
@@ -2105,7 +2104,7 @@
                 (!env.tree.hasTag(VARDEF) ||
                  (((JCVariableDecl) env.tree).mods.flags & Flags.ENUM) == 0 ||
                  ((JCVariableDecl) env.tree).init != tree))
-                log.error(tree.pos(), "enum.cant.be.instantiated");
+                log.error(tree.pos(), Errors.EnumCantBeInstantiated);
 
             boolean isSpeculativeDiamondInferenceRound = TreeInfo.isDiamond(tree) &&
                     resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.SPECULATIVE;
@@ -2113,17 +2112,17 @@
             // Check that class is not abstract
             if (cdef == null && !isSpeculativeDiamondInferenceRound && // class body may be nulled out in speculative tree copy
                 (clazztype.tsym.flags() & (ABSTRACT | INTERFACE)) != 0) {
-                log.error(tree.pos(), "abstract.cant.be.instantiated",
-                          clazztype.tsym);
+                log.error(tree.pos(),
+                          Errors.AbstractCantBeInstantiated(clazztype.tsym));
                 skipNonDiamondPath = true;
             } else if (cdef != null && clazztype.tsym.isInterface()) {
                 // Check that no constructor arguments are given to
                 // anonymous classes implementing an interface
                 if (!argtypes.isEmpty())
-                    log.error(tree.args.head.pos(), "anon.class.impl.intf.no.args");
+                    log.error(tree.args.head.pos(), Errors.AnonClassImplIntfNoArgs);
 
                 if (!typeargtypes.isEmpty())
-                    log.error(tree.typeargs.head.pos(), "anon.class.impl.intf.no.typeargs");
+                    log.error(tree.typeargs.head.pos(), Errors.AnonClassImplIntfNoTypeargs);
 
                 // Error recovery: pretend no arguments were supplied.
                 argtypes = List.nil();
@@ -2342,7 +2341,7 @@
                 @Override
                 public void report(DiagnosticPosition _unused, JCDiagnostic details) {
                     enclosingContext.report(clazz.clazz,
-                            diags.fragment("cant.apply.diamond.1", diags.fragment("diamond", tsym), details));
+                            diags.fragment(Fragments.CantApplyDiamond1(Fragments.Diamond(tsym), details)));
                 }
             };
         }
@@ -2383,8 +2382,8 @@
                 elemtype = types.elemtype(pt());
             } else {
                 if (!pt().hasTag(ERROR)) {
-                    log.error(tree.pos(), "illegal.initializer.for.type",
-                              pt());
+                    log.error(tree.pos(),
+                              Errors.IllegalInitializerForType(pt()));
                 }
                 elemtype = types.createErrorType(pt());
             }
@@ -2394,7 +2393,7 @@
             owntype = new ArrayType(elemtype, syms.arrayClass);
         }
         if (!types.isReifiable(elemtype))
-            log.error(tree.pos(), "generic.array.creation");
+            log.error(tree.pos(), Errors.GenericArrayCreation);
         result = check(tree, owntype, KindSelector.VAL, resultInfo);
     }
 
@@ -2409,7 +2408,7 @@
         if (pt().isErroneous() || (pt().hasTag(NONE) && pt() != Type.recoveryType)) {
             if (pt().hasTag(NONE)) {
                 //lambda only allowed in assignment or method invocation/cast context
-                log.error(that.pos(), "unexpected.lambda");
+                log.error(that.pos(), Errors.UnexpectedLambda);
             }
             result = that.type = types.createErrorType(pt());
             return;
@@ -2443,8 +2442,10 @@
 
             if (lambdaType.hasTag(FORALL)) {
                 //lambda expression target desc cannot be a generic method
-                resultInfo.checkContext.report(that, diags.fragment("invalid.generic.lambda.target",
-                        lambdaType, kindName(currentTarget.tsym), currentTarget.tsym));
+                Fragment msg = Fragments.InvalidGenericLambdaTarget(lambdaType,
+                                                                    kindName(currentTarget.tsym),
+                                                                    currentTarget.tsym);
+                resultInfo.checkContext.report(that, diags.fragment(msg));
                 result = that.type = types.createErrorType(pt());
                 return;
             }
@@ -2477,7 +2478,7 @@
                 attribStats(that.params, localEnv);
 
                 if (arityMismatch) {
-                    resultInfo.checkContext.report(that, diags.fragment("incompatible.arg.types.in.lambda"));
+                    resultInfo.checkContext.report(that, diags.fragment(Fragments.IncompatibleArgTypesInLambda));
                         result = that.type = types.createErrorType(currentTarget);
                         return;
                 }
@@ -2576,8 +2577,10 @@
             }
             if (that.hasTag(LAMBDA) && lambdaType.hasTag(FORALL)) {
                 //lambda expression target desc cannot be a generic method
-                resultInfo.checkContext.report(that, diags.fragment("invalid.generic.lambda.target",
-                        lambdaType, kindName(currentTarget.tsym), currentTarget.tsym));
+                Fragment msg = Fragments.InvalidGenericLambdaTarget(lambdaType,
+                                                                    kindName(currentTarget.tsym),
+                                                                    currentTarget.tsym);
+                resultInfo.checkContext.report(that, diags.fragment(msg));
                 currentTarget = types.createErrorType(pt());
             }
             return new TargetInfo(currentTarget, lambdaType);
@@ -2640,8 +2643,8 @@
             }
 
             private void reportIntersectionError(DiagnosticPosition pos, String key, Object... args) {
-                resultInfo.checkContext.report(pos, diags.fragment("bad.intersection.target.for.functional.expr",
-                        diags.fragment(key, args)));
+                resultInfo.checkContext.report(pos,
+                                               diags.fragment(Fragments.BadIntersectionTargetForFunctionalExpr(diags.fragment(key, args))));
             }
         };
 
@@ -2703,7 +2706,7 @@
 
             @Override
             public void report(DiagnosticPosition pos, JCDiagnostic details) {
-                enclosingContext.report(pos, diags.fragment("incompatible.ret.type.in.lambda", details));
+                enclosingContext.report(pos, diags.fragment(Fragments.IncompatibleRetTypeInLambda(details)));
             }
         }
 
@@ -2764,13 +2767,15 @@
             //the descriptor's return type must be void
             if (tree.getBodyKind() == JCLambda.BodyKind.STATEMENT && tree.canCompleteNormally &&
                     !returnType.hasTag(VOID) && returnType != Type.recoveryType) {
-                checkContext.report(tree, diags.fragment("incompatible.ret.type.in.lambda",
-                        diags.fragment("missing.ret.val", returnType)));
+                Fragment msg =
+                        Fragments.IncompatibleRetTypeInLambda(Fragments.MissingRetVal(returnType));
+                checkContext.report(tree,
+                                    diags.fragment(msg));
             }
 
             List<Type> argTypes = checkContext.inferenceContext().asUndetVars(descriptor.getParameterTypes());
             if (!types.isSameTypes(argTypes, TreeInfo.types(tree.params))) {
-                checkContext.report(tree, diags.fragment("incompatible.arg.types.in.lambda"));
+                checkContext.report(tree, diags.fragment(Fragments.IncompatibleArgTypesInLambda));
             }
         }
 
@@ -2841,7 +2846,7 @@
         if (pt().isErroneous() || (pt().hasTag(NONE) && pt() != Type.recoveryType)) {
             if (pt().hasTag(NONE)) {
                 //method reference only allowed in assignment or method invocation/cast context
-                log.error(that.pos(), "unexpected.mref");
+                log.error(that.pos(), Errors.UnexpectedMref);
             }
             result = that.type = types.createErrorType(pt());
             return;
@@ -2857,8 +2862,9 @@
                 if (!exprType.isErroneous() &&
                     exprType.isRaw() &&
                     that.typeargs != null) {
-                    log.error(that.expr.pos(), "invalid.mref", Kinds.kindName(that.getMode()),
-                        diags.fragment("mref.infer.and.explicit.params"));
+                    log.error(that.expr.pos(),
+                              Errors.InvalidMref(Kinds.kindName(that.getMode()),
+                                                 Fragments.MrefInferAndExplicitParams));
                     exprType = types.createErrorType(exprType);
                 }
             }
@@ -2990,8 +2996,9 @@
                 if (that.sym.isStatic() && TreeInfo.isStaticSelector(that.expr, names) &&
                         exprType.getTypeArguments().nonEmpty()) {
                     //static ref with class type-args
-                    log.error(that.expr.pos(), "invalid.mref", Kinds.kindName(that.getMode()),
-                            diags.fragment("static.mref.with.targs"));
+                    log.error(that.expr.pos(),
+                              Errors.InvalidMref(Kinds.kindName(that.getMode()),
+                                                 Fragments.StaticMrefWithTargs));
                     result = that.type = types.createErrorType(currentTarget);
                     return;
                 }
@@ -3088,8 +3095,9 @@
         }
 
         if (incompatibleReturnType != null) {
-            checkContext.report(tree, diags.fragment("incompatible.ret.type.in.mref",
-                    diags.fragment("inconvertible.types", resType, descriptor.getReturnType())));
+            Fragment msg =
+                    Fragments.IncompatibleRetTypeInMref(Fragments.InconvertibleTypes(resType, descriptor.getReturnType()));
+            checkContext.report(tree, diags.fragment(msg));
         } else {
             if (inferenceContext.free(refType)) {
                 // we need to wait for inference to finish and then replace inference vars in the referent type
@@ -3105,7 +3113,7 @@
         if (!speculativeAttr) {
             List<Type> thrownTypes = inferenceContext.asUndetVars(descriptor.getThrownTypes());
             if (chk.unhandled(refType.getThrownTypes(), thrownTypes).nonEmpty()) {
-                log.error(tree, "incompatible.thrown.types.in.mref", refType.getThrownTypes());
+                log.error(tree, Errors.IncompatibleThrownTypesInMref(refType.getThrownTypes()));
             }
             //18.2.5: "In addition, for all j (1 <= j <= n), the constraint reduces to the bound throws Ej"
             thrownTypes.stream()
@@ -3176,7 +3184,7 @@
         result = check(tree, owntype, pkind(), resultInfo);
         Symbol sym = TreeInfo.symbol(tree);
         if (sym != null && sym.kind.matches(KindSelector.TYP_PCK))
-            log.error(tree.pos(), "illegal.start.of.type");
+            log.error(tree.pos(), Errors.IllegalStartOfType);
     }
 
     public void visitAssign(JCAssign tree) {
@@ -3255,7 +3263,7 @@
             // comparisons will not have an acmp* opc at this point.
             if ((opc == ByteCodes.if_acmpeq || opc == ByteCodes.if_acmpne)) {
                 if (!types.isCastable(left, right, new Warner(tree.pos()))) {
-                    log.error(tree.pos(), "incomparable.types", left, right);
+                    log.error(tree.pos(), Errors.IncomparableTypes(left, right));
                 }
             }
 
@@ -3304,7 +3312,7 @@
             clazztype = chk.checkClassOrArrayType(tree.clazz.pos(), clazztype);
         }
         if (!clazztype.isErroneous() && !types.isReifiable(clazztype)) {
-            log.error(tree.clazz.pos(), "illegal.generic.type.for.instof");
+            log.error(tree.clazz.pos(), Errors.IllegalGenericTypeForInstof);
             clazztype = types.createErrorType(clazztype);
         }
         chk.validate(tree.clazz, env, false);
@@ -3319,7 +3327,7 @@
         if (types.isArray(atype))
             owntype = types.elemtype(atype);
         else if (!atype.hasTag(ERROR))
-            log.error(tree.pos(), "array.req.but.found", atype);
+            log.error(tree.pos(), Errors.ArrayReqButFound(atype));
         if (!pkind().contains(KindSelector.VAL))
             owntype = capture(owntype);
         result = check(tree, owntype, KindSelector.VAR, resultInfo);
@@ -3432,7 +3440,7 @@
             while (elt.hasTag(ARRAY))
                 elt = ((ArrayType)elt).elemtype;
             if (elt.hasTag(TYPEVAR)) {
-                log.error(tree.pos(), "type.var.cant.be.deref");
+                log.error(tree.pos(), Errors.TypeVarCantBeDeref);
                 result = tree.type = types.createErrorType(tree.name, site.tsym, site);
                 tree.sym = tree.type.tsym;
                 return ;
@@ -3452,7 +3460,7 @@
         env.info.pendingResolutionPhase = null;
         Symbol sym = selectSym(tree, sitesym, site, env, resultInfo);
         if (sym.kind == VAR && sym.name != names._super && env.info.defaultSuperCallSite != null) {
-            log.error(tree.selected.pos(), "not.encl.class", site.tsym);
+            log.error(tree.selected.pos(), Errors.NotEnclClass(site.tsym));
             sym = syms.errSymbol;
         }
         if (sym.exists() && !isType(sym) && pkind().contains(KindSelector.TYP_PCK)) {
@@ -3487,7 +3495,7 @@
                 sym.name.equals(names.close) &&
                 sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true) &&
                 env.info.lint.isEnabled(LintCategory.TRY)) {
-            log.warning(LintCategory.TRY, tree, "try.explicit.close.call");
+            log.warning(LintCategory.TRY, tree, Warnings.TryExplicitCloseCall);
         }
 
         // Disallow selecting a type from an expression
@@ -3517,7 +3525,7 @@
             }
             if (!allowStaticInterfaceMethods && sitesym.isInterface() &&
                     sym.isStatic() && sym.kind == MTH) {
-                log.error(DiagnosticFlag.SOURCE_LEVEL, tree.pos(), "static.intf.method.invoke.not.supported.in.source", sourceName);
+                log.error(DiagnosticFlag.SOURCE_LEVEL, tree.pos(), Errors.StaticIntfMethodInvokeNotSupportedInSource(sourceName));
             }
         } else if (sym.kind != ERR &&
                    (sym.flags() & STATIC) != 0 &&
@@ -3602,7 +3610,7 @@
                     ? selectSym(tree, location, capture(site.getUpperBound()), env, resultInfo)
                     : null;
                 if (sym == null) {
-                    log.error(pos, "type.var.cant.be.deref");
+                    log.error(pos, Errors.TypeVarCantBeDeref);
                     return syms.errSymbol;
                 } else {
                     Symbol sym2 = (sym.flags() & Flags.PRIVATE) != 0 ?
@@ -3626,7 +3634,7 @@
                     return new VarSymbol(
                         STATIC | PUBLIC | FINAL, names._class, t, site.tsym);
                 } else {
-                    log.error(pos, "cant.deref", site);
+                    log.error(pos, Errors.CantDeref(site));
                     return syms.errSymbol;
                 }
             }
@@ -3926,7 +3934,7 @@
                 if (!Resolve.isInitializer(env))
                     return;
 
-                log.error(tree.pos(), "illegal.enum.static.ref");
+                log.error(tree.pos(), Errors.IllegalEnumStaticRef);
             }
         }
 
@@ -3973,8 +3981,8 @@
                 if (icand_sup.nonEmpty() &&
                         icand_sup.head != sym &&
                         icand_sup.head.overrides(sym, icand_sup.head.enclClass(), types, true)) {
-                    log.error(env.tree.pos(), "illegal.default.super.call", env.info.defaultSuperCallSite,
-                        diags.fragment("overridden.default", sym, sup));
+                    log.error(env.tree.pos(),
+                              Errors.IllegalDefaultSuperCall(env.info.defaultSuperCallSite, Fragments.OverriddenDefault(sym, sup)));
                     break;
                 }
             }
@@ -3985,7 +3993,7 @@
             JCMethodInvocation app = (JCMethodInvocation)env.tree;
             if (app.meth.hasTag(SELECT) &&
                     !TreeInfo.isStaticSelector(((JCFieldAccess)app.meth).selected, names)) {
-                log.error(env.tree.pos(), "illegal.static.intf.meth.call", site);
+                log.error(env.tree.pos(), Errors.IllegalStaticIntfMethCall(site));
             }
         }
 
@@ -4130,10 +4138,10 @@
                                         clazztype.getMetadata());
             } else {
                 if (formals.length() != 0) {
-                    log.error(tree.pos(), "wrong.number.type.args",
-                              Integer.toString(formals.length()));
+                    log.error(tree.pos(),
+                              Errors.WrongNumberTypeArgs(Integer.toString(formals.length())));
                 } else {
-                    log.error(tree.pos(), "type.doesnt.take.params", clazztype.tsym);
+                    log.error(tree.pos(), Errors.TypeDoesntTakeParams(clazztype.tsym));
                 }
                 owntype = types.createErrorType(tree.type);
             }
@@ -4160,7 +4168,7 @@
                             //assume 'a' <: 'b'
                             Type a = sub ? ctype : t;
                             Type b = sub ? t : ctype;
-                            log.error(typeTree.pos(), "multicatch.types.must.be.disjoint", a, b);
+                            log.error(typeTree.pos(), Errors.MulticatchTypesMustBeDisjoint(a, b));
                         }
                     }
                 }
@@ -4216,7 +4224,7 @@
                 // if first bound was a typevar, do not accept further bounds.
                 if (bounds.tail.nonEmpty()) {
                     log.error(bounds.tail.head.pos(),
-                              "type.var.may.not.be.followed.by.other.bounds");
+                              Errors.TypeVarMayNotBeFollowedByOtherBounds);
                     return bounds.head.type;
                 }
             } else {
@@ -4438,13 +4446,13 @@
                 // java.lang.Enum may not be subclassed by a non-enum
                 if (st.tsym == syms.enumSym &&
                     ((c.flags_field & (Flags.ENUM|Flags.COMPOUND)) == 0))
-                    log.error(env.tree.pos(), "enum.no.subclassing");
+                    log.error(env.tree.pos(), Errors.EnumNoSubclassing);
 
                 // Enums may not be extended by source-level classes
                 if (st.tsym != null &&
                     ((st.tsym.flags_field & Flags.ENUM) != 0) &&
                     ((c.flags_field & (Flags.ENUM | Flags.COMPOUND)) == 0)) {
-                    log.error(env.tree.pos(), "enum.types.not.extensible");
+                    log.error(env.tree.pos(), Errors.EnumTypesNotExtensible);
                 }
 
                 if (isSerializable(c.type)) {
@@ -4510,10 +4518,11 @@
         if ((c.flags() & ANNOTATION) != 0) {
             if (tree.implementing.nonEmpty())
                 log.error(tree.implementing.head.pos(),
-                          "cant.extend.intf.annotation");
-            if (tree.typarams.nonEmpty())
+                          Errors.CantExtendIntfAnnotation);
+            if (tree.typarams.nonEmpty()) {
                 log.error(tree.typarams.head.pos(),
-                          "intf.annotation.cant.have.type.params");
+                          Errors.IntfAnnotationCantHaveTypeParams(c));
+            }
 
             // If this annotation type has a @Repeatable, validate
             Attribute.Compound repeatable = c.getAnnotationTypeMetadata().getRepeatable();
@@ -4548,7 +4557,7 @@
 
         // Check that a generic class doesn't extend Throwable
         if (!c.type.allparams().isEmpty() && types.isSubtype(c.type, syms.throwableType))
-            log.error(tree.extending.pos(), "generic.throwable");
+            log.error(tree.extending.pos(), Errors.GenericThrowable);
 
         // Check that all methods which implement some
         // method conform to the method they implement.
@@ -4570,7 +4579,7 @@
                 if (sym == null ||
                     sym.kind != VAR ||
                     ((VarSymbol) sym).getConstValue() == null)
-                    log.error(l.head.pos(), "icls.cant.have.static.decl", c);
+                    log.error(l.head.pos(), Errors.IclsCantHaveStaticDecl(c));
             }
         }
 
@@ -4643,7 +4652,7 @@
 
             if (svuid == null) {
                 log.warning(LintCategory.SERIAL,
-                        tree.pos(), "missing.SVUID", c);
+                        tree.pos(), Warnings.MissingSVUID(c));
                 return;
             }
 
@@ -4651,17 +4660,17 @@
             if ((svuid.flags() & (STATIC | FINAL)) !=
                 (STATIC | FINAL))
                 log.warning(LintCategory.SERIAL,
-                        TreeInfo.diagnosticPositionFor(svuid, tree), "improper.SVUID", c);
+                        TreeInfo.diagnosticPositionFor(svuid, tree), Warnings.ImproperSVUID(c));
 
             // check that it is long
             else if (!svuid.type.hasTag(LONG))
                 log.warning(LintCategory.SERIAL,
-                        TreeInfo.diagnosticPositionFor(svuid, tree), "long.SVUID", c);
+                        TreeInfo.diagnosticPositionFor(svuid, tree), Warnings.LongSVUID(c));
 
             // check constant
             else if (svuid.getConstValue() == null)
                 log.warning(LintCategory.SERIAL,
-                        TreeInfo.diagnosticPositionFor(svuid, tree), "constant.SVUID", c);
+                        TreeInfo.diagnosticPositionFor(svuid, tree), Warnings.ConstantSVUID(c));
         }
 
     private Type capture(Type type) {
@@ -4831,13 +4840,13 @@
                     JCAnnotatedType at = (JCTree.JCAnnotatedType) enclTr;
                     if (enclTy == null || enclTy.hasTag(NONE)) {
                         if (at.getAnnotations().size() == 1) {
-                            log.error(at.underlyingType.pos(), "cant.type.annotate.scoping.1", at.getAnnotations().head.attribute);
+                            log.error(at.underlyingType.pos(), Errors.CantTypeAnnotateScoping1(at.getAnnotations().head.attribute));
                         } else {
                             ListBuffer<Attribute.Compound> comps = new ListBuffer<>();
                             for (JCAnnotation an : at.getAnnotations()) {
                                 comps.add(an.attribute);
                             }
-                            log.error(at.underlyingType.pos(), "cant.type.annotate.scoping", comps.toList());
+                            log.error(at.underlyingType.pos(), Errors.CantTypeAnnotateScoping(comps.toList()));
                         }
                         repeat = false;
                     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Tue Jun 27 16:00:14 2017 -0400
@@ -42,6 +42,7 @@
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+import com.sun.tools.javac.util.JCDiagnostic.Fragment;
 import com.sun.tools.javac.util.List;
 
 import com.sun.tools.javac.code.Lint;
@@ -269,7 +270,7 @@
      */
     void warnDivZero(DiagnosticPosition pos) {
         if (lint.isEnabled(LintCategory.DIVZERO))
-            log.warning(LintCategory.DIVZERO, pos, "div.zero");
+            log.warning(LintCategory.DIVZERO, pos, Warnings.DivZero);
     }
 
     /**
@@ -288,7 +289,7 @@
      *  @param ex         The failure to report.
      */
     public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
-        log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, "cant.access", ex.sym, ex.getDetailValue());
+        log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, pos, Errors.CantAccess(ex.sym, ex.getDetailValue()));
         if (ex instanceof ClassFinder.BadClassFile) throw new Abort();
         else return syms.errType;
     }
@@ -299,14 +300,14 @@
      *                    required.
      *  @param found      The type that was found.
      */
-    Type typeTagError(DiagnosticPosition pos, Object required, Object found) {
+    Type typeTagError(DiagnosticPosition pos, JCDiagnostic required, Object found) {
         // this error used to be raised by the parser,
         // but has been delayed to this point:
         if (found instanceof Type && ((Type)found).hasTag(VOID)) {
-            log.error(pos, "illegal.start.of.type");
+            log.error(pos, Errors.IllegalStartOfType);
             return syms.errType;
         }
-        log.error(pos, "type.found.req", found, required);
+        log.error(pos, Errors.TypeFoundReq(found, required));
         return types.createErrorType(found instanceof Type ? (Type)found : syms.errType);
     }
 
@@ -316,7 +317,7 @@
      *  @param sym        The referenced symbol.
      */
     void earlyRefError(DiagnosticPosition pos, Symbol sym) {
-        log.error(pos, "cant.ref.before.ctor.called", sym);
+        log.error(pos, Errors.CantRefBeforeCtorCalled(sym));
     }
 
     /** Report duplicate declaration error.
@@ -326,12 +327,18 @@
             Symbol location = sym.location();
             if (location.kind == MTH &&
                     ((MethodSymbol)location).isStaticOrInstanceInit()) {
-                log.error(pos, "already.defined.in.clinit", kindName(sym), sym,
-                        kindName(sym.location()), kindName(sym.location().enclClass()),
-                        sym.location().enclClass());
+                log.error(pos,
+                          Errors.AlreadyDefinedInClinit(kindName(sym),
+                                                        sym,
+                                                        kindName(sym.location()),
+                                                        kindName(sym.location().enclClass()),
+                                                        sym.location().enclClass()));
             } else {
-                log.error(pos, "already.defined", kindName(sym), sym,
-                        kindName(sym.location()), sym.location());
+                log.error(pos,
+                          Errors.AlreadyDefined(kindName(sym),
+                                                sym,
+                                                kindName(sym.location()),
+                                                sym.location()));
             }
         }
     }
@@ -340,7 +347,7 @@
      */
     void varargsDuplicateError(DiagnosticPosition pos, Symbol sym1, Symbol sym2) {
         if (!sym1.type.isErroneous() && !sym2.type.isErroneous()) {
-            log.error(pos, "array.and.varargs", sym1, sym2, sym2.location());
+            log.error(pos, Errors.ArrayAndVarargs(sym1, sym2, sym2.location()));
         }
     }
 
@@ -530,7 +537,7 @@
      */
     CheckContext basicHandler = new CheckContext() {
         public void report(DiagnosticPosition pos, JCDiagnostic details) {
-            log.error(pos, "prob.found.req", details);
+            log.error(pos, Errors.ProbFoundReq(details));
         }
         public boolean compatible(Type found, Type req, Warner warn) {
             return types.isAssignable(found, req, warn);
@@ -578,10 +585,10 @@
             return found;
         } else {
             if (found.isNumeric() && req.isNumeric()) {
-                checkContext.report(pos, diags.fragment("possible.loss.of.precision", found, req));
+                checkContext.report(pos, diags.fragment(Fragments.PossibleLossOfPrecision(found, req)));
                 return types.createErrorType(found);
             }
-            checkContext.report(pos, diags.fragment("inconvertible.types", found, req));
+            checkContext.report(pos, diags.fragment(Fragments.InconvertibleTypes(found, req)));
             return types.createErrorType(found);
         }
     }
@@ -599,7 +606,7 @@
         if (types.isCastable(found, req, castWarner(pos, found, req))) {
             return req;
         } else {
-            checkContext.report(pos, diags.fragment("inconvertible.types", found, req));
+            checkContext.report(pos, diags.fragment(Fragments.InconvertibleTypes(found, req)));
             return types.createErrorType(found);
         }
     }
@@ -615,7 +622,7 @@
             deferredLintHandler.report(() -> {
                 if (lint.isEnabled(LintCategory.CAST))
                     log.warning(LintCategory.CAST,
-                            tree.pos(), "redundant.cast", tree.clazz.type);
+                            tree.pos(), Warnings.RedundantCast(tree.clazz.type));
             });
         }
     }
@@ -662,7 +669,7 @@
      */
     Type checkNonVoid(DiagnosticPosition pos, Type t) {
         if (t.hasTag(VOID)) {
-            log.error(pos, "void.not.allowed.here");
+            log.error(pos, Errors.VoidNotAllowedHere);
             return types.createErrorType(t);
         } else {
             return t;
@@ -672,7 +679,7 @@
     Type checkClassOrArrayType(DiagnosticPosition pos, Type t) {
         if (!t.hasTag(CLASS) && !t.hasTag(ARRAY) && !t.hasTag(ERROR)) {
             return typeTagError(pos,
-                                diags.fragment("type.req.class.array"),
+                                diags.fragment(Fragments.TypeReqClassArray),
                                 asTypeParam(t));
         } else {
             return t;
@@ -686,7 +693,7 @@
     Type checkClassType(DiagnosticPosition pos, Type t) {
         if (!t.hasTag(CLASS) && !t.hasTag(ERROR)) {
             return typeTagError(pos,
-                                diags.fragment("type.req.class"),
+                                diags.fragment(Fragments.TypeReqClass),
                                 asTypeParam(t));
         } else {
             return t;
@@ -695,7 +702,7 @@
     //where
         private Object asTypeParam(Type t) {
             return (t.hasTag(TYPEVAR))
-                                    ? diags.fragment("type.parameter", t)
+                                    ? diags.fragment(Fragments.TypeParameter(t))
                                     : t;
         }
 
@@ -705,17 +712,17 @@
         t = checkClassOrArrayType(pos, t);
         if (t.hasTag(CLASS)) {
             if ((t.tsym.flags() & (ABSTRACT | INTERFACE)) != 0) {
-                log.error(pos, "abstract.cant.be.instantiated", t.tsym);
+                log.error(pos, Errors.AbstractCantBeInstantiated(t.tsym));
                 t = types.createErrorType(t);
             } else if ((t.tsym.flags() & ENUM) != 0) {
-                log.error(pos, "enum.cant.be.instantiated");
+                log.error(pos, Errors.EnumCantBeInstantiated);
                 t = types.createErrorType(t);
             } else {
                 t = checkClassType(pos, t, true);
             }
         } else if (t.hasTag(ARRAY)) {
             if (!types.isReifiable(((ArrayType)t).elemtype)) {
-                log.error(pos, "generic.array.creation");
+                log.error(pos, Errors.GenericArrayCreation);
                 t = types.createErrorType(t);
             }
         }
@@ -734,7 +741,7 @@
             while (args.nonEmpty()) {
                 if (args.head.hasTag(WILDCARD))
                     return typeTagError(pos,
-                                        diags.fragment("type.req.exact"),
+                                        diags.fragment(Fragments.TypeReqExact),
                                         args.head);
                 args = args.tail;
             }
@@ -752,7 +759,7 @@
             return t;
         else
             return typeTagError(pos,
-                                diags.fragment("type.req.ref"),
+                                diags.fragment(Fragments.TypeReqRef),
                                 t);
     }
 
@@ -779,7 +786,7 @@
             return t;
         else
             return typeTagError(pos,
-                                diags.fragment("type.req.ref"),
+                                diags.fragment(Fragments.TypeReqRef),
                                 t);
     }
 
@@ -793,9 +800,8 @@
     boolean checkDisjoint(DiagnosticPosition pos, long flags, long set1, long set2) {
         if ((flags & set1) != 0 && (flags & set2) != 0) {
             log.error(pos,
-                      "illegal.combination.of.modifiers",
-                      asFlagSet(TreeInfo.firstFlag(flags & set1)),
-                      asFlagSet(TreeInfo.firstFlag(flags & set2)));
+                      Errors.IllegalCombinationOfModifiers(asFlagSet(TreeInfo.firstFlag(flags & set1)),
+                                                           asFlagSet(TreeInfo.firstFlag(flags & set2))));
             return false;
         } else
             return true;
@@ -815,14 +821,14 @@
             }
             if (t.tsym.type.getTypeArguments().isEmpty()) {
                 log.error(tree.clazz.pos(),
-                    "cant.apply.diamond.1",
-                    t, diags.fragment("diamond.non.generic", t));
+                          Errors.CantApplyDiamond1(t,
+                                                   Fragments.DiamondNonGeneric(t)));
                 return types.createErrorType(t);
             } else if (tree.typeargs != null &&
                     tree.typeargs.nonEmpty()) {
                 log.error(tree.clazz.pos(),
-                    "cant.apply.diamond.1",
-                    t, diags.fragment("diamond.and.explicit.params", t));
+                          Errors.CantApplyDiamond1(t,
+                                                   Fragments.DiamondAndExplicitParams(t)));
                 return types.createErrorType(t);
             } else {
                 return t;
@@ -905,24 +911,23 @@
         }
         if (hasTrustMeAnno && !isTrustMeAllowedOnMethod(m)) {
             if (varargElemType != null) {
+                JCDiagnostic msg = allowPrivateSafeVarargs ?
+                        diags.fragment(Fragments.VarargsTrustmeOnVirtualVarargs(m)) :
+                        diags.fragment(Fragments.VarargsTrustmeOnVirtualVarargsFinalOnly(m));
                 log.error(tree,
-                        "varargs.invalid.trustme.anno",
-                          syms.trustMeType.tsym,
-                          allowPrivateSafeVarargs ?
-                          diags.fragment("varargs.trustme.on.virtual.varargs", m) :
-                          diags.fragment("varargs.trustme.on.virtual.varargs.final.only", m));
+                          Errors.VarargsInvalidTrustmeAnno(syms.trustMeType.tsym,
+                                                           msg));
             } else {
                 log.error(tree,
-                            "varargs.invalid.trustme.anno",
-                            syms.trustMeType.tsym,
-                            diags.fragment("varargs.trustme.on.non.varargs.meth", m));
+                          Errors.VarargsInvalidTrustmeAnno(syms.trustMeType.tsym,
+                                                           Fragments.VarargsTrustmeOnNonVarargsMeth(m)));
             }
         } else if (hasTrustMeAnno && varargElemType != null &&
                             types.isReifiable(varargElemType)) {
             warnUnsafeVararg(tree,
                             "varargs.redundant.trustme.anno",
                             syms.trustMeType.tsym,
-                            diags.fragment("varargs.trustme.on.reifiable.varargs", varargElemType));
+                            diags.fragment(Fragments.VarargsTrustmeOnReifiableVarargs(varargElemType)));
         }
         else if (!hasTrustMeAnno && varargElemType != null &&
                 !types.isReifiable(varargElemType)) {
@@ -986,8 +991,8 @@
                 Type lastArg = argtypes.last();
                 if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
                     !types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
-                    log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
-                                types.elemtype(varParam), varParam);
+                    log.warning(argtrees.last().pos(),
+                                Warnings.InexactNonVarargsCall(types.elemtype(varParam),varParam));
             }
         }
         if (useVarargs) {
@@ -1172,14 +1177,14 @@
                 mask = LocalClassFlags;
                 if ((sym.owner.flags_field & STATIC) == 0 &&
                     (flags & ENUM) != 0)
-                    log.error(pos, "enums.must.be.static");
+                    log.error(pos, Errors.EnumsMustBeStatic);
             } else if (sym.owner.kind == TYP) {
                 mask = MemberClassFlags;
                 if (sym.owner.owner.kind == PCK ||
                     (sym.owner.flags_field & STATIC) != 0)
                     mask |= STATIC;
                 else if ((flags & ENUM) != 0)
-                    log.error(pos, "enums.must.be.static");
+                    log.error(pos, Errors.EnumsMustBeStatic);
                 // Nested interfaces and enums are always STATIC (Spec ???)
                 if ((flags & (INTERFACE | ENUM)) != 0 ) implicit = STATIC;
             } else {
@@ -1202,12 +1207,12 @@
         long illegal = flags & ExtendedStandardFlags & ~mask;
         if (illegal != 0) {
             if ((illegal & INTERFACE) != 0) {
-                log.error(pos, "intf.not.allowed.here");
+                log.error(pos, Errors.IntfNotAllowedHere);
                 mask |= INTERFACE;
             }
             else {
                 log.error(pos,
-                          "mod.not.allowed.here", asFlagSet(illegal));
+                          Errors.ModNotAllowedHere(asFlagSet(illegal)));
             }
         }
         else if ((sym.kind == TYP ||
@@ -1346,7 +1351,7 @@
                 if (incompatibleArg != null) {
                     for (JCTree arg : tree.arguments) {
                         if (arg.type == incompatibleArg) {
-                            log.error(arg, "not.within.bounds", incompatibleArg, forms.head);
+                            log.error(arg, Errors.NotWithinBounds(incompatibleArg, forms.head));
                         }
                         forms = forms.tail;
                      }
@@ -1369,7 +1374,7 @@
                 // Check that this type is either fully parameterized, or
                 // not parameterized at all.
                 if (tree.type.getEnclosingType().isRaw())
-                    log.error(tree.pos(), "improperly.formed.type.inner.raw.param");
+                    log.error(tree.pos(), Errors.ImproperlyFormedTypeInnerRawParam);
                 if (tree.clazz.hasTag(SELECT))
                     visitSelectInternal((JCFieldAccess)tree.clazz);
             }
@@ -1395,7 +1400,7 @@
                 // Check that this type is either fully parameterized, or
                 // not parameterized at all.
                 if (tree.selected.type.isParameterized() && tree.type.tsym.type.getTypeArguments().nonEmpty())
-                    log.error(tree.pos(), "improperly.formed.type.param.missing");
+                    log.error(tree.pos(), Errors.ImproperlyFormedTypeParamMissing);
             }
         }
 
@@ -1405,7 +1410,7 @@
                 // The enclosing type is not a class, so we are
                 // looking at a static member type.  However, the
                 // qualifying expression is parameterized.
-                log.error(tree.pos(), "cant.select.static.class.from.param.type");
+                log.error(tree.pos(), Errors.CantSelectStaticClassFromParamType);
             } else {
                 // otherwise validate the rest of the expression
                 tree.selected.accept(this);
@@ -1420,7 +1425,7 @@
         @Override
         public void visitTypeIdent(JCPrimitiveTypeTree that) {
             if (that.type.hasTag(TypeTag.VOID)) {
-                log.error(that.pos(), "void.not.allowed.here");
+                log.error(that.pos(), Errors.VoidNotAllowedHere);
             }
             super.visitTypeIdent(that);
         }
@@ -1462,7 +1467,7 @@
             !withinAnonConstr(env) &&
             tree.type.isRaw()) {
             log.warning(LintCategory.RAW,
-                    tree.pos(), "raw.class.use", tree.type, tree.type.tsym.type);
+                    tree.pos(), Warnings.RawClassUse(tree.type, tree.type.tsym.type));
         }
     }
     //where
@@ -1613,15 +1618,16 @@
      *  @param other  The overridden method.
      *  @return       An internationalized string.
      */
-    Object cannotOverride(MethodSymbol m, MethodSymbol other) {
-        String key;
+    Fragment cannotOverride(MethodSymbol m, MethodSymbol other) {
+        Symbol mloc = m.location();
+        Symbol oloc = other.location();
+
         if ((other.owner.flags() & INTERFACE) == 0)
-            key = "cant.override";
+            return Fragments.CantOverride(m, mloc, other, oloc);
         else if ((m.owner.flags() & INTERFACE) == 0)
-            key = "cant.implement";
+            return Fragments.CantImplement(m, mloc, other, oloc);
         else
-            key = "clashes.with";
-        return diags.fragment(key, m, m.location(), other, other.location());
+            return Fragments.ClashesWith(m, mloc, other, oloc);
     }
 
     /** A customized "override" warning message.
@@ -1629,15 +1635,16 @@
      *  @param other  The overridden method.
      *  @return       An internationalized string.
      */
-    Object uncheckedOverrides(MethodSymbol m, MethodSymbol other) {
-        String key;
+    Fragment uncheckedOverrides(MethodSymbol m, MethodSymbol other) {
+        Symbol mloc = m.location();
+        Symbol oloc = other.location();
+
         if ((other.owner.flags() & INTERFACE) == 0)
-            key = "unchecked.override";
+            return Fragments.UncheckedOverride(m, mloc, other, oloc);
         else if ((m.owner.flags() & INTERFACE) == 0)
-            key = "unchecked.implement";
+            return Fragments.UncheckedImplement(m, mloc, other, oloc);
         else
-            key = "unchecked.clash.with";
-        return diags.fragment(key, m, m.location(), other, other.location());
+            return Fragments.UncheckedClashWith(m, mloc, other, oloc);
     }
 
     /** A customized "override" warning message.
@@ -1645,15 +1652,16 @@
      *  @param other  The overridden method.
      *  @return       An internationalized string.
      */
-    Object varargsOverrides(MethodSymbol m, MethodSymbol other) {
-        String key;
+    Fragment varargsOverrides(MethodSymbol m, MethodSymbol other) {
+        Symbol mloc = m.location();
+        Symbol oloc = other.location();
+
         if ((other.owner.flags() & INTERFACE) == 0)
-            key = "varargs.override";
+            return Fragments.VarargsOverride(m, mloc, other, oloc);
         else  if ((m.owner.flags() & INTERFACE) == 0)
-            key = "varargs.implement";
+            return Fragments.VarargsImplement(m, mloc, other, oloc);
         else
-            key = "varargs.clash.with";
-        return diags.fragment(key, m, m.location(), other, other.location());
+            return Fragments.VarargsClashWith(m, mloc, other, oloc);
     }
 
     /** Check that this method conforms with overridden method 'other'.
@@ -1689,8 +1697,8 @@
         // Error if static method overrides instance method (JLS 8.4.6.2).
         if ((m.flags() & STATIC) != 0 &&
                    (other.flags() & STATIC) == 0) {
-            log.error(TreeInfo.diagnosticPositionFor(m, tree), "override.static",
-                      cannotOverride(m, other));
+            log.error(TreeInfo.diagnosticPositionFor(m, tree),
+                      Errors.OverrideStatic(cannotOverride(m, other)));
             m.flags_field |= BAD_OVERRIDE;
             return;
         }
@@ -1700,9 +1708,9 @@
         if ((other.flags() & FINAL) != 0 ||
                  (m.flags() & STATIC) == 0 &&
                  (other.flags() & STATIC) != 0) {
-            log.error(TreeInfo.diagnosticPositionFor(m, tree), "override.meth",
-                      cannotOverride(m, other),
-                      asFlagSet(other.flags() & (FINAL | STATIC)));
+            log.error(TreeInfo.diagnosticPositionFor(m, tree),
+                      Errors.OverrideMeth(cannotOverride(m, other),
+                                          asFlagSet(other.flags() & (FINAL | STATIC))));
             m.flags_field |= BAD_OVERRIDE;
             return;
         }
@@ -1714,11 +1722,12 @@
 
         // Error if overriding method has weaker access (JLS 8.4.6.3).
         if (protection(m.flags()) > protection(other.flags())) {
-            log.error(TreeInfo.diagnosticPositionFor(m, tree), "override.weaker.access",
-                      cannotOverride(m, other),
+            log.error(TreeInfo.diagnosticPositionFor(m, tree),
                       (other.flags() & AccessFlags) == 0 ?
-                          "package" :
-                          asFlagSet(other.flags() & AccessFlags));
+                              Errors.OverrideWeakerAccess(cannotOverride(m, other),
+                                                          "package") :
+                              Errors.OverrideWeakerAccess(cannotOverride(m, other),
+                                                          asFlagSet(other.flags() & AccessFlags)));
             m.flags_field |= BAD_OVERRIDE;
             return;
         }
@@ -1740,14 +1749,12 @@
         if (!resultTypesOK) {
             if ((m.flags() & STATIC) != 0 && (other.flags() & STATIC) != 0) {
                 log.error(TreeInfo.diagnosticPositionFor(m, tree),
-                        Errors.OverrideIncompatibleRet(Fragments.CantHide(m, m.location(), other,
+                          Errors.OverrideIncompatibleRet(Fragments.CantHide(m, m.location(), other,
                                         other.location()), mtres, otres));
                 m.flags_field |= BAD_OVERRIDE;
             } else {
                 log.error(TreeInfo.diagnosticPositionFor(m, tree),
-                        "override.incompatible.ret",
-                        cannotOverride(m, other),
-                        mtres, otres);
+                          Errors.OverrideIncompatibleRet(cannotOverride(m, other), mtres, otres));
                 m.flags_field |= BAD_OVERRIDE;
             }
             return;
@@ -1765,9 +1772,7 @@
         List<Type> unhandledUnerased = unhandled(mt.getThrownTypes(), otthrown);
         if (unhandledErased.nonEmpty()) {
             log.error(TreeInfo.diagnosticPositionFor(m, tree),
-                      "override.meth.doesnt.throw",
-                      cannotOverride(m, other),
-                      unhandledUnerased.head);
+                      Errors.OverrideMethDoesntThrow(cannotOverride(m, other), unhandledUnerased.head));
             m.flags_field |= BAD_OVERRIDE;
             return;
         }
@@ -1784,15 +1789,14 @@
             && lint.isEnabled(LintCategory.OVERRIDES)) {
             log.warning(TreeInfo.diagnosticPositionFor(m, tree),
                         ((m.flags() & Flags.VARARGS) != 0)
-                        ? "override.varargs.missing"
-                        : "override.varargs.extra",
-                        varargsOverrides(m, other));
+                        ? Warnings.OverrideVarargsMissing(varargsOverrides(m, other))
+                        : Warnings.OverrideVarargsExtra(varargsOverrides(m, other)));
         }
 
         // Warn if instance method overrides bridge method (compiler spec ??)
         if ((other.flags() & BRIDGE) != 0) {
-            log.warning(TreeInfo.diagnosticPositionFor(m, tree), "override.bridge",
-                        uncheckedOverrides(m, other));
+            log.warning(TreeInfo.diagnosticPositionFor(m, tree),
+                        Warnings.OverrideBridge(uncheckedOverrides(m, other)));
         }
 
         // Warn if a deprecated method overridden by a non-deprecated one.
@@ -1871,8 +1875,8 @@
                             continue;
                         Type st2 = types.memberType(t2, s2);
                         if (types.overrideEquivalent(st1, st2))
-                            log.error(pos, "concrete.inheritance.conflict",
-                                      s1, t1, s2, t2, sup);
+                            log.error(pos,
+                                      Errors.ConcreteInheritanceConflict(s1, t1, s2, t2, sup));
                     }
                 }
             }
@@ -1971,9 +1975,8 @@
                          types.covariantReturnType(rt2, rt1, types.noWarnings)) ||
                          checkCommonOverriderIn(s1,s2,site);
                     if (!compat) {
-                        log.error(pos, "types.incompatible.diff.ret",
-                            t1, t2, s2.name +
-                            "(" + types.memberType(t2, s2).getParameterTypes() + ")");
+                        log.error(pos, Errors.TypesIncompatibleDiffRet(t1, t2, s2.name +
+                                "(" + types.memberType(t2, s2).getParameterTypes() + ")"));
                         return s2;
                     }
                 } else if (checkNameClash((ClassSymbol)site.tsym, s1, s2) &&
@@ -2017,7 +2020,7 @@
         ClassSymbol origin = (ClassSymbol)m.owner;
         if ((origin.flags() & ENUM) != 0 && names.finalize.equals(m.name))
             if (m.overrides(syms.enumFinalFinalize, origin, types, false)) {
-                log.error(tree.pos(), "enum.no.finalize");
+                log.error(tree.pos(), Errors.EnumNoFinalize);
                 return;
             }
         for (Type t = origin.type; t.hasTag(CLASS);
@@ -2097,7 +2100,7 @@
 
             if (overridesEquals && !overridesHashCode) {
                 log.warning(LintCategory.OVERRIDES, pos,
-                        "override.equals.but.not.hashcode", someClass);
+                            Warnings.OverrideEqualsButNotHashcode(someClass));
             }
         }
     }
@@ -2154,8 +2157,8 @@
             MethodSymbol undef1 =
                 new MethodSymbol(undef.flags(), undef.name,
                                  types.memberType(c.type, undef), undef.owner);
-            log.error(pos, "does.not.override.abstract",
-                      c, undef1, undef1.location());
+            log.error(pos,
+                      Errors.DoesNotOverrideAbstract(c, undef1, undef1.location()));
         }
     }
 
@@ -2288,7 +2291,7 @@
         if (seen.contains(t)) {
             tv = (TypeVar)t;
             tv.bound = types.createErrorType(t);
-            log.error(pos, "cyclic.inheritance", t);
+            log.error(pos, Errors.CyclicInheritance(t));
         } else if (t.hasTag(TYPEVAR)) {
             tv = (TypeVar)t;
             seen = seen.prepend(tv);
@@ -2340,7 +2343,7 @@
 
     /** Note that we found an inheritance cycle. */
     private void noteCyclic(DiagnosticPosition pos, ClassSymbol c) {
-        log.error(pos, "cyclic.inheritance", c);
+        log.error(pos, Errors.CyclicInheritance(c));
         for (List<Type> l=types.interfaces(c.type); l.nonEmpty(); l=l.tail)
             l.head = types.createErrorType((ClassSymbol)l.head.tsym, Type.noType);
         Type st = types.supertype(c.type);
@@ -2509,9 +2512,7 @@
             if (!types.isSubSignature(sym.type, types.memberType(site, s), allowStrictMethodClashCheck)) {
                 if (types.hasSameArgs(s.erasure(types), sym.erasure(types))) {
                     log.error(pos,
-                            "name.clash.same.erasure.no.hide",
-                            sym, sym.location(),
-                            s, s.location());
+                              Errors.NameClashSameErasureNoHide(sym, sym.location(), s, s.location()));
                     return;
                 } else {
                     checkPotentiallyAmbiguousOverloads(pos, site, sym, (MethodSymbol)s);
@@ -2647,9 +2648,9 @@
                 //this means a call site passing an implicit lambda would be ambigiuous
                 msym1.flags_field |= POTENTIALLY_AMBIGUOUS;
                 msym2.flags_field |= POTENTIALLY_AMBIGUOUS;
-                log.warning(LintCategory.OVERLOADS, pos, "potentially.ambiguous.overload",
-                            msym1, msym1.location(),
-                            msym2, msym2.location());
+                log.warning(LintCategory.OVERLOADS, pos,
+                            Warnings.PotentiallyAmbiguousOverload(msym1, msym1.location(),
+                                                                  msym2, msym2.location()));
                 return;
             }
         }
@@ -2679,11 +2680,11 @@
                 if (isLambda) {
                     if (belongsToRestrictedPackage(sym)) {
                         log.warning(LintCategory.SERIAL, tree.pos(),
-                            "access.to.member.from.serializable.lambda", sym);
+                                    Warnings.AccessToMemberFromSerializableLambda(sym));
                     }
                 } else {
                     log.warning(tree.pos(),
-                        "access.to.member.from.serializable.element", sym);
+                                Warnings.AccessToMemberFromSerializableElement(sym));
                 }
             }
         }
@@ -2715,7 +2716,7 @@
      */
     private void syntheticError(DiagnosticPosition pos, Symbol sym) {
         if (!sym.type.isErroneous()) {
-            log.error(pos, "synthetic.name.conflict", sym, sym.location());
+            log.error(pos, Errors.SyntheticNameConflict(sym, sym.location()));
         }
     }
 
@@ -2743,9 +2744,10 @@
                     List<Type> oldparams = oldit.allparams();
                     List<Type> newparams = it.allparams();
                     if (!types.containsTypeEquivalent(oldparams, newparams))
-                        log.error(pos, "cant.inherit.diff.arg",
-                                  it.tsym, Type.toString(oldparams),
-                                  Type.toString(newparams));
+                        log.error(pos,
+                                  Errors.CantInheritDiffArg(it.tsym,
+                                                            Type.toString(oldparams),
+                                                            Type.toString(newparams)));
                 }
                 checkClassBounds(pos, seensofar, it);
             }
@@ -2758,7 +2760,7 @@
      */
     void checkNotRepeated(DiagnosticPosition pos, Type it, Set<Type> its) {
         if (its.contains(it))
-            log.error(pos, "repeated.interface");
+            log.error(pos, Errors.RepeatedInterface);
         else {
             its.add(it);
         }
@@ -2808,7 +2810,7 @@
             validateAnnotationType(pos, types.elemtype(type));
             return;
         }
-        log.error(pos, "invalid.annotation.member.type");
+        log.error(pos, Errors.InvalidAnnotationMemberType);
     }
 
     /**
@@ -2826,7 +2828,7 @@
                 if (sym.kind == MTH &&
                     (sym.flags() & (PUBLIC | PROTECTED)) != 0 &&
                     types.overrideEquivalent(m.type, sym.type))
-                    log.error(pos, "intf.annotation.member.clash", sym, sup);
+                    log.error(pos, Errors.IntfAnnotationMemberClash(sym, sup));
             }
         }
     }
@@ -2851,13 +2853,13 @@
         validateAnnotationTree(a);
 
         if (a.type.tsym.isAnnotationType() && !annotationApplicable(a, s))
-            log.error(a.pos(), "annotation.type.not.applicable");
+            log.error(a.pos(), Errors.AnnotationTypeNotApplicable);
 
         if (a.annotationType.type.tsym == syms.functionalInterfaceType.tsym) {
             if (s.kind != TYP) {
-                log.error(a.pos(), "bad.functional.intf.anno");
+                log.error(a.pos(), Errors.BadFunctionalIntfAnno);
             } else if (!s.isInterface() || (s.flags() & ANNOTATION) != 0) {
-                log.error(a.pos(), "bad.functional.intf.anno.1", diags.fragment("not.a.functional.intf", s));
+                log.error(a.pos(), Errors.BadFunctionalIntfAnno1(Fragments.NotAFunctionalIntf(s)));
             }
         }
     }
@@ -2911,11 +2913,13 @@
             MethodSymbol m = (MethodSymbol) sym;
             Type ret = m.getReturnType();
             if (!(ret.hasTag(ARRAY) && types.isSameType(((ArrayType)ret).elemtype, contained.type))) {
-                log.error(pos, "invalid.repeatable.annotation.value.return",
-                        container, ret, types.makeArrayType(contained.type));
+                log.error(pos,
+                          Errors.InvalidRepeatableAnnotationValueReturn(container,
+                                                                        ret,
+                                                                        types.makeArrayType(contained.type)));
             }
         } else {
-            log.error(pos, "invalid.repeatable.annotation.no.value", container);
+            log.error(pos, Errors.InvalidRepeatableAnnotationNoValue(container));
         }
     }
 
@@ -2936,16 +2940,18 @@
             }
         }
         if (error ) {
-            log.error(pos, "invalid.repeatable.annotation.retention",
-                      container, containerRetention,
-                      contained, containedRetention);
+            log.error(pos,
+                      Errors.InvalidRepeatableAnnotationRetention(container,
+                                                                  containerRetention.name(),
+                                                                  contained,
+                                                                  containedRetention.name()));
         }
     }
 
     private void validateDocumented(Symbol container, Symbol contained, DiagnosticPosition pos) {
         if (contained.attribute(syms.documentedType.tsym) != null) {
             if (container.attribute(syms.documentedType.tsym) == null) {
-                log.error(pos, "invalid.repeatable.annotation.not.documented", container, contained);
+                log.error(pos, Errors.InvalidRepeatableAnnotationNotDocumented(container, contained));
             }
         }
     }
@@ -2953,7 +2959,7 @@
     private void validateInherited(Symbol container, Symbol contained, DiagnosticPosition pos) {
         if (contained.attribute(syms.inheritedType.tsym) != null) {
             if (container.attribute(syms.inheritedType.tsym) == null) {
-                log.error(pos, "invalid.repeatable.annotation.not.inherited", container, contained);
+                log.error(pos, Errors.InvalidRepeatableAnnotationNotInherited(container, contained));
             }
         }
     }
@@ -2995,7 +3001,7 @@
         }
 
         if (!isTargetSubsetOf(containerTargets, containedTargets)) {
-            log.error(pos, "invalid.repeatable.annotation.incompatible.target", container, contained);
+            log.error(pos, Errors.InvalidRepeatableAnnotationIncompatibleTarget(container, contained));
         }
     }
 
@@ -3058,9 +3064,7 @@
                 elm.kind == MTH &&
                 ((MethodSymbol)elm).defaultValue == null) {
                 log.error(pos,
-                          "invalid.repeatable.annotation.elem.nondefault",
-                          container,
-                          elm);
+                          Errors.InvalidRepeatableAnnotationElemNondefault(container, elm));
             }
         }
     }
@@ -3209,8 +3213,8 @@
             if (m == null || m.type.isErroneous()) continue;
             if (!elements.remove(m)) {
                 isValid = false;
-                log.error(assign.lhs.pos(), "duplicate.annotation.member.value",
-                        m.name, a.type);
+                log.error(assign.lhs.pos(),
+                          Errors.DuplicateAnnotationMemberValue(m.name, a.type));
             }
         }
 
@@ -3256,7 +3260,7 @@
         for (JCTree elem : na.elems) {
             if (!targets.add(TreeInfo.symbol(elem))) {
                 isValid = false;
-                log.error(elem.pos(), "repeated.annotation.target");
+                log.error(elem.pos(), Errors.RepeatedAnnotationTarget);
             }
         }
         return isValid;
@@ -3268,13 +3272,13 @@
             !syms.deprecatedType.isErroneous() &&
             s.attribute(syms.deprecatedType.tsym) == null) {
             log.warning(LintCategory.DEP_ANN,
-                    pos, "missing.deprecated.annotation");
+                    pos, Warnings.MissingDeprecatedAnnotation);
         }
         // Note: @Deprecated has no effect on local variables, parameters and package decls.
         if (lint.isEnabled(LintCategory.DEPRECATION) && !s.isDeprecatableViaAnnotation()) {
             if (!syms.deprecatedType.isErroneous() && s.attribute(syms.deprecatedType.tsym) != null) {
                 log.warning(LintCategory.DEPRECATION, pos,
-                        "deprecated.annotation.has.no.effect", Kinds.kindName(s));
+                            Warnings.DeprecatedAnnotationHasNoEffect(Kinds.kindName(s)));
             }
         }
     }
@@ -3290,14 +3294,14 @@
     void checkSunAPI(final DiagnosticPosition pos, final Symbol s) {
         if ((s.flags() & PROPRIETARY) != 0) {
             deferredLintHandler.report(() -> {
-                log.mandatoryWarning(pos, "sun.proprietary", s);
+                log.mandatoryWarning(pos, Warnings.SunProprietary(s));
             });
         }
     }
 
     void checkProfile(final DiagnosticPosition pos, final Symbol s) {
         if (profile != Profile.DEFAULT && (s.flags() & NOT_IN_PROFILE) != 0) {
-            log.error(pos, "not.in.profile", s, profile);
+            log.error(pos, Errors.NotInProfile(s, profile));
         }
     }
 
@@ -3327,7 +3331,7 @@
         if ((tsym.flags_field & ACYCLIC_ANN) != 0)
             return;
         if ((tsym.flags_field & LOCKED) != 0) {
-            log.error(pos, "cyclic.annotation.element");
+            log.error(pos, Errors.CyclicAnnotationElement(tsym));
             return;
         }
         try {
@@ -3395,7 +3399,7 @@
         if (ctor != null && (ctor.flags_field & ACYCLIC) == 0) {
             if ((ctor.flags_field & LOCKED) != 0) {
                 log.error(TreeInfo.diagnosticPositionFor(ctor, tree),
-                          "recursive.ctor.invocation");
+                          Errors.RecursiveCtorInvocation);
             } else {
                 ctor.flags_field |= LOCKED;
                 checkCyclicConstructor(tree, callMap.remove(ctor), callMap);
@@ -3433,7 +3437,7 @@
     void checkEmptyIf(JCIf tree) {
         if (tree.thenpart.hasTag(SKIP) && tree.elsepart == null &&
                 lint.isEnabled(LintCategory.EMPTY))
-            log.warning(LintCategory.EMPTY, tree.thenpart.pos(), "empty.if");
+            log.warning(LintCategory.EMPTY, tree.thenpart.pos(), Warnings.EmptyIf);
     }
 
     /** Check that symbol is unique in given scope.
@@ -3473,7 +3477,7 @@
      */
     void duplicateErasureError(DiagnosticPosition pos, Symbol sym1, Symbol sym2) {
         if (!sym1.type.isErroneous() && !sym2.type.isErroneous()) {
-            log.error(pos, "name.clash.same.erasure", sym1, sym2);
+            log.error(pos, Errors.NameClashSameErasure(sym1, sym2));
         }
     }
 
@@ -3531,14 +3535,14 @@
         }
         if (clashing != null) {
             if (staticImport)
-                log.error(pos, "already.defined.static.single.import", clashing);
+                log.error(pos, Errors.AlreadyDefinedStaticSingleImport(clashing));
             else
-                log.error(pos, "already.defined.single.import", clashing);
+                log.error(pos, Errors.AlreadyDefinedSingleImport(clashing));
             return false;
         }
         clashing = topLevelScope.findFirst(sym.name, duplicates);
         if (clashing != null) {
-            log.error(pos, "already.defined.this.unit", clashing);
+            log.error(pos, Errors.AlreadyDefinedThisUnit(clashing));
             return false;
         }
         return true;
@@ -3548,8 +3552,8 @@
      */
     public void checkCanonical(JCTree tree) {
         if (!isCanonical(tree))
-            log.error(tree.pos(), "import.requires.canonical",
-                      TreeInfo.symbol(tree));
+            log.error(tree.pos(),
+                      Errors.ImportRequiresCanonical(TreeInfo.symbol(tree)));
     }
         // where
         private boolean isCanonical(JCTree tree) {
@@ -3570,8 +3574,8 @@
             rs.isAccessible(env, c) &&
             !fileManager.isSameFile(c.sourcefile, env.toplevel.sourcefile))
         {
-            log.warning(pos, "auxiliary.class.accessed.from.outside.of.its.source.file",
-                        c, c.sourcefile);
+            log.warning(pos,
+                        Warnings.AuxiliaryClassAccessedFromOutsideOfItsSourceFile(c, c.sourcefile));
         }
     }
 
@@ -3631,7 +3635,7 @@
                         break;
                     }
                 }
-                log.error(pos, "bad.functional.intf.anno.1", ex.getDiagnostic());
+                log.error(pos, Errors.BadFunctionalIntfAnno1(ex.getDiagnostic()));
             }
         }
     }
@@ -3647,11 +3651,14 @@
 
             TypeSymbol site = (TypeSymbol) TreeInfo.symbol(select.selected);
             if (!checkTypeContainsImportableElement(site, site, toplevel.packge, select.name, new HashSet<Symbol>())) {
-                log.error(imp.pos(), "cant.resolve.location",
-                          KindName.STATIC,
-                          select.name, List.<Type>nil(), List.<Type>nil(),
-                          Kinds.typeKindName(TreeInfo.symbol(select.selected).type),
-                          TreeInfo.symbol(select.selected).type);
+                log.error(imp.pos(),
+                          Errors.CantResolveLocation(KindName.STATIC,
+                                                     select.name,
+                                                     null,
+                                                     null,
+                                                     Fragments.Location(kindName(site),
+                                                                        site,
+                                                                        null)));
             }
         }
     }
@@ -3672,7 +3679,7 @@
                     }
                 }
                 if (tsym.kind == PCK && tsym.members().isEmpty() && !tsym.exists()) {
-                    log.error(DiagnosticFlag.RESOLVE_ERROR, imp.pos, "doesnt.exist", tsym);
+                    log.error(DiagnosticFlag.RESOLVE_ERROR, imp.pos, Errors.DoesntExist(tsym));
                 }
             }
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Tue Jun 27 16:00:14 2017 -0400
@@ -41,6 +41,7 @@
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.comp.Attr.ResultInfo;
 import com.sun.tools.javac.comp.Resolve.MethodResolutionPhase;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
 import com.sun.tools.javac.util.Log.DeferredDiagnosticHandler;
@@ -811,7 +812,7 @@
 
                     if (descriptorType.getParameterTypes().length() != tree.params.length()) {
                         checkContext.report(tree,
-                                diags.fragment("incompatible.arg.types.in.lambda"));
+                                diags.fragment(Fragments.IncompatibleArgTypesInLambda));
                     }
 
                     Type currentReturnType = descriptorType.getReturnType();
@@ -821,8 +822,7 @@
                             TreeInfo.isExpressionStatement((JCExpression)tree.getBody());
                         if (!isExpressionCompatible) {
                             resultInfo.checkContext.report(tree.pos(),
-                                diags.fragment("incompatible.ret.type.in.lambda",
-                                    diags.fragment("missing.ret.val", currentReturnType)));
+                                diags.fragment(Fragments.IncompatibleRetTypeInLambda(Fragments.MissingRetVal(currentReturnType))));
                         }
                     } else {
                         LambdaBodyStructChecker lambdaBodyChecker =
@@ -834,20 +834,19 @@
                         if (returnTypeIsVoid) {
                             if (!isVoidCompatible) {
                                 resultInfo.checkContext.report(tree.pos(),
-                                    diags.fragment("unexpected.ret.val"));
+                                    diags.fragment(Fragments.UnexpectedRetVal));
                             }
                         } else {
                             boolean isValueCompatible = lambdaBodyChecker.isPotentiallyValueCompatible
                                 && !canLambdaBodyCompleteNormally(tree);
                             if (!isValueCompatible && !isVoidCompatible) {
                                 log.error(tree.body.pos(),
-                                    "lambda.body.neither.value.nor.void.compatible");
+                                          Errors.LambdaBodyNeitherValueNorVoidCompatible);
                             }
 
                             if (!isValueCompatible) {
                                 resultInfo.checkContext.report(tree.pos(),
-                                    diags.fragment("incompatible.ret.type.in.lambda",
-                                        diags.fragment("missing.ret.val", currentReturnType)));
+                                    diags.fragment(Fragments.IncompatibleRetTypeInLambda(Fragments.MissingRetVal(currentReturnType))));
                             }
                         }
                     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.main.Option.PkgInfo;
 import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.*;
@@ -332,7 +333,7 @@
                         addEnv = true;
                     } else if (pd.annotations.nonEmpty()) {
                         log.error(pd.annotations.head.pos(),
-                                  "pkg.annotations.sb.in.package-info.java");
+                                  Errors.PkgAnnotationsSbInPackageInfoJava);
                     }
                 }
             } else {
@@ -363,8 +364,7 @@
                     JCCompilationUnit tree0 = env0.toplevel;
                     if (!fileManager.isSameFile(tree.sourcefile, tree0.sourcefile)) {
                         log.warning(pd != null ? pd.pid.pos() : null,
-                                    "pkg-info.already.seen",
-                                    tree.packge);
+                                    Warnings.PkgInfoAlreadySeen(tree.packge));
                     }
                 }
                 typeEnvs.put(tree.packge, packageEnv);
@@ -409,7 +409,7 @@
                     topElement = KindName.INTERFACE;
                 }
                 log.error(tree.pos(),
-                          "class.public.should.be.in.file", topElement, tree.name);
+                          Errors.ClassPublicShouldBeInFile(topElement, tree.name));
             }
         } else {
             if (!tree.name.isEmpty() &&
@@ -512,7 +512,7 @@
 
     /** Complain about a duplicate class. */
     protected void duplicateClass(DiagnosticPosition pos, ClassSymbol c) {
-        log.error(pos, "duplicate.class", c.fullname);
+        log.error(pos, Errors.DuplicateClass(c.fullname));
     }
 
     /** Class enter visitor method for type parameters.
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,6 +32,8 @@
 import com.sun.source.tree.LambdaExpressionTree.BodyKind;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Scope.WriteableScope;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -427,7 +429,7 @@
             scanStat(tree);
             if (tree != null && tree.hasTag(JCTree.Tag.BLOCK) && !alive) {
                 log.error(tree.pos(),
-                          "initializer.must.be.able.to.complete.normally");
+                          Errors.InitializerMustBeAbleToCompleteNormally);
             }
         }
 
@@ -435,7 +437,7 @@
          */
         void scanStat(JCTree tree) {
             if (!alive && tree != null) {
-                log.error(tree.pos(), "unreachable.stmt");
+                log.error(tree.pos(), Errors.UnreachableStmt);
                 if (!tree.hasTag(SKIP)) alive = true;
             }
             scan(tree);
@@ -503,7 +505,7 @@
                 scanStat(tree.body);
 
                 if (alive && !tree.sym.type.getReturnType().hasTag(VOID))
-                    log.error(TreeInfo.diagEndPos(tree.body), "missing.ret.stmt");
+                    log.error(TreeInfo.diagEndPos(tree.body), Errors.MissingRetStmt);
 
                 List<PendingExit> exits = pendingExits.toList();
                 pendingExits = new ListBuffer<>();
@@ -608,7 +610,7 @@
                     c.stats.nonEmpty() && l.tail.nonEmpty())
                     log.warning(Lint.LintCategory.FALLTHROUGH,
                                 l.tail.head.pos(),
-                                "possible.fall-through.into.case");
+                                Warnings.PossibleFallThroughIntoCase);
             }
             if (!hasDefault) {
                 alive = true;
@@ -650,7 +652,7 @@
                     if (lint.isEnabled(Lint.LintCategory.FINALLY)) {
                         log.warning(Lint.LintCategory.FINALLY,
                                 TreeInfo.diagEndPos(tree.finalizer),
-                                "finally.cannot.complete");
+                                Warnings.FinallyCannotComplete);
                     }
                 } else {
                     while (exits.nonEmpty()) {
@@ -811,18 +813,15 @@
                 if (classDef != null &&
                     classDef.pos == exit.tree.pos) {
                     log.error(exit.tree.pos(),
-                            "unreported.exception.default.constructor",
-                            exit.thrown);
+                              Errors.UnreportedExceptionDefaultConstructor(exit.thrown));
                 } else if (exit.tree.hasTag(VARDEF) &&
                         ((JCVariableDecl)exit.tree).sym.isResourceVariable()) {
                     log.error(exit.tree.pos(),
-                            "unreported.exception.implicit.close",
-                            exit.thrown,
-                            ((JCVariableDecl)exit.tree).sym.name);
+                              Errors.UnreportedExceptionImplicitClose(exit.thrown,
+                                                                      ((JCVariableDecl)exit.tree).sym.name));
                 } else {
                     log.error(exit.tree.pos(),
-                            "unreported.exception.need.to.catch.or.throw",
-                            exit.thrown);
+                              Errors.UnreportedExceptionNeedToCatchOrThrow(exit.thrown));
                 }
             }
         }
@@ -1170,11 +1169,11 @@
 
         void checkCaughtType(DiagnosticPosition pos, Type exc, List<Type> thrownInTry, List<Type> caughtInTry) {
             if (chk.subset(exc, caughtInTry)) {
-                log.error(pos, "except.already.caught", exc);
+                log.error(pos, Errors.ExceptAlreadyCaught(exc));
             } else if (!chk.isUnchecked(pos, exc) &&
                     !isExceptionOrThrowable(exc) &&
                     !chk.intersects(exc, thrownInTry)) {
-                log.error(pos, "except.never.thrown.in.try", exc);
+                log.error(pos, Errors.ExceptNeverThrownInTry(exc));
             } else if (allowImprovedCatchAnalysis) {
                 List<Type> catchableThrownTypes = chk.intersect(List.of(exc), thrownInTry);
                 // 'catchableThrownTypes' cannnot possibly be empty - if 'exc' was an
@@ -1610,11 +1609,11 @@
                 else if ((sym.flags() & FINAL) != 0) {
                     if ((sym.flags() & PARAMETER) != 0) {
                         if ((sym.flags() & UNION) != 0) { //multi-catch parameter
-                            log.error(pos, "multicatch.parameter.may.not.be.assigned", sym);
+                            log.error(pos, Errors.MulticatchParameterMayNotBeAssigned(sym));
                         }
                         else {
-                            log.error(pos, "final.parameter.may.not.be.assigned",
-                                  sym);
+                            log.error(pos,
+                                      Errors.FinalParameterMayNotBeAssigned(sym));
                         }
                     } else if (!uninits.isMember(sym.adr)) {
                         log.error(pos, flowKind.errKey, sym);
@@ -1624,7 +1623,7 @@
                 }
                 inits.incl(sym.adr);
             } else if ((sym.flags() & FINAL) != 0) {
-                log.error(pos, "var.might.already.be.assigned", sym);
+                log.error(pos, Errors.VarMightAlreadyBeAssigned(sym));
             }
         }
         //where
@@ -2190,7 +2189,7 @@
                 for (JCVariableDecl resVar : resourceVarDecls) {
                     if (unrefdResources.includes(resVar.sym)) {
                         log.warning(Lint.LintCategory.TRY, resVar.pos(),
-                                    "try.resource.not.referenced", resVar.sym);
+                                    Warnings.TryResourceNotReferenced(resVar.sym));
                         unrefdResources.remove(resVar.sym);
                     }
                 }
@@ -2601,13 +2600,12 @@
         void reportEffectivelyFinalError(DiagnosticPosition pos, Symbol sym) {
             String subKey = currentTree.hasTag(LAMBDA) ?
                   "lambda"  : "inner.cls";
-            log.error(pos, "cant.ref.non.effectively.final.var", sym, diags.fragment(subKey));
+            log.error(pos, Errors.CantRefNonEffectivelyFinalVar(sym, diags.fragment(subKey)));
         }
 
         void reportInnerClsNeedsFinalError(DiagnosticPosition pos, Symbol sym) {
             log.error(pos,
-                    "local.var.accessed.from.icls.needs.final",
-                    sym);
+                      Errors.LocalVarAccessedFromIclsNeedsFinal(sym));
         }
 
     /*************************************************************************
@@ -2676,7 +2674,7 @@
                 if (!resource.hasTag(VARDEF)) {
                     Symbol var = TreeInfo.symbol(resource);
                     if (var != null && (var.flags() & (FINAL | EFFECTIVELY_FINAL)) == 0) {
-                        log.error(resource.pos(), "try.with.resources.expr.effectively.final.var", var);
+                        log.error(resource.pos(), Errors.TryWithResourcesExprEffectivelyFinalVar(var));
                     }
                 }
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,8 @@
 import com.sun.tools.javac.code.Type.UndetVar.UndetVarListener;
 import com.sun.tools.javac.code.Types.TypeMapping;
 import com.sun.tools.javac.comp.Attr.CheckMode;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
+import com.sun.tools.javac.resources.CompilerProperties.Notes;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCTypeCast;
 import com.sun.tools.javac.tree.TreeInfo;
@@ -238,7 +240,7 @@
             }
 
             if (resultInfo != null && rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
-                log.note(env.tree.pos, "deferred.method.inst", msym, mt, resultInfo.pt);
+                log.note(env.tree.pos, Notes.DeferredMethodInst(msym, mt, resultInfo.pt));
             }
 
             // return instantiated version of method type
@@ -344,9 +346,8 @@
                     //inline logic from Attr.checkMethod - if unchecked conversion was required, erase
                     //return type _after_ resolution, and check against target
                     ret = types.erasure(ret);
-                    resultInfo.check(env.tree, ret);
                 }
-                return ret;
+                return resultInfo.check(env.tree, ret);
             } catch (InferenceException ex) {
                 resultInfo.checkContext.report(null, ex.getDiagnostic());
                 Assert.error(); //cannot get here (the above should throw)
@@ -666,12 +667,12 @@
             //in the functional interface descriptors)
             List<Type> descParameterTypes = types.findDescriptorType(formalInterface).getParameterTypes();
             if (descParameterTypes.size() != paramTypes.size()) {
-                checkContext.report(pos, diags.fragment("incompatible.arg.types.in.lambda"));
+                checkContext.report(pos, diags.fragment(Fragments.IncompatibleArgTypesInLambda));
                 return types.createErrorType(funcInterface);
             }
             for (Type p : descParameterTypes) {
                 if (!types.isSameType(funcInterfaceContext.asUndetVar(p), paramTypes.head)) {
-                    checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
+                    checkContext.report(pos, diags.fragment(Fragments.NoSuitableFunctionalIntfInst(funcInterface)));
                     return types.createErrorType(funcInterface);
                 }
                 paramTypes = paramTypes.tail;
@@ -690,7 +691,7 @@
             if (!chk.checkValidGenericType(owntype)) {
                 //if the inferred functional interface type is not well-formed,
                 //or if it's not a subtype of the original target, issue an error
-                checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
+                checkContext.report(pos, diags.fragment(Fragments.NoSuitableFunctionalIntfInst(funcInterface)));
             }
             //propagate constraints as per JLS 18.2.1
             checkContext.compatible(owntype, funcInterface, types.noWarnings);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Tue Jun 27 16:00:14 2017 -0400
@@ -45,6 +45,7 @@
 import com.sun.tools.javac.code.Types;
 import com.sun.tools.javac.comp.LambdaToMethod.LambdaAnalyzerPreprocessor.*;
 import com.sun.tools.javac.comp.Lower.BasicFreeVarCollector;
+import com.sun.tools.javac.resources.CompilerProperties.Notes;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -1497,7 +1498,7 @@
             } else {
                 super.visitReference(tree);
                 if (dumpLambdaToMethodStats) {
-                    log.note(tree, "mref.stat", rcontext.needsAltMetafactory(), null);
+                    log.note(tree, Notes.MrefStat(rcontext.needsAltMetafactory(), null));
                 }
             }
         }
@@ -2055,7 +2056,7 @@
                         Assert.error(skind.name());
                         throw new AssertionError();
                 }
-                if (ret != sym) {
+                if (ret != sym && skind.propagateAnnotations()) {
                     ret.setDeclarationAttributes(sym.getRawAttributes());
                     ret.setTypeAttributes(sym.getRawTypeAttributes());
                 }
@@ -2091,7 +2092,6 @@
                             if (m.containsKey(lambdaIdent.sym)) {
                                 Symbol tSym = m.get(lambdaIdent.sym);
                                 JCTree t = make.Ident(tSym).setType(lambdaIdent.type);
-                                tSym.setTypeAttributes(lambdaIdent.sym.getRawTypeAttributes());
                                 return t;
                             }
                             break;
@@ -2100,7 +2100,6 @@
                                 // Transform outer instance variable references anchoring them to the captured synthetic.
                                 Symbol tSym = m.get(lambdaIdent.sym.owner);
                                 JCExpression t = make.Ident(tSym).setType(lambdaIdent.sym.owner.type);
-                                tSym.setTypeAttributes(lambdaIdent.sym.owner.getRawTypeAttributes());
                                 t = make.Select(t, lambdaIdent.name);
                                 t.setType(lambdaIdent.type);
                                 TreeInfo.setSymbol(t, lambdaIdent.sym);
@@ -2121,7 +2120,6 @@
                 if (m.containsKey(fieldAccess.sym.owner)) {
                     Symbol tSym = m.get(fieldAccess.sym.owner);
                     JCExpression t = make.Ident(tSym).setType(fieldAccess.sym.owner.type);
-                    tSym.setTypeAttributes(fieldAccess.sym.owner.getRawTypeAttributes());
                     return t;
                 }
                 return null;
@@ -2321,7 +2319,18 @@
         CAPTURED_VAR,   // variables in enclosing scope to translated synthetic parameters
         CAPTURED_THIS,  // class symbols to translated synthetic parameters (for captured member access)
         CAPTURED_OUTER_THIS, // used when `this' capture is illegal, but outer this capture is legit (JDK-8129740)
-        TYPE_VAR       // original to translated lambda type variables
+        TYPE_VAR;      // original to translated lambda type variables
+
+        boolean propagateAnnotations() {
+            switch (this) {
+                case CAPTURED_VAR:
+                case CAPTURED_THIS:
+                case CAPTURED_OUTER_THIS:
+                    return false;
+                default:
+                    return true;
+           }
+        }
     }
 
     /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
 
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Symbol.OperatorSymbol.AccessCode;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.code.Type.*;
 
@@ -1760,7 +1761,7 @@
     JCExpression makeOuterThis(DiagnosticPosition pos, TypeSymbol c) {
         List<VarSymbol> ots = outerThisStack;
         if (ots.isEmpty()) {
-            log.error(pos, "no.encl.instance.of.type.in.scope", c);
+            log.error(pos, Errors.NoEnclInstanceOfTypeInScope(c));
             Assert.error();
             return makeNull();
         }
@@ -1771,9 +1772,7 @@
             do {
                 ots = ots.tail;
                 if (ots.isEmpty()) {
-                    log.error(pos,
-                              "no.encl.instance.of.type.in.scope",
-                              c);
+                    log.error(pos, Errors.NoEnclInstanceOfTypeInScope(c));
                     Assert.error(); // should have been caught in Attr
                     return tree;
                 }
@@ -1818,7 +1817,7 @@
         Symbol c = sym.owner;
         List<VarSymbol> ots = outerThisStack;
         if (ots.isEmpty()) {
-            log.error(pos, "no.encl.instance.of.type.in.scope", c);
+            log.error(pos, Errors.NoEnclInstanceOfTypeInScope(c));
             Assert.error();
             return makeNull();
         }
@@ -1829,9 +1828,7 @@
             do {
                 ots = ots.tail;
                 if (ots.isEmpty()) {
-                    log.error(pos,
-                        "no.encl.instance.of.type.in.scope",
-                        c);
+                    log.error(pos, Errors.NoEnclInstanceOfTypeInScope(c));
                     Assert.error();
                     return tree;
                 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@
 
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree.*;
 
 import static com.sun.tools.javac.code.Flags.*;
@@ -320,7 +321,7 @@
                 checkType(tree.vartype, outertype, "incorrect.constructor.receiver.type");
                 checkType(tree.nameexpr, outertype, "incorrect.constructor.receiver.name");
             } else {
-                log.error(tree, "receiver.parameter.not.applicable.constructor.toplevel.class");
+                log.error(tree, Errors.ReceiverParameterNotApplicableConstructorToplevelClass);
             }
         } else {
             checkType(tree.vartype, m.owner.type, "incorrect.receiver.type");
@@ -345,7 +346,7 @@
                            Tag.LT, Tag.LE, Tag.GT, Tag.GE, Tag.EQ, Tag.NE,
                            Tag.BITAND, Tag.BITXOR, Tag.BITOR, Tag.AND, Tag.OR);
 
-        private boolean result = true;
+        boolean result = true;
 
         @Override
         public void visitTree(JCTree tree) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java	Tue Jun 27 16:00:14 2017 -0400
@@ -276,7 +276,7 @@
                 msym.complete();
             }
         } catch (CompletionFailure ex) {
-            log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, "cant.access", ex.sym, ex.getDetailValue());
+            log.error(JCDiagnostic.DiagnosticFlag.NON_DEFERRABLE, Position.NOPOS, Errors.CantAccess(ex.sym, ex.getDetailValue()));
             if (ex instanceof ClassFinder.BadClassFile) throw new Abort();
         } finally {
             depth--;
@@ -565,7 +565,7 @@
 
         JavaFileObject prev = log.useSource(tree.sourcefile);
         try {
-            log.error(tree.pos(), "file.sb.on.source.or.patch.path.for.module");
+            log.error(tree.pos(), Errors.FileSbOnSourceOrPatchPathForModule);
         } finally {
             log.useSource(prev);
         }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java	Tue Jun 27 16:00:14 2017 -0400
@@ -41,6 +41,7 @@
 import com.sun.tools.javac.comp.Resolve.ReferenceLookupResult.StaticKind;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.main.Option;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
@@ -253,7 +254,7 @@
     JCDiagnostic getVerboseApplicableCandidateDiag(int pos, Symbol sym, Type inst) {
         JCDiagnostic subDiag = null;
         if (sym.type.hasTag(FORALL)) {
-            subDiag = diags.fragment("partial.inst.sig", inst);
+            subDiag = diags.fragment(Fragments.PartialInstSig(inst));
         }
 
         String key = subDiag == null ?
@@ -264,7 +265,7 @@
     }
 
     JCDiagnostic getVerboseInapplicableCandidateDiag(int pos, Symbol sym, JCDiagnostic subDiag) {
-        return diags.fragment("not.applicable.method.found", pos, sym, subDiag);
+        return diags.fragment(Fragments.NotApplicableMethodFound(pos, sym, subDiag));
     }
     // </editor-fold>
 
@@ -1452,8 +1453,7 @@
         Symbol sym = findField(env, site, name, site.tsym);
         if (sym.kind == VAR) return (VarSymbol)sym;
         else throw new FatalError(
-                 diags.fragment("fatal.err.cant.locate.field",
-                                name));
+                 diags.fragment(Fragments.FatalErrCantLocateField(name)));
     }
 
     /** Find unqualified variable or field with given name.
@@ -2545,8 +2545,8 @@
      */
     void checkNonAbstract(DiagnosticPosition pos, Symbol sym) {
         if ((sym.flags() & ABSTRACT) != 0 && (sym.flags() & DEFAULT) == 0)
-            log.error(pos, "abstract.cant.be.accessed.directly",
-                      kindName(sym), sym, sym.location());
+            log.error(pos,
+                      Errors.AbstractCantBeAccessedDirectly(kindName(sym),sym, sym.location()));
     }
 
 /* ***************************************************************************
@@ -2693,8 +2693,7 @@
                 site, name, argtypes, typeargtypes);
         if (sym.kind == MTH) return (MethodSymbol)sym;
         else throw new FatalError(
-                 diags.fragment("fatal.err.cant.locate.meth",
-                                name));
+                 diags.fragment(Fragments.FatalErrCantLocateMeth(name)));
     }
 
     /** Resolve constructor.
@@ -2746,7 +2745,7 @@
         Symbol sym = resolveConstructor(resolveContext, pos, env, site, argtypes, typeargtypes);
         if (sym.kind == MTH) return (MethodSymbol)sym;
         else throw new FatalError(
-                 diags.fragment("fatal.err.cant.locate.ctor", site));
+                 diags.fragment(Fragments.FatalErrCantLocateCtor(site)));
     }
 
     Symbol findConstructor(DiagnosticPosition pos, Env<AttrContext> env,
@@ -3531,14 +3530,15 @@
             //find a direct super type that is a subtype of 'c'
             for (Type i : types.directSupertypes(env.enclClass.type)) {
                 if (i.tsym.isSubClass(c, types) && i.tsym != c) {
-                    log.error(pos, "illegal.default.super.call", c,
-                            diags.fragment("redundant.supertype", c, i));
+                    log.error(pos,
+                              Errors.IllegalDefaultSuperCall(c,
+                                                             Fragments.RedundantSupertype(c, i)));
                     return syms.errSymbol;
                 }
             }
             Assert.error();
         }
-        log.error(pos, "not.encl.class", c);
+        log.error(pos, Errors.NotEnclClass(c));
         return syms.errSymbol;
     }
     //where
@@ -3572,7 +3572,7 @@
                                  boolean isSuperCall) {
         Symbol sym = resolveSelfContainingInternal(env, member, isSuperCall);
         if (sym == null) {
-            log.error(pos, "encl.class.required", member);
+            log.error(pos, Errors.EnclClassRequired(member));
             return syms.errSymbol;
         } else {
             return accessBase(sym, pos, env.enclClass.sym.type, sym.name, true);
@@ -3623,8 +3623,9 @@
         Type thisType = (t.tsym.owner.kind.matches(KindSelector.VAL_MTH)
                          ? resolveSelf(pos, env, t.getEnclosingType().tsym, names._this)
                          : resolveSelfContaining(pos, env, t.tsym, isSuperCall)).type;
-        if (env.info.isSelfCall && thisType.tsym == env.enclClass.sym)
-            log.error(pos, "cant.ref.before.ctor.called", "this");
+        if (env.info.isSelfCall && thisType.tsym == env.enclClass.sym) {
+            log.error(pos, Errors.CantRefBeforeCtorCalled("this"));
+        }
         return thisType;
     }
 
@@ -3847,15 +3848,13 @@
         }
         private JCDiagnostic getLocationDiag(Symbol location, Type site) {
             if (location.kind == VAR) {
-                return diags.fragment("location.1",
-                    kindName(location),
-                    location,
-                    location.type);
+                return diags.fragment(Fragments.Location1(kindName(location),
+                                                          location,
+                                                          location.type));
             } else {
-                return diags.fragment("location",
-                    typeKindName(site),
-                    site,
-                    null);
+                return diags.fragment(Fragments.Location(typeKindName(site),
+                                      site,
+                                      null));
             }
         }
     }
@@ -4019,11 +4018,11 @@
                 List<JCDiagnostic> details = List.nil();
                 for (Map.Entry<Symbol, JCDiagnostic> _entry : candidatesMap.entrySet()) {
                     Symbol sym = _entry.getKey();
-                    JCDiagnostic detailDiag = diags.fragment("inapplicable.method",
-                            Kinds.kindName(sym),
-                            sym.location(site, types),
-                            sym.asMemberOf(site, types),
-                            _entry.getValue());
+                    JCDiagnostic detailDiag =
+                            diags.fragment(Fragments.InapplicableMethod(Kinds.kindName(sym),
+                                                                        sym.location(site, types),
+                                                                        sym.asMemberOf(site, types),
+                                                                        _entry.getValue()));
                     details = details.prepend(detailDiag);
                 }
                 //typically members are visited in reverse order (see Scope)
@@ -4067,7 +4066,7 @@
                 "cant.apply.diamond" :
                 "cant.apply.diamond.1";
             return diags.create(dkind, log.currentSource(), pos, key,
-                    diags.fragment("diamond", site.tsym), details);
+                    Fragments.Diamond(site.tsym), details);
         }
     }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Jun 27 16:00:14 2017 -0400
@@ -541,8 +541,7 @@
             if (sym != tree.sym &&
                 types.isSameType(erasure(sym.type), tree.type)) {
                 log.error(tree.pos(),
-                          "name.clash.same.erasure", tree.sym,
-                          sym);
+                          Errors.NameClashSameErasure(tree.sym, sym));
                 return;
             }
         }
@@ -683,8 +682,8 @@
         else
             if (tree.args.length() != argtypes.length()) {
                 log.error(tree.pos(),
-                              "method.invoked.with.incorrect.number.arguments",
-                              tree.args.length(), argtypes.length());
+                          Errors.MethodInvokedWithIncorrectNumberArguments(tree.args.length(),
+                                                                           argtypes.length()));
             }
         tree.args = translateArgs(tree.args, argtypes, tree.varargsElement);
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,7 @@
 
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree.*;
 
 import static com.sun.tools.javac.code.Flags.*;
@@ -52,6 +53,7 @@
 import static com.sun.tools.javac.code.Kinds.Kind.*;
 import static com.sun.tools.javac.code.TypeTag.CLASS;
 import static com.sun.tools.javac.code.TypeTag.ERROR;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
 import com.sun.tools.javac.util.Dependencies.CompletionCause;
@@ -339,7 +341,7 @@
                 // Import-on-demand java.lang.
                 PackageSymbol javaLang = syms.enterPackage(syms.java_base, names.java_lang);
                 if (javaLang.members().isEmpty() && !javaLang.exists())
-                    throw new FatalError(diags.fragment("fatal.err.no.java.lang"));
+                    throw new FatalError(diags.fragment(Fragments.FatalErrNoJavaLang));
                 importAll(make.at(tree.pos()).Import(make.QualIdent(javaLang), false), javaLang, env);
 
                 JCModuleDecl decl = tree.getModuleDecl();
@@ -378,8 +380,7 @@
                     PackageSymbol pack = syms.lookupPackage(env.toplevel.modle, p.owner.getQualifiedName());
                     if (syms.getClass(pack.modle, p.getQualifiedName()) != null) {
                         log.error(tree.pos,
-                                  "pkg.clashes.with.class.of.same.name",
-                                  p);
+                                  Errors.PkgClashesWithClassOfSameName(p));
                     }
                     p = p.owner;
                 }
@@ -471,7 +472,7 @@
                                        final Name name,
                                        final Env<AttrContext> env) {
             if (tsym.kind != TYP) {
-                log.error(DiagnosticFlag.RECOVERABLE, imp.pos(), "static.imp.only.classes.and.interfaces");
+                log.error(DiagnosticFlag.RECOVERABLE, imp.pos(), Errors.StaticImpOnlyClassesAndInterfaces);
                 return;
             }
 
@@ -831,7 +832,7 @@
             if (checkClash &&
                 sym.owner.kind == PCK && sym.owner != env.toplevel.modle.unnamedPackage &&
                 syms.packageExists(env.toplevel.modle, sym.fullname)) {
-                log.error(tree.pos, "clash.with.pkg.of.same.name", Kinds.kindName(sym), sym);
+                log.error(tree.pos, Errors.ClashWithPkgOfSameName(Kinds.kindName(sym),sym));
             }
             if (sym.owner.kind == PCK && (sym.flags_field & PUBLIC) == 0 &&
                 !env.toplevel.sourcefile.isNameCompatible(sym.name.toString(),JavaFileObject.Kind.SOURCE)) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java	Tue Jun 27 16:00:14 2017 -0400
@@ -311,7 +311,7 @@
         try {
             decoder = getDecoder(encName, ignoreEncodingErrors);
         } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {
-            log.error("unsupported.encoding", encName);
+            log.error(Errors.UnsupportedEncoding(encName));
             return (CharBuffer)CharBuffer.allocate(1).flip();
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Tue Jun 27 16:00:14 2017 -0400
@@ -69,6 +69,7 @@
 
 import com.sun.tools.javac.file.RelativePath.RelativeDirectory;
 import com.sun.tools.javac.file.RelativePath.RelativeFile;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
 import com.sun.tools.javac.util.Context.Factory;
@@ -390,7 +391,7 @@
                 }
             } catch (IOException ex) {
                 ex.printStackTrace(System.err);
-                log.error("error.reading.file", userPath, getMessage(ex));
+                log.error(Errors.ErrorReadingFile(userPath, getMessage(ex)));
             }
         }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Tue Jun 27 16:00:14 2017 -0400
@@ -215,7 +215,7 @@
                     entries.add(getPath(s));
                 } catch (IllegalArgumentException e) {
                     if (warn) {
-                        log.warning(LintCategory.PATH, "invalid.path", s);
+                        log.warning(LintCategory.PATH, Warnings.InvalidPath(s));
                     }
                 }
             }
@@ -311,7 +311,7 @@
             if (!Files.isDirectory(dir)) {
                 if (warn) {
                     log.warning(Lint.LintCategory.PATH,
-                            "dir.path.element.not.found", dir);
+                                Warnings.DirPathElementNotFound(dir));
                 }
                 return;
             }
@@ -357,7 +357,7 @@
                 /* No such file or directory exists */
                 if (warn) {
                     log.warning(Lint.LintCategory.PATH,
-                            "path.element.not.found", file);
+                                Warnings.PathElementNotFound(file));
                 }
                 super.add(file);
                 return;
@@ -380,13 +380,13 @@
                             FileSystems.newFileSystem(file, null).close();
                             if (warn) {
                                 log.warning(Lint.LintCategory.PATH,
-                                        "unexpected.archive.file", file);
+                                            Warnings.UnexpectedArchiveFile(file));
                             }
                         } catch (IOException | ProviderNotFoundException e) {
                             // FIXME: include e.getLocalizedMessage in warning
                             if (warn) {
                                 log.warning(Lint.LintCategory.PATH,
-                                        "invalid.archive.file", file);
+                                            Warnings.InvalidArchiveFile(file));
                             }
                             return;
                         }
@@ -419,7 +419,7 @@
                     addFile(f, warn);
                 }
             } catch (IOException e) {
-                log.error("error.reading.file", jarFile, JavacFileManager.getMessage(e));
+                log.error(Errors.ErrorReadingFile(jarFile, JavacFileManager.getMessage(e)));
             }
         }
     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/CRTable.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/CRTable.java	Tue Jun 27 16:00:14 2017 -0400
@@ -27,6 +27,7 @@
 
 import java.util.*;
 
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.List;
@@ -173,7 +174,7 @@
                                 ", new_pos = " + new_pos);
          }
          if (new_pos == Position.NOPOS)
-             log.warning(pos, "position.overflow", line);
+             log.warning(pos, Warnings.PositionOverflow(line));
 
         return new_pos;
      }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue Jun 27 16:00:14 2017 -0400
@@ -57,6 +57,8 @@
 import com.sun.tools.javac.jvm.ClassFile.NameAndType;
 import com.sun.tools.javac.jvm.ClassFile.Version;
 import com.sun.tools.javac.main.Option;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.DefinedBy.Api;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -279,11 +281,11 @@
             diagFactory);
     }
 
-    public ClassFinder.BadEnclosingMethodAttr badEnclosingMethod(Object... args) {
+    public ClassFinder.BadEnclosingMethodAttr badEnclosingMethod(Symbol sym) {
         return new ClassFinder.BadEnclosingMethodAttr (
             currentOwner.enclClass(),
             currentClassFile,
-            diagFactory.fragment("bad.enclosing.method", args),
+            diagFactory.fragment(Fragments.BadEnclosingMethod(sym)),
             diagFactory);
     }
 
@@ -985,8 +987,8 @@
                 if (lintClassfile && !warnedAttrs.contains(name)) {
                     JavaFileObject prev = log.useSource(currentClassFile);
                     try {
-                        log.warning(LintCategory.CLASSFILE, (DiagnosticPosition) null, "future.attr",
-                                name, version.major, version.minor, majorVersion, minorVersion);
+                        log.warning(LintCategory.CLASSFILE, (DiagnosticPosition) null,
+                                    Warnings.FutureAttr(name, version.major, version.minor, majorVersion, minorVersion));
                     } finally {
                         log.useSource(prev);
                     }
@@ -2078,14 +2080,11 @@
             try {
                 if (lintClassfile) {
                     if (failure == null) {
-                        log.warning("annotation.method.not.found",
-                                    container,
-                                    name);
+                        log.warning(Warnings.AnnotationMethodNotFound(container, name));
                     } else {
-                        log.warning("annotation.method.not.found.reason",
-                                    container,
-                                    name,
-                                    failure.getDetailValue());//diagnostic, if present
+                        log.warning(Warnings.AnnotationMethodNotFoundReason(container,
+                                                                            name,
+                                                                            failure.getDetailValue()));//diagnostic, if present
                     }
                 }
             } finally {
@@ -2161,12 +2160,14 @@
             }
             if (enumerator == null) {
                 if (failure != null) {
-                    log.warning("unknown.enum.constant.reason",
-                              currentClassFile, enumTypeSym, proxy.enumerator,
-                              failure.getDiagnostic());
+                    log.warning(Warnings.UnknownEnumConstantReason(currentClassFile,
+                                                                   enumTypeSym,
+                                                                   proxy.enumerator,
+                                                                   failure.getDiagnostic()));
                 } else {
-                    log.warning("unknown.enum.constant",
-                              currentClassFile, enumTypeSym, proxy.enumerator);
+                    log.warning(Warnings.UnknownEnumConstant(currentClassFile,
+                                                             enumTypeSym,
+                                                             proxy.enumerator));
                 }
                 result = new Attribute.Enum(enumTypeSym.type,
                         new VarSymbol(0, proxy.enumerator, syms.botType, enumTypeSym));
@@ -2686,10 +2687,9 @@
             majorVersion * 1000 + minorVersion <
             Version.MIN().major * 1000 + Version.MIN().minor) {
             if (majorVersion == (maxMajor + 1))
-                log.warning("big.major.version",
-                            currentClassFile,
-                            majorVersion,
-                            maxMajor);
+                log.warning(Warnings.BigMajorVersion(currentClassFile,
+                                                     majorVersion,
+                                                     maxMajor));
             else
                 throw badClassFile("wrong.version",
                                    Integer.toString(majorVersion),
@@ -2982,7 +2982,7 @@
                     theRepeatable = deproxy.deproxyCompound(repeatable);
                 }
             } catch (Exception e) {
-                throw new CompletionFailure(sym, e.getMessage());
+                throw new CompletionFailure(sym, ClassReader.this.diagFactory.fragment(Fragments.ExceptionMessage(e.getMessage())));
             }
 
             sym.getAnnotationTypeMetadata().setTarget(theTarget);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Tue Jun 27 16:00:14 2017 -0400
@@ -28,6 +28,7 @@
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Types.UniqueType;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -95,15 +96,15 @@
      */
     public boolean checkLimits(DiagnosticPosition pos, Log log) {
         if (cp > ClassFile.MAX_CODE) {
-            log.error(pos, "limit.code");
+            log.error(pos, Errors.LimitCode);
             return true;
         }
         if (max_locals > ClassFile.MAX_LOCALS) {
-            log.error(pos, "limit.locals");
+            log.error(pos, Errors.LimitLocals);
             return true;
         }
         if (max_stack > ClassFile.MAX_STACK) {
-            log.error(pos, "limit.stack");
+            log.error(pos, Errors.LimitStack);
             return true;
         }
         return false;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Tue Jun 27 16:00:14 2017 -0400
@@ -39,6 +39,7 @@
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.jvm.Code.*;
 import com.sun.tools.javac.jvm.Items.*;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.tree.EndPosTable;
 import com.sun.tools.javac.tree.JCTree.*;
 
@@ -270,7 +271,7 @@
             break;
         case ARRAY:
             if (types.dimensions(t) > ClassFile.MAX_DIMENSIONS) {
-                log.error(pos, "limit.dimensions");
+                log.error(pos, Errors.LimitDimensions);
                 nerrs++;
             }
             break;
@@ -517,7 +518,7 @@
             !(constValue instanceof String) ||
             ((String)constValue).length() < Pool.MAX_STRING_LENGTH)
             return;
-        log.error(pos, "limit.string");
+        log.error(pos, Errors.LimitString);
         nerrs++;
     }
 
@@ -888,7 +889,7 @@
             //      System.err.println("Generating " + meth + " in " + meth.owner); //DEBUG
             if (Code.width(types.erasure(env.enclMethod.sym.type).getParameterTypes()) + extras >
                 ClassFile.MAX_PARAMETERS) {
-                log.error(tree.pos(), "limit.parameters");
+                log.error(tree.pos(), Errors.LimitParameters);
                 nerrs++;
             }
 
@@ -905,7 +906,7 @@
                 }
 
                 if (code.state.stacksize != 0) {
-                    log.error(tree.body.pos(), "stack.sim.error", tree);
+                    log.error(tree.body.pos(), Errors.StackSimError(tree.sym));
                     throw new AssertionError();
                 }
 
@@ -1536,7 +1537,7 @@
                 code.addCatch(startpc1, endpc1, handler_pc1,
                               (char)catch_type);
             } else {
-                log.error(pos, "limit.code.too.large.for.try.stmt");
+                log.error(pos, Errors.LimitCodeTooLargeForTryStmt);
                 nerrs++;
             }
         }
@@ -1769,7 +1770,7 @@
         Item makeNewArray(DiagnosticPosition pos, Type type, int ndims) {
             Type elemtype = types.elemtype(type);
             if (types.dimensions(type) > ClassFile.MAX_DIMENSIONS) {
-                log.error(pos, "limit.dimensions");
+                log.error(pos, Errors.LimitDimensions);
                 nerrs++;
             }
             int elemcode = Code.arraycode(elemtype);
@@ -2181,7 +2182,7 @@
                 genDef(l.head, localEnv);
             }
             if (pool.numEntries() > Pool.MAX_ENTRIES) {
-                log.error(cdef.pos(), "limit.pool");
+                log.error(cdef.pos(), Errors.LimitPool);
                 nerrs++;
             }
             if (nerrs != 0) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Tue Jun 27 16:00:14 2017 -0400
@@ -578,7 +578,7 @@
         if (lintOptions && source.compareTo(Source.DEFAULT) < 0 && !options.isSet(Option.RELEASE)) {
             if (fm instanceof BaseFileManager) {
                 if (((BaseFileManager) fm).isDefaultBootClassPath())
-                    log.warning(LintCategory.OPTIONS, "source.no.bootclasspath", source.name);
+                    log.warning(LintCategory.OPTIONS, Warnings.SourceNoBootclasspath(source.name));
             }
         }
 
@@ -628,7 +628,7 @@
         }
 
         if (obsoleteOptionFound && lintOptions) {
-            log.warning(LintCategory.OPTIONS, "option.obsolete.suppression");
+            log.warning(LintCategory.OPTIONS, Warnings.OptionObsoleteSuppression);
         }
 
         SourceVersion sv = Source.toSourceVersion(source);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -81,6 +81,8 @@
 
 import com.sun.tools.javac.code.Symbol.ModuleSymbol;
 import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
+import com.sun.tools.javac.resources.CompilerProperties.Notes;
 import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 
 import static com.sun.tools.javac.code.TypeTag.CLASS;
@@ -393,7 +395,7 @@
             syms = Symtab.instance(context);
         } catch (CompletionFailure ex) {
             // inlined Check.completionError as it is not initialized yet
-            log.error("cant.access", ex.sym, ex.getDetailValue());
+            log.error(Errors.CantAccess(ex.sym, ex.getDetailValue()));
             if (ex instanceof ClassFinder.BadClassFile)
                 throw new Abort();
         }
@@ -570,7 +572,7 @@
      */
     public int errorCount() {
         if (werror && log.nerrors == 0 && log.nwarnings > 0) {
-            log.error("warnings.and.werror");
+            log.error(Errors.WarningsAndWerror);
         }
         return log.nerrors;
     }
@@ -598,7 +600,7 @@
             inputFiles.add(filename);
             return filename.getCharContent(false);
         } catch (IOException e) {
-            log.error("error.reading.file", filename, JavacFileManager.getMessage(e));
+            log.error(Errors.ErrorReadingFile(filename, JavacFileManager.getMessage(e)));
             return null;
         }
     }
@@ -742,10 +744,10 @@
             if (gen.genClass(env, cdef) && (errorCount() == 0))
                 return writer.writeClass(cdef.sym);
         } catch (ClassWriter.PoolOverflow ex) {
-            log.error(cdef.pos(), "limit.pool");
+            log.error(cdef.pos(), Errors.LimitPool);
         } catch (ClassWriter.StringOverflow ex) {
-            log.error(cdef.pos(), "limit.string.overflow",
-                      ex.value.substring(0, 20));
+            log.error(cdef.pos(),
+                      Errors.LimitStringOverflow(ex.value.substring(0, 20)));
         } catch (CompletionFailure ex) {
             chk.completionError(cdef.pos(), ex);
         }
@@ -764,7 +766,7 @@
                                                JavaFileObject.Kind.SOURCE,
                                                null);
         if (inputFiles.contains(outFile)) {
-            log.error(cdef.pos(), "source.cant.overwrite.input.file", outFile);
+            log.error(cdef.pos(), Errors.SourceCantOverwriteInputFile(outFile));
             return null;
         } else {
             try (BufferedWriter out = new BufferedWriter(outFile.openWriter())) {
@@ -791,7 +793,9 @@
      */
     public void readSourceFile(JCCompilationUnit tree, ClassSymbol c) throws CompletionFailure {
         if (completionFailureName == c.fullname) {
-            throw new CompletionFailure(c, "user-selected completion failure by class name");
+            JCDiagnostic msg =
+                    diagFactory.fragment(Fragments.UserSelectedCompletionFailure);
+            throw new CompletionFailure(c, msg);
         }
         JavaFileObject filename = c.classfile;
         JavaFileObject prev = log.useSource(filename);
@@ -800,7 +804,7 @@
             try {
                 tree = parse(filename, filename.getCharContent(false));
             } catch (IOException e) {
-                log.error("error.reading.file", filename, JavacFileManager.getMessage(e));
+                log.error(Errors.ErrorReadingFile(filename, JavacFileManager.getMessage(e)));
                 tree = make.TopLevel(List.<JCTree>nil());
             } finally {
                 log.useSource(prev);
@@ -819,7 +823,7 @@
         // have enough modules available to access java.lang, and
         // so risk getting FatalError("no.java.lang") from MemberEnter.
         if (!modules.enter(List.of(tree), c)) {
-            throw new CompletionFailure(c, diags.fragment("cant.resolve.modules"));
+            throw new CompletionFailure(c, diags.fragment(Fragments.CantResolveModules));
         }
 
         enter.complete(List.of(tree), c);
@@ -839,20 +843,18 @@
             if (isModuleInfo) {
                 if (enter.getEnv(tree.modle) == null) {
                     JCDiagnostic diag =
-                        diagFactory.fragment("file.does.not.contain.module");
+                        diagFactory.fragment(Fragments.FileDoesNotContainModule);
                     throw new ClassFinder.BadClassFile(c, filename, diag, diagFactory);
                 }
             } else if (isPkgInfo) {
                 if (enter.getEnv(tree.packge) == null) {
                     JCDiagnostic diag =
-                        diagFactory.fragment("file.does.not.contain.package",
-                                                 c.location());
+                        diagFactory.fragment(Fragments.FileDoesNotContainPackage(c.location()));
                     throw new ClassFinder.BadClassFile(c, filename, diag, diagFactory);
                 }
             } else {
                 JCDiagnostic diag =
-                        diagFactory.fragment("file.doesnt.contain.class",
-                                            c.getQualifiedName());
+                        diagFactory.fragment(Fragments.FileDoesntContainClass(c.getQualifiedName()));
                 throw new ClassFinder.BadClassFile(c, filename, diag, diagFactory);
             }
         }
@@ -1177,13 +1179,12 @@
             // annotation processing is to occur with compilation,
             // emit a warning.
             if (options.isSet(PROC, "only")) {
-                log.warning("proc.proc-only.requested.no.procs");
+                log.warning(Warnings.ProcProcOnlyRequestedNoProcs);
                 todo.clear();
             }
             // If not processing annotations, classnames must be empty
             if (!classnames.isEmpty()) {
-                log.error("proc.no.explicit.annotation.processing.requested",
-                          classnames);
+                log.error(Errors.ProcNoExplicitAnnotationProcessingRequested(classnames));
             }
             Assert.checkNull(deferredDiagnosticHandler);
             return ; // continue regular compilation
@@ -1198,8 +1199,7 @@
                  // Check for explicit request for annotation
                  // processing
                 if (!explicitAnnotationProcessingRequested()) {
-                    log.error("proc.no.explicit.annotation.processing.requested",
-                              classnames);
+                    log.error(Errors.ProcNoExplicitAnnotationProcessingRequested(classnames));
                     deferredDiagnosticHandler.reportDeferredDiagnostics();
                     log.popDiagnosticHandler(deferredDiagnosticHandler);
                     return ; // TODO: Will this halt compilation?
@@ -1252,7 +1252,7 @@
                 procEnvImpl.close();
             }
         } catch (CompletionFailure ex) {
-            log.error("cant.access", ex.sym, ex.getDetailValue());
+            log.error(Errors.CantAccess(ex.sym, ex.getDetailValue()));
             if (deferredDiagnosticHandler != null) {
                 deferredDiagnosticHandler.reportDeferredDiagnostics();
                 log.popDiagnosticHandler(deferredDiagnosticHandler);
@@ -1623,8 +1623,8 @@
                 if (results != null && file != null)
                     results.add(file);
             } catch (IOException ex) {
-                log.error(cdef.pos(), "class.cant.write",
-                          cdef.sym, ex.getMessage());
+                log.error(cdef.pos(),
+                          Errors.ClassCantWrite(cdef.sym, ex.getMessage()));
                 return;
             } finally {
                 log.useSource(prev);
@@ -1711,13 +1711,13 @@
                 && implicitSourceFilesRead
                 && implicitSourcePolicy == ImplicitSourcePolicy.UNSET) {
             if (explicitAnnotationProcessingRequested())
-                log.warning("proc.use.implicit");
+                log.warning(Warnings.ProcUseImplicit);
             else
-                log.warning("proc.use.proc.or.implicit");
+                log.warning(Warnings.ProcUseProcOrImplicit);
         }
         chk.reportDeferredDiagnostics();
         if (log.compressedOutput) {
-            log.mandatoryNote(null, "compressed.diags");
+            log.mandatoryNote(null, Notes.CompressedDiags);
         }
     }
 
@@ -1798,7 +1798,7 @@
                     // better written to set any/all exceptions from all the
                     // Closeables as suppressed exceptions on the FatalError
                     // that is thrown.
-                    JCDiagnostic msg = diagFactory.fragment("fatal.err.cant.close");
+                    JCDiagnostic msg = diagFactory.fragment(Fragments.FatalErrCantClose);
                     throw new FatalError(msg, e);
                 }
             }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1244,7 +1244,7 @@
                     if (sel.name != names._class) {
                         return illegal();
                     } else {
-                        log.error(token.pos, "no.annotations.on.dot.class");
+                        log.error(token.pos, Errors.NoAnnotationsOnDotClass);
                         return expr;
                     }
                 }
@@ -3039,7 +3039,7 @@
         int pos = token.pos;
         Name name;
         if (lambdaParameter && token.kind == UNDERSCORE) {
-            log.error(pos, "underscore.as.identifier.in.lambda");
+            log.error(pos, Errors.UnderscoreAsIdentifierInLambda);
             name = token.name();
             nextToken();
         } else {
@@ -3049,10 +3049,10 @@
                     name = ((JCIdent)pn).name;
                 } else {
                     if ((mods.flags & Flags.VARARGS) != 0) {
-                        log.error(token.pos, "varargs.and.receiver");
+                        log.error(token.pos, Errors.VarargsAndReceiver);
                     }
                     if (token.kind == LBRACKET) {
-                        log.error(token.pos, "array.and.receiver");
+                        log.error(token.pos, Errors.ArrayAndReceiver);
                     }
                     return toP(F.at(pos).ReceiverVarDef(mods, pn, type));
                 }
@@ -3062,7 +3062,7 @@
         }
         if ((mods.flags & Flags.VARARGS) != 0 &&
                 token.kind == LBRACKET) {
-            log.error(token.pos, "varargs.and.old.array.syntax");
+            log.error(token.pos, Errors.VarargsAndOldArraySyntax);
         }
         type = bracketsOpt(type);
         return toP(F.at(pos).VarDef(mods, name, type, null));
@@ -3104,7 +3104,7 @@
         } else {
             checkVariableInTryWithResources(startPos);
             if (!t.hasTag(IDENT) && !t.hasTag(SELECT)) {
-                log.error(t.pos(), "try.with.resources.expr.needs.var");
+                log.error(t.pos(), Errors.TryWithResourcesExprNeedsVar);
             }
 
             return t;
@@ -4144,52 +4144,52 @@
 
     void checkDiamond() {
         if (!allowDiamond) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "diamond.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.DiamondNotSupportedInSource(source.name));
         }
     }
     void checkMulticatch() {
         if (!allowMulticatch) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "multicatch.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.MulticatchNotSupportedInSource(source.name));
         }
     }
     void checkTryWithResources() {
         if (!allowTWR) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "try.with.resources.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.TryWithResourcesNotSupportedInSource(source.name));
         }
     }
     void checkVariableInTryWithResources(int startPos) {
         if (!allowEffectivelyFinalVariablesInTWR) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, startPos, "var.in.try.with.resources.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, startPos, Errors.VarInTryWithResourcesNotSupportedInSource(source.name));
         }
     }
     void checkLambda() {
         if (!allowLambda) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "lambda.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.LambdaNotSupportedInSource(source.name));
         }
     }
     void checkMethodReferences() {
         if (!allowMethodReferences) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "method.references.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.MethodReferencesNotSupportedInSource(source.name));
         }
     }
     void checkDefaultMethods() {
         if (!allowDefaultMethods) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "default.methods.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.DefaultMethodsNotSupportedInSource(source.name));
         }
     }
     void checkIntersectionTypesInCast() {
         if (!allowIntersectionTypesInCast) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "intersection.types.in.cast.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.IntersectionTypesInCastNotSupportedInSource(source.name));
         }
     }
     void checkStaticInterfaceMethods() {
         if (!allowStaticInterfaceMethods) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "static.intf.methods.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.StaticIntfMethodsNotSupportedInSource(source.name));
         }
     }
     void checkTypeAnnotations() {
         if (!allowTypeAnnotations) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, "type.annotations.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, token.pos, Errors.TypeAnnotationsNotSupportedInSource(source.name));
         }
     }
     void checkPrivateInterfaceMethods() {
@@ -4199,7 +4199,7 @@
     }
     protected void checkAnnotationsAfterTypeParams(int pos) {
         if (!allowAnnotationsAfterTypeParams) {
-            log.error(DiagnosticFlag.SOURCE_LEVEL, pos, "annotations.after.type.params.not.supported.in.source", source.name);
+            log.error(DiagnosticFlag.SOURCE_LEVEL, pos, Errors.AnnotationsAfterTypeParamsNotSupportedInSource(source.name));
         }
     }
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/UnicodeReader.java	Tue Jun 27 16:00:14 2017 -0400
@@ -29,6 +29,7 @@
 import java.util.Arrays;
 
 import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
 import com.sun.tools.javac.util.ArrayUtils;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Name;
@@ -176,7 +177,7 @@
                         return;
                     }
                 }
-                log.error(bp, "illegal.unicode.esc");
+                log.error(bp, Errors.IllegalUnicodeEsc);
             } else {
                 bp--;
                 ch = '\\';
@@ -231,7 +232,7 @@
         int codePoint = peekSurrogates();
         int result = codePoint >= 0 ? Character.digit(codePoint, base) : Character.digit(c, base);
         if (result >= 0 && c > 0x7f) {
-            log.error(pos + 1, "illegal.nonascii.digit");
+            log.error(pos + 1, Errors.IllegalNonasciiDigit);
             if (codePoint >= 0)
                 scanChar();
             ch = "0123456789abcdef".charAt(result);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java	Tue Jun 27 16:00:14 2017 -0400
@@ -56,6 +56,7 @@
 import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.comp.Modules;
 import com.sun.tools.javac.model.JavacElements;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.DefinedBy.Api;
 
@@ -482,7 +483,7 @@
                 String base = name.substring(periodIndex);
                 String extn = (isSourceFile ? ".java" : ".class");
                 if (base.equals(extn))
-                    log.warning("proc.suspicious.class.name", name, extn);
+                    log.warning(Warnings.ProcSuspiciousClassName(name, extn));
             }
         }
         checkNameAndExistence(mod, name, isSourceFile);
@@ -500,7 +501,7 @@
         checkFileReopening(fileObject, true);
 
         if (lastRound)
-            log.warning("proc.file.create.last.round", name);
+            log.warning(Warnings.ProcFileCreateLastRound(name));
 
         if (isSourceFile)
             aggregateGeneratedSourceNames.add(Pair.of(mod, name));
@@ -690,7 +691,7 @@
     private void checkName(String name, boolean allowUnnamedPackageInfo) throws FilerException {
         if (!SourceVersion.isName(name) && !isPackageInfo(name, allowUnnamedPackageInfo)) {
             if (lint)
-                log.warning("proc.illegal.file.name", name);
+                log.warning(Warnings.ProcIllegalFileName(name));
             throw new FilerException("Illegal name " + name);
         }
     }
@@ -722,7 +723,7 @@
                                initialInputs.contains(existing.sourcefile));
         if (alreadySeen) {
             if (lint)
-                log.warning("proc.type.recreate", typename);
+                log.warning(Warnings.ProcTypeRecreate(typename));
             throw new FilerException("Attempt to recreate a file for type " + typename);
         }
         if (!mod.isUnnamed() && !typename.contains(".")) {
@@ -737,7 +738,7 @@
     private void checkFileReopening(FileObject fileObject, boolean forWriting) throws FilerException {
         if (isInFileObjectHistory(fileObject, forWriting)) {
             if (lint)
-                log.warning("proc.file.reopening", fileObject.getName());
+                log.warning(Warnings.ProcFileReopening(fileObject.getName()));
             throw new FilerException("Attempt to reopen a file for path " + fileObject.getName());
         }
         if (forWriting)
@@ -797,7 +798,7 @@
 
     public void warnIfUnclosedFiles() {
         if (!openTypeNames.isEmpty())
-            log.warning("proc.unclosed.type.files", openTypeNames.toString());
+            log.warning(Warnings.ProcUnclosedTypeFiles(openTypeNames));
     }
 
     /**
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacMessager.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacMessager.java	Tue Jun 27 16:00:14 2017 -0400
@@ -26,6 +26,9 @@
 package com.sun.tools.javac.processing;
 
 import com.sun.tools.javac.model.JavacElements;
+import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Notes;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.DefinedBy.Api;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
@@ -114,21 +117,21 @@
             switch (kind) {
             case ERROR:
                 errorCount++;
-                log.error(DiagnosticFlag.MULTIPLE, pos, "proc.messager", msg.toString());
+                log.error(DiagnosticFlag.MULTIPLE, pos, Errors.ProcMessager(msg.toString()));
                 break;
 
             case WARNING:
                 warningCount++;
-                log.warning(pos, "proc.messager", msg.toString());
+                log.warning(pos, Warnings.ProcMessager(msg.toString()));
                 break;
 
             case MANDATORY_WARNING:
                 warningCount++;
-                log.mandatoryWarning(pos, "proc.messager", msg.toString());
+                log.mandatoryWarning(pos, Warnings.ProcMessager(msg.toString()));
                 break;
 
             default:
-                log.note(pos, "proc.messager", msg.toString());
+                log.note(pos, Notes.ProcMessager(msg.toString()));
                 break;
             }
         } finally {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Jun 27 16:00:14 2017 -0400
@@ -69,6 +69,7 @@
 import com.sun.tools.javac.platform.PlatformDescription;
 import com.sun.tools.javac.platform.PlatformDescription.PluginInfo;
 import com.sun.tools.javac.resources.CompilerProperties.Errors;
+import com.sun.tools.javac.resources.CompilerProperties.Warnings;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.Abort;
@@ -412,7 +413,7 @@
                     this.iterator = handleServiceLoaderUnavailability("proc.no.service", null);
                 }
             } catch (Throwable t) {
-                log.error("proc.service.problem");
+                log.error(Errors.ProcServiceProblem);
                 throw new Abort(t);
             }
         }
@@ -428,7 +429,7 @@
             try {
                 return internalHasNext();
             } catch(ServiceConfigurationError sce) {
-                log.error("proc.bad.config.file", sce.getLocalizedMessage());
+                log.error(Errors.ProcBadConfigFile(sce.getLocalizedMessage()));
                 throw new Abort(sce);
             } catch (Throwable t) {
                 throw new Abort(t);
@@ -444,7 +445,7 @@
             try {
                 return internalNext();
             } catch (ServiceConfigurationError sce) {
-                log.error("proc.bad.config.file", sce.getLocalizedMessage());
+                log.error(Errors.ProcBadConfigFile(sce.getLocalizedMessage()));
                 throw new Abort(sce);
             } catch (Throwable t) {
                 throw new Abort(t);
@@ -561,13 +562,13 @@
                     ensureReadable(processorClass);
                     return (Processor) processorClass.getConstructor().newInstance();
                 } catch (ClassNotFoundException cnfe) {
-                    log.error("proc.processor.not.found", processorName);
+                    log.error(Errors.ProcProcessorNotFound(processorName));
                     return null;
                 } catch (ClassCastException cce) {
-                    log.error("proc.processor.wrong.type", processorName);
+                    log.error(Errors.ProcProcessorWrongType(processorName));
                     return null;
                 } catch (Exception e ) {
-                    log.error("proc.processor.cant.instantiate", processorName);
+                    log.error(Errors.ProcProcessorCantInstantiate(processorName));
                     return null;
                 }
             } catch (ClientCodeException e) {
@@ -707,19 +708,17 @@
             SourceVersion procSourceVersion = processor.getSupportedSourceVersion();
 
             if (procSourceVersion.compareTo(Source.toSourceVersion(source)) < 0 )  {
-                log.warning("proc.processor.incompatible.source.version",
-                            procSourceVersion,
-                            processor.getClass().getName(),
-                            source.name);
+                log.warning(Warnings.ProcProcessorIncompatibleSourceVersion(procSourceVersion,
+                                                                            processor.getClass().getName(),
+                                                                            source.name));
             }
         }
 
         private boolean checkOptionName(String optionName, Log log) {
             boolean valid = isValidOptionName(optionName);
             if (!valid)
-                log.error("proc.processor.bad.option.name",
-                            optionName,
-                            processor.getClass().getName());
+                log.error(Errors.ProcProcessorBadOptionName(optionName,
+                                                            processor.getClass().getName()));
             return valid;
         }
 
@@ -904,8 +903,7 @@
             // Remove annotations processed by javac
             unmatchedAnnotations.keySet().removeAll(platformAnnotations);
             if (unmatchedAnnotations.size() > 0) {
-                log.warning("proc.annotations.without.processors",
-                            unmatchedAnnotations.keySet());
+                log.warning(Warnings.ProcAnnotationsWithoutProcessors(unmatchedAnnotations.keySet()));
             }
         }
 
@@ -967,12 +965,12 @@
         try {
             return proc.process(tes, renv);
         } catch (ClassFinder.BadClassFile ex) {
-            log.error("proc.cant.access.1", ex.sym, ex.getDetailValue());
+            log.error(Errors.ProcCantAccess1(ex.sym, ex.getDetailValue()));
             return false;
         } catch (CompletionFailure ex) {
             StringWriter out = new StringWriter();
             ex.printStackTrace(new PrintWriter(out));
-            log.error("proc.cant.access", ex.sym, ex.getDetailValue(), out.toString());
+            log.error(Errors.ProcCantAccess(ex.sym, ex.getDetailValue(), out.toString()));
             return false;
         } catch (ClientCodeException e) {
             throw e;
@@ -1385,7 +1383,7 @@
 
     private void warnIfUnmatchedOptions() {
         if (!unmatchedProcessorOptions.isEmpty()) {
-            log.warning("proc.unmatched.processor.options", unmatchedProcessorOptions.toString());
+            log.warning(Warnings.ProcUnmatchedProcessorOptions(unmatchedProcessorOptions.toString()));
         }
     }
 
@@ -1490,7 +1488,7 @@
                 throw new AssertionError(ex);
             }
             catch (ServiceProxy.ServiceConfigurationError e) {
-                log.error("proc.bad.config.file", e.getLocalizedMessage());
+                log.error(Errors.ProcBadConfigFile(e.getLocalizedMessage()));
                 return true;
             }
         }
@@ -1682,7 +1680,7 @@
         if (MatchingUtils.isValidImportString(pkg)) {
             return Pattern.compile(module + MatchingUtils.validImportStringToPatternString(pkg));
         } else {
-            log.warning("proc.malformed.supported.string", s, p.getClass().getName());
+            log.warning(Warnings.ProcMalformedSupportedString(s, p.getClass().getName()));
             return noMatches; // won't match any valid identifier
         }
     }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -28,12 +28,14 @@
 # values.
 # The simple types currently in use are:
 #
+# annotation        annotation compound
 # boolean           true or false
 # diagnostic        a sub-message; see compiler.misc.*
 # fragment          similar to 'message segment', but with more specific type
 # modifier          a Java modifier; e.g. public, private, protected
 # file              a file URL
 # file object       a file URL - similar to 'file' but typically used for source/class files, hence more specific
+# flag              a Flags.Flag instance
 # name              a name, typically a Java identifier
 # number            an integer
 # option name       the name of a command line option
@@ -49,8 +51,9 @@
 #
 # The following compound types are also used:
 #
+# collection of X   a comma-separated collection of items; e.g. collection of type
 # list of X         a comma-separated list of items; e.g. list of type
-# set of X          a comma-separated collection of items; e.g. set of modifier
+# set of X          a comma-separated set of items; e.g. set of modifier
 #
 # These may be composed:
 #
@@ -59,7 +62,7 @@
 # The following type aliases are supported:
 #
 # message segment --> diagnostic or fragment
-# file name --> file or file object
+# file name --> file, path or file object
 #
 # Custom comments are supported in parenthesis i.e.
 #
@@ -85,25 +88,27 @@
 compiler.err.abstract.meth.cant.have.body=\
     abstract methods cannot have a body
 
+# 0: kind name, 1: symbol
 compiler.err.already.annotated=\
     {0} {1} has already been annotated
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: symbol
 compiler.err.already.defined=\
     {0} {1} is already defined in {2} {3}
 
-# 0: symbol kind, 1: symbol, 2: symbol kind, 3: symbol kind, 4: symbol
+# 0: kind name, 1: symbol, 2: kind name, 3: kind name, 4: symbol
 compiler.err.already.defined.in.clinit=\
     {0} {1} is already defined in {2} of {3} {4}
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.single.import=\
     a type with the same simple name is already defined by the single-type-import of {0}
 
-# 0: string
+# 0: symbol
 compiler.err.already.defined.static.single.import=\
     a type with the same simple name is already defined by the static single-type-import of {0}
 
+# 0: symbol
 compiler.err.already.defined.this.unit=\
     {0} is already defined in this compilation unit
 
@@ -129,15 +134,15 @@
 compiler.err.annotation.value.must.be.annotation=\
     annotation value must be an annotation
 
-compiler.err.annotation.value.must.be.class.literal=\
-    annotation value must be a class literal
-
 compiler.err.annotation.value.must.be.name.value=\
     annotation values must be of the form ''name=value''
 
 compiler.err.annotation.value.not.allowable.type=\
     annotation value not of an allowable type
 
+compiler.err.expression.not.allowable.as.annotation.value=\
+    expression not allowed as annotation value
+
 compiler.err.anon.class.impl.intf.no.args=\
     anonymous class implements interface; cannot have arguments
 
@@ -197,11 +202,11 @@
 compiler.misc.cant.apply.symbols=\
     no suitable {0} found for {1}({2})
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.no.abstracts=\
     no abstract method found in {0} {1}
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.abstracts=\
     multiple non-overriding abstract methods found in {0} {1}
 
@@ -227,12 +232,12 @@
     {0} is not a functional interface\n\
     {1}
 
-# 0: symbol, 1: symbol kind, 2: symbol
+# 0: type, 1: kind name, 2: symbol
 compiler.misc.invalid.generic.lambda.target=\
     invalid functional descriptor for lambda expression\n\
     method {0} in {1} {2} is generic
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.misc.incompatible.descs.in.functional.intf=\
     incompatible function descriptors found in {0} {1}
 
@@ -257,7 +262,7 @@
 compiler.misc.not.an.intf.component=\
     component type {0} is not an interface
 
-# 0: symbol kind, 1: message segment
+# 0: kind name, 1: message segment
 compiler.err.invalid.mref=\
     invalid {0} reference\n\
     {1}
@@ -307,7 +312,7 @@
 compiler.err.cant.inherit.from.final=\
     cannot inherit from final {0}
 
-# 0: symbol
+# 0: symbol or string
 compiler.err.cant.ref.before.ctor.called=\
     cannot reference {0} before supertype constructor has been called
 
@@ -321,7 +326,7 @@
 compiler.err.catch.without.try=\
     ''catch'' without ''try''
 
-# 0: symbol kind, 1: symbol
+# 0: kind name, 1: symbol
 compiler.err.clash.with.pkg.of.same.name=\
     {0} {1} clashes with package of same name
 
@@ -334,7 +339,7 @@
 compiler.err.cont.outside.loop=\
     continue outside of loop
 
-# 0: symbol
+# 0: symbol or type
 compiler.err.cyclic.inheritance=\
     cyclic inheritance involving {0}
 
@@ -342,7 +347,7 @@
 compiler.err.cyclic.annotation.element=\
     type of element {0} is cyclic
 
-# 0: unused
+# 0: symbol
 compiler.err.call.to.super.not.allowed.in.enum.ctor=\
     call to super not allowed in enum constructor
 
@@ -350,7 +355,7 @@
 compiler.err.no.superclass=\
     {0} has no superclass.
 
-# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
+# 0: symbol, 1: type, 2: symbol, 3: type, 4: type
 compiler.err.concrete.inheritance.conflict=\
     methods {0} from {1} and {2} from {3} are inherited with the same signature
 
@@ -369,11 +374,11 @@
 compiler.err.duplicate.annotation.member.value=\
     duplicate element ''{0}'' in annotation @{1}.
 
-# 0: name, 1: unused
+# 0: type
 compiler.err.duplicate.annotation.missing.container=\
     {0} is not a repeatable annotation type
 
-# 0: type, 1: unused
+# 0: symbol
 compiler.err.invalid.repeatable.annotation=\
     duplicate annotation: {0} is annotated with an invalid @Repeatable annotation
 
@@ -389,7 +394,7 @@
 compiler.err.invalid.repeatable.annotation.invalid.value=\
     {0} is not a valid @Repeatable: invalid value element
 
-# 0: symbol or type, 1: unused, 2: type
+# 0: symbol or type, 1: type, 2: type
 compiler.err.invalid.repeatable.annotation.value.return=\
     containing annotation type ({0}) must declare an element named ''value'' of type {2}
 
@@ -397,7 +402,7 @@
 compiler.err.invalid.repeatable.annotation.elem.nondefault=\
     containing annotation type ({0}) does not have a default value for element {1}
 
-# 0: symbol, 1: unused, 2: symbol, 3: unused
+# 0: symbol, 1: string, 2: symbol, 3: string
 compiler.err.invalid.repeatable.annotation.retention=\
     retention of containing annotation type ({0}) is shorter than the retention of repeatable annotation type ({2})
 
@@ -526,7 +531,7 @@
 compiler.err.illegal.char.for.encoding=\
     unmappable character (0x{0}) for encoding {1}
 
-# 0: set of modifier, 1: set of modifier
+# 0: set of flag, 1: set of flag
 compiler.err.illegal.combination.of.modifiers=\
     illegal combination of modifiers: {0} and {1}
 
@@ -539,7 +544,7 @@
 compiler.err.illegal.forward.ref=\
     illegal forward reference
 
-# 0: symbol, 1: string
+# 0: symbol, 1: object
 compiler.err.not.in.profile=\
     {0} is not available in profile ''{1}''
 
@@ -627,9 +632,8 @@
 compiler.err.intf.meth.cant.have.body=\
     interface abstract methods cannot have body
 
-# 0: symbol
 compiler.err.invalid.annotation.member.type=\
-    invalid type for element {0} of annotation type
+    invalid type for annotation type element
 
 compiler.err.invalid.binary.number=\
     binary numbers must contain at least one binary digit
@@ -707,6 +711,7 @@
 compiler.err.limit.string=\
     constant string too long
 
+# 0: string
 compiler.err.limit.string.overflow=\
     UTF8 representation for string \"{0}...\" is too long for the constant pool
 
@@ -722,14 +727,14 @@
 compiler.err.missing.ret.stmt=\
     missing return statement
 
-# 0: unused
+# 0: type
 compiler.misc.missing.ret.val=\
     missing return value
 
 compiler.misc.unexpected.ret.val=\
     unexpected return value
 
-# 0: set of modifier
+# 0: set of flag
 compiler.err.mod.not.allowed.here=\
     modifier {0} not allowed here
 
@@ -778,7 +783,7 @@
 compiler.misc.conditional.target.cant.be.void=\
     target-type for conditional expression cannot be void
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.lambda=\
     bad return type in lambda expression\n\
     {0}
@@ -787,7 +792,7 @@
     lambda body is not compatible with a void functional interface\n\
     (consider using a block lambda body, or use a statement expression instead)
 
-# 0: type
+# 0: message segment
 compiler.misc.incompatible.ret.type.in.mref=\
     bad return type in method reference\n\
     {0}
@@ -808,9 +813,11 @@
 compiler.err.new.not.allowed.in.annotation=\
     ''new'' not allowed in an annotation
 
+# 0: name, 1: type
 compiler.err.no.annotation.member=\
     no annotation member {0} in {1}
 
+# 0: symbol
 compiler.err.no.encl.instance.of.type.in.scope=\
     no enclosing instance of type {0} is in scope
 
@@ -820,6 +827,7 @@
 compiler.err.no.match.entry=\
     {0} has no match in entry in {1}; required {2}
 
+# 0: type
 compiler.err.not.annotation.type=\
     {0} is not an annotation type
 
@@ -958,14 +966,14 @@
 
 # Errors related to annotation processing
 
-# 0: symbol, 1: string, 2: string (stack-trace)
+# 0: symbol, 1: message segment, 2: string (stack-trace)
 compiler.err.proc.cant.access=\
     cannot access {0}\n\
     {1}\n\
     Consult the following stack trace for details.\n\
     {2}
 
-# 0: symbol, 1: string
+# 0: symbol, 1: message segment
 compiler.err.proc.cant.access.1=\
     cannot access {0}\n\
     {1}
@@ -979,13 +987,21 @@
 compiler.err.proc.messager=\
     {0}
 
-# 0: list of string
+# 0: string
+compiler.misc.exception.message=\
+    {0}
+
+compiler.misc.user.selected.completion.failure=\
+    user-selected completion failure by class name
+
+# 0: collection of string
 compiler.err.proc.no.explicit.annotation.processing.requested=\
     Class names, ''{0}'', are only accepted if annotation processing is explicitly requested
 
 compiler.err.proc.no.service=\
     A ServiceLoader was not usable and is required for annotation processing.
 
+# 0: string, 1: string
 compiler.err.proc.processor.bad.option.name=\
     Bad option name ''{0}'' provided by processor ''{1}''
 
@@ -1004,13 +1020,14 @@
 compiler.err.proc.service.problem=\
     Error creating a service loader to load Processors.
 
+# 0: string
 compiler.err.proc.bad.config.file=\
     Bad service configuration file, or exception thrown while constructing Processor object: {0}
 
 compiler.err.proc.cant.create.loader=\
     Could not create class loader for annotation processors: {0}
 
-# 0: unused
+# 0: symbol
 compiler.err.qualified.new.of.static.class=\
     qualified new of static class
 
@@ -1061,9 +1078,11 @@
 compiler.err.does.not.override.abstract=\
     {0} is not abstract and does not override abstract method {1} in {2}
 
+# 0: file object
 compiler.err.source.cant.overwrite.input.file=\
     error writing source; cannot overwrite input file {0}
 
+# 0: symbol
 compiler.err.stack.sim.error=\
     Internal error: stack sim error on {0}
 
@@ -1123,7 +1142,7 @@
     illegal static interface method call\n\
     the receiver expression should be replaced with the type qualifier ''{0}''
 
-# 0: type, 1: message segment
+# 0: symbol or type, 1: message segment
 compiler.err.illegal.default.super.call=\
     bad type qualifier {0} in default super call\n\
     {1}
@@ -1145,7 +1164,7 @@
 compiler.err.unclosed.str.lit=\
     unclosed string literal
 
-# 0: name
+# 0: string
 compiler.err.unsupported.encoding=\
     unsupported encoding: {0}
 
@@ -1314,12 +1333,15 @@
 compiler.misc.fatal.err.no.java.lang=\
     Fatal Error: Unable to find package java.lang in classpath or bootclasspath
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.meth=\
     Fatal Error: Unable to find method {0}
 
+# 0: name
 compiler.misc.fatal.err.cant.locate.field=\
     Fatal Error: Unable to find field {0}
 
+# 0: type
 compiler.misc.fatal.err.cant.locate.ctor=\
     Fatal Error: Unable to find constructor for {0}
 
@@ -1527,7 +1549,7 @@
 compiler.warn.constant.SVUID=\
     serialVersionUID must be constant in class {0}
 
-# 0: file name
+# 0: path
 compiler.warn.dir.path.element.not.found=\
     bad path element "{0}": no such directory
 
@@ -1609,6 +1631,7 @@
 compiler.warn.override.varargs.extra=\
     {0}; overriding method is missing ''...''
 
+# 0: message segment
 compiler.warn.override.bridge=\
     {0}; overridden method is a bridge method
 
@@ -1616,7 +1639,7 @@
 compiler.warn.pkg-info.already.seen=\
     a package-info.java file has already been seen for package {0}
 
-# 0: file name
+# 0: path
 compiler.warn.path.element.not.found=\
     bad path element "{0}": no such file or directory
 
@@ -1678,7 +1701,7 @@
 compiler.warn.proc.package.does.not.exist=\
     package {0} does not exist
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.reopening=\
     Attempt to create a file for ''{0}'' multiple times
 
@@ -1686,7 +1709,7 @@
 compiler.warn.proc.type.already.exists=\
     A file for type ''{0}'' already exists on the sourcepath or classpath
 
-# 0: name
+# 0: string
 compiler.warn.proc.type.recreate=\
     Attempt to create a file for type ''{0}'' multiple times
 
@@ -1698,7 +1721,7 @@
 compiler.warn.proc.suspicious.class.name=\
     Creating file for a type whose name ends in {1}: ''{0}''
 
-# 0: name
+# 0: string
 compiler.warn.proc.file.create.last.round=\
     File for type ''{0}'' created in the last round will not be subject to annotation processing.
 
@@ -1730,7 +1753,7 @@
 compiler.warn.proc.messager=\
     {0}
 
-# 0: set of name
+# 0: set of string
 compiler.warn.proc.unclosed.type.files=\
     Unclosed files for the types ''{0}''; these types will not undergo annotation processing
 
@@ -1784,16 +1807,19 @@
 compiler.warn.missing.deprecated.annotation=\
     deprecated item is not annotated with @Deprecated
 
-# 0: symbol kind
+# 0: kind name
 compiler.warn.deprecated.annotation.has.no.effect=\
     @Deprecated annotation has no effect on this {0} declaration
 
+# 0: string
 compiler.warn.invalid.path=\
     Invalid filename: {0}
 
+# 0: path
 compiler.warn.invalid.archive.file=\
     Unexpected file on path: {0}
 
+# 0: path
 compiler.warn.unexpected.archive.file=\
     Unexpected extension for archive file: {0}
 
@@ -1807,17 +1833,19 @@
 compiler.warn.empty.if=\
     empty statement after if
 
+# 0: type, 1: name
 compiler.warn.annotation.method.not.found=\
     Cannot find annotation method ''{1}()'' in type ''{0}''
 
+# 0: type, 1: name, 2: message segment
 compiler.warn.annotation.method.not.found.reason=\
     Cannot find annotation method ''{1}()'' in type ''{0}'': {2}
 
-# 0: symbol, 1: name
+# 0: file object, 1: symbol, 2: name
 compiler.warn.unknown.enum.constant=\
     unknown enum constant {1}.{2}
 
-# 0: symbol, 1: name, 2: message segment
+# 0: file object, 1: symbol, 2: name, 3: message segment
 compiler.warn.unknown.enum.constant.reason=\
     unknown enum constant {1}.{2}\n\
     reason: {3}
@@ -1827,7 +1855,6 @@
     found raw type: {0}\n\
     missing type arguments for generic class {1}
 
-# 0: unused, 1: unused
 compiler.warn.diamond.redundant.args=\
     Redundant type arguments in new expression (use diamond operator instead).
 
@@ -2004,6 +2031,7 @@
 compiler.misc.module.info.invalid.super.class=\
     module-info with invalid super class
 
+# 0: name
 compiler.misc.class.file.not.found=\
     class file for {0} not found
 
@@ -2031,6 +2059,7 @@
 compiler.misc.file.doesnt.contain.class=\
     file does not contain class {0}
 
+# 0: symbol
 compiler.misc.file.does.not.contain.package=\
     file does not contain package {0}
 
@@ -2105,14 +2134,14 @@
 # compiler.err.no.elem.type=\
 #     \[\*\] cannot have a type
 
-# 0: type
+# 0: message segment
 compiler.misc.try.not.applicable.to.type=\
     try-with-resources not applicable to variable type\n\
     ({0})
 
 #####
 
-# 0: message segment or type, 1: message segment
+# 0: object, 1: message segment
 compiler.err.type.found.req=\
     unexpected type\n\
     required: {1}\n\
@@ -2232,11 +2261,10 @@
     type arguments {0} inferred for {1} are not allowed in this context\n\
     inferred arguments are not expressible in the Signature attribute
 
-# 0: unused
+# 0: type
 compiler.misc.diamond.and.explicit.params=\
     cannot use ''<>'' with explicit type parameters for constructor
 
-# 0: unused
 compiler.misc.mref.infer.and.explicit.params=\
     cannot use raw constructor reference with explicit type parameters for constructor
 
@@ -2266,7 +2294,7 @@
     auxiliary class {0} in {1} should not be accessed from outside its own source file
 
 ## The first argument ({0}) is a "kindname".
-# 0: symbol kind, 1: symbol, 2: symbol
+# 0: kind name, 1: symbol, 2: symbol
 compiler.err.abstract.cant.be.accessed.directly=\
     abstract {0} {1} in {2} cannot be accessed directly
 
@@ -2289,6 +2317,7 @@
 
 ## Both arguments ({0}, {1}) are "kindname"s.  {0} is a comma-separated list
 ## of kindnames (the list should be identical to that provided in source.
+# 0: set of kind name, 1: set of kind name
 compiler.err.unexpected.type=\
     unexpected type\n\
     required: {0}\n\
@@ -2304,36 +2333,36 @@
 ## The second argument {1} is the non-resolved symbol
 ## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
 ## The fourth argument {3} is a list of argument types (non-empty if {1} is a method)
-# 0: symbol kind, 1: name, 2: unused, 3: unused
+# 0: kind name, 1: name, 2: unused, 3: unused
 compiler.err.cant.resolve=\
     cannot find symbol\n\
     symbol: {0} {1}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type
+# 0: kind name, 1: name, 2: unused, 3: list of type
 compiler.err.cant.resolve.args=\
     cannot find symbol\n\
     symbol: {0} {1}({3})
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list of type
+# 0: kind name, 1: name, 2: list of type, 3: list of type
 compiler.err.cant.resolve.args.params=\
     cannot find symbol\n\
     symbol: {0} <{2}>{1}({3})
 
 ## arguments from {0} to {3} have the same meaning as above
 ## The fifth argument {4} is a location subdiagnostic (see below)
-# 0: symbol kind, 1: name, 2: unused, 3: unused, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: unused, 4: message segment
 compiler.err.cant.resolve.location=\
     cannot find symbol\n\
     symbol:   {0} {1}\n\
     location: {4}
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.err.cant.resolve.location.args=\
     cannot find symbol\n\
     symbol:   {0} {1}({3})\n\
     location: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.err.cant.resolve.location.args.params=\
     cannot find symbol\n\
     symbol:   {0} <{2}>{1}({3})\n\
@@ -2341,13 +2370,13 @@
 
 ### Following are replicated/used for method reference diagnostics
 
-# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+# 0: kind name, 1: name, 2: unused, 3: list of type, 4: message segment
 compiler.misc.cant.resolve.location.args=\
     cannot find symbol\n\
     symbol:   {0} {1}({3})\n\
     location: {4}
 
-# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+# 0: kind name, 1: name, 2: list of type, 3: list, 4: message segment
 compiler.misc.cant.resolve.location.args.params=\
     cannot find symbol\n\
     symbol:   {0} <{2}>{1}({3})\n\
@@ -2358,11 +2387,11 @@
 ## The second argument {1} is the location name
 ## The third argument {2} is the location type (only when {1} is a variable name)
 
-# 0: symbol kind, 1: type or symbol, 2: unused
+# 0: kind name, 1: type or symbol, 2: unused
 compiler.misc.location=\
     {0} {1}
 
-# 0: symbol kind, 1: symbol, 2: type
+# 0: kind name, 1: symbol, 2: type
 compiler.misc.location.1=\
     {0} {1} of type {2}
 
@@ -2426,7 +2455,7 @@
     {0}\n\
     overriding method is static
 
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag
 compiler.err.override.meth=\
     {0}\n\
     overridden method is {1}
@@ -2438,7 +2467,7 @@
 
 # In the following string {1} is a space separated list of Java Keywords, as
 # they would have been declared in the source code
-# 0: message segment, 1: set of modifier
+# 0: message segment, 1: set of flag or string
 compiler.err.override.weaker.access=\
     {0}\n\
     attempting to assign weaker access privileges; was {1}
@@ -2504,7 +2533,7 @@
 compiler.misc.varargs.clash.with=\
     {0} in {1} overrides {2} in {3}
 
-# 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
+# 0: kind name, 1: symbol, 2: symbol, 3: message segment
 compiler.misc.inapplicable.method=\
     {0} {1}.{2} is not applicable\n\
     ({3})
@@ -2563,17 +2592,16 @@
 compiler.err.this.as.identifier=\
     as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter
 
-# 0: symbol
 compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\
     receiver parameter not applicable for constructor of top-level class
 
 # TODO 308: make a better error message
-# 0: symbol
+# 0: annotation
 compiler.err.cant.type.annotate.scoping.1=\
     scoping construct cannot be annotated with type-use annotation: {0}
 
 # TODO 308: make a better error message
-# 0: list of symbol
+# 0: list of annotation
 compiler.err.cant.type.annotate.scoping=\
     scoping construct cannot be annotated with type-use annotations: {0}
 
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -40,6 +40,7 @@
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.code.Types;
+import com.sun.tools.javac.resources.CompilerProperties.Fragments;
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.TypeTag.*;
@@ -520,7 +521,7 @@
                 if (indexOf(t, WhereClauseKind.INTERSECTION) == -1) {
                     Type supertype = types.supertype(t);
                     List<Type> interfaces = types.interfaces(t);
-                    JCDiagnostic d = diags.fragment("where.intersection", t, interfaces.prepend(supertype));
+                    JCDiagnostic d = diags.fragment(Fragments.WhereIntersection(t, interfaces.prepend(supertype)));
                     whereClauses.get(WhereClauseKind.INTERSECTION).put(t, d);
                     visit(supertype);
                     visit(interfaces);
@@ -575,7 +576,7 @@
                 } else {
                     Assert.check(!boundErroneous);
                     //this is a fresh (synthetic) tvar
-                    JCDiagnostic d = diags.fragment("where.fresh.typevar", t, bounds);
+                    JCDiagnostic d = diags.fragment(Fragments.WhereFreshTypevar(t, bounds));
                     whereClauses.get(WhereClauseKind.TYPEVAR).put(t, d);
                     visit(bounds);
                 }
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,8 +32,8 @@
  * tag must implement this interface.
  *
  * <p style="font-style: italic; font-size:larger">
- * <b>Note:</b> This interface has been superseded by one
- * in the new package {@code jdk.javadoc.doclet.taglet}.
+ * <b>Note:</b> This interface has been superseded by its replacement,
+ * {@link jdk.javadoc.doclet.Taglet}.
  * </p>
  *
  * To be loaded and used by
@@ -66,7 +66,8 @@
  * @author Jamie Ho
  *
  * @deprecated
- *   This interface has been superseded by one in the new package {@code jdk.javadoc.doclet.taglet}.
+ * This interface has been superseded by its replacement,
+ * {@link jdk.javadoc.doclet.Taglet}.
  */
 @Deprecated
 public interface Taglet {
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java	Tue Jun 27 16:00:14 2017 -0400
@@ -31,7 +31,7 @@
 /**
  * This doclet generates HTML-formatted documentation for the specified packages and types.
  * @deprecated The doclet has been superseded by its replacement,
- * {@code jdk.javadoc.doclets.StandardDoclet}.
+ * {@link jdk.javadoc.doclet.StandardDoclet}.
  */
 @Deprecated(forRemoval=true, since="9")
 public class Standard {
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/StandardDoclet.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,11 @@
 import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
 
 /**
- * This doclet generates HTML-formatted documentation for the specified modules, packages and types.
+ * This doclet generates HTML-formatted documentation for the specified modules,
+ * packages and types.
+ *
+ * @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ *      Documentation Comment Specification for the Standard Doclet</a>
  */
 public class StandardDoclet implements Doclet {
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -375,7 +375,7 @@
         Content li = HtmlTree.LI(contents.summaryLabel);
         li.addContent(Contents.SPACE);
         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
-        MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
+        MemberSummaryBuilder memberSummaryBuilder =
                 configuration.getBuilderFactory().getMemberSummaryBuilder(this);
         Content liNavField = new HtmlTree(HtmlTag.LI);
         addNavSummaryLink(memberSummaryBuilder,
@@ -426,7 +426,7 @@
         Content li = HtmlTree.LI(contents.detailLabel);
         li.addContent(Contents.SPACE);
         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
-        MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
+        MemberSummaryBuilder memberSummaryBuilder =
                 configuration.getBuilderFactory().getMemberSummaryBuilder(this);
         AbstractMemberWriter writerField =
                 ((AbstractMemberWriter) memberSummaryBuilder.
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Tue Jun 27 16:00:14 2017 -0400
@@ -688,7 +688,7 @@
         Content li = HtmlTree.LI(contents.summaryLabel);
         li.addContent(Contents.SPACE);
         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
-        MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
+        MemberSummaryBuilder memberSummaryBuilder =
                 configuration.getBuilderFactory().getMemberSummaryBuilder(this);
         for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.summarySet) {
             Content liNav = new HtmlTree(HtmlTag.LI);
@@ -724,7 +724,7 @@
         Content li = HtmlTree.LI(contents.detailLabel);
         li.addContent(Contents.SPACE);
         Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
-        MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
+        MemberSummaryBuilder memberSummaryBuilder =
                 configuration.getBuilderFactory().getMemberSummaryBuilder(this);
         for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.detailSet) {
             Content liNav = new HtmlTree(HtmlTag.LI);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Tue Jun 27 16:00:14 2017 -0400
@@ -86,7 +86,7 @@
             $(this).val(watermark).addClass('watermark');
         }
     });
-    $("#search").keydown(function() {
+    $("#search").on('click keydown', function() {
         if ($(this).val() == watermark) {
             $(this).val('').removeClass('watermark');
         }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeRequiredMemberWriter.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeRequiredMemberWriter.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
 
 package jdk.javadoc.internal.doclets.toolkit;
 
-import java.io.*;
-
 import javax.lang.model.element.Element;
 import javax.lang.model.element.TypeElement;
+
 /**
  * The interface for writing annotation type required member output.
  *
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,28 +25,22 @@
 
 package jdk.javadoc.internal.doclets.toolkit.builders;
 
-import java.lang.reflect.*;
 import java.util.*;
 
 import javax.lang.model.element.PackageElement;
 
 import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
-import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.DocletException;
 import jdk.javadoc.internal.doclets.toolkit.Messages;
 import jdk.javadoc.internal.doclets.toolkit.Resources;
-import jdk.javadoc.internal.doclets.toolkit.util.UncheckedDocletException;
-import jdk.javadoc.internal.doclets.toolkit.util.InternalException;
-import jdk.javadoc.internal.doclets.toolkit.util.SimpleDocletException;
 import jdk.javadoc.internal.doclets.toolkit.util.Utils;
 
-import static javax.tools.Diagnostic.Kind.*;
 
 /**
  * The superclass for all builders.  A builder is a class that provides
  * the structure and content of API documentation.  A builder is completely
  * doclet independent which means that any doclet can use builders to
- * construct documentation, as long as it impelements the appropriate
+ * construct documentation, as long as it implements the appropriate
  * writer interfaces.  For example, if a doclet wanted to use
  * {@link ConstantsSummaryBuilder} to build a constant summary, all it has to
  * do is implement the ConstantsSummaryWriter interface and pass it to the
@@ -74,17 +68,9 @@
          */
         final Set<PackageElement> containingPackagesSeen;
 
-        /**
-         * Shared parser for the builder XML file
-         */
-        final LayoutParser layoutParser;
-
-        Context(BaseConfiguration configuration,
-                Set<PackageElement> containingPackagesSeen,
-                LayoutParser layoutParser) {
+        Context(BaseConfiguration configuration, Set<PackageElement> containingPackagesSeen) {
             this.configuration = configuration;
             this.containingPackagesSeen = containingPackagesSeen;
-            this.layoutParser = layoutParser;
         }
     }
 
@@ -93,6 +79,7 @@
      */
     protected final BaseConfiguration configuration;
 
+    protected final BuilderFactory builderFactory;
     protected final Messages messages;
     protected final Resources resources;
     protected final Utils utils;
@@ -104,99 +91,23 @@
      */
     protected final Set<PackageElement> containingPackagesSeen;
 
-    protected final LayoutParser layoutParser;
-
-    /**
-     * True if we want to print debug output.
-     */
-    protected static final boolean DEBUG = false;
-
     /**
      * Construct a Builder.
      * @param c a context providing information used in this run of the doclet
      */
     public AbstractBuilder(Context c) {
         this.configuration = c.configuration;
+        this.builderFactory = configuration.getBuilderFactory();
         this.messages = configuration.getMessages();
         this.resources = configuration.getResources();
         this.utils = configuration.utils;
         this.containingPackagesSeen = c.containingPackagesSeen;
-        this.layoutParser = c.layoutParser;
     }
 
     /**
-     * Return the name of this builder.
-     *
-     * @return the name of the builder.
-     */
-    public abstract String getName();
-
-    /**
      * Build the documentation.
      *
      * @throws DocletException if there is a problem building the documentation
      */
     public abstract void build() throws DocletException;
-
-    /**
-     * Build the documentation, as specified by the given XML element.
-     *
-     * @param node the XML element that specifies which component to document.
-     * @param contentTree content tree to which the documentation will be added
-     * @throws DocletException if there is a problem building the documentation
-     */
-    protected void build(XMLNode node, Content contentTree) throws DocletException {
-        String component = node.name;
-        try {
-            String methodName = "build" + component;
-            if (DEBUG) {
-                configuration.reporter.print(ERROR,
-                        "DEBUG: " + getClass().getName() + "." + methodName);
-            }
-            Method method = getClass().getMethod(methodName, XMLNode.class, Content.class);
-            method.invoke(this, node, contentTree);
-
-        } catch (NoSuchMethodException e) {
-            // Use SimpleDocletException instead of InternalException because there is nothing
-            // informative about about the place the exception occurred, here in this method.
-            // The problem is either a misconfigured doclet.xml file or a missing method in the
-            // user-supplied(?) doclet
-            String message = resources.getText("doclet.builder.unknown.component", component);
-            throw new SimpleDocletException(message, e);
-
-        } catch (InvocationTargetException e) {
-            Throwable cause = e.getCause();
-            if (cause instanceof DocletException) {
-                throw (DocletException) cause;
-            } else if (cause instanceof UncheckedDocletException) {
-                throw (DocletException) cause.getCause();
-            } else {
-                // use InternalException, so that a stacktrace showing the position of
-                // the internal exception is generated
-                String message = resources.getText("doclet.builder.exception.in.component", component,
-                        e.getCause());
-                throw new InternalException(message, e.getCause());
-            }
-
-        } catch (ReflectiveOperationException e) {
-            // Use SimpleDocletException instead of InternalException because there is nothing
-            // informative about about the place the exception occurred, here in this method.
-            // The problem is specific to the method being invoked, such as illegal access
-            // or illegal argument.
-            String message = resources.getText("doclet.builder.exception.in.component", component, e);
-            throw new SimpleDocletException(message, e.getCause());
-        }
-    }
-
-    /**
-     * Build the documentation, as specified by the children of the given XML element.
-     *
-     * @param node the XML element that specifies which components to document.
-     * @param contentTree content tree to which the documentation will be added
-     * @throws DocletException if there is a problem while building the children
-     */
-    protected void buildChildren(XMLNode node, Content contentTree) throws DocletException {
-        for (XMLNode child : node.children)
-            build(child, contentTree);
-    }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractMemberBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractMemberBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -25,14 +25,6 @@
 
 package jdk.javadoc.internal.doclets.toolkit.builders;
 
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import javax.lang.model.element.Element;
-
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.DocletException;
 
@@ -50,7 +42,6 @@
  */
 public abstract class AbstractMemberBuilder extends AbstractBuilder {
 
-    public final Comparator<Element> comparator;
     /**
      * Construct a SubBuilder.
      * @param context a context object, providing information used in this run
@@ -58,7 +49,6 @@
      */
     public AbstractMemberBuilder(Context context) {
         super(context);
-        comparator = utils.makeGeneralPurposeComparator();
     }
 
     /**
@@ -72,20 +62,14 @@
         throw new AssertionError();
     }
 
-
     /**
-     * Builds the sub component if there is anything to document.
+     *
+     * Build the documentation.
      *
-     * @param node the XML element that specifies which components to document.
-     * @param contentTree content tree to which the documentation will be added
-     * @throws DocletException if there is a problem while building the documentation
+     * @param contentTree The content tree into which to add the documention
+     * @throws DocletException  if there is a problem building the documentation
      */
-    @Override
-    public void build(XMLNode node, Content contentTree) throws DocletException {
-        if (hasMembersToDocument()) {
-            super.build(node, contentTree);
-        }
-    }
+    public abstract void build(Content contentTree) throws DocletException;
 
     /**
      * Returns true if this subbuilder has anything to document.
@@ -93,10 +77,4 @@
      * @return true if this subbuilder has anything to document
      */
     public abstract boolean hasMembersToDocument();
-
-    public SortedSet<Element> asSortedSet(Collection<Element> members) {
-        SortedSet<Element> out = new TreeSet<>(comparator);
-        out.addAll(members);
-        return out;
-    }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,11 +47,6 @@
 public class AnnotationTypeBuilder extends AbstractBuilder {
 
     /**
-     * The root element of the annotation type XML is {@value}.
-     */
-    public static final String ROOT = "AnnotationTypeDoc";
-
-    /**
      * The annotation type being documented.
      */
     private final TypeElement annotationType;
@@ -100,29 +95,24 @@
      */
     @Override
     public void build() throws DocletException {
-        build(layoutParser.parseXML(ROOT), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return ROOT;
+        buildAnnotationTypeDoc(contentTree);
     }
 
     /**
      * Build the annotation type documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildAnnotationTypeDoc(Content contentTree) throws DocletException {
         contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
                " " + utils.getSimpleName(annotationType));
         Content annotationContentTree = writer.getAnnotationContentHeader();
-        buildChildren(node, annotationContentTree);
+
+        buildAnnotationTypeInfo(annotationContentTree);
+        buildMemberSummary(annotationContentTree);
+        buildAnnotationTypeMemberDetails(annotationContentTree);
+
         writer.addAnnotationContentTree(contentTree, annotationContentTree);
         writer.addFooter(contentTree);
         writer.printDocument(contentTree);
@@ -136,7 +126,7 @@
      */
     private void copyDocFiles() throws DocletException {
         PackageElement containingPackage = utils.containingPackage(annotationType);
-        if((configuration.packages == null ||
+        if ((configuration.packages == null ||
             !configuration.packages.contains(containingPackage) &&
             !containingPackagesSeen.contains(containingPackage))){
             //Only copy doc files dir if the containing package is not
@@ -150,34 +140,36 @@
     /**
      * Build the annotation information tree documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeInfo(XMLNode node, Content annotationContentTree)
+    protected void buildAnnotationTypeInfo(Content annotationContentTree)
             throws DocletException {
         Content annotationInfoTree = writer.getAnnotationInfoTreeHeader();
-        buildChildren(node, annotationInfoTree);
+
+        buildDeprecationInfo(annotationInfoTree);
+        buildAnnotationTypeSignature(annotationInfoTree);
+        buildAnnotationTypeDescription(annotationInfoTree);
+        buildAnnotationTypeTagInfo(annotationInfoTree);
+
         annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree));
     }
 
     /**
      * If this annotation is deprecated, build the appropriate information.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationInfoTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo (XMLNode node, Content annotationInfoTree) {
+    protected void buildDeprecationInfo(Content annotationInfoTree) {
         writer.addAnnotationTypeDeprecationInfo(annotationInfoTree);
     }
 
     /**
      * Build the signature of the current annotation type.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationInfoTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) {
+    protected void buildAnnotationTypeSignature(Content annotationInfoTree) {
         writer.addAnnotationTypeSignature(utils.modifiersToString(annotationType, true),
                 annotationInfoTree);
     }
@@ -185,48 +177,47 @@
     /**
      * Build the annotation type description.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationInfoTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeDescription(XMLNode node, Content annotationInfoTree) {
+    protected void buildAnnotationTypeDescription(Content annotationInfoTree) {
         writer.addAnnotationTypeDescription(annotationInfoTree);
     }
 
     /**
      * Build the tag information for the current annotation type.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationInfoTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeTagInfo(XMLNode node, Content annotationInfoTree) {
+    protected void buildAnnotationTypeTagInfo(Content annotationInfoTree) {
         writer.addAnnotationTypeTagInfo(annotationInfoTree);
     }
 
     /**
      * Build the member summary contents of the page.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildMemberSummary(XMLNode node, Content annotationContentTree) throws DocletException {
+    protected void buildMemberSummary(Content annotationContentTree) throws DocletException {
         Content memberSummaryTree = writer.getMemberTreeHeader();
-        configuration.getBuilderFactory().
-                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
+        builderFactory.getMemberSummaryBuilder(writer).build(memberSummaryTree);
         annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
     }
 
     /**
      * Build the member details contents of the page.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeMemberDetails(XMLNode node, Content annotationContentTree)
+    protected void buildAnnotationTypeMemberDetails(Content annotationContentTree)
             throws DocletException {
         Content memberDetailsTree = writer.getMemberTreeHeader();
-        buildChildren(node, memberDetailsTree);
+
+        buildAnnotationTypeFieldDetails(memberDetailsTree);
+        buildAnnotationTypeRequiredMemberDetails(memberDetailsTree);
+        buildAnnotationTypeOptionalMemberDetails(memberDetailsTree);
+
         if (memberDetailsTree.isValid()) {
             annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
         }
@@ -235,39 +226,33 @@
     /**
      * Build the annotation type field documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeFieldDetails(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeFieldDetails(Content memberDetailsTree)
             throws DocletException {
-        configuration.getBuilderFactory().
-                getAnnotationTypeFieldsBuilder(writer).buildChildren(node, memberDetailsTree);
+        builderFactory.getAnnotationTypeFieldsBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the annotation type optional member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeOptionalMemberDetails(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeOptionalMemberDetails(Content memberDetailsTree)
             throws DocletException {
-        configuration.getBuilderFactory().
-                getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node, memberDetailsTree);
+        builderFactory.getAnnotationTypeOptionalMemberBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the annotation type required member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem building the documentation
      */
-    public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeRequiredMemberDetails(Content memberDetailsTree)
             throws DocletException {
-        configuration.getBuilderFactory().
-                getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree);
+        builderFactory.getAnnotationTypeRequiredMemberBuilder(writer).build(memberDetailsTree);
     }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -111,15 +111,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return "AnnotationTypeFieldDetails";
-    }
-
-
-    /**
      * Returns whether or not there are members to document.
      * @return whether or not there are members to document
      */
@@ -129,25 +120,31 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildAnnotationTypeField(contentTree);
+    }
+
+    /**
      * Build the annotation type field documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildAnnotationTypeField(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeField(Content memberDetailsTree)
             throws DocletException {
-        buildAnnotationTypeMember(node, memberDetailsTree);
+        buildAnnotationTypeMember(memberDetailsTree);
     }
 
     /**
      * Build the member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeMember(Content memberDetailsTree)
             throws DocletException {
         if (writer == null) {
             return;
@@ -162,7 +159,12 @@
                 writer.addAnnotationDetailsTreeHeader(typeElement, detailsTree);
                 Content annotationDocTree = writer.getAnnotationDocTreeHeader(currentMember,
                         detailsTree);
-                buildChildren(node, annotationDocTree);
+
+                buildSignature(annotationDocTree);
+                buildDeprecationInfo(annotationDocTree);
+                buildMemberComments(annotationDocTree);
+                buildTagInfo(annotationDocTree);
+
                 detailsTree.addContent(writer.getAnnotationDoc(
                         annotationDocTree, currentMember == lastElement));
                 memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
@@ -173,10 +175,9 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content annotationDocTree) {
+    protected void buildSignature(Content annotationDocTree) {
         annotationDocTree.addContent(
                 writer.getSignature(currentMember));
     }
@@ -184,10 +185,9 @@
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
+    protected void buildDeprecationInfo(Content annotationDocTree) {
         writer.addDeprecated(currentMember, annotationDocTree);
     }
 
@@ -195,11 +195,10 @@
      * Build the comments for the member.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
-        if(! configuration.nocomment){
+    protected void buildMemberComments(Content annotationDocTree) {
+        if (!configuration.nocomment) {
             writer.addComments(currentMember, annotationDocTree);
         }
     }
@@ -207,10 +206,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
+    protected void buildTagInfo(Content annotationDocTree) {
         writer.addTags(currentMember, annotationDocTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,29 +81,33 @@
      * {@inheritDoc}
      */
     @Override
-    public String getName() {
-        return "AnnotationTypeOptionalMemberDetails";
+    public void build(Content contentTree) throws DocletException {
+        buildAnnotationTypeOptionalMember(contentTree);
     }
 
     /**
      * Build the annotation type optional member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildAnnotationTypeOptionalMember(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeOptionalMember(Content memberDetailsTree)
                 throws DocletException {
-        buildAnnotationTypeMember(node, memberDetailsTree);
+        buildAnnotationTypeMember(memberDetailsTree);
+    }
+
+    @Override
+    protected void buildAnnotationTypeMemberChildren(Content annotationDocTree) {
+        super.buildAnnotationTypeMemberChildren(annotationDocTree);
+        buildDefaultValueInfo(annotationDocTree);
     }
 
     /**
      * Build the default value for this optional member.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildDefaultValueInfo(XMLNode node, Content annotationDocTree) {
+    protected void buildDefaultValueInfo(Content annotationDocTree) {
         ((AnnotationTypeOptionalMemberWriter) writer).addDefaultValueInfo(currentMember,
                 annotationDocTree);
     }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -113,14 +113,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return "AnnotationTypeRequiredMemberDetails";
-    }
-
-    /**
      * Returns whether or not there are members to document.
      * @return whether or not there are members to document
      */
@@ -130,25 +122,31 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildAnnotationTypeRequiredMember(contentTree);
+    }
+
+    /**
      * Build the annotation type required member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildAnnotationTypeRequiredMember(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeRequiredMember(Content memberDetailsTree)
             throws DocletException {
-        buildAnnotationTypeMember(node, memberDetailsTree);
+        buildAnnotationTypeMember(memberDetailsTree);
     }
 
     /**
      * Build the member documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if an error occurs
      */
-    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree)
+    protected void buildAnnotationTypeMember(Content memberDetailsTree)
             throws DocletException {
         if (writer == null) {
             return;
@@ -162,7 +160,9 @@
                 writer.addAnnotationDetailsTreeHeader(typeElement, detailsTree);
                 Content annotationDocTree = writer.getAnnotationDocTreeHeader(
                         currentMember, detailsTree);
-                buildChildren(node, annotationDocTree);
+
+                buildAnnotationTypeMemberChildren(annotationDocTree);
+
                 detailsTree.addContent(writer.getAnnotationDoc(
                         annotationDocTree, currentMember == lastMember));
                 memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
@@ -170,23 +170,28 @@
         }
     }
 
+    protected void buildAnnotationTypeMemberChildren(Content annotationDocTree) {
+        buildSignature(annotationDocTree);
+        buildDeprecationInfo(annotationDocTree);
+        buildMemberComments(annotationDocTree);
+        buildTagInfo(annotationDocTree);
+    }
+
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content annotationDocTree) {
+    protected void buildSignature(Content annotationDocTree) {
         annotationDocTree.addContent(writer.getSignature(currentMember));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
+    protected void buildDeprecationInfo(Content annotationDocTree) {
         writer.addDeprecated(currentMember, annotationDocTree);
     }
 
@@ -194,11 +199,10 @@
      * Build the comments for the member.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
-        if(! configuration.nocomment) {
+    protected void buildMemberComments(Content annotationDocTree) {
+        if (!configuration.nocomment) {
             writer.addComments(currentMember, annotationDocTree);
         }
     }
@@ -206,10 +210,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param annotationDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
+    protected void buildTagInfo(Content annotationDocTree) {
         writer.addTags(currentMember, annotationDocTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/BuilderFactory.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/BuilderFactory.java	Tue Jun 27 16:00:14 2017 -0400
@@ -54,11 +54,6 @@
 public class BuilderFactory {
 
     /**
-     * The current configuration of the doclet.
-     */
-    private final BaseConfiguration configuration;
-
-    /**
      * The factory to retrieve the required writers from.
      */
     private final WriterFactory writerFactory;
@@ -71,12 +66,10 @@
      * being executed.
      */
     public BuilderFactory (BaseConfiguration configuration) {
-        this.configuration = configuration;
         this.writerFactory = configuration.getWriterFactory();
 
         Set<PackageElement> containingPackagesSeen = new HashSet<>();
-        context = new AbstractBuilder.Context(configuration, containingPackagesSeen,
-                LayoutParser.getInstance(configuration));
+        context = new AbstractBuilder.Context(configuration, containingPackagesSeen);
     }
 
     /**
@@ -150,9 +143,10 @@
     /**
      * Return an instance of the method builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the method builder for the given class.
      */
-    public AbstractBuilder getMethodBuilder(ClassWriter classWriter) {
+    public AbstractMemberBuilder getMethodBuilder(ClassWriter classWriter) {
         return MethodBuilder.getInstance(context, classWriter.getTypeElement(),
             writerFactory.getMethodWriter(classWriter));
     }
@@ -161,10 +155,11 @@
      * Return an instance of the annotation type fields builder for the given
      * class.
      *
+     * @param annotationTypeWriter the writer for the enclosing annotation type
      * @return an instance of the annotation type field builder for the given
      *         annotation type.
      */
-    public AbstractBuilder getAnnotationTypeFieldsBuilder(
+    public AbstractMemberBuilder getAnnotationTypeFieldsBuilder(
             AnnotationTypeWriter annotationTypeWriter) {
         return AnnotationTypeFieldBuilder.getInstance(context,
                 annotationTypeWriter.getAnnotationTypeElement(),
@@ -175,10 +170,11 @@
      * Return an instance of the annotation type member builder for the given
      * class.
      *
+     * @param annotationTypeWriter the writer for the enclosing annotation type
      * @return an instance of the annotation type member builder for the given
      *         annotation type.
      */
-    public AbstractBuilder getAnnotationTypeOptionalMemberBuilder(
+    public AbstractMemberBuilder getAnnotationTypeOptionalMemberBuilder(
             AnnotationTypeWriter annotationTypeWriter) {
         return AnnotationTypeOptionalMemberBuilder.getInstance(context,
             annotationTypeWriter.getAnnotationTypeElement(),
@@ -189,10 +185,11 @@
      * Return an instance of the annotation type member builder for the given
      * class.
      *
+     * @param annotationTypeWriter the writer for the enclosing annotation type
      * @return an instance of the annotation type member builder for the given
      *         annotation type.
      */
-    public AbstractBuilder getAnnotationTypeRequiredMemberBuilder(
+    public AbstractMemberBuilder getAnnotationTypeRequiredMemberBuilder(
             AnnotationTypeWriter annotationTypeWriter) {
         return AnnotationTypeRequiredMemberBuilder.getInstance(context,
             annotationTypeWriter.getAnnotationTypeElement(),
@@ -202,9 +199,10 @@
     /**
      * Return an instance of the enum constants builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the enum constants builder for the given class.
      */
-    public AbstractBuilder getEnumConstantsBuilder(ClassWriter classWriter) {
+    public AbstractMemberBuilder getEnumConstantsBuilder(ClassWriter classWriter) {
         return EnumConstantBuilder.getInstance(context, classWriter.getTypeElement(),
                 writerFactory.getEnumConstantWriter(classWriter));
     }
@@ -212,9 +210,10 @@
     /**
      * Return an instance of the field builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the field builder for the given class.
      */
-    public AbstractBuilder getFieldBuilder(ClassWriter classWriter) {
+    public AbstractMemberBuilder getFieldBuilder(ClassWriter classWriter) {
         return FieldBuilder.getInstance(context, classWriter.getTypeElement(),
             writerFactory.getFieldWriter(classWriter));
     }
@@ -222,9 +221,10 @@
     /**
      * Return an instance of the property builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the field builder for the given class.
      */
-    public AbstractBuilder getPropertyBuilder(ClassWriter classWriter) {
+    public AbstractMemberBuilder getPropertyBuilder(ClassWriter classWriter) {
         final PropertyWriter propertyWriter =
                 writerFactory.getPropertyWriter(classWriter);
         return PropertyBuilder.getInstance(context,
@@ -235,9 +235,10 @@
     /**
      * Return an instance of the constructor builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the constructor builder for the given class.
      */
-    public AbstractBuilder getConstructorBuilder(ClassWriter classWriter) {
+    public AbstractMemberBuilder getConstructorBuilder(ClassWriter classWriter) {
         return ConstructorBuilder.getInstance(context, classWriter.getTypeElement(),
             writerFactory.getConstructorWriter(classWriter));
     }
@@ -245,9 +246,10 @@
     /**
      * Return an instance of the member summary builder for the given class.
      *
+     * @param classWriter the writer for the enclosing class
      * @return an instance of the member summary builder for the given class.
      */
-    public AbstractBuilder getMemberSummaryBuilder(ClassWriter classWriter) {
+    public MemberSummaryBuilder getMemberSummaryBuilder(ClassWriter classWriter) {
         return MemberSummaryBuilder.getInstance(classWriter, context);
     }
 
@@ -255,10 +257,11 @@
      * Return an instance of the member summary builder for the given annotation
      * type.
      *
+     * @param annotationTypeWriter the writer for the enclosing annotation type
      * @return an instance of the member summary builder for the given
      *         annotation type.
      */
-    public AbstractBuilder getMemberSummaryBuilder(AnnotationTypeWriter annotationTypeWriter) {
+    public MemberSummaryBuilder getMemberSummaryBuilder(AnnotationTypeWriter annotationTypeWriter) {
         return MemberSummaryBuilder.getInstance(annotationTypeWriter, context);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,11 +48,6 @@
 public class ClassBuilder extends AbstractBuilder {
 
     /**
-     * The root element of the class XML is {@value}.
-     */
-    public static final String ROOT = "ClassDoc";
-
-    /**
      * The class being documented.
      */
     private final TypeElement typeElement;
@@ -112,8 +107,7 @@
      * @param writer the doclet specific writer.
      * @return the new ClassBuilder
      */
-    public static ClassBuilder getInstance(Context context,
-            TypeElement typeElement, ClassWriter writer) {
+    public static ClassBuilder getInstance(Context context, TypeElement typeElement, ClassWriter writer) {
         return new ClassBuilder(context, typeElement, writer);
     }
 
@@ -122,153 +116,151 @@
      */
     @Override
     public void build() throws DocletException {
-        build(layoutParser.parseXML(ROOT), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return ROOT;
+        buildClassDoc(contentTree);
     }
 
      /**
       * Handles the {@literal <TypeElement>} tag.
       *
-      * @param node the XML element that specifies which components to document
       * @param contentTree the content tree to which the documentation will be added
-     * @throws DocletException if there is a problem while building the documentation
+      * @throws DocletException if there is a problem while building the documentation
       */
-     public void buildClassDoc(XMLNode node, Content contentTree) throws DocletException {
-         String key;
-         if (isInterface) {
-             key =  "doclet.Interface";
-         } else if (isEnum) {
-             key = "doclet.Enum";
-         } else {
-             key =  "doclet.Class";
-         }
-         contentTree = writer.getHeader(configuration.getText(key) + " " +
-                 utils.getSimpleName(typeElement));
-         Content classContentTree = writer.getClassContentHeader();
-         buildChildren(node, classContentTree);
-         writer.addClassContentTree(contentTree, classContentTree);
-         writer.addFooter(contentTree);
-         writer.printDocument(contentTree);
-         copyDocFiles();
-     }
+     protected void buildClassDoc(Content contentTree) throws DocletException {
+        String key;
+        if (isInterface) {
+            key = "doclet.Interface";
+        } else if (isEnum) {
+            key = "doclet.Enum";
+        } else {
+            key = "doclet.Class";
+        }
+        contentTree = writer.getHeader(configuration.getText(key) + " "
+                + utils.getSimpleName(typeElement));
+        Content classContentTree = writer.getClassContentHeader();
+
+        buildClassTree(classContentTree);
+        buildClassInfo(classContentTree);
+        buildMemberSummary(classContentTree);
+        buildMemberDetails(classContentTree);
+
+        writer.addClassContentTree(contentTree, classContentTree);
+        writer.addFooter(contentTree);
+        writer.printDocument(contentTree);
+        copyDocFiles();
+    }
 
      /**
       * Build the class tree documentation.
       *
-      * @param node the XML element that specifies which components to document
       * @param classContentTree the content tree to which the documentation will be added
       */
-    public void buildClassTree(XMLNode node, Content classContentTree) {
+    protected void buildClassTree(Content classContentTree) {
         writer.addClassTree(classContentTree);
     }
 
     /**
      * Build the class information tree documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildClassInfo(XMLNode node, Content classContentTree) throws DocletException {
+    protected void buildClassInfo(Content classContentTree) throws DocletException {
         Content classInfoTree = writer.getClassInfoTreeHeader();
-        buildChildren(node, classInfoTree);
+
+        buildTypeParamInfo(classInfoTree);
+        buildSuperInterfacesInfo(classInfoTree);
+        buildImplementedInterfacesInfo(classInfoTree);
+        buildSubClassInfo(classInfoTree);
+        buildSubInterfacesInfo(classInfoTree);
+        buildInterfaceUsageInfo(classInfoTree);
+        buildNestedClassInfo(classInfoTree);
+        buildFunctionalInterfaceInfo(classInfoTree);
+        buildDeprecationInfo(classInfoTree);
+        buildClassSignature(classInfoTree);
+        buildClassDescription(classInfoTree);
+        buildClassTagInfo(classInfoTree);
+
         classContentTree.addContent(writer.getClassInfo(classInfoTree));
     }
 
     /**
      * Build the type parameters of this class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildTypeParamInfo(XMLNode node, Content classInfoTree) {
+    protected void buildTypeParamInfo(Content classInfoTree) {
         writer.addTypeParamInfo(classInfoTree);
     }
 
     /**
      * If this is an interface, list all super interfaces.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildSuperInterfacesInfo(XMLNode node, Content classInfoTree) {
+    protected void buildSuperInterfacesInfo(Content classInfoTree) {
         writer.addSuperInterfacesInfo(classInfoTree);
     }
 
     /**
      * If this is a class, list all interfaces implemented by this class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildImplementedInterfacesInfo(XMLNode node, Content classInfoTree) {
+    protected void buildImplementedInterfacesInfo(Content classInfoTree) {
         writer.addImplementedInterfacesInfo(classInfoTree);
     }
 
     /**
      * List all the classes extend this one.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildSubClassInfo(XMLNode node, Content classInfoTree) {
+    protected void buildSubClassInfo(Content classInfoTree) {
         writer.addSubClassInfo(classInfoTree);
     }
 
     /**
      * List all the interfaces that extend this one.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildSubInterfacesInfo(XMLNode node, Content classInfoTree) {
+    protected void buildSubInterfacesInfo(Content classInfoTree) {
         writer.addSubInterfacesInfo(classInfoTree);
     }
 
     /**
      * If this is an interface, list all classes that implement this interface.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildInterfaceUsageInfo(XMLNode node, Content classInfoTree) {
+    protected void buildInterfaceUsageInfo(Content classInfoTree) {
         writer.addInterfaceUsageInfo(classInfoTree);
     }
 
     /**
      * If this is an functional interface, display appropriate message.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildFunctionalInterfaceInfo(XMLNode node, Content classInfoTree) {
+    protected void buildFunctionalInterfaceInfo(Content classInfoTree) {
         writer.addFunctionalInterfaceInfo(classInfoTree);
     }
 
     /**
      * If this class is deprecated, build the appropriate information.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo (XMLNode node, Content classInfoTree) {
+    protected void buildDeprecationInfo(Content classInfoTree) {
         writer.addClassDeprecationInfo(classInfoTree);
     }
 
     /**
      * If this is an inner class or interface, list the enclosing class or interface.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildNestedClassInfo (XMLNode node, Content classInfoTree) {
+    protected void buildNestedClassInfo(Content classInfoTree) {
         writer.addNestedClassInfo(classInfoTree);
     }
 
@@ -279,7 +271,7 @@
      */
      private void copyDocFiles() throws DocFileIOException {
         PackageElement containingPackage = utils.containingPackage(typeElement);
-        if((configuration.packages == null ||
+        if ((configuration.packages == null ||
             !configuration.packages.contains(containingPackage)) &&
             !containingPackagesSeen.contains(containingPackage)) {
             //Only copy doc files dir if the containing package is not
@@ -293,122 +285,107 @@
     /**
      * Build the signature of the current class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildClassSignature(XMLNode node, Content classInfoTree) {
+    protected void buildClassSignature(Content classInfoTree) {
         writer.addClassSignature(utils.modifiersToString(typeElement, true), classInfoTree);
     }
 
     /**
      * Build the class description.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildClassDescription(XMLNode node, Content classInfoTree) {
+    protected void buildClassDescription(Content classInfoTree) {
        writer.addClassDescription(classInfoTree);
     }
 
     /**
      * Build the tag information for the current class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classInfoTree the content tree to which the documentation will be added
      */
-    public void buildClassTagInfo(XMLNode node, Content classInfoTree) {
+    protected void buildClassTagInfo(Content classInfoTree) {
        writer.addClassTagInfo(classInfoTree);
     }
 
     /**
      * Build the member summary contents of the page.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildMemberSummary(XMLNode node, Content classContentTree) throws DocletException {
+    protected void buildMemberSummary(Content classContentTree) throws DocletException {
         Content memberSummaryTree = writer.getMemberTreeHeader();
-        configuration.getBuilderFactory().
-                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
+        builderFactory.getMemberSummaryBuilder(writer).build(memberSummaryTree);
         classContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
     }
 
     /**
      * Build the member details contents of the page.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildMemberDetails(XMLNode node, Content classContentTree) throws DocletException {
+    protected void buildMemberDetails(Content classContentTree) throws DocletException {
         Content memberDetailsTree = writer.getMemberTreeHeader();
-        buildChildren(node, memberDetailsTree);
+
+        buildEnumConstantsDetails(memberDetailsTree);
+        buildPropertyDetails(memberDetailsTree);
+        buildFieldDetails(memberDetailsTree);
+        buildConstructorDetails(memberDetailsTree);
+        buildMethodDetails(memberDetailsTree);
+
         classContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
     }
 
     /**
      * Build the enum constants documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildEnumConstantsDetails(XMLNode node,
-            Content memberDetailsTree) throws DocletException {
-        configuration.getBuilderFactory().
-                getEnumConstantsBuilder(writer).buildChildren(node, memberDetailsTree);
+    protected void buildEnumConstantsDetails(Content memberDetailsTree) throws DocletException {
+        builderFactory.getEnumConstantsBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the field documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildFieldDetails(XMLNode node,
-            Content memberDetailsTree) throws DocletException {
-        configuration.getBuilderFactory().
-                getFieldBuilder(writer).buildChildren(node, memberDetailsTree);
+    protected void buildFieldDetails(Content memberDetailsTree) throws DocletException {
+        builderFactory.getFieldBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the property documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildPropertyDetails(XMLNode node,
-            Content memberDetailsTree) throws DocletException {
-        configuration.getBuilderFactory().
-                getPropertyBuilder(writer).buildChildren(node, memberDetailsTree);
+    public void buildPropertyDetails( Content memberDetailsTree) throws DocletException {
+        builderFactory.getPropertyBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the constructor documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildConstructorDetails(XMLNode node,
-            Content memberDetailsTree) throws DocletException {
-        configuration.getBuilderFactory().
-                getConstructorBuilder(writer).buildChildren(node, memberDetailsTree);
+    protected void buildConstructorDetails(Content memberDetailsTree) throws DocletException {
+        builderFactory.getConstructorBuilder(writer).build(memberDetailsTree);
     }
 
     /**
      * Build the method documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildMethodDetails(XMLNode node,
-            Content memberDetailsTree) throws DocletException {
-        configuration.getBuilderFactory().
-                getMethodBuilder(writer).buildChildren(node, memberDetailsTree);
+    protected void buildMethodDetails(Content memberDetailsTree) throws DocletException {
+        builderFactory.getMethodBuilder(writer).build(memberDetailsTree);
     }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -52,11 +52,6 @@
 public class ConstantsSummaryBuilder extends AbstractBuilder {
 
     /**
-     * The root element of the constant summary XML is {@value}.
-     */
-    public static final String ROOT = "ConstantSummary";
-
-    /**
      * The maximum number of package directories shown in the constant
      * value index.
      */
@@ -133,27 +128,21 @@
             //Doclet does not support this output.
             return;
         }
-        build(layoutParser.parseXML(ROOT), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return ROOT;
+        buildConstantSummary(contentTree);
     }
 
     /**
      * Build the constant summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildConstantSummary(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildConstantSummary(Content contentTree) throws DocletException {
         contentTree = writer.getHeader();
-        buildChildren(node, contentTree);
+
+        buildContents(contentTree);
+        buildConstantSummaries(contentTree);
+
         writer.addFooter(contentTree);
         writer.printDocument(contentTree);
     }
@@ -161,10 +150,9 @@
     /**
      * Build the list of packages.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the content list will be added
      */
-    public void buildContents(XMLNode node, Content contentTree) {
+    protected void buildContents(Content contentTree) {
         Content contentListTree = writer.getContentsHeader();
         printedPackageHeaders.clear();
         for (PackageElement pkg : configuration.packages) {
@@ -178,18 +166,20 @@
     /**
      * Build the summary for each documented package.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the tree to which the summaries will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildConstantSummaries(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildConstantSummaries(Content contentTree) throws DocletException {
         printedPackageHeaders.clear();
         Content summariesTree = writer.getConstantSummaries();
         for (PackageElement aPackage : configuration.packages) {
             if (hasConstantField(aPackage)) {
                 currentPackage = aPackage;
                 //Build the documentation for the current package.
-                buildChildren(node, summariesTree);
+
+                buildPackageHeader(summariesTree);
+                buildClassConstantSummary(summariesTree);
+
                 first = false;
             }
         }
@@ -199,10 +189,9 @@
     /**
      * Build the header for the given package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summariesTree the tree to which the package header will be added
      */
-    public void buildPackageHeader(XMLNode node, Content summariesTree) {
+    protected void buildPackageHeader(Content summariesTree) {
         PackageElement abbrevPkg = configuration.workArounds.getAbbreviatedPackageElement(currentPackage);
         if (!printedPackageHeaders.contains(abbrevPkg)) {
             writer.addPackageName(currentPackage, summariesTree, first);
@@ -213,12 +202,11 @@
     /**
      * Build the summary for the current class.
      *
-     * @param node the XML element that specifies which components to document
      * @param summariesTree the tree to which the class constant summary will be added
      * @throws DocletException if there is a problem while building the documentation
      *
      */
-    public void buildClassConstantSummary(XMLNode node, Content summariesTree)
+    protected void buildClassConstantSummary(Content summariesTree)
             throws DocletException {
         SortedSet<TypeElement> classes = !currentPackage.isUnnamed()
                 ? utils.getAllClasses(currentPackage)
@@ -231,7 +219,9 @@
             }
             currentClass = te;
             //Build the documentation for the current class.
-            buildChildren(node, classConstantTree);
+
+            buildConstantMembers(classConstantTree);
+
         }
         writer.addClassConstant(summariesTree, classConstantTree);
     }
@@ -239,12 +229,11 @@
     /**
      * Build the summary of constant members in the class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classConstantTree the tree to which the constant members table
      *                          will be added
      */
-    public void buildConstantMembers(XMLNode node, Content classConstantTree) {
-        new ConstantFieldBuilder(currentClass).buildMembersSummary(node, classConstantTree);
+    protected void buildConstantMembers(Content classConstantTree) {
+        new ConstantFieldBuilder(currentClass).buildMembersSummary(classConstantTree);
     }
 
     /**
@@ -338,11 +327,10 @@
         /**
          * Builds the table of constants for a given class.
          *
-         * @param node the XML element that specifies which components to document
          * @param classConstantTree the tree to which the class constants table
          *                          will be added
          */
-        protected void buildMembersSummary(XMLNode node, Content classConstantTree) {
+        protected void buildMembersSummary(Content classConstantTree) {
             SortedSet<VariableElement> members = members();
             if (!members.isEmpty()) {
                 writer.addConstantMembers(typeElement, members, classConstantTree);
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -52,11 +52,6 @@
 public class ConstructorBuilder extends AbstractMemberBuilder {
 
     /**
-     * The name of this builder.
-     */
-    public static final String NAME = "ConstructorDetails";
-
-    /**
      * The current constructor that is being documented at this point in time.
      */
     private ExecutableElement currentConstructor;
@@ -85,7 +80,7 @@
      * Construct a new ConstructorBuilder.
      *
      * @param context  the build context.
-     * @param typeElement the class whoses members are being documented.
+     * @param typeElement the class whose members are being documented.
      * @param writer the doclet specific writer.
      */
     private ConstructorBuilder(Context context,
@@ -108,7 +103,7 @@
      * Construct a new ConstructorBuilder.
      *
      * @param context  the build context.
-     * @param typeElement the class whoses members are being documented.
+     * @param typeElement the class whose members are being documented.
      * @param writer the doclet specific writer.
      * @return the new ConstructorBuilder
      */
@@ -121,14 +116,6 @@
      * {@inheritDoc}
      */
     @Override
-    public String getName() {
-        return NAME;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
     public boolean hasMembersToDocument() {
         return !constructors.isEmpty();
     }
@@ -143,13 +130,20 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildConstructorDoc(contentTree);
+    }
+
+    /**
      * Build the constructor documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException is there is a problem while building the documentation
      */
-    public void buildConstructorDoc(XMLNode node, Content memberDetailsTree) throws DocletException {
+    protected void buildConstructorDoc(Content memberDetailsTree) throws DocletException {
         if (writer == null) {
             return;
         }
@@ -161,7 +155,12 @@
             for (Element contructor : constructors) {
                 currentConstructor = (ExecutableElement)contructor;
                 Content constructorDocTree = writer.getConstructorDocTreeHeader(currentConstructor, constructorDetailsTree);
-                buildChildren(node, constructorDocTree);
+
+                buildSignature(constructorDocTree);
+                buildDeprecationInfo(constructorDocTree);
+                buildConstructorComments(constructorDocTree);
+                buildTagInfo(constructorDocTree);
+
                 constructorDetailsTree.addContent(writer.getConstructorDoc(constructorDocTree,
                         currentConstructor == lastElement));
             }
@@ -173,20 +172,18 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param constructorDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content constructorDocTree) {
+    protected void buildSignature(Content constructorDocTree) {
         constructorDocTree.addContent(writer.getSignature(currentConstructor));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param constructorDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content constructorDocTree) {
+    protected void buildDeprecationInfo(Content constructorDocTree) {
         writer.addDeprecated(currentConstructor, constructorDocTree);
     }
 
@@ -194,10 +191,9 @@
      * Build the comments for the constructor.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param constructorDocTree the content tree to which the documentation will be added
      */
-    public void buildConstructorComments(XMLNode node, Content constructorDocTree) {
+    protected void buildConstructorComments(Content constructorDocTree) {
         if (!configuration.nocomment) {
             writer.addComments(currentConstructor, constructorDocTree);
         }
@@ -206,10 +202,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param constructorDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content constructorDocTree) {
+    protected void buildTagInfo(Content constructorDocTree) {
         writer.addTags(currentConstructor, constructorDocTree);
     }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -108,14 +108,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return "EnumConstantDetails";
-    }
-
-    /**
      * Returns whether or not there are members to document.
      *
      * @return whether or not there are members to document
@@ -126,13 +118,20 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildEnumConstant(contentTree);
+    }
+
+    /**
      * Build the enum constant documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException is there is a problem while building the documentation
      */
-    public void buildEnumConstant(XMLNode node, Content memberDetailsTree) throws DocletException {
+    protected void buildEnumConstant(Content memberDetailsTree) throws DocletException {
         if (writer == null) {
             return;
         }
@@ -144,7 +143,12 @@
                 currentElement = (VariableElement)enumConstant;
                 Content enumConstantsTree = writer.getEnumConstantsTreeHeader(currentElement,
                         enumConstantsDetailsTree);
-                buildChildren(node, enumConstantsTree);
+
+                buildSignature(enumConstantsTree);
+                buildDeprecationInfo(enumConstantsTree);
+                buildEnumConstantComments(enumConstantsTree);
+                buildTagInfo(enumConstantsTree);
+
                 enumConstantsDetailsTree.addContent(writer.getEnumConstants(
                         enumConstantsTree, currentElement == lastElement));
             }
@@ -156,20 +160,18 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param enumConstantsTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content enumConstantsTree) {
+    protected void buildSignature(Content enumConstantsTree) {
         enumConstantsTree.addContent(writer.getSignature(currentElement));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param enumConstantsTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content enumConstantsTree) {
+    protected void buildDeprecationInfo(Content enumConstantsTree) {
         writer.addDeprecated(currentElement, enumConstantsTree);
     }
 
@@ -177,10 +179,9 @@
      * Build the comments for the enum constant.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param enumConstantsTree the content tree to which the documentation will be added
      */
-    public void buildEnumConstantComments(XMLNode node, Content enumConstantsTree) {
+    protected void buildEnumConstantComments(Content enumConstantsTree) {
         if (!configuration.nocomment) {
             writer.addComments(currentElement, enumConstantsTree);
         }
@@ -189,10 +190,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param enumConstantsTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content enumConstantsTree) {
+    protected void buildTagInfo(Content enumConstantsTree) {
         writer.addTags(currentElement, enumConstantsTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -110,14 +110,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return "FieldDetails";
-    }
-
-    /**
      * Returns whether or not there are members to document.
      *
      * @return whether or not there are members to document
@@ -128,13 +120,20 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildFieldDoc(contentTree);
+    }
+
+    /**
      * Build the field documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildFieldDoc(XMLNode node, Content memberDetailsTree) throws DocletException {
+    protected void buildFieldDoc(Content memberDetailsTree) throws DocletException {
         if (writer == null) {
             return;
         }
@@ -145,7 +144,12 @@
             for (Element element : fields) {
                 currentElement = (VariableElement)element;
                 Content fieldDocTree = writer.getFieldDocTreeHeader(currentElement, fieldDetailsTree);
-                buildChildren(node, fieldDocTree);
+
+                buildSignature(fieldDocTree);
+                buildDeprecationInfo(fieldDocTree);
+                buildFieldComments(fieldDocTree);
+                buildTagInfo(fieldDocTree);
+
                 fieldDetailsTree.addContent(writer.getFieldDoc(
                         fieldDocTree, currentElement == lastElement));
             }
@@ -157,20 +161,18 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content fieldDocTree) {
+    protected void buildSignature(Content fieldDocTree) {
         fieldDocTree.addContent(writer.getSignature(currentElement));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content fieldDocTree) {
+    protected void buildDeprecationInfo(Content fieldDocTree) {
         writer.addDeprecated(currentElement, fieldDocTree);
     }
 
@@ -178,10 +180,9 @@
      * Build the comments for the field.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldDocTree the content tree to which the documentation will be added
      */
-    public void buildFieldComments(XMLNode node, Content fieldDocTree) {
+    protected void buildFieldComments(Content fieldDocTree) {
         if (!configuration.nocomment) {
             writer.addComments(currentElement, fieldDocTree);
         }
@@ -190,10 +191,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content fieldDocTree) {
+    protected void buildTagInfo(Content fieldDocTree) {
         writer.addTags(currentElement, fieldDocTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/LayoutParser.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.javadoc.internal.doclets.toolkit.builders;
-
-import java.io.*;
-import java.util.*;
-
-import javax.xml.parsers.*;
-
-import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
-import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
-import jdk.javadoc.internal.doclets.toolkit.util.SimpleDocletException;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-
-/**
- * Parse the XML that specified the order of operation for the builders.  This
- * Parser uses SAX parsing.
- *
- *  <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 Jamie Ho
- * @see SAXParser
- */
-public class LayoutParser extends DefaultHandler {
-
-    /**
-     * The map of XML elements that have been parsed.
-     */
-    private final Map<String,XMLNode> xmlElementsMap;
-    private XMLNode currentNode;
-    private final BaseConfiguration configuration;
-    private String currentRoot;
-    private boolean isParsing;
-
-    private LayoutParser(BaseConfiguration configuration) {
-        xmlElementsMap = new HashMap<>();
-        this.configuration = configuration;
-    }
-
-    /**
-     * Return an instance of the BuilderXML.
-     *
-     * @param configuration the current configuration of the doclet.
-     * @return an instance of the BuilderXML.
-     */
-    public static LayoutParser getInstance(BaseConfiguration configuration) {
-        return new LayoutParser(configuration);
-    }
-
-    /**
-     * Parse the XML specifying the layout of the documentation.
-     *
-     * @param root the name of the desired node
-     * @return the list of XML elements parsed.
-     * @throws DocFileIOException if there is a problem reading a user-supplied build file
-     * @throws SimpleDocletException if there is a problem reading the system build file
-     */
-    public XMLNode parseXML(String root) throws DocFileIOException, SimpleDocletException {
-        if (!xmlElementsMap.containsKey(root)) {
-            try {
-                currentRoot = root;
-                isParsing = false;
-                SAXParserFactory factory = SAXParserFactory.newInstance();
-                SAXParser saxParser = factory.newSAXParser();
-                InputStream in = configuration.getBuilderXML();
-                saxParser.parse(in, this);
-            } catch (IOException | ParserConfigurationException | SAXException e) {
-                String message = (configuration.builderXMLPath == null)
-                        ? configuration.getResources().getText("doclet.exception.read.resource",
-                                BaseConfiguration.DEFAULT_BUILDER_XML, e)
-                        : configuration.getResources().getText("doclet.exception.read.file",
-                                configuration.builderXMLPath, e);
-                throw new SimpleDocletException(message, e);
-            }
-        }
-        return xmlElementsMap.get(root);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void startElement(String namespaceURI, String sName, String qName, Attributes attrs)
-            throws SAXException {
-        if (isParsing || qName.equals(currentRoot)) {
-            isParsing = true;
-            currentNode = new XMLNode(currentNode, qName);
-            for (int i = 0; i < attrs.getLength(); i++)
-                currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i));
-            if (qName.equals(currentRoot))
-                xmlElementsMap.put(qName, currentNode);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void endElement(String namespaceURI, String sName, String qName)
-    throws SAXException {
-        if (! isParsing) {
-            return;
-        }
-        currentNode = currentNode.parent;
-        isParsing = ! qName.equals(currentRoot);
-    }
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -32,12 +32,6 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
-import javax.lang.model.type.ArrayType;
-import javax.lang.model.type.DeclaredType;
-import javax.lang.model.type.ExecutableType;
-import javax.lang.model.type.PrimitiveType;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.SimpleTypeVisitor9;
 
 import com.sun.source.doctree.DocTree;
 import com.sun.source.doctree.DocTree.Kind;
@@ -53,6 +47,9 @@
 
 /**
  * Builds the member summary.
+ * There are two anonymous subtype variants of this builder, created
+ * in the {@link #getInstance} methods. One is for general types;
+ * the other is for annotation types.
  *
  *  <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.
@@ -62,12 +59,12 @@
  * @author Jamie Ho
  * @author Bhavesh Patel (Modified)
  */
-public class MemberSummaryBuilder extends AbstractMemberBuilder {
+public abstract class MemberSummaryBuilder extends AbstractMemberBuilder {
 
-    /**
-     * The XML root for this builder.
+    /*
+     * Comparator used to sort the members in the summary.
      */
-    public static final String NAME = "MemberSummary";
+    private final Comparator<Element> comparator;
 
     /**
      * The member summary writers for the given class.
@@ -77,7 +74,7 @@
     /**
      * The type being documented.
      */
-    private final TypeElement typeElement;
+    protected final TypeElement typeElement;
 
     /**
      * Construct a new MemberSummaryBuilder.
@@ -90,22 +87,45 @@
         super(context);
         this.typeElement = typeElement;
         memberSummaryWriters = new EnumMap<>(VisibleMemberMap.Kind.class);
+
+        comparator = utils.makeGeneralPurposeComparator();
     }
 
     /**
-     * Construct a new MemberSummaryBuilder.
+     * Construct a new MemberSummaryBuilder for a general type.
      *
      * @param classWriter   the writer for the class whose members are being
      *                      summarized.
      * @param context       the build context.
+     * @return              the instance
      */
     public static MemberSummaryBuilder getInstance(
             ClassWriter classWriter, Context context) {
-        MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
-                classWriter.getTypeElement());
+        MemberSummaryBuilder builder = new MemberSummaryBuilder(context, classWriter.getTypeElement()) {
+            @Override
+            public void build(Content contentTree) {
+                buildPropertiesSummary(contentTree);
+                buildNestedClassesSummary(contentTree);
+                buildEnumConstantsSummary(contentTree);
+                buildFieldsSummary(contentTree);
+                buildConstructorsSummary(contentTree);
+                buildMethodsSummary(contentTree);
+            }
+
+            @Override
+            public boolean hasMembersToDocument() {
+                for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
+                    VisibleMemberMap members = getVisibleMemberMap(kind);
+                    if (!members.noVisibleMembers()) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        };
         WriterFactory wf = context.configuration.getWriterFactory();
         for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
-            MemberSummaryWriter msw =  builder.getVisibleMemberMap(kind).noVisibleMembers()
+            MemberSummaryWriter msw = builder.getVisibleMemberMap(kind).noVisibleMembers()
                     ? null
                     : wf.getMemberSummaryWriter(classWriter, kind);
             builder.memberSummaryWriters.put(kind, msw);
@@ -114,16 +134,29 @@
     }
 
     /**
-     * Construct a new MemberSummaryBuilder.
+     * Construct a new MemberSummaryBuilder for an annotation type.
      *
      * @param annotationTypeWriter the writer for the class whose members are
      *                             being summarized.
-     * @param configuration the current configuration of the doclet.
+     * @param context       the build context.
+     * @return              the instance
      */
     public static MemberSummaryBuilder getInstance(
             AnnotationTypeWriter annotationTypeWriter, Context context) {
         MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
-                annotationTypeWriter.getAnnotationTypeElement());
+                annotationTypeWriter.getAnnotationTypeElement()) {
+            @Override
+            public void build(Content contentTree) {
+                buildAnnotationTypeFieldsSummary(contentTree);
+                buildAnnotationTypeRequiredMemberSummary(contentTree);
+                buildAnnotationTypeOptionalMemberSummary(contentTree);
+            }
+
+            @Override
+            public boolean hasMembersToDocument() {
+                return !utils.getAnnotationMembers(typeElement).isEmpty();
+            }
+        };
         WriterFactory wf = context.configuration.getWriterFactory();
         for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
             MemberSummaryWriter msw = builder.getVisibleMemberMap(kind).noVisibleMembers()
@@ -135,14 +168,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return NAME;
-    }
-
-    /**
      * Return the specified visible member map.
      *
      * @param kind the kind of visible member map to return.
@@ -182,31 +207,11 @@
     }
 
     /**
-     * Return true it there are any members to summarize.
-     *
-     * @return true if there are any members to summarize.
-     */
-    @Override
-    public boolean hasMembersToDocument() {
-        if (utils.isAnnotationType(typeElement)) {
-            return !utils.getAnnotationMethods(typeElement).isEmpty();
-        }
-        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
-            VisibleMemberMap members = getVisibleMemberMap(kind);
-            if (!members.noVisibleMembers()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
      * Build the summary for the enum constants.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildEnumConstantsSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.ENUM_CONSTANTS);
         VisibleMemberMap visibleMemberMap =
@@ -217,10 +222,9 @@
     /**
      * Build the summary for fields.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeFieldsSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildAnnotationTypeFieldsSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_FIELDS);
         VisibleMemberMap visibleMemberMap =
@@ -231,10 +235,9 @@
     /**
      * Build the summary for the optional members.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildAnnotationTypeOptionalMemberSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL);
         VisibleMemberMap visibleMemberMap =
@@ -245,10 +248,9 @@
     /**
      * Build the summary for the optional members.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildAnnotationTypeRequiredMemberSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED);
         VisibleMemberMap visibleMemberMap =
@@ -259,10 +261,9 @@
     /**
      * Build the summary for the fields.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildFieldsSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildFieldsSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.FIELDS);
         VisibleMemberMap visibleMemberMap =
@@ -272,8 +273,10 @@
 
     /**
      * Build the summary for the fields.
+     *
+     * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildPropertiesSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildPropertiesSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.PROPERTIES);
         VisibleMemberMap visibleMemberMap =
@@ -284,10 +287,9 @@
     /**
      * Build the summary for the nested classes.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildNestedClassesSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildNestedClassesSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.INNER_CLASSES);
         VisibleMemberMap visibleMemberMap =
@@ -298,10 +300,9 @@
     /**
      * Build the method summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildMethodsSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.METHODS);
         VisibleMemberMap visibleMemberMap =
@@ -312,10 +313,9 @@
     /**
      * Build the constructor summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberSummaryTree the content tree to which the documentation will be added
      */
-    public void buildConstructorsSummary(XMLNode node, Content memberSummaryTree) {
+    protected void buildConstructorsSummary(Content memberSummaryTree) {
         MemberSummaryWriter writer =
                 memberSummaryWriters.get(VisibleMemberMap.Kind.CONSTRUCTORS);
         VisibleMemberMap visibleMemberMap =
@@ -521,4 +521,10 @@
             writer.addMemberTree(memberSummaryTree, memberTree);
         }
     }
+
+    private SortedSet<Element> asSortedSet(Collection<Element> members) {
+        SortedSet<Element> out = new TreeSet<>(comparator);
+        out.addAll(members);
+        return out;
+    }
 }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -116,26 +116,25 @@
      * {@inheritDoc}
      */
     @Override
-    public String getName() {
-        return "MethodDetails";
+    public boolean hasMembersToDocument() {
+        return !methods.isEmpty();
     }
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public boolean hasMembersToDocument() {
-        return !methods.isEmpty();
+    public void build(Content contentTree) throws DocletException {
+        buildMethodDoc(contentTree);
     }
 
     /**
      * Build the method documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildMethodDoc(XMLNode node, Content memberDetailsTree) throws DocletException {
+    protected void buildMethodDoc(Content memberDetailsTree) throws DocletException {
         if (writer == null) {
             return;
         }
@@ -147,7 +146,12 @@
             for (Element method : methods) {
                 currentMethod = (ExecutableElement)method;
                 Content methodDocTree = writer.getMethodDocTreeHeader(currentMethod, methodDetailsTree);
-                buildChildren(node, methodDocTree);
+
+                buildSignature(methodDocTree);
+                buildDeprecationInfo(methodDocTree);
+                buildMethodComments(methodDocTree);
+                buildTagInfo(methodDocTree);
+
                 methodDetailsTree.addContent(writer.getMethodDoc(
                         methodDocTree, currentMethod == lastElement));
             }
@@ -158,20 +162,18 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content methodDocTree) {
+    protected void buildSignature(Content methodDocTree) {
         methodDocTree.addContent(writer.getSignature(currentMethod));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content methodDocTree) {
+    protected void buildDeprecationInfo(Content methodDocTree) {
         writer.addDeprecated(currentMethod, methodDocTree);
     }
 
@@ -179,10 +181,9 @@
      * Build the comments for the method.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodDocTree the content tree to which the documentation will be added
      */
-    public void buildMethodComments(XMLNode node, Content methodDocTree) {
+    protected void buildMethodComments(Content methodDocTree) {
         if (!configuration.nocomment) {
             ExecutableElement method = currentMethod;
             if (utils.getFullBody(currentMethod).isEmpty()) {
@@ -199,10 +200,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content methodDocTree) {
+    protected void buildTagInfo(Content methodDocTree) {
         writer.addTags(currentMethod, methodDocTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,6 @@
 package jdk.javadoc.internal.doclets.toolkit.builders;
 
 import javax.lang.model.element.ModuleElement;
-import javax.lang.model.element.PackageElement;
-import javax.tools.StandardLocation;
 
 import jdk.javadoc.internal.doclets.toolkit.Content;
 import jdk.javadoc.internal.doclets.toolkit.DocletException;
@@ -46,10 +44,6 @@
  * @author Bhavesh Patel
  */
 public class ModuleSummaryBuilder extends AbstractBuilder {
-    /**
-     * The root element of the module summary XML is {@value}.
-     */
-    public static final String ROOT = "ModuleDoc";
 
     /**
      * The module being documented.
@@ -67,11 +61,6 @@
     private Content contentTree;
 
     /**
-     * The module package being documented.
-     */
-    private PackageElement pkg;
-
-    /**
      * Construct a new ModuleSummaryBuilder.
      *
      * @param context  the build context.
@@ -112,27 +101,20 @@
             //Doclet does not support this output.
             return;
         }
-        build(layoutParser.parseXML(ROOT), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return ROOT;
+        buildModuleDoc(contentTree);
     }
 
     /**
      * Build the module documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildModuleDoc(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildModuleDoc(Content contentTree) throws DocletException {
         contentTree = moduleWriter.getModuleHeader(mdle.getSimpleName().toString());
-        buildChildren(node, contentTree);
+
+        buildContent(contentTree);
+
         moduleWriter.addModuleFooter(contentTree);
         moduleWriter.printDocument(contentTree);
         utils.copyDirectory(mdle, DocPaths.moduleSummary(mdle));
@@ -141,70 +123,72 @@
     /**
      * Build the content for the module doc.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the module contents
      *                    will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildContent(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildContent(Content contentTree) throws DocletException {
         Content moduleContentTree = moduleWriter.getContentHeader();
-        buildChildren(node, moduleContentTree);
+
+        buildModuleDescription(moduleContentTree);
+        buildModuleTags(moduleContentTree);
+        buildSummary(moduleContentTree);
+
         moduleWriter.addModuleContent(contentTree, moduleContentTree);
     }
 
     /**
      * Build the module summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param moduleContentTree the module content tree to which the summaries will
      *                           be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSummary(XMLNode node, Content moduleContentTree) throws DocletException {
+    protected void buildSummary(Content moduleContentTree) throws DocletException {
         Content summaryContentTree = moduleWriter.getSummaryHeader();
-        buildChildren(node, summaryContentTree);
+
+        buildPackagesSummary(summaryContentTree);
+        buildModulesSummary(summaryContentTree);
+        buildServicesSummary(summaryContentTree);
+
         moduleContentTree.addContent(moduleWriter.getSummaryTree(summaryContentTree));
     }
 
     /**
      * Build the modules summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the content tree to which the summaries will
      *                           be added
      */
-    public void buildModulesSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildModulesSummary(Content summaryContentTree) {
         moduleWriter.addModulesSummary(summaryContentTree);
     }
 
     /**
      * Build the package summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the content tree to which the summaries will be added
      */
-    public void buildPackagesSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildPackagesSummary(Content summaryContentTree) {
         moduleWriter.addPackagesSummary(summaryContentTree);
-        }
+    }
 
     /**
      * Build the services summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the content tree to which the summaries will be added
      */
-    public void buildServicesSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildServicesSummary(Content summaryContentTree) {
         moduleWriter.addServicesSummary(summaryContentTree);
     }
 
     /**
      * Build the description for the module.
      *
-     * @param node the XML element that specifies which components to document
      * @param moduleContentTree the tree to which the module description will
      *                           be added
      */
-    public void buildModuleDescription(XMLNode node, Content moduleContentTree) {
+    protected void buildModuleDescription(Content moduleContentTree) {
         if (!configuration.nocomment) {
             moduleWriter.addModuleDescription(moduleContentTree);
         }
@@ -213,10 +197,9 @@
     /**
      * Build the tags of the summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param moduleContentTree the tree to which the module tags will be added
      */
-    public void buildModuleTags(XMLNode node, Content moduleContentTree) {
+    protected void buildModuleTags(Content moduleContentTree) {
         if (!configuration.nocomment) {
             moduleWriter.addModuleTags(moduleContentTree);
         }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,10 +50,6 @@
  * @author Bhavesh Patel (Modified)
  */
 public class PackageSummaryBuilder extends AbstractBuilder {
-    /**
-     * The root element of the package summary XML is {@value}.
-     */
-    public static final String ROOT = "PackageDoc";
 
     /**
      * The package being documented.
@@ -112,27 +108,20 @@
             //Doclet does not support this output.
             return;
         }
-        build(layoutParser.parseXML(ROOT), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return ROOT;
+        buildPackageDoc(contentTree);
     }
 
     /**
      * Build the package documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildPackageDoc(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildPackageDoc(Content contentTree) throws DocletException {
         contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement));
-        buildChildren(node, contentTree);
+
+        buildContent(contentTree);
+
         packageWriter.addPackageFooter(contentTree);
         packageWriter.printDocument(contentTree);
         utils.copyDocFiles(packageElement);
@@ -141,39 +130,47 @@
     /**
      * Build the content for the package.
      *
-     * @param node the XML element that specifies which components to document
      * @param contentTree the content tree to which the package contents
      *                    will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildContent(XMLNode node, Content contentTree) throws DocletException {
+    protected void buildContent(Content contentTree) throws DocletException {
         Content packageContentTree = packageWriter.getContentHeader();
-        buildChildren(node, packageContentTree);
+
+        buildPackageDescription(packageContentTree);
+        buildPackageTags(packageContentTree);
+        buildSummary(packageContentTree);
+
         packageWriter.addPackageContent(contentTree, packageContentTree);
     }
 
     /**
      * Build the package summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param packageContentTree the package content tree to which the summaries will
      *                           be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSummary(XMLNode node, Content packageContentTree) throws DocletException {
+    protected void buildSummary(Content packageContentTree) throws DocletException {
         Content summaryContentTree = packageWriter.getSummaryHeader();
-        buildChildren(node, summaryContentTree);
+
+        buildInterfaceSummary(summaryContentTree);
+        buildClassSummary(summaryContentTree);
+        buildEnumSummary(summaryContentTree);
+        buildExceptionSummary(summaryContentTree);
+        buildErrorSummary(summaryContentTree);
+        buildAnnotationTypeSummary(summaryContentTree);
+
         packageContentTree.addContent(summaryContentTree);
     }
 
     /**
      * Build the summary for the interfaces in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the interface summary
      *                           will be added
      */
-    public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildInterfaceSummary(Content summaryContentTree) {
         String interfaceTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Interface_Summary"),
@@ -195,11 +192,10 @@
     /**
      * Build the summary for the classes in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the class summary will
      *                           be added
      */
-    public void buildClassSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildClassSummary(Content summaryContentTree) {
         String classTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Class_Summary"),
@@ -220,11 +216,10 @@
     /**
      * Build the summary for the enums in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the enum summary will
      *                           be added
      */
-    public void buildEnumSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildEnumSummary(Content summaryContentTree) {
         String enumTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Enum_Summary"),
@@ -245,11 +240,10 @@
     /**
      * Build the summary for the exceptions in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the exception summary will
      *                           be added
      */
-    public void buildExceptionSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildExceptionSummary(Content summaryContentTree) {
         String exceptionTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Exception_Summary"),
@@ -272,11 +266,10 @@
     /**
      * Build the summary for the errors in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the error summary will
      *                           be added
      */
-    public void buildErrorSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildErrorSummary(Content summaryContentTree) {
         String errorTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Error_Summary"),
@@ -298,11 +291,10 @@
     /**
      * Build the summary for the annotation type in this package.
      *
-     * @param node the XML element that specifies which components to document
      * @param summaryContentTree the summary tree to which the annotation type
      *                           summary will be added
      */
-    public void buildAnnotationTypeSummary(XMLNode node, Content summaryContentTree) {
+    protected void buildAnnotationTypeSummary(Content summaryContentTree) {
         String annotationtypeTableSummary =
                 configuration.getText("doclet.Member_Table_Summary",
                 configuration.getText("doclet.Annotation_Types_Summary"),
@@ -327,11 +319,10 @@
     /**
      * Build the description of the summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param packageContentTree the tree to which the package description will
      *                           be added
      */
-    public void buildPackageDescription(XMLNode node, Content packageContentTree) {
+    protected void buildPackageDescription(Content packageContentTree) {
         if (configuration.nocomment) {
             return;
         }
@@ -341,10 +332,9 @@
     /**
      * Build the tags of the summary.
      *
-     * @param node the XML element that specifies which components to document
      * @param packageContentTree the tree to which the package tags will be added
      */
-    public void buildPackageTags(XMLNode node, Content packageContentTree) {
+    protected void buildPackageTags(Content packageContentTree) {
         if (configuration.nocomment) {
             return;
         }
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -110,14 +110,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return "PropertyDetails";
-    }
-
-    /**
      * Returns whether or not there are members to document.
      *
      * @return whether or not there are members to document
@@ -128,13 +120,20 @@
     }
 
     /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build(Content contentTree) throws DocletException {
+        buildPropertyDoc(contentTree);
+    }
+
+    /**
      * Build the property documentation.
      *
-     * @param node the XML element that specifies which components to document
      * @param memberDetailsTree the content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) throws DocletException {
+    protected void buildPropertyDoc(Content memberDetailsTree) throws DocletException {
         if (writer == null) {
             return;
         }
@@ -146,7 +145,11 @@
                 currentProperty = (ExecutableElement)property;
                 Content propertyDocTree = writer.getPropertyDocTreeHeader(currentProperty,
                         propertyDetailsTree);
-                buildChildren(node, propertyDocTree);
+
+                buildSignature(propertyDocTree);
+                buildPropertyComments(propertyDocTree);
+                buildTagInfo(propertyDocTree);
+
                 propertyDetailsTree.addContent(writer.getPropertyDoc(
                         propertyDocTree, currentProperty == lastElement));
             }
@@ -158,20 +161,18 @@
     /**
      * Build the signature.
      *
-     * @param node the XML element that specifies which components to document
      * @param propertyDocTree the content tree to which the documentation will be added
      */
-    public void buildSignature(XMLNode node, Content propertyDocTree) {
+    protected void buildSignature(Content propertyDocTree) {
         propertyDocTree.addContent(writer.getSignature(currentProperty));
     }
 
     /**
      * Build the deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param propertyDocTree the content tree to which the documentation will be added
      */
-    public void buildDeprecationInfo(XMLNode node, Content propertyDocTree) {
+    protected void buildDeprecationInfo(Content propertyDocTree) {
         writer.addDeprecated(currentProperty, propertyDocTree);
     }
 
@@ -179,10 +180,9 @@
      * Build the comments for the property.  Do nothing if
      * {@link BaseConfiguration#nocomment} is set to true.
      *
-     * @param node the XML element that specifies which components to document
      * @param propertyDocTree the content tree to which the documentation will be added
      */
-    public void buildPropertyComments(XMLNode node, Content propertyDocTree) {
+    protected void buildPropertyComments(Content propertyDocTree) {
         if (!configuration.nocomment) {
             writer.addComments(currentProperty, propertyDocTree);
         }
@@ -191,10 +191,9 @@
     /**
      * Build the tag information.
      *
-     * @param node the XML element that specifies which components to document
      * @param propertyDocTree the content tree to which the documentation will be added
      */
-    public void buildTagInfo(XMLNode node, Content propertyDocTree) {
+    protected void buildTagInfo(Content propertyDocTree) {
         writer.addTags(currentProperty, propertyDocTree);
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 
 package jdk.javadoc.internal.doclets.toolkit.builders;
 
-import java.util.*;
+
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
 
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ExecutableElement;
@@ -55,11 +58,6 @@
 public class SerializedFormBuilder extends AbstractBuilder {
 
     /**
-     * The root element of the serialized form XML is {@value}.
-     */
-    public static final String NAME = "SerializedForm";
-
-    /**
      * The writer for this builder.
      */
     private SerializedFormWriter writer;
@@ -139,28 +137,21 @@
             //Doclet does not support this output.
             return;
         }
-        build(layoutParser.parseXML(NAME), contentTree);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public String getName() {
-        return NAME;
+        buildSerializedForm(contentTree);
     }
 
     /**
      * Build the serialized form.
      *
-     * @param node the XML element that specifies which components to document
      * @param serializedTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSerializedForm(XMLNode node, Content serializedTree) throws DocletException {
+    protected void buildSerializedForm(Content serializedTree) throws DocletException {
         serializedTree = writer.getHeader(configuration.getText(
                 "doclet.Serialized_Form"));
-        buildChildren(node, serializedTree);
+
+        buildSerializedFormSummaries(serializedTree);
+
         writer.addFooter(serializedTree);
         writer.printDocument(serializedTree);
     }
@@ -168,16 +159,16 @@
     /**
      * Build the serialized form summaries.
      *
-     * @param node the XML element that specifies which components to document
      * @param serializedTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSerializedFormSummaries(XMLNode node, Content serializedTree)
+    protected void buildSerializedFormSummaries(Content serializedTree)
             throws DocletException {
         Content serializedSummariesTree = writer.getSerializedSummariesHeader();
         for (PackageElement pkg : configuration.packages) {
             currentPackage = pkg;
-            buildChildren(node, serializedSummariesTree);
+
+            buildPackageSerializedForm(serializedSummariesTree);
         }
         serializedTree.addContent(writer.getSerializedContent(
                 serializedSummariesTree));
@@ -186,11 +177,10 @@
     /**
      * Build the package serialized form for the current package being processed.
      *
-     * @param node the XML element that specifies which components to document
      * @param serializedSummariesTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildPackageSerializedForm(XMLNode node, Content serializedSummariesTree) throws DocletException {
+    protected void buildPackageSerializedForm(Content serializedSummariesTree) throws DocletException {
         Content packageSerializedTree = writer.getPackageSerializedHeader();
         SortedSet<TypeElement> classes = utils.getAllClassesUnfiltered(currentPackage);
         if (classes.isEmpty()) {
@@ -202,17 +192,19 @@
         if (!serialClassFoundToDocument(classes)) {
             return;
         }
-        buildChildren(node, packageSerializedTree);
+
+        buildPackageHeader(packageSerializedTree);
+        buildClassSerializedForm(packageSerializedTree);
+
         writer.addPackageSerializedTree(serializedSummariesTree, packageSerializedTree);
     }
 
     /**
      * Build the package header.
      *
-     * @param node the XML element that specifies which components to document
      * @param packageSerializedTree content tree to which the documentation will be added
      */
-    public void buildPackageHeader(XMLNode node, Content packageSerializedTree) {
+    protected void buildPackageHeader(Content packageSerializedTree) {
         packageSerializedTree.addContent(writer.getPackageHeader(
                 utils.getPackageName(currentPackage)));
     }
@@ -220,11 +212,10 @@
     /**
      * Build the class serialized form.
      *
-     * @param node the XML element that specifies which components to document
      * @param packageSerializedTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree)
+    protected void buildClassSerializedForm(Content packageSerializedTree)
             throws DocletException {
         Content classSerializedTree = writer.getClassSerializedHeader();
         SortedSet<TypeElement> typeElements = utils.getAllClassesUnfiltered(currentPackage);
@@ -237,7 +228,10 @@
                     continue;
                 }
                 Content classTree = writer.getClassHeader(currentTypeElement);
-                buildChildren(node, classTree);
+
+                buildSerialUIDInfo(classTree);
+                buildClassContent(classTree);
+
                 classSerializedTree.addContent(classTree);
             }
         }
@@ -247,10 +241,9 @@
     /**
      * Build the serial UID information for the given class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classTree content tree to which the serial UID information will be added
      */
-    public void buildSerialUIDInfo(XMLNode node, Content classTree) {
+    protected void buildSerialUIDInfo(Content classTree) {
         Content serialUidTree = writer.getSerialUIDInfoHeader();
         for (Element e : utils.getFieldsUnfiltered(currentTypeElement)) {
             VariableElement field = (VariableElement)e;
@@ -267,25 +260,26 @@
     /**
      * Build the summaries for the methods and fields.
      *
-     * @param node the XML element that specifies which components to document
      * @param classTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildClassContent(XMLNode node, Content classTree) throws DocletException {
+    protected void buildClassContent(Content classTree) throws DocletException {
         Content classContentTree = writer.getClassContentHeader();
-        buildChildren(node, classContentTree);
+
+        buildSerializableMethods(classContentTree);
+        buildFieldHeader(classContentTree);
+        buildSerializableFields(classContentTree);
+
         classTree.addContent(classContentTree);
     }
 
     /**
-     * Build the summaries for the methods that belong to the given
-     * class.
+     * Build the summaries for the methods that belong to the given class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSerializableMethods(XMLNode node, Content classContentTree) throws DocletException {
+    protected void buildSerializableMethods(Content classContentTree) throws DocletException {
         Content serializableMethodTree = methodWriter.getSerializableMethodsHeader();
         SortedSet<ExecutableElement> members = utils.serializationMethods(currentTypeElement);
         if (!members.isEmpty()) {
@@ -293,7 +287,11 @@
                 currentMember = member;
                 Content methodsContentTree = methodWriter.getMethodsContentHeader(
                         currentMember == members.last());
-                buildChildren(node, methodsContentTree);
+
+                buildMethodSubHeader(methodsContentTree);
+                buildDeprecatedMethodInfo(methodsContentTree);
+                buildMethodInfo(methodsContentTree);
+
                 serializableMethodTree.addContent(methodsContentTree);
             }
         }
@@ -316,54 +314,51 @@
     /**
      * Build the method sub header.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodsContentTree content tree to which the documentation will be added
      */
-    public void buildMethodSubHeader(XMLNode node, Content methodsContentTree)  {
+    protected void buildMethodSubHeader(Content methodsContentTree)  {
         methodWriter.addMemberHeader((ExecutableElement)currentMember, methodsContentTree);
     }
 
     /**
      * Build the deprecated method description.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodsContentTree content tree to which the documentation will be added
      */
-    public void buildDeprecatedMethodInfo(XMLNode node, Content methodsContentTree) {
+    protected void buildDeprecatedMethodInfo(Content methodsContentTree) {
         methodWriter.addDeprecatedMemberInfo((ExecutableElement)currentMember, methodsContentTree);
     }
 
     /**
      * Build the information for the method.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodsContentTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildMethodInfo(XMLNode node, Content methodsContentTree) throws DocletException  {
-        if(configuration.nocomment){
+    protected void buildMethodInfo(Content methodsContentTree) throws DocletException  {
+        if (configuration.nocomment) {
             return;
         }
-        buildChildren(node, methodsContentTree);
+
+        buildMethodDescription(methodsContentTree);
+        buildMethodTags(methodsContentTree);
     }
 
     /**
      * Build method description.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodsContentTree content tree to which the documentation will be added
      */
-    public void buildMethodDescription(XMLNode node, Content methodsContentTree) {
+    protected void buildMethodDescription(Content methodsContentTree) {
         methodWriter.addMemberDescription((ExecutableElement)currentMember, methodsContentTree);
     }
 
     /**
      * Build the method tags.
      *
-     * @param node the XML element that specifies which components to document
      * @param methodsContentTree content tree to which the documentation will be added
      */
-    public void buildMethodTags(XMLNode node, Content methodsContentTree) {
+    protected void buildMethodTags(Content methodsContentTree) {
         methodWriter.addMemberTags((ExecutableElement)currentMember, methodsContentTree);
         ExecutableElement method = (ExecutableElement)currentMember;
         if (method.getSimpleName().toString().compareTo("writeExternal") == 0
@@ -380,10 +375,9 @@
     /**
      * Build the field header.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree content tree to which the documentation will be added
      */
-    public void buildFieldHeader(XMLNode node, Content classContentTree) {
+    protected void buildFieldHeader(Content classContentTree) {
         if (!utils.serializableFields(currentTypeElement).isEmpty()) {
             buildFieldSerializationOverview(currentTypeElement, classContentTree);
         }
@@ -419,11 +413,10 @@
     /**
      * Build the summaries for the fields that belong to the given class.
      *
-     * @param node the XML element that specifies which components to document
      * @param classContentTree content tree to which the documentation will be added
      * @throws DocletException if there is a problem while building the documentation
      */
-    public void buildSerializableFields(XMLNode node, Content classContentTree)
+    protected void buildSerializableFields(Content classContentTree)
             throws DocletException {
         SortedSet<VariableElement> members = utils.serializableFields(currentTypeElement);
         if (!members.isEmpty()) {
@@ -433,7 +426,11 @@
                 if (!utils.definesSerializableFields(currentTypeElement)) {
                     Content fieldsContentTree = fieldWriter.getFieldsContentHeader(
                             currentMember == members.last());
-                    buildChildren(node, fieldsContentTree);
+
+                    buildFieldSubHeader(fieldsContentTree);
+                    buildFieldDeprecationInfo(fieldsContentTree);
+                    buildFieldInfo(fieldsContentTree);
+
                     serializableFieldsTree.addContent(fieldsContentTree);
                 } else {
                     buildSerialFieldTagsInfo(serializableFieldsTree);
@@ -448,10 +445,9 @@
     /**
      * Build the field sub header.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldsContentTree content tree to which the documentation will be added
      */
-    public void buildFieldSubHeader(XMLNode node, Content fieldsContentTree) {
+    protected void buildFieldSubHeader(Content fieldsContentTree) {
         if (!utils.definesSerializableFields(currentTypeElement)) {
             VariableElement field = (VariableElement) currentMember;
             fieldWriter.addMemberHeader(utils.asTypeElement(field.asType()),
@@ -464,10 +460,9 @@
     /**
      * Build the field deprecation information.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldsContentTree content tree to which the documentation will be added
      */
-    public void buildFieldDeprecationInfo(XMLNode node, Content fieldsContentTree) {
+    protected void buildFieldDeprecationInfo(Content fieldsContentTree) {
         if (!utils.definesSerializableFields(currentTypeElement)) {
             fieldWriter.addMemberDeprecatedInfo((VariableElement)currentMember,
                     fieldsContentTree);
@@ -479,8 +474,8 @@
      *
      * @param serializableFieldsTree content tree to which the documentation will be added
      */
-    public void buildSerialFieldTagsInfo(Content serializableFieldsTree) {
-        if(configuration.nocomment){
+    protected void buildSerialFieldTagsInfo(Content serializableFieldsTree) {
+        if (configuration.nocomment) {
             return;
         }
         VariableElement field = (VariableElement)currentMember;
@@ -524,17 +519,16 @@
     /**
      * Build the field information.
      *
-     * @param node the XML element that specifies which components to document
      * @param fieldsContentTree content tree to which the documentation will be added
      */
-    public void buildFieldInfo(XMLNode node, Content fieldsContentTree) {
-        if(configuration.nocomment){
+    protected void buildFieldInfo(Content fieldsContentTree) {
+        if (configuration.nocomment) {
             return;
         }
         VariableElement field = (VariableElement)currentMember;
         TypeElement te = utils.getEnclosingTypeElement(currentMember);
         // Process default Serializable field.
-        if ((utils.getSerialTrees(field).isEmpty()) /*&& ! field.isSynthetic()*/
+        if ((utils.getSerialTrees(field).isEmpty()) /*&& !field.isSynthetic()*/
                 && configuration.serialwarn) {
             messages.warning(field,
                     "doclet.MissingSerialTag", utils.getFullyQualifiedName(te),
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/XMLNode.java	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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.doclets.toolkit.builders;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Simple class to represent the attribute and elements of an XML node.
- *
- *  <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>
- */
-public class XMLNode {
-    XMLNode(XMLNode parent, String qname) {
-        this.parent = parent;
-        name = qname;
-        attrs = new HashMap<>();
-        children = new ArrayList<>();
-
-        if (parent != null)
-            parent.children.add(this);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("<");
-        sb.append(name);
-        for (Map.Entry<String,String> e: attrs.entrySet())
-            sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\"");
-        if (children.size() == 0)
-            sb.append("/>");
-        else {
-            sb.append(">");
-            for (XMLNode c: children)
-                sb.append(c.toString());
-            sb.append("</" + name + ">");
-        }
-        return sb.toString();
-    }
-
-    final XMLNode parent;
-    final String name;
-    final Map<String,String> attrs;
-    final List<XMLNode> children;
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclet.xml	Tue Jun 27 14:30:44 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-
-<!--
- Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
- This code is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation.  Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
-
- This code is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- version 2 for more details (a copy is included in the LICENSE file that
- accompanied this code).
-
- You should have received a copy of the GNU General Public License version
- 2 along with this work; if not, write to the Free Software Foundation,
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
- Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- or visit www.oracle.com if you need additional information or have any
- questions.
--->
-
-
-<Doclet>
-
-    <ModuleDoc>
-        <Content>
-            <ModuleDescription/>
-            <ModuleTags/>
-            <Summary>
-                <PackagesSummary/>
-                <ModulesSummary/>
-                <ServicesSummary/>
-            </Summary>
-        </Content>
-    </ModuleDoc>
-
-    <PackageDoc>
-        <Content>
-            <PackageDescription/>
-            <PackageTags/>
-            <Summary>
-                <InterfaceSummary/>
-                <ClassSummary/>
-                <EnumSummary/>
-                <ExceptionSummary/>
-                <ErrorSummary/>
-                <AnnotationTypeSummary/>
-            </Summary>
-        </Content>
-    </PackageDoc>
-
-    <AnnotationTypeDoc>
-        <AnnotationTypeInfo>
-            <DeprecationInfo/>
-            <AnnotationTypeSignature/>
-            <AnnotationTypeDescription/>
-            <AnnotationTypeTagInfo/>
-        </AnnotationTypeInfo>
-        <MemberSummary>
-            <AnnotationTypeFieldsSummary/>
-            <AnnotationTypeRequiredMemberSummary/>
-            <AnnotationTypeOptionalMemberSummary/>
-        </MemberSummary>
-        <AnnotationTypeMemberDetails>
-            <AnnotationTypeFieldDetails>
-                <AnnotationTypeField>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <MemberComments/>
-                    <TagInfo/>
-                </AnnotationTypeField>
-            </AnnotationTypeFieldDetails>
-            <AnnotationTypeRequiredMemberDetails>
-                <AnnotationTypeRequiredMember>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <MemberComments/>
-                    <TagInfo/>
-                </AnnotationTypeRequiredMember>
-            </AnnotationTypeRequiredMemberDetails>
-            <AnnotationTypeOptionalMemberDetails>
-                <AnnotationTypeOptionalMember>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <MemberComments/>
-                    <TagInfo/>
-                    <DefaultValueInfo/>
-                </AnnotationTypeOptionalMember>
-            </AnnotationTypeOptionalMemberDetails>
-        </AnnotationTypeMemberDetails>
-    </AnnotationTypeDoc>
-
-    <ClassDoc>
-        <ClassTree/>
-        <ClassInfo>
-            <TypeParamInfo/>
-            <SuperInterfacesInfo/>
-            <ImplementedInterfacesInfo/>
-            <SubClassInfo/>
-            <SubInterfacesInfo/>
-            <InterfaceUsageInfo/>
-            <NestedClassInfo/>
-            <FunctionalInterfaceInfo/>
-            <DeprecationInfo/>
-            <ClassSignature/>
-            <ClassDescription/>
-            <ClassTagInfo/>
-        </ClassInfo>
-        <MemberSummary>
-            <PropertiesSummary/>
-            <NestedClassesSummary/>
-            <EnumConstantsSummary/>
-            <FieldsSummary/>
-            <ConstructorsSummary/>
-            <MethodsSummary/>
-        </MemberSummary>
-        <MemberDetails>
-            <EnumConstantsDetails>
-                <EnumConstant>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <EnumConstantComments/>
-                    <TagInfo/>
-                </EnumConstant>
-            </EnumConstantsDetails>
-            <PropertyDetails>
-                <PropertyDoc>
-                    <Signature/>
-                    <PropertyComments/>
-                    <TagInfo/>
-                </PropertyDoc>
-            </PropertyDetails>
-            <FieldDetails>
-                <FieldDoc>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <FieldComments/>
-                    <TagInfo/>
-                </FieldDoc>
-            </FieldDetails>
-            <ConstructorDetails>
-                <ConstructorDoc>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <ConstructorComments/>
-                    <TagInfo/>
-                </ConstructorDoc>
-            </ConstructorDetails>
-            <MethodDetails>
-                <MethodDoc>
-                    <Signature/>
-                    <DeprecationInfo/>
-                    <MethodComments/>
-                    <TagInfo/>
-                </MethodDoc>
-            </MethodDetails>
-        </MemberDetails>
-    </ClassDoc>
-
-    <ConstantSummary>
-        <Contents/>
-        <ConstantSummaries>
-            <PackageHeader/>
-            <ClassConstantSummary>
-                <ConstantMembers/>
-            </ClassConstantSummary>
-        </ConstantSummaries>
-    </ConstantSummary>
-
-    <SerializedForm>
-        <SerializedFormSummaries>
-            <PackageSerializedForm>
-                <PackageHeader/>
-                <ClassSerializedForm>
-                    <SerialUIDInfo/>
-                    <ClassContent>
-                        <SerializableMethods>
-                            <MethodSubHeader/>
-                            <DeprecatedMethodInfo/>
-                            <MethodInfo>
-                                <MethodDescription/>
-                                <MethodTags/>
-                            </MethodInfo>
-                        </SerializableMethods>
-                        <FieldHeader/>
-                        <SerializableFields>
-                            <FieldSubHeader/>
-                            <FieldDeprecationInfo/>
-                            <FieldInfo/>
-                        </SerializableFields>
-                    </ClassContent>
-                </ClassSerializedForm>
-            </PackageSerializedForm>
-        </SerializedFormSummaries>
-    </SerializedForm>
-</Doclet>
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -14,9 +14,6 @@
 doclet.Option_doclint_no_qualifiers=Access qualifiers not permitted for -Xdoclint arguments
 doclet.Option_doclint_invalid_arg=Invalid argument for -Xdoclint option
 doclet.Option_doclint_package_invalid_arg=Invalid argument for -Xdoclint/package option
-doclet.builder.exception.in.component=An exception occurred while building a component: {0}\n\
-\t({1})
-doclet.builder.unknown.component=Unknown component referenced in doclet build file: {0}
 doclet.error.initializing.dest.dir=Error initializing destination directory: {0}
 doclet.exception.read.file=Error reading file: {0}\n\
 \t({1})
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Tue Jun 27 16:00:14 2017 -0400
@@ -576,7 +576,6 @@
 th.colFirst a:link, th.colFirst a:visited,
 th.colSecond a:link, th.colSecond a:visited,
 th.colConstructorName a:link, th.colConstructorName a:visited,
-td.colLast a:link, td.colLast a:visited,
 .constantValuesContainer td a:link, .constantValuesContainer td a:visited {
     font-weight:bold;
 }
--- a/langtools/src/jdk.javadoc/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.javadoc/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
  *  {@link javax.tools.ToolProvider#getSystemDocumentationTool system documentation tool}
  *  and its command line equivalent, <em>javadoc</em>.
  *
+ *  @see <a href="{@docRoot}/../specs/doc-comment-spec.html">
+ *      Documentation Comment Specification for the Standard Doclet</a>
+ *
  *  @moduleGraph
  *  @since 9
  */
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java	Tue Jun 27 16:00:14 2017 -0400
@@ -43,7 +43,6 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Optional;
-import java.util.function.BooleanSupplier;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
@@ -962,6 +961,7 @@
             this.input = input;
         }
 
+        @Override
         public boolean isRaw() {
             try {
                 return getSettings().get("-a").contains("-icanon");
@@ -1053,12 +1053,23 @@
     private static final class TestTerminal extends TerminalSupport {
 
         private final StopDetectingInputStream input;
+        private final int height;
 
         public TestTerminal(StopDetectingInputStream input) throws Exception {
             super(true);
             setAnsiSupported(false);
             setEchoEnabled(false);
             this.input = input;
+            int h = DEFAULT_HEIGHT;
+            try {
+                String hp = System.getProperty("test.terminal.height");
+                if (hp != null && !hp.isEmpty()) {
+                    h = Integer.parseInt(hp);
+                }
+            } catch (Throwable ex) {
+                // ignore
+            }
+            this.height = h;
         }
 
         @Override
@@ -1066,6 +1077,11 @@
             return input.setInputStream(super.wrapInIfNeeded(in));
         }
 
+        @Override
+        public int getHeight() {
+            return height;
+        }
+
     }
 
     private interface SuspendableTerminal {
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1706,9 +1706,13 @@
         // Documentation pseudo-commands
         registerCommand(new Command("/<id>",
                 "help.id",
+                arg -> cmdHelp("rerun"),
+                EMPTY_COMPLETION_PROVIDER,
                 CommandKind.HELP_ONLY));
         registerCommand(new Command("/-<n>",
                 "help.previous",
+                arg -> cmdHelp("rerun"),
+                EMPTY_COMPLETION_PROVIDER,
                 CommandKind.HELP_ONLY));
         registerCommand(new Command("intro",
                 "help.intro",
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -249,6 +249,11 @@
     Edit the snippets with the specified snippet ids\n\n\
 /edit <id>-<id>\n\t\
     Edit the snippets within the range of snippet ids\n\n\
+/edit -start\n\t\
+    Edit the automatically evaluated start-up snippets. Any changes are in this\n\t\
+    session, and do not affect the start-up setting\n\n\
+/edit -all\n\t\
+    Edit all snippets including failed, overwritten, dropped, and start-up\n\n\
 /edit\n\t\
     Edit the currently active snippets of code that you typed or read with /open
 
@@ -393,7 +398,7 @@
      recent.\n\n\
 /reload -restore\n\t\
      Reset and replay the valid history between the previous and most\n\t\
-     recent time that jshell was entered, or a /reset, or /reload\n\t\
+     recent time that jshell was entered, or a /reset, /reload, or /env\n\t\
      command was executed. This can thus be used to restore a previous\n\t\
      jshell tool session.\n\n\
 /reload [-restore] -quiet\n\t\
@@ -695,18 +700,18 @@
    error1 -- one error\n\t\
    error2 -- two or more errors\n\n\
 Examples:\n\t\
-/set format myformat action 'Created' added-primary\n\t\
-/set format myformat action 'Update replaced' replaced-update\n\t\
-/set format myformat display '{pre}{action} class {name}{post}' class-ok\n\t\
-/set format myformat display '{pre}{action} variable {name}, reset to null{post}' replaced-vardecl,varinit-ok-update\n\n\
+/set format mymode action 'Created' added-primary\n\t\
+/set format mymode action 'Update replaced' replaced-update\n\t\
+/set format mymode display '{pre}{action} class {name}{post}' class-ok\n\t\
+/set format mymode display '{pre}{action} variable {name}, reset to null{post}' replaced-vardecl,varinit-ok-update\n\n\
 Note that subsequent selectors for a field may overwrite some or all of previous used selectors -- last one wins\n\
 \n\
 The form without <format> shows the current format settings.\n\
 When the <mode> is specified only the format settings for that mode are shown.\n\
 When both the <mode> and <field> are specified only the format settings for that\n\
 mode and field are shown.  Example:\n\t\
-/set format myformat\n\
-shows the format settings for the mode myformat\n
+/set format mymode\n\
+shows the format settings for the mode mymode\n
 
 help.set.truncation = \
 Set the max length of a displayed value:\n\
@@ -745,8 +750,8 @@
 The form without <length> shows the truncation settings.\n\
 When the <mode> is specified only the truncation settings for that mode are shown.\n\
 Example:\n\t\
-/set truncation myformat\n\
-shows the truncation settings for the mode myformat\n
+/set truncation mymode\n\
+shows the truncation settings for the mode mymode\n
 
 help.set.feedback = \
 Set the feedback mode describing displayed feedback for entered snippets and commands:\n\
@@ -818,9 +823,9 @@
 Note: the settings for the mode include the settings for prompt, format, and\n\
 truncation.\n\
 Example:\n\t\
-/set mode myformat\n\
+/set mode mymode\n\
 \n\
-shows the mode, prompt, format, and truncation settings for the mode myformat
+shows the mode, prompt, format, and truncation settings for the mode mymode
 
 help.set.prompt = \
 Set the prompts.  Both the normal prompt and the continuation-prompt must be set:\n\
@@ -840,8 +845,8 @@
 The form without <prompt> shows the currently set prompts.\n\
 When the <mode> is specified only the prompts for that mode are shown.\n\
 Example:\n\t\
-/set prompt myformat\n\
-shows the prompts set for the mode myformat\n
+/set prompt mymode\n\
+shows the prompts set for the mode mymode\n
 
 help.set.editor =\
 Specify the command to launch for the /edit command:\n\
--- a/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/jdk/javadoc/doclet/testSearch/TestSearch.java	Tue Jun 27 16:00:14 2017 -0400
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218
+ * @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
  * @summary Test the search feature of javadoc.
  * @author bpatel
  * @library ../lib
@@ -491,6 +491,11 @@
                 "function nestedName(e) {",
                 "function sortAndConcatResults(a1, a2) {",
                 "if (exactMatcher.test(item.l)) {\n"
-                + "                        presult.unshift(item);");
+                + "                        presult.unshift(item);",
+                "$(\"#search\").on('click keydown', function() {\n"
+                + "        if ($(this).val() == watermark) {\n"
+                + "            $(this).val('').removeClass('watermark');\n"
+                + "        }\n"
+                + "    });");
     }
 }
--- a/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug      4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461 8154261 8162363 8160196 8151743 8177417
- *           8175218 8176452
+ *           8175218 8176452 8181215
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib
@@ -183,7 +183,6 @@
                 + "th.colFirst a:link, th.colFirst a:visited,\n"
                 + "th.colSecond a:link, th.colSecond a:visited,\n"
                 + "th.colConstructorName a:link, th.colConstructorName a:visited,\n"
-                + "td.colLast a:link, td.colLast a:visited,\n"
                 + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited {\n"
                 + "    font-weight:bold;\n"
                 + "}");
@@ -219,6 +218,15 @@
                 "a[name]:hover {\n"
                 + "    text-decoration:none;\n"
                 + "    color:#353833;\n"
+                + "}",
+                "td.colFirst a:link, td.colFirst a:visited,\n"
+                + "td.colSecond a:link, td.colSecond a:visited,\n"
+                + "th.colFirst a:link, th.colFirst a:visited,\n"
+                + "th.colSecond a:link, th.colSecond a:visited,\n"
+                + "th.colConstructorName a:link, th.colConstructorName a:visited,\n"
+                + "td.colLast a:link, td.colLast a:visited,\n"
+                + ".constantValuesContainer td a:link, .constantValuesContainer td a:visited {\n"
+                + "    font-weight:bold;\n"
                 + "}");
     }
 }
--- a/langtools/test/jdk/jshell/MergedTabShiftTabCommandTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/jdk/jshell/MergedTabShiftTabCommandTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -44,6 +44,9 @@
 public class MergedTabShiftTabCommandTest extends UITesting {
 
     public void testCommand() throws Exception {
+        // set terminal height so that help output won't hit page breaks
+        System.setProperty("test.terminal.height", "1000000");
+
         doRunTest((inputSink, out) -> {
             inputSink.write("1\n");
             waitOutput(out, "\u0005");
--- a/langtools/test/jdk/jshell/ToolSimpleTest.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/jdk/jshell/ToolSimpleTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -388,6 +388,14 @@
         );
     }
 
+    @Test
+    public void testConfusedUserPseudoCommands() {
+        test(
+                (a) -> assertHelp(a, "/-<n>", "last snippet", "digits"),
+                (a) -> assertHelp(a, "/<id>", "last snippet", "digits")
+        );
+    }
+
     private void assertHelp(boolean a, String command, String... find) {
         assertCommandCheckOutput(a, command, s -> {
             for (String f : find) {
--- a/langtools/test/tools/javac/8002286/T8002286.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/8002286/T8002286.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,3 +1,2 @@
 T8002286.java:8:22: compiler.err.cant.resolve.location.args: kindname.method, value, , , (compiler.misc.location: kindname.annotation, T8002286.Anno, null)
-T8002286.java:8:11: compiler.err.cant.resolve.location.args: kindname.method, nonExistent, , , (compiler.misc.location: kindname.class, T8002286, null)
-2 errors
+1 error
--- a/langtools/test/tools/javac/T5024091/T5024091.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/T5024091/T5024091.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-T5024091.java:12:29: compiler.err.cant.access: java.lang.StringBuilder, user-selected completion failure by class name
+T5024091.java:12:29: compiler.err.cant.access: java.lang.StringBuilder, (compiler.misc.user.selected.completion.failure)
 1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8175794/MissingReturnConstraintTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8175794
+ * @summary Type inference regression after JDK-8078093
+ * @compile MissingReturnConstraintTest.java
+ */
+
+import java.util.concurrent.ExecutorService;
+
+public abstract class MissingReturnConstraintTest {
+    void f(ExecutorService s) {
+        s.submit(() -> run(() -> {}));
+    }
+
+    abstract <E extends Throwable> void run(ThrowableRunnable<E> action) throws E;
+
+    public interface ThrowableRunnable<T extends Throwable> {
+        void run() throws T;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/Anno.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+@interface Anno {
+    Class<?> value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/Anno2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+@interface Anno2 {
+    String value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/AnnoProcessor.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.Set;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.element.TypeElement;
+
+@SupportedAnnotationTypes("*")
+public class AnnoProcessor extends AbstractProcessor {
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest1.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,11 @@
+/* @test /nodynamiccopyright/
+ * @bug 8181464
+ * @summary Invalid lambda in annotation causes NPE in Lint.augment
+ * @modules java.compiler
+ *          jdk.compiler
+ * @compile Anno.java AnnoProcessor.java
+ * @compile/fail/ref=LambdaInAnnotationsCausesNPETest1.out -XDrawDiagnostics -processor AnnoProcessor -proc:only LambdaInAnnotationsCausesNPETest1.java
+ */
+
+@Anno(value = x -> x)
+class LambdaInAnnotationsCausesNPETest1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest1.out	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,2 @@
+LambdaInAnnotationsCausesNPETest1.java:10:15: compiler.err.expression.not.allowable.as.annotation.value
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,11 @@
+/* @test /nodynamiccopyright/
+ * @bug 8181464
+ * @summary Invalid lambda in annotation causes NPE in Lint.augment
+ * @modules java.compiler
+ *          jdk.compiler
+ * @compile Anno.java AnnoProcessor.java
+ * @compile/fail/ref=LambdaInAnnotationsCausesNPETest2.out -XDrawDiagnostics -processor AnnoProcessor -proc:only LambdaInAnnotationsCausesNPETest2.java
+ */
+
+@Anno(value = (String x) -> x)
+class LambdaInAnnotationsCausesNPETest2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest2.out	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,2 @@
+LambdaInAnnotationsCausesNPETest2.java:10:15: compiler.err.expression.not.allowable.as.annotation.value
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest3.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,15 @@
+/* @test /nodynamiccopyright/
+ * @bug 8181464
+ * @summary Invalid lambda in annotation causes NPE in Lint.augment
+ * @modules java.compiler
+ *          jdk.compiler
+ * @compile Anno2.java AnnoProcessor.java
+ * @compile/fail/ref=LambdaInAnnotationsCausesNPETest3.out -XDrawDiagnostics -processor AnnoProcessor -proc:only LambdaInAnnotationsCausesNPETest3.java
+ */
+
+@Anno2(value = LambdaInAnnotationsCausesNPETest3.m(x -> x))
+class LambdaInAnnotationsCausesNPETest3 {
+    static String m(Class<?> target) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest3.out	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,2 @@
+LambdaInAnnotationsCausesNPETest3.java:10:51: compiler.err.expression.not.allowable.as.annotation.value
+1 error
--- a/langtools/test/tools/javac/annotations/neg/AnonSubclass.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/AnonSubclass.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-AnonSubclass.java:10:15: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: java.lang.Object, java.lang.String)
+AnonSubclass.java:10:15: compiler.err.expression.not.allowable.as.annotation.value
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle1.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Cycle1.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Cycle1.java:13:9: compiler.err.cyclic.annotation.element
+Cycle1.java:13:9: compiler.err.cyclic.annotation.element: cycle1.Foo
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle2.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Cycle2.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Cycle2.java:13:9: compiler.err.cyclic.annotation.element
+Cycle2.java:13:9: compiler.err.cyclic.annotation.element: cycle2.Bar
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Cycle3.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Cycle3.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Cycle3.java:17:9: compiler.err.cyclic.annotation.element
+Cycle3.java:17:9: compiler.err.cyclic.annotation.element: cycle3.A
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Dup.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Dup.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Dup.java:11:1: compiler.err.duplicate.annotation.missing.container: Dup, java.lang.annotation.Repeatable
+Dup.java:11:1: compiler.err.duplicate.annotation.missing.container: Dup
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Z14.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Z14.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Z14.java:10:15: compiler.err.intf.annotation.cant.have.type.params
+Z14.java:10:15: compiler.err.intf.annotation.cant.have.type.params: An
 1 error
--- a/langtools/test/tools/javac/annotations/neg/Z15.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/Z15.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-Z15.java:11:36: compiler.err.attribute.value.must.be.constant
+Z15.java:11:36: compiler.err.expression.not.allowable.as.annotation.value
 1 error
--- a/langtools/test/tools/javac/annotations/neg/pkg/package-info.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/neg/pkg/package-info.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-package-info.java:11:20: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.anonymous.class: java.lang.Object, java.lang.String)
+package-info.java:11:20: compiler.err.expression.not.allowable.as.annotation.value
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/BaseAnnoAsContainerAnno.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-BaseAnnoAsContainerAnno.java:13:11: compiler.err.cyclic.annotation.element
+BaseAnnoAsContainerAnno.java:13:11: compiler.err.cyclic.annotation.element: Foo
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/CyclicAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-CyclicAnnotation.java:13:11: compiler.err.cyclic.annotation.element
+CyclicAnnotation.java:13:11: compiler.err.cyclic.annotation.element: Baz
 1 error
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/DuplicateErrors.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/DuplicateErrors.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,3 +1,3 @@
-DuplicateErrors.java:34:1: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.Repeatable
-DuplicateErrors.java:35:1: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.Repeatable
+DuplicateErrors.java:34:1: compiler.err.duplicate.annotation.missing.container: Foo
+DuplicateErrors.java:35:1: compiler.err.duplicate.annotation.missing.container: Foo
 2 errors
--- a/langtools/test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-NoRepeatableAnno.java:11:6: compiler.err.duplicate.annotation.missing.container: Foo, java.lang.annotation.Repeatable
+NoRepeatableAnno.java:11:6: compiler.err.duplicate.annotation.missing.container: Foo
 1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TypeAnnotationPropagationTest.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2017, Google Inc. All rights reserved.
+ * 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 8144185
+ * @summary javac produces incorrect RuntimeInvisibleTypeAnnotations length attribute
+ * @modules jdk.jdeps/com.sun.tools.classfile
+ */
+
+import static java.lang.annotation.ElementType.TYPE_USE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.Method;
+import com.sun.tools.classfile.RuntimeVisibleTypeAnnotations_attribute;
+import com.sun.tools.classfile.TypeAnnotation;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.util.Arrays;
+import java.util.Objects;
+
+public class TypeAnnotationPropagationTest extends ClassfileTestHelper {
+    public static void main(String[] args) throws Exception {
+        new TypeAnnotationPropagationTest().run();
+    }
+
+    public void run() throws Exception {
+        ClassFile cf = getClassFile("TypeAnnotationPropagationTest$Test.class");
+
+        Method f = null;
+        for (Method m : cf.methods) {
+            if (m.getName(cf.constant_pool).contains("f")) {
+                f = m;
+                break;
+            }
+        }
+
+        int idx = f.attributes.getIndex(cf.constant_pool, Attribute.Code);
+        Code_attribute cattr = (Code_attribute) f.attributes.get(idx);
+        idx = cattr.attributes.getIndex(cf.constant_pool, Attribute.RuntimeVisibleTypeAnnotations);
+        RuntimeVisibleTypeAnnotations_attribute attr =
+                (RuntimeVisibleTypeAnnotations_attribute) cattr.attributes.get(idx);
+
+        TypeAnnotation anno = attr.annotations[0];
+        assertEquals(anno.position.lvarOffset, new int[] {3}, "start_pc");
+        assertEquals(anno.position.lvarLength, new int[] {8}, "length");
+        assertEquals(anno.position.lvarIndex, new int[] {1}, "index");
+    }
+
+    void assertEquals(int[] actual, int[] expected, String message) {
+        if (!Arrays.equals(actual, expected)) {
+            throw new AssertionError(
+                    String.format(
+                            "actual: %s, expected: %s, %s",
+                            Arrays.toString(actual), Arrays.toString(expected), message));
+        }
+    }
+
+    /** ********************* Test class ************************ */
+    static class Test {
+        void f() {
+            @A String s = "";
+            Runnable r =
+                    () -> {
+                        Objects.requireNonNull(s);
+                        Objects.requireNonNull(s);
+                        Objects.requireNonNull(s);
+                        Objects.requireNonNull(s);
+                        Objects.requireNonNull(s);
+                        Objects.requireNonNull(s);
+                    };
+        }
+
+        @Retention(RUNTIME)
+        @Target(TYPE_USE)
+        @interface A {}
+    }
+}
+
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:11:15: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:11:15: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/innertypeparams/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:11:20: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:11:20: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/newarray/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:11:32: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:11:32: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/parambounds/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:9:38: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:9:38: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/receiver/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:10:16: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:10:16: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/rest/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:11:12: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:11:12: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/typeArgs/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/typeparams/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:9:28: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:9:28: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/common/wildcards/DuplicateTypeAnnotation.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation.missing.container: A, java.lang.annotation.Repeatable
+DuplicateTypeAnnotation.java:10:24: compiler.err.duplicate.annotation.missing.container: A
 1 error
--- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,28 +1,28 @@
-RepeatingTypeAnnotations.java:39:25: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:41:25: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:42:25: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:50:31: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:52:24: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:61:21: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:63:38: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:65:24: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:72:21: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:77:28: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:79:21: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:79:36: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:81:19: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:85:19: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:85:34: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:89:18: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:89:33: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:93:19: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:93:35: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:97:19: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:97:34: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:101:37: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:101:26: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:101:56: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
-RepeatingTypeAnnotations.java:101:72: compiler.err.duplicate.annotation.missing.container: TA, java.lang.annotation.Repeatable
+RepeatingTypeAnnotations.java:39:25: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:41:25: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:42:25: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:50:31: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:52:24: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:61:21: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:63:38: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:65:24: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:72:21: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:77:28: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:79:21: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:79:36: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:81:19: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:85:19: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:85:34: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:89:18: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:89:33: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:93:19: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:93:35: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:97:19: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:97:34: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:101:37: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:101:26: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:101:56: compiler.err.duplicate.annotation.missing.container: TA
+RepeatingTypeAnnotations.java:101:72: compiler.err.duplicate.annotation.missing.container: TA
 - compiler.note.unchecked.filename: RepeatingTypeAnnotations.java
 - compiler.note.unchecked.recompile
 25 errors
--- a/langtools/test/tools/javac/diags/examples.not-yet.txt	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/diags/examples.not-yet.txt	Tue Jun 27 16:00:14 2017 -0400
@@ -1,7 +1,7 @@
 compiler.err.already.annotated                          # internal compiler error?
 compiler.err.already.defined.this.unit                  # seems to be masked by compiler.err.duplicate.class
-compiler.err.annotation.value.not.allowable.type        # cannot happen: precluded by complete type-specific tests
 compiler.err.bad.functional.intf.anno                   # seems to be masked by compiler.err.annotation.type.not.applicable
+compiler.err.annotation.value.not.allowable.type        # should be detected in advance by the annotation value visitor
 compiler.err.cant.read.file                             # (apt.JavaCompiler?)
 compiler.err.cant.select.static.class.from.param.type
 compiler.err.dc.unterminated.string                     # cannot happen
@@ -56,6 +56,7 @@
 compiler.misc.base.membership                           # UNUSED
 compiler.misc.class.file.not.found                      # ClassReader
 compiler.misc.class.file.wrong.class
+compiler.misc.exception.message                         # uncommon completion failure based on a string
 compiler.misc.fatal.err.cant.locate.ctor                # Resolve, from Lower
 compiler.misc.fatal.err.cant.locate.field               # Resolve, from Lower
 compiler.misc.fatal.err.cant.locate.meth                # Resolve, from Lower
@@ -94,6 +95,7 @@
 compiler.misc.unable.to.access.file                     # ClassFile
 compiler.misc.undecl.type.var                           # ClassReader
 compiler.misc.unicode.str.not.supported                 # ClassReader
+compiler.misc.user.selected.completion.failure          # manual completion failure
 compiler.misc.malformed.vararg.method                   # ClassReader
 compiler.misc.version.not.available                     # JavaCompiler; implies build error
 compiler.misc.where.description.captured
--- a/langtools/test/tools/javac/diags/examples/AnnoValueMustBeClassLiteral.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/diags/examples/AnnoValueMustBeClassLiteral.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.annotation.value.must.be.class.literal
+// key: compiler.err.expression.not.allowable.as.annotation.value
 
 @interface Anno {
     Class value();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/AnnotationMustBeConstant.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.expression.not.allowable.as.annotation.value
+
+import java.util.function.*;
+
+@interface Anno {
+    String value();
+}
+
+@Anno(value = AnnotationMustBeConstant.m(x -> x))
+class AnnotationMustBeConstant {
+    static String m(Function<String, String> f) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/AnnotationMustBeConstant2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.attribute.value.must.be.constant
+
+@T(a = AnnotationMustBeConstant2.x)
+@interface T {
+    int a();
+}
+
+class AnnotationMustBeConstant2 {
+    static int x;
+}
--- a/langtools/test/tools/javac/diags/examples/AttrMustBeConstant.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/diags/examples/AttrMustBeConstant.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.attribute.value.must.be.constant
+// key: compiler.err.expression.not.allowable.as.annotation.value
 
 @interface Anno {
     String value();
--- a/langtools/test/tools/javac/diags/examples/EnumAnnoValueMustBeEnumConst.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/diags/examples/EnumAnnoValueMustBeEnumConst.java	Tue Jun 27 16:00:14 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.enum.annotation.must.be.enum.constant
+// key: compiler.err.expression.not.allowable.as.annotation.value
 
 enum E { A, B, C }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/EnumAnnoValueMustBeEnumConst2.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.enum.annotation.must.be.enum.constant
+
+enum E {
+    A,
+    B;
+
+    public static final E e = A;
+}
+
+@interface Anno {
+    E value();
+}
+
+@Anno(E.e)
+class EnumAnnoValueMustBeEnumConstant { }
--- a/langtools/test/tools/javac/importChecks/NoImportedNoClasses.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/importChecks/NoImportedNoClasses.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,2 +1,2 @@
-NoImportedNoClasses.java:10:1: compiler.err.cant.resolve.location: kindname.static, UNKNOWN, , , kindname.interface, java.lang.Runnable
+NoImportedNoClasses.java:10:1: compiler.err.cant.resolve.location: kindname.static, UNKNOWN, null, null, (compiler.misc.location: kindname.interface, java.lang.Runnable, null)
 1 error
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/LambdaConv28.java	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,32 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8181911
+ * @summary Verify that the analyzer does not affect ordinary compilation.
+ * @compile/ref=LambdaConv28.out -XDrawDiagnostics -XDfind=lambda LambdaConv28.java
+ */
+
+class LambdaConv28 {
+
+    public void test(A a) {
+        test(()-> {
+            return new I() {
+                public <T> void t() {
+                }
+            };
+        });
+        test(new A() {
+            public I get() {
+                return null;
+            }
+        });
+    }
+
+    public interface I {
+        public <T> void t();
+    }
+
+    public interface A {
+        public I get();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/lambda/LambdaConv28.out	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,2 @@
+LambdaConv28.java:17:22: compiler.warn.potential.lambda.found
+1 warning
--- a/langtools/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.out	Tue Jun 27 16:00:14 2017 -0400
@@ -3,5 +3,5 @@
 Generated.java:4:22: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, E)
 Generated.java:5:37: compiler.err.annotation.not.valid.for.type: int
 Generated.java:6:32: compiler.err.annotation.value.not.allowable.type
-Generated.java:7:35: compiler.err.annotation.value.must.be.class.literal
+Generated.java:7:35: compiler.err.expression.not.allowable.as.annotation.value
 6 errors
--- a/langtools/test/tools/javac/staticImport/ImportPrivate.out	Tue Jun 27 14:30:44 2017 -0400
+++ b/langtools/test/tools/javac/staticImport/ImportPrivate.out	Tue Jun 27 16:00:14 2017 -0400
@@ -1,3 +1,3 @@
-ImportPrivate.java:12:1: compiler.err.cant.resolve.location: kindname.static, m, , , kindname.class, importPrivate.A
+ImportPrivate.java:12:1: compiler.err.cant.resolve.location: kindname.static, m, null, null, (compiler.misc.location: kindname.class, importPrivate.A, null)
 ImportPrivate.java:22:9: compiler.err.cant.resolve.location.args: kindname.method, m, , , (compiler.misc.location: kindname.class, importPrivate.MyTest, null)
 2 errors
--- a/make/CompileJavaModules.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/CompileJavaModules.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -42,8 +42,7 @@
 
 ################################################################################
 
-java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline \
-    --doclint-format html4
+java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
 java.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
 java.base_CLEAN := intrinsic.properties
 
--- a/make/CreateJmods.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/CreateJmods.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -81,6 +81,7 @@
 
 LEGAL_NOTICES := \
     $(SUPPORT_OUTPUTDIR)/modules_legal/java.base \
+    $(wildcard $(SUPPORT_OUTPUTDIR)/modules_legal/$(MODULE)) \
     $(call FindModuleLegalDirs, $(MODULE)) \
     #
 
--- a/make/Main.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/Main.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -843,7 +843,7 @@
   build-test-hotspot-jtreg-native: buildtools-jdk \
       hotspot-$(JVM_VARIANT_MAIN)-libs
 
-  build-test-jdk-jtreg-native: buildtools-jdk
+  build-test-jdk-jtreg-native: buildtools-jdk java.base-libs
 
   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
 
--- a/make/RunTests.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/RunTests.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -364,6 +364,10 @@
     $1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
   endif
 
+  ifneq ($$(JIB_JAR), )
+    $1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR)
+  endif
+
   run-test-$1:
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
--- a/make/common/Modules.gmk	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/common/Modules.gmk	Tue Jun 27 16:00:14 2017 -0400
@@ -175,10 +175,13 @@
     jdk.policytool \
     jdk.rmic \
     jdk.scripting.nashorn \
+    jdk.scripting.nashorn.shell \
     jdk.sctp \
     jdk.security.auth \
     jdk.security.jgss \
+    jdk.xml.bind \
     jdk.xml.dom \
+    jdk.xml.ws \
     jdk.zipfs \
     #
 
--- a/make/jprt.properties	Tue Jun 27 14:30:44 2017 -0400
+++ b/make/jprt.properties	Tue Jun 27 16:00:14 2017 -0400
@@ -174,7 +174,13 @@
 # Select test targets - jprt default for jprt.test.set is "default"
 jprt.test.targets=${my.test.targets.${jprt.test.set}}
 jprt.make.rule.test.targets=${my.make.rule.test.targets.${jprt.test.set}}
-jprt.test.bundle.targets=${my.jprt.test.bundle.targets.${jprt.test.set}}
+
+# Not all test targets need the test image
+jprt.test.bundle.targets=\
+  ${my.make.rule.test.targets.hotspot.reg}, \
+  ${my.make.rule.test.targets.hotspot.gtest} \
+  ${my.make.rule.test.targets.nativesanity} \
+  ${my.test.target.set:TESTNAME=jdk_lang}
 
 # 7155453: Work-around to prevent popups on OSX from blocking test completion
 # but the work-around is added to all platforms to be consistent
@@ -473,20 +479,11 @@
   ${my.make.rule.test.targets.hotspot.reg}                              \
   ${my.make.rule.test.targets.hotspot.other}
 
-# Install the test bundle for the testset hotspot jtreg tests
-# (but not for the other Makefile based tests)
-my.jprt.test.bundle.targets.hotspot= \
-  ${my.make.rule.test.targets.hotspot.reg}, \
-  ${my.make.rule.test.targets.hotspot.gtest}
-
 # Native jdk and hotspot test targets (testset=nativesanity)
 my.make.rule.test.targets.nativesanity=					\
     ${my.test.target.set:TESTNAME=jdk_native_sanity},			\
     ${my.test.target.set:TESTNAME=hotspot_native_sanity}
 
-# Install the test bundle for the nativesanity jtreg tests
-my.jprt.test.bundle.targets.nativesanity=${my.make.rule.test.targets.nativesanity}
-
 ################################################################################
 # Testset buildinfra
 my.build.flavors.buildinfra = \
--- a/nashorn/.hgtags	Tue Jun 27 14:30:44 2017 -0400
+++ b/nashorn/.hgtags	Tue Jun 27 16:00:14 2017 -0400
@@ -417,3 +417,7 @@
 fc416270a776409b74006262dd0a9f5f5ff31555 jdk-9+171
 f381e171bec90afee95dc2920793754b58b6f705 jdk-10+10
 c8d6b740f0f7ec834b4157bf0d4523e8bbddb3f0 jdk-9+172
+ae0c4f1560e41e94a843e9933558d0223575869d jdk-10+11
+fa8e4de50e821eed876388c84f7129a6739268be jdk-9+173
+7d4006eaa088848c4fa2ac4aef0ba9982f80752a jdk-9+174
+de571c0a93258599054f18184cbdeae42cd95265 jdk-10+12
--- a/nashorn/src/jdk.dynalink/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/nashorn/src/jdk.dynalink/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,6 +24,7 @@
  */
 
 /**
+ * Defines the API for dynamic linking of high-level operations on objects.
  * <p>
  * Dynalink is a library for dynamic linking of high-level operations on objects.
  * These operations include "read a property",
@@ -217,6 +218,8 @@
  * from B will get a chance to link the call site in A when it encounters the
  * object from B.
  *
+ * @uses jdk.dynalink.linker.GuardingDynamicLinkerExporter
+ *
  * @moduleGraph
  * @since 9
  */
--- a/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/nashorn/src/jdk.scripting.nashorn.shell/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,8 +24,17 @@
  */
 
 /**
- * Nashorn shell module
+ * Defines Nashorn shell module.
+ *
+ * <p>This module includes the command line tool <em>{@index jjs jjs tool}</em>
+ * to invoke the Nashorn engine.
  *
+ * <dl style="font-family:'DejaVu Sans', Arial, Helvetica, sans serif">
+ * <dt class="simpleTagLabel">Tool Guides:
+ * <dd>{@extLink jjs_tool_reference jjs}
+ * </dl>
+ *
+ * @moduleGraph
  * @since 9
  */
 module jdk.scripting.nashorn.shell {
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeDataView.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/objects/NativeDataView.java	Tue Jun 27 16:00:14 2017 -0400
@@ -416,7 +416,7 @@
      * @return 32-bit unsigned int value at the byteOffset
      */
     @Function(attributes = Attribute.NOT_ENUMERABLE, arity = 1)
-    public static long getUint32(final Object self, final Object byteOffset, final Object littleEndian) {
+    public static double getUint32(final Object self, final Object byteOffset, final Object littleEndian) {
         try {
             return 0xFFFFFFFFL & getBuffer(self, littleEndian).getInt(JSType.toInt32(byteOffset));
         } catch (final IllegalArgumentException iae) {
@@ -432,7 +432,7 @@
      * @return 32-bit unsigned int value at the byteOffset
      */
     @SpecializedFunction
-    public static long getUint32(final Object self, final int byteOffset) {
+    public static double getUint32(final Object self, final int byteOffset) {
         try {
             return JSType.toUint32(getBuffer(self, false).getInt(JSType.toInt32(byteOffset)));
         } catch (final IllegalArgumentException iae) {
@@ -449,7 +449,7 @@
      * @return 32-bit unsigned int value at the byteOffset
      */
     @SpecializedFunction
-    public static long getUint32(final Object self, final int byteOffset, final boolean littleEndian) {
+    public static double getUint32(final Object self, final int byteOffset, final boolean littleEndian) {
         try {
             return JSType.toUint32(getBuffer(self, littleEndian).getInt(JSType.toInt32(byteOffset)));
         } catch (final IllegalArgumentException iae) {
@@ -837,9 +837,9 @@
      * @return undefined
      */
     @SpecializedFunction
-    public static Object setUint32(final Object self, final int byteOffset, final long value) {
+    public static Object setUint32(final Object self, final int byteOffset, final double value) {
         try {
-            getBuffer(self, false).putInt(byteOffset, (int)value);
+            getBuffer(self, false).putInt(byteOffset, (int) JSType.toUint32(value));
             return UNDEFINED;
         } catch (final IllegalArgumentException iae) {
             throw rangeError(iae, "dataview.offset");
@@ -856,9 +856,9 @@
      * @return undefined
      */
     @SpecializedFunction
-    public static Object setUint32(final Object self, final int byteOffset, final long value, final boolean littleEndian) {
+    public static Object setUint32(final Object self, final int byteOffset, final double value, final boolean littleEndian) {
         try {
-            getBuffer(self, littleEndian).putInt(byteOffset, (int)value);
+            getBuffer(self, littleEndian).putInt(byteOffset, (int) JSType.toUint32(value));
             return UNDEFINED;
         } catch (final IllegalArgumentException iae) {
             throw rangeError(iae, "dataview.offset");
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java	Tue Jun 27 14:30:44 2017 -0400
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/module-info.java	Tue Jun 27 16:00:14 2017 -0400
@@ -24,74 +24,121 @@
  */
 
 /**
-<p>
-Nashorn is a runtime environment for programs written in ECMAScript 5.1.
-</p>
-<h1>Usage</h1>
-The recommended way to use Nashorn is through the <a href="http://jcp.org/en/jsr/detail?id=223" target="_top">JSR-223
-"Scripting for the Java Platform"</a> APIs found in the {@link javax.script} package. Usually, you'll obtain a
-{@link javax.script.ScriptEngine} instance for Nashorn using:
-<pre>
+ * Provides the implementation of Nashorn script engine and
+ * the runtime environment for programs written in ECMAScript 5.1.
+ * <p>
+ * Nashorn is a runtime environment for programs written in ECMAScript 5.1.
+ * </p>
+ *
+ * <h1>Usage</h1>
+ *
+ * The recommended way to use Nashorn is through the
+ * <a href="http://jcp.org/en/jsr/detail?id=223" target="_top">JSR-223
+ * "Scripting for the Java Platform"</a> APIs found in the
+ * {@link javax.script} package. Usually, you'll obtain a
+ * {@link javax.script.ScriptEngine} instance for Nashorn using:
+ * <pre>
 import javax.script.*;
 ...
 ScriptEngine nashornEngine = new ScriptEngineManager().getEngineByName("nashorn");
 </pre>
-and then use it just as you would any other JSR-223 script engine. See
-<a href="jdk/nashorn/api/scripting/package-summary.html">{@code jdk.nashorn.api.scripting}</a> package
-for details.
-<h1>Compatibility</h1>
-Nashorn is 100% compliant with the <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"
-target="_top">ECMA-262 Standard, Edition 5.1</a>. It requires a Java Virtual Machine that implements the
-<a href="http://jcp.org/en/jsr/detail?id=292" target="_top">JSR-292 "Supporting Dynamically Typed Languages on the Java
-Platform"</a> specification (often referred to as "invokedynamic"), as well as the already mentioned JSR-223.
-<h1>Interoperability with the Java platform</h1>
-In addition to being a 100% ECMAScript 5.1 runtime, Nashorn provides features for interoperability of the ECMAScript
-programs with the Java platform. In general, any Java object put into the script engine's context will be visible from
-the script. In terms of the standard, such Java objects are not considered "native objects", but rather "host objects",
-as defined in section 4.3.8. This distinction allows certain semantical differences in handling them compared to native
-objects. For most purposes, Java objects behave just as native objects do: you can invoke their methods, get and set
-their properties. In most cases, though, you can't add arbitrary properties to them, nor can you remove existing
-properties.
-<h2>Java collection handling</h2>
-Native Java arrays and {@link java.util.List}s support indexed access to their elements through the property accessors,
-and {@link java.util.Map}s support both property and element access through both dot and square-bracket property
-accessors, with the difference being that dot operator gives precedence to object properties (its fields and properties
-defined as {@code getXxx} and {@code setXxx} methods) while the square bracket operator gives precedence to map
-elements. Native Java arrays expose the {@code length} property.
-<h2>ECMAScript primitive types</h2>
-ECMAScript primitive types for number, string, and boolean are represented with {@link java.lang.Number},
-{@link java.lang.CharSequence}, and {@link java.lang.Boolean} objects. While the most often used number type is
-{@link java.lang.Double} and the most often used string type is {@link java.lang.String}, don't rely on it as various
-internal optimizations cause other subclasses of {@code Number} and internal implementations of {@code CharSequence} to
-be used.
-<h2>Type conversions</h2>
-When a method on a Java object is invoked, the arguments are converted to the formal parameter types of the Java method
-using all allowed ECMAScript conversions. This can be surprising, as in general, conversions from string to number will
-succeed according to Standard's section 9.3 "ToNumber" and so on; string to boolean, number to boolean, Object to
-number, Object to string all work. Note that if the Java method's declared parameter type is {@code java.lang.Object},
-Nashorn objects are passed without any conversion whatsoever; specifically if the JavaScript value being passed is of
-primitive string type, you can only rely on it being a {@code java.lang.CharSequence}, and if the value is a number, you
-can only rely on it being a {@code java.lang.Number}. If the Java method declared parameter type is more specific (e.g.
-{@code java.lang.String} or {@code java.lang.Double}), then Nashorn will of course ensure the required type is passed.
-<h2>SAM types</h2>
-As a special extension when invoking Java methods, ECMAScript function objects can be passed in place of an argument
-whose Java type is so-called "single abstract method" or "SAM" type. While this name usually covers single-method
-interfaces, Nashorn is a bit more versatile, and it recognizes a type as a SAM type if all its abstract methods are
-overloads of the same name, and it is either an interface, or it is an abstract class with
-a no-arg constructor. The type itself must be public, while the constructor and the methods can be either public or
-protected. If there are multiple abstract overloads of the same name, the single function will serve as the shared
-implementation for all of them, <em>and additionally it will also override any non-abstract methods of the same name</em>.
-This is done to be consistent with the fact that ECMAScript does not have the concept of overloaded methods.
-<h2>The {@code Java} object</h2>
-Nashorn exposes a non-standard global object named {@code Java} that is the primary API entry point into Java
-platform-specific functionality. You can use it to create instances of Java classes, convert from Java arrays to native
-arrays and back, and so on.
-<h2>Other non-standard built-in objects</h2>
-In addition to {@code Java}, Nashorn also exposes some other non-standard built-in objects:
-{@code JSAdapter}, {@code JavaImporter}, {@code Packages}
-
-@moduleGraph
-@since 9
+ *
+ * and then use it just as you would any other JSR-223 script engine. See
+ * <a href="jdk/nashorn/api/scripting/package-summary.html">
+ * {@code jdk.nashorn.api.scripting}</a> package for details.
+ * <h1>Compatibility</h1>
+ * Nashorn is 100% compliant with the
+ * <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"
+ * target="_top">ECMA-262 Standard, Edition 5.1</a>.
+ * It requires a Java Virtual Machine that implements the
+ * <a href="http://jcp.org/en/jsr/detail?id=292" target="_top">
+ * JSR-292 "Supporting Dynamically Typed Languages on the Java Platform"</a>
+ * specification (often referred to as "invokedynamic"), as well as
+ * the already mentioned JSR-223.
+ *
+ * <h1>Interoperability with the Java platform</h1>
+ *
+ * In addition to being a 100% ECMAScript 5.1 runtime, Nashorn provides features
+ * for interoperability of the ECMAScript programs with the Java platform.
+ * In general, any Java object put into the script engine's context will be
+ * visible from the script. In terms of the standard, such Java objects are not
+ * considered "native objects", but rather "host objects", as defined in
+ * section 4.3.8. This distinction allows certain semantical differences
+ * in handling them compared to native objects. For most purposes, Java objects
+ * behave just as native objects do: you can invoke their methods, get and set
+ * their properties. In most cases, though, you can't add arbitrary properties
+ * to them, nor can you remove existing properties.
+ *
+ * <h2>Java collection handling</h2>
+ *
+ * Native Java arrays and {@link java.util.List}s support indexed access to
+ * their elements through the property accessors, and {@link java.util.Map}s
+ * support both property and element access through both dot and square-bracket
+ * property accessors, with the difference being that dot operator gives
+ * precedence to object properties (its fields and properties defined as
+ * {@code getXxx} and {@code setXxx} methods) while the square bracket
+ * operator gives precedence to map elements. Native Java arrays expose
+ * the {@code length} property.
+ *
+ * <h2>ECMAScript primitive types</h2>
+ *
+ * ECMAScript primitive types for number, string, and boolean are represented
+ * with {@link java.lang.Number}, {@link java.lang.CharSequence}, and
+ * {@link java.lang.Boolean} objects. While the most often used number type
+ * is {@link java.lang.Double} and the most often used string type is
+ * {@link java.lang.String}, don't rely on it as various internal optimizations
+ * cause other subclasses of {@code Number} and internal implementations of
+ * {@code CharSequence} to be used.
+ *
+ * <h2>Type conversions</h2>
+ *
+ * When a method on a Java object is invoked, the arguments are converted to
+ * the formal parameter types of the Java method using all allowed ECMAScript
+ * conversions. This can be surprising, as in general, conversions from string
+ * to number will succeed according to Standard's section 9.3 "ToNumber"
+ * and so on; string to boolean, number to boolean, Object to number,
+ * Object to string all work. Note that if the Java method's declared parameter
+ * type is {@code java.lang.Object}, Nashorn objects are passed without any
+ * conversion whatsoever; specifically if the JavaScript value being passed
+ * is of primitive string type, you can only rely on it being a
+ * {@code java.lang.CharSequence}, and if the value is a number, you can only
+ * rely on it being a {@code java.lang.Number}. If the Java method declared
+ * parameter type is more specific (e.g. {@code java.lang.String} or
+ * {@code java.lang.Double}), then Nashorn will of course ensure
+ * the required type is passed.
+ *
+ * <h2>SAM types</h2>
+ *
+ * As a special extension when invoking Java methods, ECMAScript function
+ * objects can be passed in place of an argument whose Java type is so-called
+ * "single abstract method" or "SAM" type. While this name usually covers
+ * single-method interfaces, Nashorn is a bit more versatile, and it
+ * recognizes a type as a SAM type if all its abstract methods are
+ * overloads of the same name, and it is either an interface, or it is an
+ * abstract class with a no-arg constructor. The type itself must be public,
+ * while the constructor and the methods can be either public or protected.
+ * If there are multiple abstract overloads of the same name, the single
+ * function will serve as the shared implementation for all of them,
+ * <em>and additionally it will also override any non-abstract methods of
+ * the same name</em>. This is done to be consistent with the fact that
+ * ECMAScript does not have the concept of overloaded methods.
+ *
+ * <h2>The {@code Java} object</h2>
+ *
+ * Nashorn exposes a non-standard global object named {@code Java} that is
+ * the primary API entry point into Java platform-specific functionality.
+ * You can use it to create instances of Java classes, convert from Java arrays
+ * to native arrays and back, and so on.
+ *
+ * <h2>Other non-standard built-in objects</h2>
+ *
+ * In addition to {@code Java}, Nashorn also exposes some other
+ * non-standard built-in objects:
+ * {@code JSAdapter}, {@code JavaImporter}, {@code Packages}
+ *
+ * @provides javax.script.ScriptEngineFactory
+ * @moduleGraph
+ * @since 9
  */
 module jdk.scripting.nashorn {
     requires java.logging;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8181191.js	Tue Jun 27 16:00:14 2017 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8181191: getUint32 returning Long
+ *
+ * @test
+ * @run
+ */
+
+
+function uint32(x) {
+    var buffer = new ArrayBuffer(16);
+    var dataview = new DataView(buffer);
+    dataview.setUint32(0, x);
+    return dataview.getUint32(0);
+}
+
+Assert.assertTrue(typeof uint32(0x7f) === 'number');
+Assert.assertTrue(typeof uint32(0x80) === 'number');
+Assert.assertTrue(typeof uint32(0xffffffff) === 'number');
+Assert.assertTrue(typeof uint32(0x100000000) === 'number');
+
+Assert.assertTrue(uint32(0x7f) === 0x7f);
+Assert.assertTrue(uint32(0x80) === 0x80);
+Assert.assertTrue(uint32(0xffffffff) === 0xffffffff);
+Assert.assertTrue(uint32(0x100000000) === 0x0);
+
+Assert.assertTrue(uint32(0x7f) === uint32(0x7f));
+Assert.assertTrue(uint32(0x80) === uint32(0x80));
+Assert.assertTrue(uint32(0xffffffff) === uint32(0xffffffff));
+Assert.assertTrue(uint32(0x100000000) === uint32(0x100000000));