changeset 17136:e2b414957632

Merge
author jjg
date Fri, 12 May 2017 10:43:28 -0700
parents 29e8713fdd03 (current diff) fb6138cce508 (diff)
children e8ee0b0489eb
files src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java test/demo/jvmti/Context.java test/demo/jvmti/DemoRun.java test/demo/jvmti/HeapUser.java test/demo/jvmti/Hello.java test/demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java test/demo/jvmti/gctest/BigHello.java test/demo/jvmti/gctest/Gctest.java test/demo/jvmti/heapTracker/HeapTrackerTest.java test/demo/jvmti/heapViewer/HeapViewerTest.java test/demo/jvmti/minst/MinstExample.java test/demo/jvmti/minst/MinstTest.java test/demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java test/demo/jvmti/waiters/WaitersTest.java test/sample/TEST.properties test/sample/chatserver/ChatTest.java test/sample/mergesort/MergeSortTest.java test/tools/launcher/modules/listmods/src/java.transaction/javax/transaction/atomic/Atomic.java
diffstat 551 files changed, 9706 insertions(+), 5712 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Apr 28 15:43:43 2017 -0700
+++ b/.hgtags	Fri May 12 10:43:28 2017 -0700
@@ -410,3 +410,5 @@
 a7942c3b1e59495dbf51dc7c41aab355fcd253d7 jdk-9+165
 5d2b48f1f0a322aca719b49ff02ab421705bffc7 jdk-9+166
 7828aedcb525df40b7c8122bcc3f997c75ebaf7f jdk-9+167
+e78da9db6299b3fcba49300d52e2359e82fdd218 jdk-9+168
+177436a54ca13730ffc725a6e5dbfcd9486f3da3 jdk-9+169
--- a/make/CompileDemos.gmk	Fri Apr 28 15:43:43 2017 -0700
+++ b/make/CompileDemos.gmk	Fri May 12 10:43:28 2017 -0700
@@ -291,9 +291,21 @@
 
 ################################################################################
 
+ifneq ($(filter images, $(MAKECMDGOALS)), )
+  $(eval $(call SetupCopyFiles, COPY_TO_TEST_IMAGE, \
+      SRC := $(SUPPORT_OUTPUTDIR)/demos/image, \
+      DEST := $(TEST_IMAGE_DIR)/jdk/demos, \
+      FILES := $(call DoubleDollar, $(call CacheFind, $(SUPPORT_OUTPUTDIR)/demos/image)), \
+  ))
+
+  IMAGES_TARGETS := $(COPY_TO_TEST_IMAGE)
+endif
+
+################################################################################
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk))
 
 all: $(TARGETS)
+images: $(IMAGES_TARGETS)
 
 .PHONY: all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/data/docs-resources/specs/resources/jdk-default.css	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,129 @@
+/*
+ * 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.  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.
+ */
+
+body {
+  margin: 2em 2em;
+  font-family: DejaVu Sans, Bitstream Vera Sans, Luxi Sans, Verdana, Arial, Helvetica;
+  font-size: 10pt;
+  line-height: 1.4;
+}
+
+pre, code, tt {
+  font-family: DejaVu Sans Mono, Bitstream Vera Sans Mono, Luxi Mono,
+    Courier New, monospace;
+}
+
+blockquote {
+  margin: 1.5ex 0em 1.5ex 2em;
+}
+
+p {
+  padding: 0pt;
+  margin: 1ex 0em;
+}
+
+p:first-child, pre:first-child { margin-top: 0pt; }
+
+h1 {
+  font-weight: bold;
+  padding: 0pt;
+  margin: 2ex .5ex 1ex 0pt;
+}
+
+h1:first-child, h2:first-child {
+  margin-top: 0ex;
+}
+
+h2 {
+  font-weight: bold;
+  padding: 0pt;
+  margin: 2ex 0pt 1ex 0pt;
+}
+
+h3 {
+  font-weight: bold;
+  padding: 0pt;
+  margin: 1.5ex 0pt 1ex 0pt;
+}
+
+h4 {
+  font-weight: bold;
+  padding: 0pt;
+  margin: 1.5ex 0pt 1ex 0pt;
+}
+
+a:link {
+  color: #437291;
+}
+
+a:visited {
+  color: #666666;
+}
+
+a[href]:hover {
+  color: #e76f00;
+}
+
+a img {
+  border-width: 0px;
+}
+
+img {
+  background: white;
+}
+
+table {
+  border-collapse: collapse;
+  margin-left: 15px;
+  margin-right: 15px;
+}
+
+th, td {
+  padding: 3px;
+  vertical-align: top;
+}
+
+table, th, td {
+  border: 1px solid black;
+}
+
+caption  {
+  text-align: left;
+  font-style: italic;
+  text-indent: 15px;
+  margin-bottom:10px;
+}
+
+tr:nth-child(even) {
+  background: #DDD;
+}
+
+tr:nth-child(odd) {
+  background: #FFF;
+}
+
+th {
+  background: #DDF;
+}
--- a/make/mapfiles/libinstrument/mapfile-vers	Fri Apr 28 15:43:43 2017 -0700
+++ b/make/mapfiles/libinstrument/mapfile-vers	Fri May 12 10:43:28 2017 -0700
@@ -39,6 +39,7 @@
             Java_sun_instrument_InstrumentationImpl_getObjectSize0;
 	    Java_sun_instrument_InstrumentationImpl_appendToClassLoaderSearch0;
 	    Java_sun_instrument_InstrumentationImpl_setNativeMethodPrefixes;
+            Java_sun_instrument_InstrumentationImpl_loadAgent0;
 	local:
 		*;
 };
--- a/src/java.base/macosx/native/libnet/DefaultProxySelector.c	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/macosx/native/libnet/DefaultProxySelector.c	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2017 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/com/sun/crypto/provider/GCTR.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017 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
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PropMap.java	Fri May 12 10:43:28 2017 -0700
@@ -29,6 +29,8 @@
 import java.io.InputStream;
 import java.io.PrintStream;
 import java.io.PrintWriter;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Comparator;
@@ -62,12 +64,17 @@
         Properties props = new Properties();
 
         // Allow implementation selected via -Dpack.disable.native=true
+        String propValue = getPropertyValue(Utils.DEBUG_DISABLE_NATIVE, "false");
         props.put(Utils.DEBUG_DISABLE_NATIVE,
-                  String.valueOf(Boolean.getBoolean(Utils.DEBUG_DISABLE_NATIVE)));
+                  String.valueOf(Boolean.parseBoolean(propValue)));
 
         // Set the DEBUG_VERBOSE from system
-        props.put(Utils.DEBUG_VERBOSE,
-                  String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0)));
+        int verbose = 0;
+        try {
+            verbose = Integer.decode(getPropertyValue(Utils.DEBUG_VERBOSE, "0"));
+        } catch (NumberFormatException e) {
+        }
+        props.put(Utils.DEBUG_VERBOSE, String.valueOf(verbose));
 
         // The segment size is unlimited
         props.put(Pack200.Packer.SEGMENT_LIMIT, "-1");
@@ -87,7 +94,7 @@
         // Pass through files with unrecognized format by default, also
         // allow system property to be set
         props.put(Utils.CLASS_FORMAT_ERROR,
-                System.getProperty(Utils.CLASS_FORMAT_ERROR, Pack200.Packer.PASS));
+                  getPropertyValue(Utils.CLASS_FORMAT_ERROR, Pack200.Packer.PASS));
 
         // Default effort is 5, midway between 1 and 9.
         props.put(Pack200.Packer.EFFORT, "5");
@@ -97,7 +104,9 @@
         // to allow override if necessary.
         String propFile = "intrinsic.properties";
 
-        try (InputStream propStr = PackerImpl.class.getResourceAsStream(propFile)) {
+        PrivilegedAction<InputStream> pa =
+            () -> PackerImpl.class.getResourceAsStream(propFile);
+        try (InputStream propStr = AccessController.doPrivileged(pa)) {
             if (propStr == null) {
                 throw new RuntimeException(propFile + " cannot be loaded");
             }
@@ -119,6 +128,12 @@
         defaultProps = temp;
     }
 
+    private static String getPropertyValue(String key, String defaultValue) {
+        PrivilegedAction<String> pa = () -> System.getProperty(key);
+        String s = AccessController.doPrivileged(pa);
+        return s != null ? s : defaultValue;
+    }
+
     PropMap() {
         theMap.putAll(defaultProps);
     }
--- a/src/java.base/share/classes/java/io/DataInput.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/io/DataInput.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -59,8 +59,9 @@
  * far left-hand column.
  *
  * <blockquote>
- *   <table border="1" cellspacing="0" cellpadding="8"
- *          summary="Bit values and bytes">
+ *   <table class="plain">
+ *     <caption style="display:none">Bit values and bytes</caption>
+ *     <tbody>
  *     <tr>
  *       <th colspan="9"><span style="font-weight:normal">
  *         All characters in the range {@code '\u005Cu0001'} to
@@ -71,7 +72,7 @@
  *       <th colspan="8" id="bit_a">Bit Values</th>
  *     </tr>
  *     <tr>
- *       <th id="byte1_a">Byte 1</th>
+ *       <th id="byte1_a" style="text-align:left">Byte 1</th>
  *       <td style="text-align:center">0
  *       <td colspan="7" style="text-align:center">bits 6-0
  *     </tr>
@@ -86,14 +87,14 @@
  *       <th colspan="8" id="bit_b">Bit Values</th>
  *     </tr>
  *     <tr>
- *       <th id="byte1_b">Byte 1</th>
+ *       <th id="byte1_b" style="text-align:left">Byte 1</th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
  *       <td colspan="5" style="text-align:center">bits 10-6
  *     </tr>
  *     <tr>
- *       <th id="byte2_a">Byte 2</th>
+ *       <th id="byte2_a" style="text-align:left">Byte 2</th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
  *       <td colspan="6" style="text-align:center">bits 5-0
@@ -108,7 +109,7 @@
  *       <th colspan="8"id="bit_c">Bit Values</th>
  *     </tr>
  *     <tr>
- *       <th id="byte1_c">Byte 1</th>
+ *       <th id="byte1_c" style="text-align:left">Byte 1</th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">1
  *       <td style="text-align:center">1
@@ -116,17 +117,18 @@
  *       <td colspan="4" style="text-align:center">bits 15-12
  *     </tr>
  *     <tr>
- *       <th id="byte2_b">Byte 2</th>
+ *       <th id="byte2_b" style="text-align:left">Byte 2</th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
  *       <td colspan="6" style="text-align:center">bits 11-6
  *     </tr>
  *     <tr>
- *       <th id="byte3">Byte 3</th>
+ *       <th id="byte3" style="text-align:left">Byte 3</th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
  *       <td colspan="6" style="text-align:center">bits 5-0
  *     </tr>
+ *     </tbody>
  *   </table>
  * </blockquote>
  * <p>
--- a/src/java.base/share/classes/java/io/OutputStreamWriter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/io/OutputStreamWriter.java	Fri May 12 10:43:28 2017 -0700
@@ -40,10 +40,8 @@
  *
  * <p> Each invocation of a write() method causes the encoding converter to be
  * invoked on the given character(s).  The resulting bytes are accumulated in a
- * buffer before being written to the underlying output stream.  The size of
- * this buffer may be specified, but by default it is large enough for most
- * purposes.  Note that the characters passed to the write() methods are not
- * buffered.
+ * buffer before being written to the underlying output stream.  Note that the
+ * characters passed to the write() methods are not buffered.
  *
  * <p> For top efficiency, consider wrapping an OutputStreamWriter within a
  * BufferedWriter so as to avoid frequent converter invocations.  For example:
--- a/src/java.base/share/classes/java/io/RandomAccessFile.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/io/RandomAccessFile.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -136,8 +136,12 @@
      * in which the file is to be opened.  The permitted values and their
      * meanings are:
      *
-     * <table summary="Access mode permitted values and meanings">
+     * <table class="striped">
+     * <caption style="display:none">Access mode permitted values and meanings</caption>
+     * <thead>
      * <tr><th style="text-align:left">Value</th><th style="text-align:left">Meaning</th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td style="vertical-align:top">{@code "r"}</td>
      *     <td> Open for reading only. Invoking any of the {@code write}
      *     methods of the resulting object will cause an
@@ -153,6 +157,7 @@
      *     <td> Open for reading and writing, as with {@code "rw"}, and also
      *     require that every update to the file's content be written
      *     synchronously to the underlying storage device.</td></tr>
+     * </tbody>
      * </table>
      *
      * The {@code "rws"} and {@code "rwd"} modes work much like the {@link
--- a/src/java.base/share/classes/java/io/SerializablePermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/io/SerializablePermission.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -44,12 +44,16 @@
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">Permission target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  *
  * <tr>
  *   <td>enableSubclassImplementation</td>
@@ -79,7 +83,7 @@
  *   <td>Code could remove a configured filter and remove protections
  *       already established.</td>
  * </tr>
- *
+ * </tbody>
  * </table>
  *
  * @see java.security.BasicPermission
--- a/src/java.base/share/classes/java/lang/Character.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/Character.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, 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
@@ -9566,7 +9566,9 @@
      * Determines if the specified character is ISO-LATIN-1 white space.
      * This method returns {@code true} for the following five
      * characters only:
-     * <table summary="truechars">
+     * <table class="borderless">
+     * <caption style="display:none">truechars</caption>
+     * <tbody>
      * <tr><td>{@code '\t'}</td>            <td>{@code U+0009}</td>
      *     <td>{@code HORIZONTAL TABULATION}</td></tr>
      * <tr><td>{@code '\n'}</td>            <td>{@code U+000A}</td>
@@ -9577,6 +9579,7 @@
      *     <td>{@code CARRIAGE RETURN}</td></tr>
      * <tr><td>{@code ' '}</td>  <td>{@code U+0020}</td>
      *     <td>{@code SPACE}</td></tr>
+     * </tbody>
      * </table>
      *
      * @param      ch   the character to be tested.
--- a/src/java.base/share/classes/java/lang/Class.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/Class.java	Fri May 12 10:43:28 2017 -0700
@@ -724,18 +724,23 @@
      * one or more '{@code [}' characters representing the depth of the array
      * nesting.  The encoding of element type names is as follows:
      *
-     * <blockquote><table summary="Element types and encodings">
-     * <tr><th> Element Type <th> &nbsp;&nbsp;&nbsp; <th> Encoding
-     * <tr><td> boolean      <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> Z
-     * <tr><td> byte         <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> B
-     * <tr><td> char         <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> C
+     * <blockquote><table class="borderless">
+     * <caption style="display:none">Element types and encodings</caption>
+     * <thead>
+     * <tr><th style="padding-right:3em;"> Element Type <th> Encoding
+     * </thead>
+     * <tbody>
+     * <tr><td> boolean      <td style="text-align:center"> Z
+     * <tr><td> byte         <td style="text-align:center"> B
+     * <tr><td> char         <td style="text-align:center"> C
      * <tr><td> class or interface
-     *                       <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> L<i>classname</i>;
-     * <tr><td> double       <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> D
-     * <tr><td> float        <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> F
-     * <tr><td> int          <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> I
-     * <tr><td> long         <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> J
-     * <tr><td> short        <td> &nbsp;&nbsp;&nbsp; <td style="text-align:center"> S
+     *                       <td style="text-align:center"> L<i>classname</i>;
+     * <tr><td> double       <td style="text-align:center"> D
+     * <tr><td> float        <td style="text-align:center"> F
+     * <tr><td> int          <td style="text-align:center"> I
+     * <tr><td> long         <td style="text-align:center"> J
+     * <tr><td> short        <td style="text-align:center"> S
+     * </tbody>
      * </table></blockquote>
      *
      * <p> The class or interface name <i>classname</i> is the binary name of
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Fri May 12 10:43:28 2017 -0700
@@ -119,18 +119,24 @@
  * The Java run-time has the following built-in class loaders:
  *
  * <ul>
- * <li>Bootstrap class loader.
+ * <li><p>Bootstrap class loader.
  *     It is the virtual machine's built-in class loader, typically represented
  *     as {@code null}, and does not have a parent.</li>
- * <li>{@linkplain #getPlatformClassLoader() Platform class loader}.
+ * <li><p>{@linkplain #getPlatformClassLoader() Platform class loader}.
  *     All <em>platform classes</em> are visible to the platform class loader
  *     that can be used as the parent of a {@code ClassLoader} instance.
  *     Platform classes include Java SE platform APIs, their implementation
  *     classes and JDK-specific run-time classes that are defined by the
- *     platform class loader or its ancestors.</li>
- * <li>{@linkplain #getSystemClassLoader() System class loader}.
- *     It is also known as <em>application class
- *     loader</em> and is distinct from the platform class loader.
+ *     platform class loader or its ancestors.
+ *     <p> To allow for upgrading/overriding of modules defined to the platform
+ *     class loader, and where classes in the upgraded version link to
+ *     classes in modules defined to the application class loader, the
+ *     platform class loader may delegate to the application class loader.
+ *     In other words, classes in named modules defined to the application
+ *     class loader may be visible to the platform class loader. </li>
+ * <li><p>{@linkplain #getSystemClassLoader() System class loader}.
+ *     It is also known as <em>application class loader</em> and is distinct
+ *     from the platform class loader.
  *     The system class loader is typically used to define classes on the
  *     application class path, module path, and JDK-specific tools.
  *     The platform class loader is a parent or an ancestor of the system class
@@ -368,6 +374,10 @@
      * Creates a new class loader of the specified name and using the
      * specified parent class loader for delegation.
      *
+     * @apiNote If the parent is specified as {@code null} (for the
+     * bootstrap class loader) then there is no guarantee that all platform
+     * classes are visible.
+     *
      * @param  name   class loader name; or {@code null} if not named
      * @param  parent the parent class loader
      *
@@ -390,9 +400,12 @@
      * delegation.
      *
      * <p> If there is a security manager, its {@link
-     * SecurityManager#checkCreateClassLoader()
-     * checkCreateClassLoader} method is invoked.  This may result in
-     * a security exception.  </p>
+     * SecurityManager#checkCreateClassLoader() checkCreateClassLoader} method
+     * is invoked.  This may result in a security exception.  </p>
+     *
+     * @apiNote If the parent is specified as {@code null} (for the
+     * bootstrap class loader) then there is no guarantee that all platform
+     * classes are visible.
      *
      * @param  parent
      *         The parent class loader
@@ -2206,6 +2219,12 @@
      * this class loader are searched recursively (parent by parent)
      * for a {@code Package} of the given name.
      *
+     * @apiNote The {@link #getPlatformClassLoader() platform class loader}
+     * may delegate to the application class loader but the application class
+     * loader is not its ancestor.  When invoked on the platform class loader,
+     * this method  will not find packages defined to the application
+     * class loader.
+     *
      * @param  name
      *         The <a href="#name">package name</a>
      *
@@ -2251,6 +2270,14 @@
      * {@code Package} object of the same package name, each defined by
      * a different class loader in the class loader hierarchy.
      *
+     * @apiNote The {@link #getPlatformClassLoader() platform class loader}
+     * may delegate to the application class loader. In other words,
+     * packages in modules defined to the application class loader may be
+     * visible to the platform class loader.  On the other hand,
+     * the application class loader is not its ancestor and hence
+     * when invoked on the platform class loader, this method will not
+     * return any packages defined to the application class loader.
+     *
      * @return  The array of {@code Package} objects defined by this
      *          class loader and its ancestors
      *
--- a/src/java.base/share/classes/java/lang/Double.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/Double.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -255,9 +255,12 @@
      *
      * </ul>
      *
-     * <table border>
+     * <table class="plain">
      * <caption>Examples</caption>
+     * <thead>
      * <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
+     * </thead>
+     * <tbody>
      * <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
      * <tr><td>{@code -1.0}</td>        <td>{@code -0x1.0p0}</td>
      * <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
@@ -272,6 +275,7 @@
      *     <td>{@code 0x0.fffffffffffffp-1022}</td>
      * <tr><td>{@code Double.MIN_VALUE}</td>
      *     <td>{@code 0x0.0000000000001p-1022}</td>
+     * </tbody>
      * </table>
      * @param   d   the {@code double} to be converted.
      * @return a hex string representation of the argument.
--- a/src/java.base/share/classes/java/lang/Float.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/Float.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -256,9 +256,12 @@
      *
      * </ul>
      *
-     * <table border>
+     * <table class="plain">
      * <caption>Examples</caption>
+     * <thead>
      * <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
+     * </thead>
+     * <tbody>
      * <tr><td>{@code 1.0}</td> <td>{@code 0x1.0p0}</td>
      * <tr><td>{@code -1.0}</td>        <td>{@code -0x1.0p0}</td>
      * <tr><td>{@code 2.0}</td> <td>{@code 0x1.0p1}</td>
@@ -273,6 +276,7 @@
      *     <td>{@code 0x0.fffffep-126}</td>
      * <tr><td>{@code Float.MIN_VALUE}</td>
      *     <td>{@code 0x0.000002p-126}</td>
+     * </tbody>
      * </table>
      * @param   f   the {@code float} to be converted.
      * @return a hex string representation of the argument.
--- a/src/java.base/share/classes/java/lang/Module.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/Module.java	Fri May 12 10:43:28 2017 -0700
@@ -57,6 +57,7 @@
 import jdk.internal.loader.BootLoader;
 import jdk.internal.misc.JavaLangAccess;
 import jdk.internal.misc.SharedSecrets;
+import jdk.internal.module.ModuleLoaderMap;
 import jdk.internal.module.ServicesCatalog;
 import jdk.internal.module.Resources;
 import jdk.internal.org.objectweb.asm.AnnotationVisitor;
@@ -215,8 +216,8 @@
     }
 
     /**
-     * Returns the layer that contains this module or {@code null} if this
-     * module is not in a layer.
+     * Returns the module layer that contains this module or {@code null} if
+     * this module is not in a module layer.
      *
      * A module layer contains named modules and therefore this method always
      * returns {@code null} when invoked on an unnamed module.
@@ -691,6 +692,13 @@
      * <p> This method has no effect if the package is already <em>open</em>
      * to the given module. </p>
      *
+     * @apiNote This method can be used for cases where a <em>consumer
+     * module</em> uses a qualified opens to open a package to an <em>API
+     * module</em> but where the reflective access to the members of classes in
+     * the consumer module is delegated to code in another module. Code in the
+     * API module can use this method to open the package in the consumer module
+     * to the other module.
+     *
      * @param  pn
      *         The package name
      * @param  other
@@ -1077,7 +1085,7 @@
             if (loader != null) {
                 moduleToLoader.put(name, loader);
                 loaders.add(loader);
-            } else if (!isBootLayer) {
+            } else if (!(clf instanceof ModuleLoaderMap.Mapper)) {
                 throw new IllegalArgumentException("loader can't be 'null'");
             }
         }
@@ -1458,11 +1466,11 @@
      *     encapsulated. </li>
      *
      *     <li> A <em>package name</em> is derived from the resource name. If
-     *     the package name is a {@link #getPackages() package} in the module
-     *     then the resource can only be located by the caller of this method
-     *     when the package is {@link #isOpen(String,Module) open} to at least
-     *     the caller's module. If the resource is not in a package in the module
-     *     then the resource is not encapsulated. </li>
+     *     the package name is a {@linkplain #getPackages() package} in the
+     *     module then the resource can only be located by the caller of this
+     *     method when the package is {@linkplain #isOpen(String,Module) open}
+     *     to at least the caller's module. If the resource is not in a
+     *     package in the module then the resource is not encapsulated. </li>
      * </ul>
      *
      * <p> In the above, the <em>package name</em> for a resource is derived
@@ -1521,8 +1529,7 @@
         }
 
         // locate resource in module
-        JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
-        URL url = jla.findResource(loader, mn, name);
+        URL url = loader.findResource(mn, name);
         if (url != null) {
             try {
                 return url.openStream();
--- a/src/java.base/share/classes/java/lang/RuntimePermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/RuntimePermission.java	Fri May 12 10:43:28 2017 -0700
@@ -43,13 +43,17 @@
  * target names, and for each provides a description of what the permission
  * allows and a discussion of the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="permission target name,
- *  what the target allows,and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">permission target name,
+ *  what the target allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  *
  * <tr>
  *   <td>createClassLoader</td>
@@ -383,6 +387,7 @@
  *   {@linkplain ModuleFinder#ofSystem system modules} in the runtime image.</td>
  * </tr>
  *
+ * </tbody>
  * </table>
  *
  * @implNote
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Fri May 12 10:43:28 2017 -0700
@@ -25,10 +25,10 @@
 
 package java.lang;
 
-import java.lang.RuntimePermission;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleDescriptor.Exports;
 import java.lang.module.ModuleDescriptor.Opens;
+import java.lang.module.ModuleReference;
 import java.lang.reflect.Member;
 import java.io.FileDescriptor;
 import java.io.File;
@@ -42,12 +42,15 @@
 import java.security.Security;
 import java.security.SecurityPermission;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Objects;
 import java.util.PropertyPermission;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
+import jdk.internal.module.ModuleBootstrap;
+import jdk.internal.module.ModuleLoaderMap;
 import jdk.internal.reflect.CallerSensitive;
 import sun.security.util.SecurityConstants;
 
@@ -1431,29 +1434,29 @@
         return packages;
     }
 
-    // The non-exported packages of the modules in the boot layer that are
-    // loaded by the platform class loader or its ancestors. A non-exported
-    // package is a package that either is not exported at all by its containing
-    // module or is exported in a qualified fashion by its containing module.
-    private static final Set<String> nonExportedPkgs;
-
+    // The non-exported packages in modules defined to the boot or platform
+    // class loaders. A non-exported package is a package that is not exported
+    // or is only exported to specific modules.
+    private static final Map<String, Boolean> nonExportedPkgs = new ConcurrentHashMap<>();
     static {
-        // Get the modules in the boot layer
-        Stream<Module> bootLayerModules = ModuleLayer.boot().modules().stream();
+        addNonExportedPackages(ModuleLayer.boot());
+    }
 
-        // Filter out the modules loaded by the boot or platform loader
-        PrivilegedAction<Set<Module>> pa = () ->
-            bootLayerModules.filter(SecurityManager::isBootOrPlatformModule)
-                            .collect(Collectors.toSet());
-        Set<Module> modules = AccessController.doPrivileged(pa);
+    /**
+     * Record the non-exported packages of the modules in the given layer
+     */
+    static void addNonExportedPackages(ModuleLayer layer) {
+        Set<String> bootModules = ModuleLoaderMap.bootModules();
+        Set<String> platformModules = ModuleLoaderMap.platformModules();
+        layer.modules().stream()
+                .map(Module::getDescriptor)
+                .filter(md -> bootModules.contains(md.name())
+                        || platformModules.contains(md.name()))
+                .map(SecurityManager::nonExportedPkgs)
+                .flatMap(Set::stream)
+                .forEach(pn -> nonExportedPkgs.put(pn, Boolean.TRUE));
+    }
 
-        // Filter out the non-exported packages
-        nonExportedPkgs = modules.stream()
-                                 .map(Module::getDescriptor)
-                                 .map(SecurityManager::nonExportedPkgs)
-                                 .flatMap(Set::stream)
-                                 .collect(Collectors.toSet());
-    }
 
     /**
      * Called by java.security.Security
@@ -1468,14 +1471,6 @@
     }
 
     /**
-     * Returns true if the module's loader is the boot or platform loader.
-     */
-    private static boolean isBootOrPlatformModule(Module m) {
-        return m.getClassLoader() == null ||
-               m.getClassLoader() == ClassLoader.getPlatformClassLoader();
-    }
-
-    /**
      * Returns the non-exported packages of the specified module.
      */
     private static Set<String> nonExportedPkgs(ModuleDescriptor md) {
@@ -1535,7 +1530,7 @@
         Objects.requireNonNull(pkg, "package name can't be null");
 
         // check if pkg is not exported to all modules
-        if (nonExportedPkgs.contains(pkg)) {
+        if (nonExportedPkgs.containsKey(pkg)) {
             checkPermission(
                 new RuntimePermission("accessClassInPackage." + pkg));
             return;
@@ -1634,7 +1629,7 @@
         Objects.requireNonNull(pkg, "package name can't be null");
 
         // check if pkg is not exported to all modules
-        if (nonExportedPkgs.contains(pkg)) {
+        if (nonExportedPkgs.containsKey(pkg)) {
             checkPermission(
                 new RuntimePermission("defineClassInPackage." + pkg));
             return;
--- a/src/java.base/share/classes/java/lang/String.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/String.java	Fri May 12 10:43:28 2017 -0700
@@ -335,7 +335,7 @@
      * subarray.
      *
      * <p> Each {@code byte} in the subarray is converted to a {@code char} as
-     * specified in the method above.
+     * specified in the {@link #String(byte[],int) String(byte[],int)} constructor.
      *
      * @deprecated This method does not properly convert bytes into characters.
      * As of JDK&nbsp;1.1, the preferred way to do this is via the
@@ -390,7 +390,7 @@
 
     /**
      * Allocates a new {@code String} containing characters constructed from
-     * an array of 8-bit integer values. Each character <i>c</i>in the
+     * an array of 8-bit integer values. Each character <i>c</i> in the
      * resulting string is constructed from the corresponding component
      * <i>b</i> in the byte array such that:
      *
@@ -2203,12 +2203,16 @@
      * <p> The string {@code "boo:and:foo"}, for example, yields the
      * following results with these parameters:
      *
-     * <blockquote><table cellpadding=1 cellspacing=0 summary="Split example showing regex, limit, and result">
+     * <blockquote><table class="plain">
+     * <caption style="display:none">Split example showing regex, limit, and result</caption>
+     * <thead>
      * <tr>
      *     <th>Regex</th>
      *     <th>Limit</th>
      *     <th>Result</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr><td style="text-align:center">:</td>
      *     <td style="text-align:center">2</td>
      *     <td>{@code { "boo", "and:foo" }}</td></tr>
@@ -2227,6 +2231,7 @@
      * <tr><td style="text-align:center">o</td>
      *     <td style="text-align:center">0</td>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
+     * </tbody>
      * </table></blockquote>
      *
      * <p> An invocation of this method of the form
@@ -2326,15 +2331,20 @@
      * <p> The string {@code "boo:and:foo"}, for example, yields the following
      * results with these expressions:
      *
-     * <blockquote><table cellpadding=1 cellspacing=0 summary="Split examples showing regex and result">
+     * <blockquote><table class="plain">
+     * <caption style="display:none">Split examples showing regex and result</caption>
+     * <thead>
      * <tr>
      *  <th>Regex</th>
      *  <th>Result</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr><td style="text-align:center">:</td>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
      * <tr><td style="text-align:center">o</td>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
+     * </tbody>
      * </table></blockquote>
      *
      *
@@ -2445,13 +2455,17 @@
      * {@code String} may be a different length than the original {@code String}.
      * <p>
      * Examples of lowercase  mappings are in the following table:
-     * <table border="1" summary="Lowercase mapping examples showing language code of locale, upper case, lower case, and description">
+     * <table class="plain">
+     * <caption style="display:none">Lowercase mapping examples showing language code of locale, upper case, lower case, and description</caption>
+     * <thead>
      * <tr>
      *   <th>Language Code of Locale</th>
      *   <th>Upper Case</th>
      *   <th>Lower Case</th>
      *   <th>Description</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td>tr (Turkish)</td>
      *   <td>&#92;u0130</td>
@@ -2480,6 +2494,7 @@
      *       <img src="doc-files/sigma1.gif" alt="sigma"></td>
      *   <td>lowercased all chars in String</td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * @param locale use the case transformation rules for this locale
@@ -2526,13 +2541,17 @@
      * <p>
      * Examples of locale-sensitive and 1:M case mappings are in the following table.
      *
-     * <table border="1" summary="Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.">
+     * <table class="plain">
+     * <caption style="display:none">Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.</caption>
+     * <thead>
      * <tr>
      *   <th>Language Code of Locale</th>
      *   <th>Lower Case</th>
      *   <th>Upper Case</th>
      *   <th>Description</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td>tr (Turkish)</td>
      *   <td>&#92;u0069</td>
@@ -2557,6 +2576,7 @@
      *   <td>FAHRVERGN&Uuml;GEN</td>
      *   <td></td>
      * </tr>
+     * </tbody>
      * </table>
      * @param locale use the case transformation rules for this locale
      * @return the {@code String}, converted to uppercase.
--- a/src/java.base/share/classes/java/lang/System.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/System.java	Fri May 12 10:43:28 2017 -0700
@@ -41,7 +41,6 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.net.URI;
-import java.net.URL;
 import java.security.AccessControlContext;
 import java.security.ProtectionDomain;
 import java.security.AccessController;
@@ -576,9 +575,13 @@
      * system properties, a set of system properties is first created and
      * initialized. This set of system properties always includes values
      * for the following keys:
-     * <table summary="Shows property keys and associated values">
+     * <table class="striped">
+     * <caption style="display:none">Shows property keys and associated values</caption>
+     * <thead>
      * <tr><th>Key</th>
      *     <th>Description of Associated Value</th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td><code>java.version</code></td>
      *     <td>Java Runtime Environment version which may be interpreted
      *     as a {@link Runtime.Version}</td></tr>
@@ -637,6 +640,7 @@
      *     <td>User's home directory</td></tr>
      * <tr><td><code>user.dir</code></td>
      *     <td>User's current working directory</td></tr>
+     * </tbody>
      * </table>
      * <p>
      * Multiple paths in a system property value are separated by the path
@@ -648,9 +652,13 @@
      *
      * @implNote In addition to the standard system properties, the system
      * properties may include the following keys:
-     * <table summary="Shows property keys and associated values">
+     * <table class="striped">
+     * <caption style="display:none">Shows property keys and associated values</caption>
+     * <thead>
      * <tr><th>Key</th>
      *     <th>Description of Associated Value</th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td>{@code jdk.module.path}</td>
      *     <td>The application module path</td></tr>
      * <tr><td>{@code jdk.module.upgrade.path}</td>
@@ -659,6 +667,7 @@
      *     <td>The module name of the initial/main module</td></tr>
      * <tr><td>{@code jdk.module.main.class}</td>
      *     <td>The main class name of the initial module</td></tr>
+     * </tbody>
      * </table>
      *
      * @return     the system properties
@@ -2111,9 +2120,6 @@
             public Class<?> findBootstrapClassOrNull(ClassLoader cl, String name) {
                 return cl.findBootstrapClassOrNull(name);
             }
-            public URL findResource(ClassLoader cl, String mn, String name) throws IOException {
-                return cl.findResource(mn, name);
-            }
             public Stream<Package> packages(ClassLoader cl) {
                 return cl.packages();
             }
@@ -2123,6 +2129,9 @@
             public String fastUUID(long lsb, long msb) {
                 return Long.fastUUID(lsb, msb);
             }
+            public void addNonExportedPackages(ModuleLayer layer) {
+                SecurityManager.addNonExportedPackages(layer);
+            }
             public void invalidatePackageAccessCache() {
                 SecurityManager.invalidatePackageAccessCache();
             }
--- a/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -149,8 +149,12 @@
  * capture argument (corresponding to the receiver) must be non-null.
  *
  * <p>A type Q is considered adaptable to S as follows:
- * <table summary="adaptable types">
+ * <table class="borderless">
+ *   <caption style="display:none">adaptable types</caption>
+ *   <thead>
  *     <tr><th>Q</th><th>S</th><th>Link-time checks</th><th>Invocation-time checks</th></tr>
+ *   </thead>
+ *   <tbody>
  *     <tr>
  *         <td>Primitive</td><td>Primitive</td>
  *         <td>Q can be converted to S via a primitive widening conversion</td>
@@ -176,6 +180,7 @@
  *         <br>for return types: none</td>
  *         <td>Cast from Q to S</td>
  *     </tr>
+ *   </tbody>
  * </table>
  *
  * @apiNote These linkage methods are designed to support the evaluation
@@ -213,7 +218,9 @@
  * methods.
  * @since 1.8
  */
-public class LambdaMetafactory {
+public final class LambdaMetafactory {
+
+    private LambdaMetafactory() {}
 
     /** Flag for alternate metafactories indicating the lambda object
      * must be serializable */
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -81,8 +81,12 @@
  * The <a href="MethodHandles.Lookup.html#lookups">Lookup Factory Methods</a>
  * correspond to all major use cases for methods, constructors, and fields.
  * These use cases may be distinguished using small integers as follows:
- * <table border=1 cellpadding=5 summary="reference kinds">
+ * <table class="striped">
+ * <caption style="display:none">reference kinds</caption>
+ * <thead>
  * <tr><th>reference kind</th><th>descriptive name</th><th>scope</th><th>member</th><th>behavior</th></tr>
+ * </thead>
+ * <tbody>
  * <tr>
  *     <td>{@code 1}</td><td>{@code REF_getField}</td><td>{@code class}</td>
  *     <td>{@code FT f;}</td><td>{@code (T) this.f;}</td>
@@ -119,6 +123,7 @@
  *     <td>{@code 9}</td><td>{@code REF_invokeInterface}</td><td>{@code interface}</td>
  *     <td>{@code T m(A*);}</td><td>{@code (T) this.m(arg*);}</td>
  * </tr>
+ * </tbody>
  * </table>
  * @since 1.8
  */
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri May 12 10:43:28 2017 -0700
@@ -113,6 +113,19 @@
     }
 
     /**
+     * This reflected$lookup method is the alternate implementation of
+     * the lookup method when being invoked by reflection.
+     */
+    @CallerSensitive
+    private static Lookup reflected$lookup() {
+        Class<?> caller = Reflection.getCallerClass();
+        if (caller.getClassLoader() == null) {
+            throw newIllegalArgumentException("illegal lookupClass: "+caller);
+        }
+        return new Lookup(caller);
+    }
+
+    /**
      * Returns a {@link Lookup lookup object} which is trusted minimally.
      * The lookup has the {@code PUBLIC} and {@code UNCONDITIONAL} modes.
      * It can only be used to create method handles to public members of
@@ -265,12 +278,16 @@
      * (Bytecode behaviors are described in section 5.4.3.5 of the Java Virtual Machine Specification.)
      * Here is a summary of the correspondence between these factory methods and
      * the behavior of the resulting method handles:
-     * <table border=1 cellpadding=5 summary="lookup method behaviors">
+     * <table class="striped">
+     * <caption style="display:none">lookup method behaviors</caption>
+     * <thead>
      * <tr>
      *     <th><a id="equiv"></a>lookup expression</th>
      *     <th>member</th>
      *     <th>bytecode behavior</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *     <td>{@link java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}</td>
      *     <td>{@code FT f;}</td><td>{@code (T) this.f;}</td>
@@ -327,6 +344,7 @@
      *     <td>{@link java.lang.invoke.MethodHandles.Lookup#findClass lookup.findClass("C")}</td>
      *     <td>{@code class C { ... }}</td><td>{@code C.class;}</td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * Here, the type {@code C} is the class or interface being searched for a member,
@@ -747,7 +765,7 @@
         Lookup(Class<?> lookupClass) {
             this(lookupClass, FULL_POWER_MODES);
             // make sure we haven't accidentally picked up a privileged class:
-            checkUnprivilegedlookupClass(lookupClass, FULL_POWER_MODES);
+            checkUnprivilegedlookupClass(lookupClass);
         }
 
         private Lookup(Class<?> lookupClass, int allowedModes) {
@@ -827,7 +845,7 @@
                 newModes = 0;
             }
 
-            checkUnprivilegedlookupClass(requestedLookupClass, newModes);
+            checkUnprivilegedlookupClass(requestedLookupClass);
             return new Lookup(requestedLookupClass, newModes);
         }
 
@@ -876,9 +894,7 @@
          * accessible to the class. The {@code PACKAGE} lookup mode serves to authenticate
          * that the lookup object was created by a caller in the runtime package (or derived
          * from a lookup originally created by suitably privileged code to a target class in
-         * the runtime package). The lookup modes cannot include {@link #PRIVATE PRIVATE}
-         * access. A lookup with {@code PRIVATE} access can be downgraded to drop this lookup
-         * mode with the {@linkplain #dropLookupMode(int) dropLookupMode} method. </p>
+         * the runtime package). </p>
          *
          * <p> The {@code bytes} parameter is the class bytes of a valid class file (as defined
          * by the <em>The Java Virtual Machine Specification</em>) with a class name in the
@@ -896,7 +912,6 @@
          * @throws IllegalArgumentException the bytes are for a class in a different package
          * to the lookup class
          * @throws IllegalAccessException if this lookup does not have {@code PACKAGE} access
-         * @throws UnsupportedOperationException if the lookup class has {@code PRIVATE} access
          * @throws LinkageError if the class is malformed ({@code ClassFormatError}), cannot be
          * verified ({@code VerifyError}), is already defined, or another linkage error occurs
          * @throws SecurityException if denied by the security manager
@@ -911,8 +926,6 @@
             SecurityManager sm = System.getSecurityManager();
             if (sm != null)
                 sm.checkPermission(new RuntimePermission("defineClass"));
-            if (hasPrivateAccess())
-                throw new UnsupportedOperationException("PRIVATE access not supported");
             if ((lookupModes() & PACKAGE) == 0)
                 throw new IllegalAccessException("Lookup does not have PACKAGE access");
             assert (lookupModes() & (MODULE|PUBLIC)) != 0;
@@ -984,25 +997,10 @@
          */
         static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, (PUBLIC|UNCONDITIONAL));
 
-        private static void checkUnprivilegedlookupClass(Class<?> lookupClass, int allowedModes) {
+        private static void checkUnprivilegedlookupClass(Class<?> lookupClass) {
             String name = lookupClass.getName();
             if (name.startsWith("java.lang.invoke."))
                 throw newIllegalArgumentException("illegal lookupClass: "+lookupClass);
-
-            // For caller-sensitive MethodHandles.lookup() disallow lookup from
-            // restricted packages.  This a fragile and blunt approach.
-            // TODO replace with a more formal and less fragile mechanism
-            // that does not bluntly restrict classes under packages within
-            // java.base from looking up MethodHandles or VarHandles.
-            if (allowedModes == FULL_POWER_MODES && lookupClass.getClassLoader() == null) {
-                if ((name.startsWith("java.") &&
-                     !name.equals("java.lang.Thread") &&
-                     !name.startsWith("java.util.concurrent.")) ||
-                    (name.startsWith("sun.") &&
-                     !name.startsWith("sun.invoke."))) {
-                    throw newIllegalArgumentException("illegal lookupClass: " + lookupClass);
-                }
-            }
         }
 
         /**
@@ -1447,9 +1445,10 @@
         }
 
         /**
-         * Produces a VarHandle giving access to non-static fields of type
-         * {@code T} declared by a receiver class of type {@code R}, supporting
-         * shape {@code (R : T)}.
+         * Produces a VarHandle giving access to a non-static field {@code name}
+         * of type {@code type} declared in a class of type {@code recv}.
+         * The VarHandle's variable type is {@code type} and it has one
+         * coordinate type, {@code recv}.
          * <p>
          * Access checking is performed immediately on behalf of the lookup
          * class.
@@ -1472,7 +1471,7 @@
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
          * will override access to the field (effectively ignore the
-         * {@code volatile} declaration) in accordance to it's specified
+         * {@code volatile} declaration) in accordance to its specified
          * access modes.
          * <p>
          * If the field type is {@code float} or {@code double} then numeric
@@ -1568,9 +1567,10 @@
         }
 
         /**
-         * Produces a VarHandle giving access to a static field of type
-         * {@code T} declared by a given declaring class, supporting shape
-         * {@code ((empty) : T)}.
+         * Produces a VarHandle giving access to a static field {@code name} of
+         * type {@code type} declared in a class of type {@code decl}.
+         * The VarHandle's variable type is {@code type} and it has no
+         * coordinate types.
          * <p>
          * Access checking is performed immediately on behalf of the lookup
          * class.
@@ -1596,7 +1596,7 @@
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
          * will override access to the field (effectively ignore the
-         * {@code volatile} declaration) in accordance to it's specified
+         * {@code volatile} declaration) in accordance to its specified
          * access modes.
          * <p>
          * If the field type is {@code float} or {@code double} then numeric
@@ -1691,7 +1691,13 @@
         public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
             Class<? extends Object> refc = receiver.getClass(); // may get NPE
             MemberName method = resolveOrFail(REF_invokeSpecial, refc, name, type);
-            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method, findBoundCallerClass(method));
+            MethodHandle mh = getDirectMethodNoRestrictInvokeSpecial(refc, method, findBoundCallerClass(method));
+            if (!mh.type().leadingReferenceParameter().isAssignableFrom(receiver.getClass())) {
+                throw new IllegalAccessException("The restricted defining class " +
+                                                 mh.type().leadingReferenceParameter().getName() +
+                                                 " is not assignable from receiver class " +
+                                                 receiver.getClass().getName());
+            }
             return mh.bindArgumentL(0, receiver).setVarargs(method);
         }
 
@@ -1877,11 +1883,12 @@
         }
 
         /**
-         * Produces a VarHandle that accesses fields of type {@code T} declared
-         * by a class of type {@code R}, as described by the given reflected
-         * field.
-         * If the field is non-static the VarHandle supports a shape of
-         * {@code (R : T)}, otherwise supports a shape of {@code ((empty) : T)}.
+         * Produces a VarHandle giving access to a reflected field {@code f}
+         * of type {@code T} declared in a class of type {@code R}.
+         * The VarHandle's variable type is {@code T}.
+         * If the field is non-static the VarHandle has one coordinate type,
+         * {@code R}.  Otherwise, the field is static, and the VarHandle has no
+         * coordinate types.
          * <p>
          * Access checking is performed immediately on behalf of the lookup
          * class, regardless of the value of the field's {@code accessible}
@@ -1909,7 +1916,7 @@
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
          * will override access to the field (effectively ignore the
-         * {@code volatile} declaration) in accordance to it's specified
+         * {@code volatile} declaration) in accordance to its specified
          * access modes.
          * <p>
          * If the field type is {@code float} or {@code double} then numeric
@@ -2240,7 +2247,7 @@
                 throw method.makeAccessException("caller class must be a subclass below the method", caller);
             }
             MethodType rawType = mh.type();
-            if (rawType.parameterType(0) == caller)  return mh;
+            if (caller.isAssignableFrom(rawType.parameterType(0))) return mh; // no need to restrict; already narrow
             MethodType narrowType = rawType.changeParameterType(0, caller);
             assert(!mh.isVarargsCollector());  // viewAsType will lose varargs-ness
             assert(mh.viewAsTypeChecks(narrowType, true));
@@ -2253,11 +2260,11 @@
             final boolean checkSecurity = true;
             return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass);
         }
-        /** Check access and get the requested method, eliding receiver narrowing rules. */
-        private MethodHandle getDirectMethodNoRestrict(byte refKind, Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
+        /** Check access and get the requested method, for invokespecial with no restriction on the application of narrowing rules. */
+        private MethodHandle getDirectMethodNoRestrictInvokeSpecial(Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
             final boolean doRestrict    = false;
             final boolean checkSecurity = true;
-            return getDirectMethodCommon(refKind, refc, method, checkSecurity, doRestrict, callerClass);
+            return getDirectMethodCommon(REF_invokeSpecial, refc, method, checkSecurity, doRestrict, callerClass);
         }
         /** Check access and get the requested method, eliding security manager checks. */
         private MethodHandle getDirectMethodNoSecurityManager(byte refKind, Class<?> refc, MemberName method, Class<?> callerClass) throws IllegalAccessException {
@@ -2309,10 +2316,8 @@
             DirectMethodHandle dmh = DirectMethodHandle.make(refKind, refc, method);
             MethodHandle mh = dmh;
             // Optionally narrow the receiver argument to refc using restrictReceiver.
-            if (doRestrict &&
-                   (refKind == REF_invokeSpecial ||
-                       (MethodHandleNatives.refKindHasReceiver(refKind) &&
-                           restrictProtectedReceiver(method)))) {
+            if ((doRestrict && refKind == REF_invokeSpecial) ||
+                    (MethodHandleNatives.refKindHasReceiver(refKind) && restrictProtectedReceiver(method))) {
                 mh = restrictReceiver(method, dmh, lookupClass());
             }
             mh = maybeBindCaller(method, mh, callerClass);
@@ -2572,9 +2577,11 @@
     }
 
     /**
-     *
-     * Produces a VarHandle giving access to elements of an array type
-     * {@code T[]}, supporting shape {@code (T[], int : T)}.
+     * Produces a VarHandle giving access to elements of an array of type
+     * {@code arrayClass}.  The VarHandle's variable type is the component type
+     * of {@code arrayClass} and the list of coordinate types is
+     * {@code (arrayClass, int)}, where the {@code int} coordinate type
+     * corresponds to an argument that is an index into an array.
      * <p>
      * Certain access modes of the returned VarHandle are unsupported under
      * the following conditions:
@@ -2629,13 +2636,14 @@
     /**
      * Produces a VarHandle giving access to elements of a {@code byte[]} array
      * viewed as if it were a different primitive array type, such as
-     * {@code int[]} or {@code long[]}.  The shape of the resulting VarHandle is
-     * {@code (byte[], int : T)}, where the {@code int} coordinate type
-     * corresponds to an argument that is an index in a {@code byte[]} array,
-     * and {@code T} is the component type of the given view array class.  The
-     * returned VarHandle accesses bytes at an index in a {@code byte[]} array,
-     * composing bytes to or from a value of {@code T} according to the given
-     * endianness.
+     * {@code int[]} or {@code long[]}.
+     * The VarHandle's variable type is the component type of
+     * {@code viewArrayClass} and the list of coordinate types is
+     * {@code (byte[], int)}, where the {@code int} coordinate type
+     * corresponds to an argument that is an index into a {@code byte[]} array.
+     * The returned VarHandle accesses bytes at an index in a {@code byte[]}
+     * array, composing bytes to or from a value of the component type of
+     * {@code viewArrayClass} according to the given endianness.
      * <p>
      * The supported component types (variables types) are {@code short},
      * {@code char}, {@code int}, {@code long}, {@code float} and
@@ -2713,13 +2721,14 @@
      * Produces a VarHandle giving access to elements of a {@code ByteBuffer}
      * viewed as if it were an array of elements of a different primitive
      * component type to that of {@code byte}, such as {@code int[]} or
-     * {@code long[]}.  The shape of the resulting VarHandle is
-     * {@code (ByteBuffer, int : T)}, where the {@code int} coordinate type
-     * corresponds to an argument that is an index in a {@code ByteBuffer}, and
-     * {@code T} is the component type of the given view array class.  The
-     * returned VarHandle accesses bytes at an index in a {@code ByteBuffer},
-     * composing bytes to or from a value of {@code T} according to the given
-     * endianness.
+     * {@code long[]}.
+     * The VarHandle's variable type is the component type of
+     * {@code viewArrayClass} and the list of coordinate types is
+     * {@code (ByteBuffer, int)}, where the {@code int} coordinate type
+     * corresponds to an argument that is an index into a {@code byte[]} array.
+     * The returned VarHandle accesses bytes at an index in a
+     * {@code ByteBuffer}, composing bytes to or from a value of the component
+     * type of {@code viewArrayClass} according to the given endianness.
      * <p>
      * The supported component types (variables types) are {@code short},
      * {@code char}, {@code int}, {@code long}, {@code float} and
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Fri May 12 10:43:28 2017 -0700
@@ -41,7 +41,7 @@
 import static java.lang.invoke.MethodHandleStatics.newInternalError;
 
 /**
- * A VarHandle is a dynamically typed reference to a variable, or to a
+ * A VarHandle is a dynamically strongly typed reference to a variable, or to a
  * parametrically-defined family of variables, including static fields,
  * non-static fields, array elements, or components of an off-heap data
  * structure.  Access to such variables is supported under various
@@ -53,63 +53,62 @@
  *
  * <p>A VarHandle has:
  * <ul>
- * <li>a {@link #varType variable type}, referred to as {@code T}, which is the
- * type of variable(s) referenced by this VarHandle;
- * <li>a list of {@link #coordinateTypes coordinate types}, referred to as
- * {@code CT}, where the types (primitive and reference) are represented by
- * {@link Class} objects).  A list of arguments corresponding to instances of
- * the coordinate types uniquely locates a variable referenced by this
- * VarHandle; and
- * <li>a <em>shape</em>, that combines the variable type and coordinate types,
- * and is declared with the notation {@code (CT : T)}.  An empty list of
- * coordinate types is declared as {@code (empty)}.
+ * <li>a {@link #varType variable type} T, the type of every variable referenced
+ * by this VarHandle; and
+ * <li>a list of {@link #coordinateTypes coordinate types}
+ * {@code CT1, CT2, ..., CTn}, the types of <em>coordinate expressions</em> that
+ * jointly locate a variable referenced by this VarHandle.
  * </ul>
+ * Variable and coordinate types may be primitive or reference, and are
+ * represented by {@code Class} objects.  The list of coordinate types may be
+ * empty.
  *
  * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup
- * lookup} VarHandle instances document the supported variable type, coordinate
- * types, and shape.
+ * lookup} VarHandle instances document the supported variable type and the list
+ * of coordinate types.
  *
- * For example, a VarHandle referencing a non-static field will declare a shape
- * of {@code (R : T)}, where {@code R} is the receiver type and
- * {@code T} is the field type, and where the VarHandle and an instance of the
- * receiver type can be utilized to access the field variable.
- * A VarHandle referencing array elements will declare a shape of
- * {@code (T[], int : T)}, where {@code T[]} is the array type and {@code T}
- * its component type, and where the VarHandle, an instance of the array type,
- * and an {@code int} index can be utilized to access an array element variable.
- *
- * <p>Each access mode is associated with a
- * <a href="MethodHandle.html#sigpoly">signature polymorphic</a> method of the
- * same name, where the VarHandle shape and access mode uniquely determine the
- * canonical {@link #accessModeType(AccessMode) access mode type},
- * which in turn determines the matching constraints on a valid symbolic
- * type descriptor at the call site of an access mode's method
- * <a href="VarHandle.html#invoke">invocation</a>.
+ * <p>Each access mode is associated with one <em>access mode method</em>, a
+ * <a href="MethodHandle.html#sigpoly">signature polymorphic</a> method named
+ * for the access mode.  When an access mode method is invoked on a VarHandle
+ * instance, the initial arguments to the invocation are coordinate expressions
+ * that indicate in precisely which object the variable is to be accessed.
+ * Trailing arguments to the invocation represent values of importance to the
+ * access mode.  For example, the various compare-and-set or compare-and-exchange
+ * access modes require two trailing arguments for the variable's expected value
+ * and new value.
  *
- * As such, VarHandles are dynamically and strongly typed.  Their arity,
- * argument types, and return type of an access mode method invocation are not
- * statically checked.  If they, and associated values, do not match the arity
- * and types of the access mode's type, an exception will be thrown.
- *
- * The parameter types of an access mode method type will consist of those that
- * are the VarHandles's coordinate types (in order), followed by access mode
- * parameter types specific to the access mode.
+ * <p>The arity and types of arguments to the invocation of an access mode
+ * method are not checked statically.  Instead, each access mode method
+ * specifies an {@link #accessModeType(AccessMode) access mode type},
+ * represented as an instance of {@link MethodType}, that serves as a kind of
+ * method signature against which the arguments are checked dynamically.  An
+ * access mode type gives formal parameter types in terms of the coordinate
+ * types of a VarHandle instance and the types for values of importance to the
+ * access mode.  An access mode type also gives a return type, often in terms of
+ * the variable type of a VarHandle instance.  When an access mode method is
+ * invoked on a VarHandle instance, the symbolic type descriptor at the
+ * call site, the run time types of arguments to the invocation, and the run
+ * time type of the return value, must <a href="#invoke">match</a> the types
+ * given in the access mode type.  A runtime exception will be thrown if the
+ * match fails.
  *
- * <p>An access mode's method documents the form of its method signature, which
- * is derived from the access mode parameter types.  The form is declared with
- * the notation {@code (CT, P1 p1, P2 p2, ..., PN pn)R}, where {@code CT} is the
- * coordinate types (as documented by a VarHandle factory method), {@code P1},
- * {@code P2} and {@code PN} are the first, second and the n'th access mode
- * parameters named {@code p1}, {@code p2} and {@code pn} respectively, and
- * {@code R} is the return type.
- *
- * For example, for the generic shape of {@code (CT : T)} the
- * {@link #compareAndSet} access mode method documents that its method
- * signature is of the form {@code (CT, T expectedValue, T newValue)boolean},
- * where the parameter types named {@code extendedValue} and {@code newValue}
- * are the access mode parameter types.  If the VarHandle accesses array
- * elements with a shape of say {@code (T[], int : T)} then the access mode
- * method type is {@code (T[], int, T, T)boolean}.
+ * For example, the access mode method {@link #compareAndSet} specifies that if
+ * its receiver is a VarHandle instance with coordinate types
+ * {@code CT1, ..., CTn} and variable type {@code T}, then its access mode type
+ * is {@code (CT1 c1, ..., CTn cn, T expectedValue, T newValue)boolean}.
+ * Suppose that a VarHandle instance can access array elements, and that its
+ * coordinate types are {@code String[]} and {@code int} while its variable type
+ * is {@code String}.  The access mode type for {@code compareAndSet} on this
+ * VarHandle instance would be
+ * {@code (String[] c1, int c2, String expectedValue, String newValue)boolean}.
+ * Such a VarHandle instance may produced by the
+ * {@link MethodHandles#arrayElementVarHandle(Class) array factory method} and
+ * access array elements as follows:
+ * <pre> {@code
+ * String[] sa = ...
+ * VarHandle avh = MethodHandles.arrayElementVarHandle(String[].class);
+ * boolean r = avh.compareAndSet(sa, 10, "expected", "new");
+ * }</pre>
  *
  * <p>Access modes are grouped into the following categories:
  * <ul>
@@ -172,10 +171,10 @@
  * lookup} VarHandle instances document the set of access modes that are
  * supported, which may also include documenting restrictions based on the
  * variable type and whether a variable is read-only.  If an access mode is not
- * supported then the corresponding signature-polymorphic method will on
- * invocation throw an {@code UnsupportedOperationException}.  Factory methods
- * should document any additional undeclared exceptions that may be thrown by
- * access mode methods.
+ * supported then the corresponding access mode method will on invocation throw
+ * an {@code UnsupportedOperationException}.  Factory methods should document
+ * any additional undeclared exceptions that may be thrown by access mode
+ * methods.
  * The {@link #get get} access mode is supported for all
  * VarHandle instances and the corresponding method never throws
  * {@code UnsupportedOperationException}.
@@ -215,7 +214,7 @@
  * precise phrasing of the specification of access mode methods and memory fence
  * methods may accompany future updates of the Java Language Specification.
  *
- * <h1>Compilation of an access mode's method</h1>
+ * <h1>Compiling invocation of access mode methods</h1>
  * A Java method call expression naming an access mode method can invoke a
  * VarHandle from Java source code.  From the viewpoint of source code, these
  * methods can take any arguments and their polymorphic result (if expressed)
@@ -247,7 +246,7 @@
  * except the null reference.
  *
  *
- * <h1><a id="invoke">Invocation of an access mode's method</a></h1>
+ * <h1><a id="invoke">Performing invocation of access mode methods</a></h1>
  * The first time an {@code invokevirtual} instruction is executed it is linked
  * by symbolically resolving the names in the instruction and verifying that
  * the method call is statically legal.  This also holds for calls to access mode
@@ -264,38 +263,31 @@
  * invoking is not present on the individual VarHandle being invoked.
  *
  * <p>
- * Invocation of an access mode's signature-polymorphic method behaves as if an
- * invocation of {@link MethodHandle#invoke}, where the receiving method handle
- * is bound to a VarHandle instance and the access mode.  More specifically, the
- * following:
+ * Invocation of an access mode method behaves as if an invocation of
+ * {@link MethodHandle#invoke}, where the receiving method handle accepts the
+ * VarHandle instance as the leading argument.  More specifically, the
+ * following, where {@code {access-mode}} corresponds to the access mode method
+ * name:
  * <pre> {@code
  * VarHandle vh = ..
  * R r = (R) vh.{access-mode}(p1, p2, ..., pN);
  * }</pre>
- * behaves as if (modulo the access mode methods do not declare throwing of
- * {@code Throwable}):
+ * behaves as if:
  * <pre> {@code
  * VarHandle vh = ..
+ * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}");
  * MethodHandle mh = MethodHandles.varHandleExactInvoker(
- *                       VarHandle.AccessMode.{access-mode},
- *                       vh.accessModeType(VarHandle.AccessMode.{access-mode}));
+ *                       am,
+ *                       vh.accessModeType(am));
  *
- * mh = mh.bindTo(vh);
- * R r = (R) mh.invoke(p1, p2, ..., pN)
+ * R r = (R) mh.invoke(vh, p1, p2, ..., pN)
  * }</pre>
- * or, more concisely, behaves as if:
- * <pre> {@code
- * VarHandle vh = ..
- * MethodHandle mh = vh.toMethodHandle(VarHandle.AccessMode.{access-mode});
- *
- * R r = (R) mh.invoke(p1, p2, ..., pN)
- * }</pre>
- * In terms of equivalent {@code invokevirtual} bytecode behaviour an access
- * mode method invocation is equivalent to:
+ * (modulo access mode methods do not declare throwing of {@code Throwable}).
+ * This is equivalent to:
  * <pre> {@code
  * MethodHandle mh = MethodHandles.lookup().findVirtual(
  *                       VarHandle.class,
- *                       VarHandle.AccessMode.{access-mode}.methodName(),
+ *                       "{access-mode}",
  *                       MethodType.methodType(R, p1, p2, ..., pN));
  *
  * R r = (R) mh.invokeExact(vh, p1, p2, ..., pN)
@@ -306,6 +298,17 @@
  * widen primitive values, as if by {@link MethodHandle#asType asType} (see also
  * {@link MethodHandles#varHandleInvoker}).
  *
+ * More concisely, such behaviour is equivalent to:
+ * <pre> {@code
+ * VarHandle vh = ..
+ * VarHandle.AccessMode am = VarHandle.AccessMode.valueFromMethodName("{access-mode}");
+ * MethodHandle mh = vh.toMethodHandle(am);
+ *
+ * R r = (R) mh.invoke(p1, p2, ..., pN)
+ * }</pre>
+ * Where, in this case, the method handle is bound to the VarHandle instance.
+ *
+ *
  * <h1>Invocation checking</h1>
  * In typical programs, VarHandle access mode type matching will usually
  * succeed.  But if a match fails, the JVM will throw a
@@ -439,7 +442,7 @@
      * if the variable was declared non-{@code volatile}.  Commonly referred to
      * as plain read access.
      *
-     * <p>The method signature is of the form {@code (CT)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code get}
      * must match the access mode type that is the result of calling
@@ -449,15 +452,15 @@
      * throws {@code UnsupportedOperationException}.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT)}
+     * {@code (CT1 ct1, ..., CTn)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the value of the
      * variable
      * , statically represented using {@code Object}.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -469,21 +472,21 @@
      * semantics of setting as if the variable was declared non-{@code volatile}
      * and non-{@code final}.  Commonly referred to as plain write access.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)void}
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}
      *
      * <p>The symbolic type descriptor at the call site of {@code set}
      * must match the access mode type that is the result of calling
      * {@code accessModeType(VarHandle.AccessMode.SET)} on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -497,7 +500,7 @@
      * Returns the value of a variable, with memory semantics of reading as if
      * the variable was declared {@code volatile}.
      *
-     * <p>The method signature is of the form {@code (CT)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getVolatile}
      * must match the access mode type that is the result of calling
@@ -505,17 +508,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT)}
+     * {@code (CT1 ct1, ..., CTn ctn)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the value of the
      * variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -526,7 +529,7 @@
      * Sets the value of a variable to the {@code newValue}, with memory
      * semantics of setting as if the variable was declared {@code volatile}.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)void}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}.
      *
      * <p>The symbolic type descriptor at the call site of {@code setVolatile}
      * must match the access mode type that is the result of calling
@@ -538,14 +541,14 @@
      * memory ordering effects compatible with {@code memory_order_seq_cst}.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -557,7 +560,7 @@
      * Returns the value of a variable, accessed in program order, but with no
      * assurance of memory ordering effects with respect to other threads.
      *
-     * <p>The method signature is of the form {@code (CT)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getOpaque}
      * must match the access mode type that is the result of calling
@@ -565,17 +568,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT)}
+     * {@code (CT1 ct1, ..., CTn ctn)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the value of the
      * variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -587,7 +590,7 @@
      * but with no assurance of memory ordering effects with respect to other
      * threads.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)void}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}.
      *
      * <p>The symbolic type descriptor at the call site of {@code setOpaque}
      * must match the access mode type that is the result of calling
@@ -595,14 +598,14 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -616,7 +619,7 @@
      * Returns the value of a variable, and ensures that subsequent loads and
      * stores are not reordered before this access.
      *
-     * <p>The method signature is of the form {@code (CT)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAcquire}
      * must match the access mode type that is the result of calling
@@ -629,17 +632,17 @@
      * ordering.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT)}
+     * {@code (CT1 ct1, ..., CTn ctn)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the value of the
      * variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -650,7 +653,7 @@
      * Sets the value of a variable to the {@code newValue}, and ensures that
      * prior loads and stores are not reordered after this access.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)void}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)void}.
      *
      * <p>The symbolic type descriptor at the call site of {@code setRelease}
      * must match the access mode type that is the result of calling
@@ -663,14 +666,14 @@
      * ordering.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      */
     public final native
     @MethodHandle.PolymorphicSignature
@@ -687,7 +690,7 @@
      * {@code expectedValue}, as accessed with the memory semantics of
      * {@link #getVolatile}.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * compareAndSet} must match the access mode type that is the result of
@@ -695,16 +698,16 @@
      * this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return {@code true} if successful, otherwise {@code false} if the
      * witness value was not the same as the {@code expectedValue}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -720,7 +723,7 @@
      * {@code expectedValue}, as accessed with the memory semantics of
      * {@link #getVolatile}.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * compareAndExchange}
@@ -729,7 +732,7 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the witness value, which
      * will be the same as the {@code expectedValue} if successful
@@ -755,7 +758,7 @@
      * {@code expectedValue}, as accessed with the memory semantics of
      * {@link #getAcquire}.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * compareAndExchangeAcquire}
@@ -764,17 +767,17 @@
      * this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the witness value, which
      * will be the same as the {@code expectedValue} if successful
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #getAcquire(Object...)
      */
@@ -790,7 +793,7 @@
      * {@code expectedValue}, as accessed with the memory semantics of
      * {@link #get}.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * compareAndExchangeRelease}
@@ -799,17 +802,17 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the witness value, which
      * will be the same as the {@code expectedValue} if successful
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setRelease(Object...)
      * @see #get(Object...)
      */
@@ -830,7 +833,7 @@
      * <p>This operation may fail spuriously (typically, due to memory
      * contention) even if the witness value does match the expected value.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * weakCompareAndSetPlain} must match the access mode type that is the result of
@@ -838,17 +841,17 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return {@code true} if successful, otherwise {@code false} if the
      * witness value was not the same as the {@code expectedValue} or if this
      * operation spuriously failed.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #get(Object...)
      */
@@ -867,7 +870,7 @@
      * <p>This operation may fail spuriously (typically, due to memory
      * contention) even if the witness value does match the expected value.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * weakCompareAndSet} must match the access mode type that is the
@@ -875,17 +878,17 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return {@code true} if successful, otherwise {@code false} if the
      * witness value was not the same as the {@code expectedValue} or if this
      * operation spuriously failed.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -904,7 +907,7 @@
      * <p>This operation may fail spuriously (typically, due to memory
      * contention) even if the witness value does match the expected value.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * weakCompareAndSetAcquire}
@@ -913,17 +916,17 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return {@code true} if successful, otherwise {@code false} if the
      * witness value was not the same as the {@code expectedValue} or if this
      * operation spuriously failed.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #getAcquire(Object...)
      */
@@ -942,7 +945,7 @@
      * <p>This operation may fail spuriously (typically, due to memory
      * contention) even if the witness value does match the expected value.
      *
-     * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
      * weakCompareAndSetRelease}
@@ -951,17 +954,17 @@
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T expectedValue, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T expectedValue, T newValue)}
      * , statically represented using varargs.
      * @return {@code true} if successful, otherwise {@code false} if the
      * witness value was not the same as the {@code expectedValue} or if this
      * operation spuriously failed.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setRelease(Object...)
      * @see #get(Object...)
      */
@@ -976,7 +979,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #getVolatile}.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndSet}
      * must match the access mode type that is the result of calling
@@ -984,17 +987,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1009,7 +1012,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #getAcquire}.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire}
      * must match the access mode type that is the result of calling
@@ -1017,17 +1020,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1042,7 +1045,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #get}.
      *
-     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T newValue)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease}
      * must match the access mode type that is the result of calling
@@ -1050,17 +1053,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T newValue)}
+     * {@code (CT1 ct1, ..., CTn ctn, T newValue)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1078,7 +1081,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #getVolatile}.
      *
-     * <p>The method signature is of the form {@code (CT, T value)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndAdd}
      * must match the access mode type that is the result of calling
@@ -1086,17 +1089,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T value)}
+     * {@code (CT1 ct1, ..., CTn ctn, T value)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1111,7 +1114,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #getAcquire}.
      *
-     * <p>The method signature is of the form {@code (CT, T value)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire}
      * must match the access mode type that is the result of calling
@@ -1119,17 +1122,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T value)}
+     * {@code (CT1 ct1, ..., CTn ctn, T value)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1144,7 +1147,7 @@
      * previous value, as accessed with the memory semantics of
      * {@link #get}.
      *
-     * <p>The method signature is of the form {@code (CT, T value)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T value)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease}
      * must match the access mode type that is the result of calling
@@ -1152,17 +1155,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T value)}
+     * {@code (CT1 ct1, ..., CTn ctn, T value)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1185,7 +1188,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical OR is performed instead of a bitwise OR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr}
      * must match the access mode type that is the result of calling
@@ -1193,17 +1196,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1222,7 +1225,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical OR is performed instead of a bitwise OR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire}
      * must match the access mode type that is the result of calling
@@ -1230,17 +1233,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #getAcquire(Object...)
      */
@@ -1259,7 +1262,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical OR is performed instead of a bitwise OR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease}
      * must match the access mode type that is the result of calling
@@ -1267,17 +1270,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setRelease(Object...)
      * @see #get(Object...)
      */
@@ -1296,7 +1299,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical AND is performed instead of a bitwise AND.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd}
      * must match the access mode type that is the result of calling
@@ -1304,17 +1307,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1333,7 +1336,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical AND is performed instead of a bitwise AND.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire}
      * must match the access mode type that is the result of calling
@@ -1341,17 +1344,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #getAcquire(Object...)
      */
@@ -1370,7 +1373,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical AND is performed instead of a bitwise AND.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease}
      * must match the access mode type that is the result of calling
@@ -1378,17 +1381,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setRelease(Object...)
      * @see #get(Object...)
      */
@@ -1407,7 +1410,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical XOR is performed instead of a bitwise XOR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor}
      * must match the access mode type that is the result of calling
@@ -1415,17 +1418,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setVolatile(Object...)
      * @see #getVolatile(Object...)
      */
@@ -1444,7 +1447,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical XOR is performed instead of a bitwise XOR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire}
      * must match the access mode type that is the result of calling
@@ -1452,17 +1455,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #set(Object...)
      * @see #getAcquire(Object...)
      */
@@ -1481,7 +1484,7 @@
      * <p>If the variable type is the non-integral {@code boolean} type then a
      * logical XOR is performed instead of a bitwise XOR.
      *
-     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     * <p>The method signature is of the form {@code (CT1 ct1, ..., CTn ctn, T mask)T}.
      *
      * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease}
      * must match the access mode type that is the result of calling
@@ -1489,17 +1492,17 @@
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
-     * {@code (CT, T mask)}
+     * {@code (CT1 ct1, ..., CTn ctn, T mask)}
      * , statically represented using varargs.
      * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
      * for this VarHandle.
-     * @throws WrongMethodTypeException if the access mode type is not
-     * compatible with the caller's symbolic type descriptor.
-     * @throws ClassCastException if the access mode type is compatible with the
-     * caller's symbolic type descriptor, but a reference cast fails.
+     * @throws WrongMethodTypeException if the access mode type does not
+     * match the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type matches the caller's
+     * symbolic type descriptor, but a reference cast fails.
      * @see #setRelease(Object...)
      * @see #get(Object...)
      */
@@ -1790,7 +1793,7 @@
 
         /**
          * Returns the {@code VarHandle} signature-polymorphic method name
-         * associated with this {@code AccessMode} value
+         * associated with this {@code AccessMode} value.
          *
          * @return the signature-polymorphic method name
          * @see #valueFromMethodName
@@ -1861,14 +1864,13 @@
     }
 
     /**
-     * Obtains the canonical access mode type for this VarHandle and a given
-     * access mode.
+     * Obtains the access mode type for this VarHandle and a given access mode.
      *
      * <p>The access mode type's parameter types will consist of a prefix that
      * is the coordinate types of this VarHandle followed by further
-     * types as defined by the access mode's method.
+     * types as defined by the access mode method.
      * The access mode type's return type is defined by the return type of the
-     * access mode's method.
+     * access mode method.
      *
      * @param accessMode the access mode, corresponding to the
      * signature-polymorphic method of the same name
@@ -1891,7 +1893,7 @@
      *
      * <p>The return of a {@code false} value for a given access mode indicates
      * that an {@code UnsupportedOperationException} is thrown on invocation
-     * of the corresponding access mode's signature-polymorphic method.
+     * of the corresponding access mode method.
      *
      * @param accessMode the access mode, corresponding to the
      * signature-polymorphic method of the same name
@@ -1908,7 +1910,7 @@
      *
      * @apiNote This method, for a VarHandle {@code vh} and access mode
      * {@code {access-mode}}, returns a method handle that is equivalent to
-     * method handle {@code bhm} in the following code (though it may be more
+     * method handle {@code bmh} in the following code (though it may be more
      * efficient):
      * <pre>{@code
      * MethodHandle mh = MethodHandles.varHandleExactInvoker(
--- a/src/java.base/share/classes/java/lang/module/Configuration.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/module/Configuration.java	Fri May 12 10:43:28 2017 -0700
@@ -109,20 +109,17 @@
     private final Set<ResolvedModule> modules;
     private final Map<String, ResolvedModule> nameToModule;
 
-    // module constraints on target
-    private final String osName;
-    private final String osArch;
+    // constraint on target platform
+    private final String targetPlatform;
 
-    String osName() { return osName; }
-    String osArch() { return osArch; }
+    String targetPlatform() { return targetPlatform; }
 
     private Configuration() {
         this.parents = Collections.emptyList();
         this.graph = Collections.emptyMap();
         this.modules = Collections.emptySet();
         this.nameToModule = Collections.emptyMap();
-        this.osName = null;
-        this.osArch = null;
+        this.targetPlatform = null;
     }
 
     private Configuration(List<Configuration> parents,
@@ -147,8 +144,7 @@
         this.modules = Set.of(moduleArray);
         this.nameToModule = Map.ofEntries(nameEntries);
 
-        this.osName = resolver.osName();
-        this.osArch = resolver.osArch();
+        this.targetPlatform = resolver.targetPlatform();
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Fri May 12 10:43:28 2017 -0700
@@ -99,6 +99,7 @@
      *
      * @see ModuleDescriptor#modifiers()
      * @since 9
+     * @spec JPMS
      */
     public static enum Modifier {
         /**
--- a/src/java.base/share/classes/java/lang/module/ModuleFinder.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/module/ModuleFinder.java	Fri May 12 10:43:28 2017 -0700
@@ -286,8 +286,9 @@
      *     class names of provider classes. </p></li>
      *
      *     <li><p> If the JAR file has a {@code Main-Class} attribute in its
-     *     main manifest then its value is the module {@link
-     *     ModuleDescriptor#mainClass() main class}. </p></li>
+     *     main manifest, its value is a legal class name, and its package is
+     *     in the set of packages derived for the module, then the value is the
+     *     module {@linkplain ModuleDescriptor#mainClass() main class}. </p></li>
      *
      * </ul>
      *
@@ -298,8 +299,7 @@
      * file, where the JAR file contains a {@code .class} in the top-level
      * directory of the JAR file, where an entry in a service configuration
      * file is not a legal class name or its package name is not in the set of
-     * packages derived for the module, or where the module main class is not
-     * a legal class name or its package is not in the module. </p>
+     * packages derived for the module. </p>
      *
      * <p> In addition to JAR files, an implementation may also support modules
      * that are packaged in other implementation specific module formats. If
--- a/src/java.base/share/classes/java/lang/module/Resolver.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/module/Resolver.java	Fri May 12 10:43:28 2017 -0700
@@ -28,6 +28,7 @@
 import java.io.PrintStream;
 import java.lang.module.ModuleDescriptor.Provides;
 import java.lang.module.ModuleDescriptor.Requires.Modifier;
+import java.net.URI;
 import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -38,10 +39,8 @@
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
-import java.util.StringJoiner;
 import java.util.stream.Collectors;
 
 import jdk.internal.module.ModuleHashes;
@@ -69,12 +68,10 @@
     // true if all automatic modules have been found
     private boolean haveAllAutomaticModules;
 
-    // module constraints on target platform
-    private String osName;
-    private String osArch;
+    // constraint on target platform
+    private String targetPlatform;
 
-    String osName() { return osName; }
-    String osArch() { return osArch; }
+    String targetPlatform() { return targetPlatform; }
 
     /**
      * @throws IllegalArgumentException if there are more than one parent and
@@ -89,37 +86,23 @@
         this.afterFinder = afterFinder;
         this.traceOutput = traceOutput;
 
-        // record constraints on target platform, checking that they don't conflict
+        // record constraint on target platform, checking for conflicts
         for (Configuration parent : parents) {
-            String value = parent.osName();
+            String value = parent.targetPlatform();
             if (value != null) {
-                if (osName == null) {
-                    osName = value;
+                if (targetPlatform == null) {
+                    targetPlatform = value;
                 } else {
-                    if (!value.equals(osName)) {
-                        failParentConflict("Operating System", osName, value);
-                    }
-                }
-            }
-            value = parent.osArch();
-            if (value != null) {
-                if (osArch == null) {
-                    osArch = value;
-                } else {
-                    if (!value.equals(osArch)) {
-                        failParentConflict("OS architecture", osArch, value);
+                    if (!value.equals(targetPlatform)) {
+                        String msg = "Parents have conflicting constraints on target" +
+                                     "  platform: " + targetPlatform + ", " + value;
+                        throw new IllegalArgumentException(msg);
                     }
                 }
             }
         }
     }
 
-    private void failParentConflict(String constraint, String s1, String s2) {
-        String msg = "Parents have conflicting constraints on target "
-                     + constraint + ": " + s1 + ", " + s2;
-        throw new IllegalArgumentException(msg);
-    }
-
     /**
      * Resolves the given named modules.
      *
@@ -147,8 +130,7 @@
             }
 
             if (isTracing()) {
-                trace("Root module %s located", root);
-                mref.location().ifPresent(uri -> trace("  (%s)", uri));
+                trace("root %s", nameAndInfo(mref));
             }
 
             addFoundModule(mref);
@@ -180,9 +162,7 @@
                     ModuleDescriptor other = mref.descriptor();
                     q.offer(other);
                     if (isTracing()) {
-                        trace("Automatic module %s located, required by %s",
-                              other.name(), descriptor.name());
-                        mref.location().ifPresent(uri -> trace("  (%s)", uri));
+                        trace("%s requires %s", descriptor.name(), nameAndInfo(mref));
                     }
                 });
                 haveAllAutomaticModules = true;
@@ -213,21 +193,13 @@
                     }
                 }
 
+                if (isTracing() && !dn.equals("java.base")) {
+                    trace("%s requires %s", descriptor.name(), nameAndInfo(mref));
+                }
+
                 if (!nameToReference.containsKey(dn)) {
                     addFoundModule(mref);
                     q.offer(mref.descriptor());
-
-                    if (isTracing()) {
-                        String prefix;
-                        if (mref.descriptor().isAutomatic()) {
-                            prefix = "Automatic module";
-                        } else {
-                            prefix = "Module";
-                        }
-                        trace(prefix + " %s located, required by %s",
-                              dn, descriptor.name());
-                        mref.location().ifPresent(uri -> trace("  (%s)", uri));
-                    }
                 }
 
             }
@@ -291,6 +263,13 @@
         do {
             for (ModuleDescriptor descriptor : candidateConsumers) {
                 if (!descriptor.uses().isEmpty()) {
+
+                    // the modules that provide at least one service
+                    Set<ModuleDescriptor> modulesToBind = null;
+                    if (isTracing()) {
+                        modulesToBind = new HashSet<>();
+                    }
+
                     for (String service : descriptor.uses()) {
                         Set<ModuleReference> mrefs = availableProviders.get(service);
                         if (mrefs != null) {
@@ -298,15 +277,13 @@
                                 ModuleDescriptor provider = mref.descriptor();
                                 if (!provider.equals(descriptor)) {
 
-                                    trace("Module %s provides %s, used by %s",
-                                            provider.name(), service, descriptor.name());
+                                    if (isTracing() && modulesToBind.add(provider)) {
+                                        trace("%s binds %s", descriptor.name(),
+                                                nameAndInfo(mref));
+                                    }
 
                                     String pn = provider.name();
                                     if (!nameToReference.containsKey(pn)) {
-                                        if (isTracing()) {
-                                            mref.location()
-                                                .ifPresent(uri -> trace("  (%s)", uri));
-                                        }
                                         addFoundModule(mref);
                                         q.push(provider);
                                     }
@@ -349,59 +326,31 @@
         if (mref instanceof ModuleReferenceImpl) {
             ModuleTarget target = ((ModuleReferenceImpl)mref).moduleTarget();
             if (target != null)
-                checkTargetConstraints(mn, target);
+                checkTargetPlatform(mn, target);
         }
 
         nameToReference.put(mn, mref);
     }
 
     /**
-     * Check that the module's constraints on the target platform do not
-     * conflict with the constraints of other modules resolved so far or
-     * modules in parent configurations.
+     * Check that the module's constraints on the target platform does
+     * conflict with the constraint of other modules resolved so far.
      */
-    private void checkTargetConstraints(String mn, ModuleTarget target) {
-        String value = target.osName();
+    private void checkTargetPlatform(String mn, ModuleTarget target) {
+        String value = target.targetPlatform();
         if (value != null) {
-            if (osName == null) {
-                osName = value;
+            if (targetPlatform == null) {
+                targetPlatform = value;
             } else {
-                if (!value.equals(osName)) {
-                    failTargetConstraint(mn, target);
-                }
-            }
-        }
-        value = target.osArch();
-        if (value != null) {
-            if (osArch == null) {
-                osArch = value;
-            } else {
-                if (!value.equals(osArch)) {
-                    failTargetConstraint(mn, target);
+                if (!value.equals(targetPlatform)) {
+                    findFail("Module %s has constraints on target platform (%s)"
+                             + " that conflict with other modules: %s", mn,
+                             value, targetPlatform);
                 }
             }
         }
     }
 
-    private void failTargetConstraint(String mn, ModuleTarget target) {
-        String s1 = targetAsString(osName, osArch);
-        String s2 = targetAsString(target.osName(), target.osArch());
-        findFail("Module %s has constraints on target platform (%s) that"
-                 + " conflict with other modules: %s", mn, s1, s2);
-    }
-
-    private String targetAsString(ModuleTarget target) {
-        return targetAsString(target.osName(), target.osArch());
-    }
-
-    private String targetAsString(String osName, String osArch) {
-        return new StringJoiner("-")
-                .add(Objects.toString(osName, "*"))
-                .add(Objects.toString(osArch, "*"))
-                .toString();
-    }
-
-
     /**
      * Execute post-resolution checks and returns the module graph of resolved
      * modules as {@code Map}. The resolved modules will be in the given
@@ -412,12 +361,6 @@
     Map<ResolvedModule, Set<ResolvedModule>> finish(Configuration cf,
                                                     boolean check)
     {
-        if (isTracing()) {
-            trace("Result:");
-            Set<String> names = nameToReference.keySet();
-            names.stream().sorted().forEach(name -> trace("  %s", name));
-        }
-
         if (check) {
             detectCycles();
             checkHashes();
@@ -520,9 +463,8 @@
                     findFail("Unable to compute the hash of module %s", dn);
                 }
 
-                // skip checking the hash if the module has been patched
                 ModuleReferenceImpl other = (ModuleReferenceImpl)mref2;
-                if (other != null && !other.isPatched()) {
+                if (other != null) {
                     byte[] recordedHash = hashes.hashFor(dn);
                     byte[] actualHash = other.computeHash(algorithm);
                     if (actualHash == null)
@@ -965,9 +907,17 @@
 
     private void trace(String fmt, Object ... args) {
         if (traceOutput != null) {
-            traceOutput.format("[Resolver] " + fmt, args);
+            traceOutput.format(fmt, args);
             traceOutput.println();
         }
     }
 
+    private String nameAndInfo(ModuleReference mref) {
+        ModuleDescriptor descriptor = mref.descriptor();
+        StringBuilder sb = new StringBuilder(descriptor.name());
+        mref.location().ifPresent(uri -> sb.append(" " + uri));
+        if (descriptor.isAutomatic())
+            sb.append(" automatic");
+        return sb.toString();
+    }
 }
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -105,10 +105,13 @@
  * <p>The table below summarizes which kind of annotation presence
  * different methods in this interface examine.
  *
- * <table border>
+ * <table class="plain">
  * <caption>Overview of kind of presence detected by different AnnotatedElement methods</caption>
+ * <thead>
  * <tr><th colspan=2></th><th colspan=4>Kind of Presence</th>
  * <tr><th colspan=2>Method</th><th>Directly Present</th><th>Indirectly Present</th><th>Present</th><th>Associated</th>
+ * </thead>
+ * <tbody>
  * <tr><td style="text-align:right">{@code T}</td><td>{@link #getAnnotation(Class) getAnnotation(Class&lt;T&gt;)}
  * <td></td><td></td><td>X</td><td></td>
  * </tr>
@@ -127,6 +130,7 @@
  * <tr><td style="text-align:right">{@code T[]}</td><td>{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class&lt;T&gt;)}
  * <td>X</td><td>X</td><td></td><td></td>
  * </tr>
+ * </tbody>
  * </table>
  *
  * <p>For an invocation of {@code get[Declared]AnnotationsByType( Class <
--- a/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/ReflectPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -32,12 +32,16 @@
  * provides a summary description of what the permission allows,
  * and discusses the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="Table shows permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">Table shows permission target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  *
  * <tr>
  *   <td>suppressAccessChecks</td>
@@ -58,6 +62,7 @@
  *       help in its attempt to compromise security in the system.</td>
  * </tr>
  *
+ * </tbody>
  * </table>
  *
  * @see java.security.Permission
--- a/src/java.base/share/classes/java/math/BigDecimal.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/math/BigDecimal.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -120,15 +120,19 @@
  * preferred scale for representing a result.  The preferred
  * scale for each operation is listed in the table below.
  *
- * <table border>
+ * <table class="plain">
  * <caption><b>Preferred Scales for Results of Arithmetic Operations
  * </b></caption>
+ * <thead>
  * <tr><th>Operation</th><th>Preferred Scale of Result</th></tr>
+ * </thead>
+ * <tbody>
  * <tr><td>Add</td><td>max(addend.scale(), augend.scale())</td>
  * <tr><td>Subtract</td><td>max(minuend.scale(), subtrahend.scale())</td>
  * <tr><td>Multiply</td><td>multiplier.scale() + multiplicand.scale()</td>
  * <tr><td>Divide</td><td>dividend.scale() - divisor.scale()</td>
  * <tr><td>Square root</td><td>radicand.scale()/2</td>
+ * </tbody>
  * </table>
  *
  * These scales are the ones used by the methods which return exact
--- a/src/java.base/share/classes/java/math/RoundingMode.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/math/RoundingMode.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -51,8 +51,9 @@
  * proper {@code MathContext}.  A summary table showing the results
  * of these rounding operations for all rounding modes appears below.
  *
- *<table border>
+ *<table class="plain">
  * <caption><b>Summary of Rounding Operations Under Different Rounding Modes</b></caption>
+ * <thead>
  * <tr><th></th><th colspan=8>Result of rounding input to one digit with the given
  *                           rounding mode</th>
  * <tr style="vertical-align:top">
@@ -64,6 +65,8 @@
  *                                                                                                   <th>{@code HALF_DOWN}</th>
  *                                                                                                                    <th>{@code HALF_EVEN}</th>
  *                                                                                                                                     <th>{@code UNNECESSARY}</th>
+ * </thead>
+ * <tbody>
  *
  * <tr style="text-align:right"><td>5.5</td>  <td>6</td>  <td>5</td>    <td>6</td>    <td>5</td>  <td>6</td>      <td>5</td>       <td>6</td>       <td>throw {@code ArithmeticException}</td>
  * <tr style="text-align:right"><td>2.5</td>  <td>3</td>  <td>2</td>    <td>3</td>    <td>2</td>  <td>3</td>      <td>2</td>       <td>2</td>       <td>throw {@code ArithmeticException}</td>
@@ -75,7 +78,8 @@
  * <tr style="text-align:right"><td>-1.6</td> <td>-2</td> <td>-1</td>   <td>-1</td>   <td>-2</td> <td>-2</td>     <td>-2</td>      <td>-2</td>      <td>throw {@code ArithmeticException}</td>
  * <tr style="text-align:right"><td>-2.5</td> <td>-3</td> <td>-2</td>   <td>-2</td>   <td>-3</td> <td>-3</td>     <td>-2</td>      <td>-2</td>      <td>throw {@code ArithmeticException}</td>
  * <tr style="text-align:right"><td>-5.5</td> <td>-6</td> <td>-5</td>   <td>-5</td>   <td>-6</td> <td>-6</td>     <td>-5</td>      <td>-6</td>      <td>throw {@code ArithmeticException}</td>
- *</table>
+ * </tbody>
+ * </table>
  *
  *
  * <p>This {@code enum} is intended to replace the integer-based
@@ -100,10 +104,13 @@
          * value.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode UP Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code UP} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>6</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>3</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>2</td>
@@ -114,6 +121,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
+         *</tbody>
          *</table>
          */
     UP(BigDecimal.ROUND_UP),
@@ -124,10 +132,13 @@
          * rounding mode never increases the magnitude of the calculated value.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode DOWN Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code DOWN} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>5</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>2</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>1</td>
@@ -138,6 +149,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-1</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
+         *</tbody>
          *</table>
          */
     DOWN(BigDecimal.ROUND_DOWN),
@@ -149,10 +161,13 @@
          * that this rounding mode never decreases the calculated value.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode CEILING Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code CEILING} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>6</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>3</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>2</td>
@@ -163,6 +178,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-1</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
+         *</tbody>
          *</table>
          */
     CEILING(BigDecimal.ROUND_CEILING),
@@ -174,10 +190,13 @@
          * this rounding mode never increases the calculated value.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode FLOOR Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code FLOOR} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>5</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>2</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>1</td>
@@ -188,6 +207,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
+         *</tbody>
          *</table>
          */
     FLOOR(BigDecimal.ROUND_FLOOR),
@@ -201,10 +221,13 @@
          * mode commonly taught at school.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode HALF_UP Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code HALF_UP} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>6</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>3</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>2</td>
@@ -215,6 +238,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-3</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
+         *</tbody>
          *</table>
          */
     HALF_UP(BigDecimal.ROUND_HALF_UP),
@@ -227,10 +251,13 @@
          * {@code RoundingMode.DOWN}.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode HALF_DOWN Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code HALF_DOWN} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>5</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>2</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>2</td>
@@ -241,6 +268,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-5</td>
+         *</tbody>
          *</table>
          */
     HALF_DOWN(BigDecimal.ROUND_HALF_DOWN),
@@ -260,10 +288,13 @@
          * arithmetic in Java.
          *
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode HALF_EVEN Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code HALF_EVEN} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>6</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>2</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>2</td>
@@ -274,6 +305,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>-2</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>-2</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>-6</td>
+         *</tbody>
          *</table>
          */
     HALF_EVEN(BigDecimal.ROUND_HALF_EVEN),
@@ -284,10 +316,13 @@
          * specified on an operation that yields an inexact result, an
          * {@code ArithmeticException} is thrown.
          *<p>Example:
-         *<table border>
+         *<table class="plain">
          * <caption><b>Rounding mode UNNECESSARY Examples</b></caption>
+         *<thead>
          *<tr style="vertical-align:top"><th>Input Number</th>
          *    <th>Input rounded to one digit<br> with {@code UNNECESSARY} rounding
+         *</thead>
+         *<tbody>
          *<tr style="text-align:right"><td>5.5</td>  <td>throw {@code ArithmeticException}</td>
          *<tr style="text-align:right"><td>2.5</td>  <td>throw {@code ArithmeticException}</td>
          *<tr style="text-align:right"><td>1.6</td>  <td>throw {@code ArithmeticException}</td>
@@ -298,6 +333,7 @@
          *<tr style="text-align:right"><td>-1.6</td> <td>throw {@code ArithmeticException}</td>
          *<tr style="text-align:right"><td>-2.5</td> <td>throw {@code ArithmeticException}</td>
          *<tr style="text-align:right"><td>-5.5</td> <td>throw {@code ArithmeticException}</td>
+         *</tbody>
          *</table>
          */
     UNNECESSARY(BigDecimal.ROUND_UNNECESSARY);
--- a/src/java.base/share/classes/java/net/HttpURLConnection.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/HttpURLConnection.java	Fri May 12 10:43:28 2017 -0700
@@ -54,7 +54,7 @@
  * <b>Security permissions</b>
  * <p>
  * If a security manager is installed, and if a method is called which results in an
- * attempt to open a connection, the caller must possess either:-
+ * attempt to open a connection, the caller must possess either:
  * <ul><li>a "connect" {@link SocketPermission} to the host/port combination of the
  * destination URL or</li>
  * <li>a {@link URLPermission} that permits this request.</li>
--- a/src/java.base/share/classes/java/net/Inet4Address.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/Inet4Address.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -41,12 +41,12 @@
  * Textual representation of IPv4 address used as input to methods
  * takes one of the following forms:
  *
- * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td>{@code d.d.d.d}</td></tr>
- * <tr><td>{@code d.d.d}</td></tr>
- * <tr><td>{@code d.d}</td></tr>
- * <tr><td>{@code d}</td></tr>
- * </table></blockquote>
+ * <blockquote><ul style="list-style-type:none">
+ * <li>{@code d.d.d.d}</li>
+ * <li>{@code d.d.d}</li>
+ * <li>{@code d.d}</li>
+ * <li>{@code d}</li>
+ * </ul></blockquote>
  *
  * <p> When four parts are specified, each is interpreted as a byte of
  * data and assigned, from left to right, to the four bytes of an IPv4
--- a/src/java.base/share/classes/java/net/Inet6Address.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/Inet6Address.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -49,9 +49,9 @@
  *   the hexadecimal values of the eight 16-bit pieces of the
  *   address. This is the full form.  For example,
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code 1080:0:0:0:8:800:200C:417A}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code 1080:0:0:0:8:800:200C:417A}</li>
+ *   </ul></blockquote>
  *
  *   <p> Note that it is not necessary to write the leading zeros in
  *   an individual field. However, there must be at least one numeral
@@ -66,9 +66,9 @@
  *   The "::" can also be used to compress the leading and/or trailing
  *   zeros in an address. For example,
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code 1080::8:800:200C:417A}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code 1080::8:800:200C:417A}</li>
+ *   </ul></blockquote>
  *
  *   <li><p> An alternative form that is sometimes more convenient
  *   when dealing with a mixed environment of IPv4 and IPv6 nodes is
@@ -77,35 +77,35 @@
  *   are the decimal values of the four low-order 8-bit pieces of the
  *   standard IPv4 representation address, for example,
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code ::FFFF:129.144.52.38}<td></tr>
- *   <tr><td>{@code ::129.144.52.38}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code ::FFFF:129.144.52.38}</li>
+ *   <li>{@code ::129.144.52.38}</li>
+ *   </ul></blockquote>
  *
  *   <p> where "::FFFF:d.d.d.d" and "::d.d.d.d" are, respectively, the
  *   general forms of an IPv4-mapped IPv6 address and an
  *   IPv4-compatible IPv6 address. Note that the IPv4 portion must be
  *   in the "d.d.d.d" form. The following forms are invalid:
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code ::FFFF:d.d.d}<td></tr>
- *   <tr><td>{@code ::FFFF:d.d}<td></tr>
- *   <tr><td>{@code ::d.d.d}<td></tr>
- *   <tr><td>{@code ::d.d}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code ::FFFF:d.d.d}</li>
+ *   <li>{@code ::FFFF:d.d}</li>
+ *   <li>{@code ::d.d.d}</li>
+ *   <li>{@code ::d.d}</li>
+ *   </ul></blockquote>
  *
  *   <p> The following form:
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code ::FFFF:d}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code ::FFFF:d}</li>
+ *   </ul></blockquote>
  *
  *   <p> is valid, however it is an unconventional representation of
  *   the IPv4-compatible IPv6 address,
  *
- *   <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- *   <tr><td>{@code ::255.255.0.d}<td></tr>
- *   </table></blockquote>
+ *   <blockquote><ul style="list-style-type:none">
+ *   <li>{@code ::255.255.0.d}</li>
+ *   </ul></blockquote>
  *
  *   <p> while "::d" corresponds to the general IPv6 address
  *   "0:0:0:0:0:0:0:d".</li>
@@ -119,9 +119,10 @@
  * <h4> Special IPv6 address </h4>
  *
  * <blockquote>
- * <table cellspacing=2 summary="Description of IPv4-mapped address">
- * <tr><th valign=top><i>IPv4-mapped address</i></th>
- *         <td>Of the form::ffff:w.x.y.z, this IPv6 address is used to
+ * <table class="borderless">
+ * <caption style="display:none">Description of IPv4-mapped address</caption>
+ * <tr><th style="vertical-align:top; padding-right:2px"><i>IPv4-mapped address</i></th>
+ *         <td>Of the form ::ffff:w.x.y.z, this IPv6 address is used to
  *         represent an IPv4 address. It allows the native program to
  *         use the same address data structure and also the same
  *         socket when communicating with both IPv4 and IPv6 nodes.
--- a/src/java.base/share/classes/java/net/InetAddress.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -72,7 +72,9 @@
  *
  * <h3> Address types </h3>
  *
- * <blockquote><table cellspacing=2 summary="Description of unicast and multicast address types">
+ * <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>
  *       <td>An identifier for a single interface. A packet sent to
  *         a unicast address is delivered to the interface identified by
@@ -96,6 +98,7 @@
  *       <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>
+ * </tbody>
  * </table></blockquote>
  *
  * <h4> IP address scope </h4>
--- a/src/java.base/share/classes/java/net/NetPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/NetPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -47,12 +47,16 @@
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="Permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">Permission target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  * <tr>
  *   <td>allowHttpTrace</td>
  *   <td>The ability to use the HTTP TRACE method in HttpURLConnection.</td>
@@ -151,6 +155,7 @@
  *   creating a ProtectionDomain/CodeSource for a class even though
  *   that class really didn't come from that location.</td>
  * </tr>
+   </tbody>
  * </table>
  *
  * @see java.security.BasicPermission
--- a/src/java.base/share/classes/java/net/URI.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/URI.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -83,11 +83,11 @@
  * not begin with a slash character ({@code '/'}).  Opaque URIs are not
  * subject to further parsing.  Some examples of opaque URIs are:
  *
- * <blockquote><table cellpadding=0 cellspacing=0 summary="layout">
- * <tr><td>{@code mailto:java-net@java.sun.com}<td></tr>
- * <tr><td>{@code news:comp.lang.java}<td></tr>
- * <tr><td>{@code urn:isbn:096139210x}</td></tr>
- * </table></blockquote>
+ * <blockquote><ul style="list-style-type:none">
+ * <li>{@code mailto:java-net@java.sun.com}</li>
+ * <li>{@code news:comp.lang.java}</li>
+ * <li>{@code urn:isbn:096139210x}</li>
+ * </ul></blockquote>
  *
  * <p> A <i>hierarchical</i> URI is either an absolute URI whose
  * scheme-specific part begins with a slash character, or a relative URI, that
@@ -132,8 +132,12 @@
  *
  * <p> All told, then, a URI instance has the following nine components:
  *
- * <blockquote><table summary="Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment">
+ * <blockquote><table class="borderless">
+ * <caption style="display:none">Describes the components of a URI:scheme,scheme-specific-part,authority,user-info,host,port,path,query,fragment</caption>
+ * <thead>
  * <tr><th><i>Component</i></th><th><i>Type</i></th></tr>
+ * </thead>
+ * <tbody>
  * <tr><td>scheme</td><td>{@code String}</td></tr>
  * <tr><td>scheme-specific-part&nbsp;&nbsp;&nbsp;&nbsp;</td><td>{@code String}</td></tr>
  * <tr><td>authority</td><td>{@code String}</td></tr>
@@ -143,6 +147,7 @@
  * <tr><td>path</td><td>{@code String}</td></tr>
  * <tr><td>query</td><td>{@code String}</td></tr>
  * <tr><td>fragment</td><td>{@code String}</td></tr>
+ * </tbody>
  * </table></blockquote>
  *
  * In a given instance any particular component is either <i>undefined</i> or
@@ -248,7 +253,9 @@
  * which are taken from that specification, are used below to describe these
  * constraints:
  *
- * <blockquote><table cellspacing=2 summary="Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other">
+ * <blockquote><table>
+ * <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>
  *       <td>The US-ASCII alphabetic characters,
  *        {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
@@ -279,6 +286,7 @@
  *           java.lang.Character#isSpaceChar(char) Character.isSpaceChar}
  *           method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is
  *           limited to US-ASCII)</i></td></tr>
+ * </tbody>
  * </table></blockquote>
  *
  * <p><a id="legal-chars"></a> The set of all legal URI characters consists of
--- a/src/java.base/share/classes/java/net/URLConnection.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/URLConnection.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -54,13 +54,18 @@
  * read from and to write to the resource referenced by the URL. In
  * general, creating a connection to a URL is a multistep process:
  *
- * <div style="text-align:center"><table style="margin:0 auto" border=2 summary="Describes the process of creating a connection to a URL: openConnection() and connect() over time.">
+ * <div style="text-align:center"><table class="plain" style="margin:0 auto">
+ * <caption style="display:none">Describes the process of creating a connection to a URL: openConnection() and connect() over time.</caption>
+ * <thead>
  * <tr><th>{@code openConnection()}</th>
  *     <th>{@code connect()}</th></tr>
+ * </thead>
+ * <tbody>
  * <tr><td>Manipulate parameters that affect the connection to the remote
  *         resource.</td>
  *     <td>Interact with the resource; query header fields and
  *         contents.</td></tr>
+ * </tbody>
  * </table>
  * ----------------------------&gt;
  * <br>time</div>
--- a/src/java.base/share/classes/java/net/URLPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/net/URLPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -72,9 +72,12 @@
  * separated by '/' characters. <i>path</i> may also be empty. The path is specified
  * in a similar way to the path in {@link java.io.FilePermission}. There are
  * three different ways as the following examples show:
- * <table border>
+ * <table class="plain">
  * <caption>URL Examples</caption>
+ * <thead>
  * <tr><th>Example url</th><th>Description</th></tr>
+ * </thead>
+ * <tbody>
  * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
  *   <td>A url which identifies a specific (single) resource</td>
  * </tr>
@@ -90,6 +93,7 @@
  *       example).
  *   </td>
  * </tr>
+ * </tbody>
  * </table>
  * <p>
  * The '*' and '-' may only be specified in the final segment of a path and must be
@@ -246,9 +250,12 @@
      * <li>otherwise, return false</li>
      * </ul>
      * <p>Some examples of how paths are matched are shown below:
-     * <table border>
+     * <table class="plain">
      * <caption>Examples of Path Matching</caption>
+     * <thead>
      * <tr><th>this's path</th><th>p's path</th><th>match</th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td>/a/b</td><td>/a/b</td><td>yes</td></tr>
      * <tr><td>/a/b/*</td><td>/a/b/c</td><td>yes</td></tr>
      * <tr><td>/a/b/*</td><td>/a/b/c/d</td><td>no</td></tr>
@@ -256,6 +263,7 @@
      * <tr><td>/a/b/-</td><td>/a/b/c/d/e</td><td>yes</td></tr>
      * <tr><td>/a/b/-</td><td>/a/b/c/*</td><td>yes</td></tr>
      * <tr><td>/a/b/*</td><td>/a/b/c/-</td><td>no</td></tr>
+     * </tbody>
      * </table>
      */
     public boolean implies(Permission p) {
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousChannelGroup.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -60,11 +60,15 @@
  * default group is not configured then the pooled threads of the default group
  * are {@link Thread#isDaemon daemon} threads.
  *
- * <table border summary="System properties">
+ * <table class="striped">
+ * <caption style="display:none:">System properties</caption>
+ *   <thead>
  *   <tr>
  *     <th>System property</th>
  *     <th>Description</th>
  *   </tr>
+ *   </thead>
+ *   <tbody>
  *   <tr>
  *     <td> {@code java.nio.channels.DefaultThreadPool.threadFactory} </td>
  *     <td> The value of this property is taken to be the fully-qualified name
@@ -86,6 +90,7 @@
  *     unspecified error to be thrown during the construction of the default
  *     group. </td>
  *   </tr>
+ *   </tbody>
  * </table>
  *
  * <a id="threading"></a><h2>Threading</h2>
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -133,8 +133,12 @@
      * <p> In addition to {@code READ} and {@code WRITE}, the following options
      * may be present:
      *
-     * <table border=1 cellpadding=5 summary="">
+     * <table class="striped">
+     * <caption style="display:none">additional options</caption>
+     * <thead>
      * <tr> <th>Option</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} </td>
      *   <td> When opening an existing file, the file is first truncated to a
@@ -186,6 +190,7 @@
      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
      *   integrity</a>). </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * <p> An implementation may also support additional options.
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -52,11 +52,15 @@
  * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
  * setOption} method. Channels of this type support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped">
+ * <caption style="display:none">Socket options</caption>
+ * <thead>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} </td>
  *     <td> The size of the socket receive buffer </td>
@@ -65,6 +69,7 @@
  *     <td> {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} </td>
  *     <td> Re-use address </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  * Additional (implementation specific) options may also be supported.
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousSocketChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -62,11 +62,15 @@
  * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
  * setOption} method. Asynchronous socket channels support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped">
+ * <caption style="display:none">Socket options</caption>
+ * <thead>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} </td>
  *     <td> The size of the socket send buffer </td>
@@ -87,6 +91,7 @@
  *     <td> {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} </td>
  *     <td> Disable the Nagle algorithm </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  * Additional (implementation specific) options may also be supported.
--- a/src/java.base/share/classes/java/nio/channels/DatagramChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/DatagramChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,11 +57,15 @@
  * setOption} method. A datagram channel to an Internet Protocol socket supports
  * the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped">
+ * <caption style="display:none">Socket options</caption>
+ * <thead>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} </td>
  *     <td> The size of the socket send buffer </td>
@@ -97,6 +101,7 @@
  *       IP_MULTICAST_LOOP} </td>
  *     <td> Loopback for Internet Protocol (IP) multicast datagrams </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  * Additional (implementation specific) options may also be supported.
--- a/src/java.base/share/classes/java/nio/channels/FileChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/FileChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -174,8 +174,12 @@
      * <p> In the addition to {@code READ} and {@code WRITE}, the following
      * options may be present:
      *
-     * <table border=1 cellpadding=5 summary="">
+     * <table class="striped">
+     * <caption style="display:none">additional options</caption>
+     * <thead>
      * <tr> <th>Option</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link StandardOpenOption#APPEND APPEND} </td>
      *   <td> If this option is present then the file is opened for writing and
@@ -237,6 +241,7 @@
      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
      *   integrity</a>). </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * <p> An implementation may also support additional options.
--- a/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/ServerSocketChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,11 +46,15 @@
  * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
  * setOption} method. Server-socket channels support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped">
+ * <caption style="display:none">Socket options</caption>
+ * <thead>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> {@link java.net.StandardSocketOptions#SO_RCVBUF SO_RCVBUF} </td>
  *     <td> The size of the socket receive buffer </td>
@@ -59,6 +63,7 @@
  *     <td> {@link java.net.StandardSocketOptions#SO_REUSEADDR SO_REUSEADDR} </td>
  *     <td> Re-use address </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  * Additional (implementation specific) options may also be supported.
--- a/src/java.base/share/classes/java/nio/channels/SocketChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/channels/SocketChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,11 +66,15 @@
  * <p> Socket options are configured using the {@link #setOption(SocketOption,Object)
  * setOption} method. Socket channels support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped">
+ * <caption style="display:none">Socket options</caption>
+ * <thead>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> {@link java.net.StandardSocketOptions#SO_SNDBUF SO_SNDBUF} </td>
  *     <td> The size of the socket send buffer </td>
@@ -96,6 +100,7 @@
  *     <td> {@link java.net.StandardSocketOptions#TCP_NODELAY TCP_NODELAY} </td>
  *     <td> Disable the Nagle algorithm </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  * Additional (implementation specific) options may also be supported.
--- a/src/java.base/share/classes/java/nio/charset/Charset.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -147,8 +147,12 @@
  * implementation to see if any other charsets are supported.  The behavior
  * of such optional charsets may differ between implementations.
  *
- * <blockquote><table style="width:80%" summary="Description of standard charsets">
+ * <blockquote><table class="striped" style="width:80%">
+ * <caption style="display:none">Description of standard charsets</caption>
+ * <thead>
  * <tr><th style="text-align:left">Charset</th><th style="text-align:left">Description</th></tr>
+ * </thead>
+ * <tbody>
  * <tr><td style="vertical-align:top">{@code US-ASCII}</td>
  *     <td>Seven-bit ASCII, a.k.a. {@code ISO646-US},
  *         a.k.a. the Basic Latin block of the Unicode character set</td></tr>
@@ -165,6 +169,7 @@
  * <tr><td style="vertical-align:top">{@code UTF-16}</td>
  *     <td>Sixteen-bit UCS Transformation Format,
  *         byte&nbsp;order identified by an optional byte-order mark</td></tr>
+ * </tbody>
  * </table></blockquote>
  *
  * <p> The {@code UTF-8} charset is specified by <a
--- a/src/java.base/share/classes/java/nio/file/FileSystem.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/FileSystem.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -315,7 +315,9 @@
      * that resembles regular expressions but with a simpler syntax. For example:
      *
      * <blockquote>
-     * <table border="0" summary="Pattern Language">
+     * <table class="borderless">
+     * <caption style="display:none">Pattern Language</caption>
+     * <tbody>
      * <tr>
      *   <td>{@code *.java}</td>
      *   <td>Matches a path that represents a file name ending in {@code .java}</td>
@@ -348,7 +350,7 @@
      *   platform (note that the backslash is escaped; as a string literal in the
      *   Java Language the pattern would be <code>"C:&#92;&#92;&#92;&#92;*"</code>) </td>
      * </tr>
-     *
+     * </tbody>
      * </table>
      * </blockquote>
      *
--- a/src/java.base/share/classes/java/nio/file/FileSystems.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/FileSystems.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
  * 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,8 @@
 import java.util.ServiceConfigurationError;
 import java.util.ServiceLoader;
 
+import jdk.internal.misc.VM;
+
 /**
  * Factory methods for file systems. This class defines the {@link #getDefault
  * getDefault} method to get the default file system and factory methods to
@@ -120,8 +122,8 @@
 
             // if the property java.nio.file.spi.DefaultFileSystemProvider is
             // set then its value is the name of the default provider (or a list)
-            String propValue = System
-                .getProperty("java.nio.file.spi.DefaultFileSystemProvider");
+            String prop = "java.nio.file.spi.DefaultFileSystemProvider";
+            String propValue = System.getProperty(prop);
             if (propValue != null) {
                 for (String cn: propValue.split(",")) {
                     try {
@@ -184,7 +186,7 @@
      * @return  the default file system
      */
     public static FileSystem getDefault() {
-        if (jdk.internal.misc.VM.isBooted()) {
+        if (VM.isModuleSystemInited()) {
             return DefaultFileSystemHolder.defaultFileSystem;
         } else {
             return BuiltinFileSystemHolder.builtinFileSystem;
--- a/src/java.base/share/classes/java/nio/file/Files.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/Files.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -233,8 +233,12 @@
      * <p> In the addition to {@code READ} and {@code WRITE}, the following
      * options may be present:
      *
-     * <table border=1 cellpadding=5 summary="Options">
+     * <table class="striped">
+     * <caption style="display:none">Options</caption>
+     * <thead>
      * <tr> <th>Option</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link StandardOpenOption#APPEND APPEND} </td>
      *   <td> If this option is present then the file is opened for writing and
@@ -294,6 +298,7 @@
      *   href="package-summary.html#integrity"> Synchronized I/O file
      *   integrity</a>). </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * <p> An implementation may also support additional implementation specific
@@ -1188,8 +1193,12 @@
      *
      * <p> The {@code options} parameter may include any of the following:
      *
-     * <table border=1 cellpadding=5 summary="">
+     * <table class="striped">
+     * <caption style="display:none">Options</caption>
+     * <thead>
      * <tr> <th>Option</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
      *   <td> If the target file exists, then the target file is replaced if it
@@ -1215,6 +1224,7 @@
      *     new link. In other words, the {@code COPY_ATTRIBUTES} option may be
      *     ignored when copying a symbolic link. </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * <p> An implementation of this interface may support additional
@@ -1306,8 +1316,12 @@
      *
      * <p> The {@code options} parameter may include any of the following:
      *
-     * <table border=1 cellpadding=5 summary="">
+     * <table class="striped">
+     * <caption style="display:none">Options</caption>
+     * <thead>
      * <tr> <th>Option</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link StandardCopyOption#REPLACE_EXISTING REPLACE_EXISTING} </td>
      *   <td> If the target file exists, then the target file is replaced if it
@@ -1326,6 +1340,7 @@
      *     example, when the target location is on a different {@code FileStore}
      *     and would require that the file be copied, or target location is
      *     associated with a different provider to this object. </td>
+     * </tbody>
      * </table>
      *
      * <p> An implementation of this interface may support additional
@@ -1909,7 +1924,9 @@
      * attributes} parameter:
      *
      * <blockquote>
-     * <table border="0" summary="Possible values">
+     * <table class="borderless">
+     * <caption style="display:none">Possible values</caption>
+     * <tbody>
      * <tr>
      *   <td> {@code "*"} </td>
      *   <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
@@ -1927,6 +1944,7 @@
      *   <td> {@code "posix:permissions,owner,size"} </td>
      *   <td> Reads the POSIX file permissions, owner, and file size. </td>
      * </tr>
+     * </tbody>
      * </table>
      * </blockquote>
      *
--- a/src/java.base/share/classes/java/nio/file/LinkPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/LinkPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, 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,13 +33,16 @@
  * <p> The following table provides a summary description of what the permission
  * allows, and discusses the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5
- *        summary="Table shows permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">Table shows permission target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  * <tr>
  *   <td>hard</td>
  *   <td> Ability to add an existing file to a directory. This is sometimes
@@ -55,6 +58,7 @@
  *   linking to any file or directory in the file system thus allowing the
  *   attacker to access to all files. </td>
  * </tr>
+ * </tbody>
  * </table>
  *
  * @since 1.7
--- a/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/attribute/AclFileAttributeView.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -94,11 +94,15 @@
  * <p> Where dynamic access to file attributes is required, the attributes
  * supported by this attribute view are as follows:
  * <blockquote>
- * <table border="1" cellpadding="8" summary="Supported attributes">
+ * <table class="striped">
+ * <caption style="display:none">Supported attributes</caption>
+ * <thead>
  *   <tr>
  *     <th> Name </th>
  *     <th> Type </th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> "acl" </td>
  *     <td> {@link List}&lt;{@link AclEntry}&gt; </td>
@@ -107,6 +111,7 @@
  *     <td> "owner" </td>
  *     <td> {@link UserPrincipal} </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/attribute/BasicFileAttributeView.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -41,11 +41,15 @@
  * <p> Where dynamic access to file attributes is required, the attributes
  * supported by this attribute view have the following names and types:
  * <blockquote>
- *  <table border="1" cellpadding="8" summary="Supported attributes">
+ *  <table class="striped">
+ *  <caption style="display:none">Supported attributes</caption>
+ *  <thead>
  *   <tr>
  *     <th> Name </th>
  *     <th> Type </th>
  *   </tr>
+ *  </thead>
+ *  <tbody>
  *  <tr>
  *     <td> "lastModifiedTime" </td>
  *     <td> {@link FileTime} </td>
@@ -82,6 +86,7 @@
  *     <td> "fileKey" </td>
  *     <td> {@link Object} </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/attribute/DosFileAttributeView.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -41,11 +41,15 @@
  * BasicFileAttributeView}, and in addition, the following attributes are
  * supported:
  * <blockquote>
- * <table border="1" cellpadding="8" summary="Supported attributes">
+ * <table class="striped">
+ * <caption style="display:none">Supported attributes</caption>
+ * <thead>
  *   <tr>
  *     <th> Name </th>
  *     <th> Type </th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td> readonly </td>
  *     <td> {@link Boolean} </td>
@@ -62,6 +66,7 @@
  *     <td> archive </td>
  *     <td> {@link Boolean} </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/attribute/PosixFileAttributeView.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -74,11 +74,15 @@
  * BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition,
  * the following attributes are supported:
  * <blockquote>
- * <table border="1" cellpadding="8" summary="Supported attributes">
+ * <table class="striped">
+ * <caption style="display:none">Supported attributes</caption>
+ * <thead>
  *   <tr>
  *     <th> Name </th>
  *     <th> Type </th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *  <tr>
  *     <td> "permissions" </td>
  *     <td> {@link Set}&lt;{@link PosixFilePermission}&gt; </td>
@@ -87,6 +91,7 @@
  *     <td> "group" </td>
  *     <td> {@link GroupPrincipal} </td>
  *   </tr>
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -919,8 +919,12 @@
      * according to all of access modes specified in the {@code modes} parameter
      * as follows:
      *
-     * <table border=1 cellpadding=5 summary="">
+     * <table class="striped">
+     * <caption style="display:none">Access Modes</caption>
+     * <thead>
      * <tr> <th>Value</th> <th>Description</th> </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      *   <td> {@link AccessMode#READ READ} </td>
      *   <td> Checks that the file exists and that the Java virtual machine has
@@ -940,6 +944,7 @@
      *     virtual machine has permission to search the directory in order to
      *     access file or subdirectories. </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * <p> If the {@code modes} parameter is of length zero, then the existence
--- a/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java	Fri May 12 10:43:28 2017 -0700
@@ -75,9 +75,9 @@
  * <li>{@code DSA} (1024, 2048)</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator">
+ * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms">
  * AlgorithmParameterGenerator section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -150,8 +150,8 @@
      * @param algorithm the name of the algorithm this
      * parameter generator is associated with.
      * See the AlgorithmParameterGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code AlgorithmParameterGenerator} object
@@ -195,8 +195,8 @@
      * @param algorithm the name of the algorithm this
      * parameter generator is associated with.
      * See the AlgorithmParameterGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the string name of the Provider.
@@ -245,8 +245,8 @@
      * @param algorithm the string name of the algorithm this
      * parameter generator is associated with.
      * See the AlgorithmParameterGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameterGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparametergenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the {@code Provider} object.
--- a/src/java.base/share/classes/java/security/AlgorithmParameters.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/AlgorithmParameters.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -57,9 +57,9 @@
  * <li>{@code DSA}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters">
+ * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms">
  * AlgorithmParameters section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -137,8 +137,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the AlgorithmParameters section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new parameter object
@@ -182,8 +182,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the AlgorithmParameters section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -232,8 +232,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the AlgorithmParameters section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#AlgorithmParameters">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#algorithmparameters-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
--- a/src/java.base/share/classes/java/security/DrbgParameters.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/DrbgParameters.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,7 +188,7 @@
  * @implSpec
  * By convention, a provider should name its primary DRBG implementation
  * with the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
+ * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
  * standard {@code SecureRandom} algorithm name</a> "DRBG".
  *
  * @implNote
@@ -263,14 +263,19 @@
      * Capability effective = ((DrbgParametes.Initiate) s.getParameters())
      *         .getCapability();</pre>
      * </blockquote>
-     * <table border=1 summary="requested and effective capabilities">
+     * <table class="plain">
+     * <caption style="display:none">requested and effective capabilities</caption>
+     * <thead>
      * <tr>
      * <th>Requested Value</th>
      * <th>Possible Effective Values</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr><td>NONE</td><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
      * <tr><td>RESEED_ONLY</td><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
      * <tr><td>PR_AND_RESEED</td><td>PR_AND_RESEED</td></tr>
+     * </tbody>
      * </table>
      * <p>
      * A DRBG implementation supporting prediction resistance must also
--- a/src/java.base/share/classes/java/security/KeyFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/KeyFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -75,9 +75,9 @@
  * <li>{@code RSA}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
+ * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
  * KeyFactory section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -163,8 +163,8 @@
      *
      * @param algorithm the name of the requested key algorithm.
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code KeyFactory} object
@@ -197,8 +197,8 @@
      *
      * @param algorithm the name of the requested key algorithm.
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -239,8 +239,8 @@
      *
      * @param algorithm the name of the requested key algorithm.
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/KeyPairGenerator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/KeyPairGenerator.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -114,9 +114,9 @@
  * <li>{@code RSA} (1024, 2048, 4096)</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
+ * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
  * KeyPairGenerator section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -142,8 +142,8 @@
      *
      * @param algorithm the standard string name of the algorithm.
      * See the KeyPairGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      */
     protected KeyPairGenerator(String algorithm) {
@@ -153,8 +153,8 @@
     /**
      * Returns the standard name of the algorithm for this key pair generator.
      * See the KeyPairGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the standard string name of the algorithm.
@@ -205,8 +205,8 @@
      *
      * @param algorithm the standard string name of the algorithm.
      * See the KeyPairGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code KeyPairGenerator} object
@@ -264,8 +264,8 @@
      *
      * @param algorithm the standard string name of the algorithm.
      * See the KeyPairGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the string name of the provider.
@@ -306,8 +306,8 @@
      *
      * @param algorithm the standard string name of the algorithm.
      * See the KeyPairGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyPairGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keypairgenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/KeyStore.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/KeyStore.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -176,9 +176,9 @@
  * <li>{@code PKCS12}</li>
  * </ul>
  * This type is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
+ * "{@docRoot}/../specs/security/standard-names.html#keystore-types">
  * KeyStore section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other types are supported.
  *
@@ -291,9 +291,8 @@
          * @param protectionAlgorithm the encryption algorithm name, for
          *     example, {@code PBEWithHmacSHA256AndAES_256}.
          *     See the Cipher section in the <a href=
-         * "{@docRoot}/../technotes/guides/security/StandardNames.html#Cipher">
-         * Java Cryptography Architecture Standard Algorithm Name
-         * Documentation</a>
+         * "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names">
+         * Java Security Standard Algorithm Names Specification</a>
          *     for information about standard encryption algorithm names.
          * @param protectionParameters the encryption algorithm parameter
          *     specification, which may be {@code null}
@@ -854,8 +853,8 @@
      *
      * @param type the type of keystore.
      * See the KeyStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keystore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard keystore types.
      *
      * @return a keystore object of the specified type
@@ -895,8 +894,8 @@
      *
      * @param type the type of keystore.
      * See the KeyStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keystore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard keystore types.
      *
      * @param provider the name of the provider.
@@ -941,8 +940,8 @@
      *
      * @param type the type of keystore.
      * See the KeyStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keystore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard keystore types.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/MessageDigest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/MessageDigest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,9 +89,9 @@
  * <li>{@code SHA-256}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
+ * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
  * MessageDigest section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -123,8 +123,8 @@
      *
      * @param algorithm the standard name of the digest algorithm.
      * See the MessageDigest section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      */
     protected MessageDigest(String algorithm) {
@@ -154,8 +154,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the MessageDigest section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return a {@code MessageDigest} object that implements the
@@ -209,8 +209,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the MessageDigest section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -262,8 +262,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the MessageDigest section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
@@ -497,8 +497,8 @@
      * implementation details. The name should be a standard
      * Java Security name (such as "SHA", "MD5", and so on).
      * See the MessageDigest section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the name of the algorithm
--- a/src/java.base/share/classes/java/security/Policy.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/Policy.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -365,8 +365,8 @@
      *
      * @param type the specified Policy type.  See the Policy section in the
      *    <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Policy">
-     *    Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *    "{@docRoot}/../specs/security/standard-names.html#policy-types">
+     *    Java Security Standard Algorithm Names Specification</a>
      *    for a list of standard Policy types.
      *
      * @param params parameters for the Policy, which may be null.
@@ -419,8 +419,8 @@
      *
      * @param type the specified Policy type.  See the Policy section in the
      *    <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Policy">
-     *    Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *    "{@docRoot}/../specs/security/standard-names.html#policy-types">
+     *    Java Security Standard Algorithm Names Specification</a>
      *    for a list of standard Policy types.
      *
      * @param params parameters for the Policy, which may be null.
@@ -485,8 +485,8 @@
      *
      * @param type the specified Policy type.  See the Policy section in the
      *    <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Policy">
-     *    Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *    "{@docRoot}/../specs/security/standard-names.html#policy-types">
+     *    Java Security Standard Algorithm Names Specification</a>
      *    for a list of standard Policy types.
      *
      * @param params parameters for the Policy, which may be null.
--- a/src/java.base/share/classes/java/security/Provider.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/Provider.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,17 +61,21 @@
  * security framework. Services of this type cannot be added, removed,
  * or modified by applications.
  * The following attributes are automatically placed in each Provider object:
- * <table cellspacing=4>
+ * <table class="plain">
  * <caption><b>Attributes Automatically Placed in a Provider Object</b></caption>
+ * <thead>
  * <tr><th>Name</th><th>Value</th>
+ * </thead>
+ * <tbody>
  * <tr><td>{@code Provider.id name}</td>
-  *    <td>{@code String.valueOf(provider.getName())}</td>
+ *     <td>{@code String.valueOf(provider.getName())}</td>
  * <tr><td>{@code Provider.id version}</td>
  *     <td>{@code String.valueOf(provider.getVersionStr())}</td>
  * <tr><td>{@code Provider.id info}</td>
-       <td>{@code String.valueOf(provider.getInfo())}</td>
+ *     <td>{@code String.valueOf(provider.getInfo())}</td>
  * <tr><td>{@code Provider.id className}</td>
  *     <td>{@code provider.getClass().getName()}</td>
+ * </tbody>
  * </table>
  *
  * <p>Each provider has a name and a version string. A provider normally
--- a/src/java.base/share/classes/java/security/SecureRandom.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/SecureRandom.java	Fri May 12 10:43:28 2017 -0700
@@ -126,7 +126,7 @@
  * @implSpec
  * A {@code SecureRandom} service provider can advertise that it is thread-safe
  * by setting the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#Service">service
+ * "{@docRoot}/../specs/security/standard-names.html#service-attributes">service
  * provider attribute</a> "ThreadSafe" to "true" when registering the provider.
  * Otherwise, this class will instead synchronize access to the following
  * methods of the {@code SecureRandomSpi} implementation:
@@ -203,8 +203,8 @@
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
      * <p> See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      */
     public SecureRandom() {
@@ -244,8 +244,8 @@
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
      * <p> See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param seed the seed.
@@ -341,8 +341,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @return the new {@code SecureRandom} object
@@ -380,8 +380,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param provider the name of the provider.
@@ -424,8 +424,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param provider the provider.
@@ -478,8 +478,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param params the {@code SecureRandomParameters}
@@ -528,8 +528,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param params the {@code SecureRandomParameters}
@@ -581,8 +581,8 @@
      *
      * @param algorithm the name of the RNG algorithm.
      * See the {@code SecureRandom} section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecureRandom">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#securerandom-number-generation-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard RNG algorithm names.
      *
      * @param params the {@code SecureRandomParameters}
--- a/src/java.base/share/classes/java/security/SecureRandomSpi.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/SecureRandomSpi.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -65,7 +65,7 @@
  * will synchronize access to each of the applicable engine methods
  * (see {@link SecureRandom} for the list of methods). However, if a
  * {@code SecureRandomSpi} implementation is thread-safe, the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#Service">
+ * "{@docRoot}/../specs/security/standard-names.html#service-attributes">
  * service provider attribute</a> "ThreadSafe" should be set to "true" during
  * its registration, as follows:
  * <blockquote><pre>
--- a/src/java.base/share/classes/java/security/Security.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/Security.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -281,8 +281,8 @@
     /**
      * Gets a specified property for an algorithm. The algorithm name
      * should be a standard name. See the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * One possible use is by specialized algorithm parsers, which may map
@@ -511,8 +511,8 @@
      * </ul>
      *
      * <p> See the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard cryptographic service names, standard
      * algorithm names and standard attribute names.
      *
@@ -582,8 +582,8 @@
      * </ul>
      *
      * <p> See the <a href=
-     * "../../../technotes/guides/security/StandardNames.html">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard cryptographic service names, standard
      * algorithm names and standard attribute names.
      *
--- a/src/java.base/share/classes/java/security/SecurityPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/SecurityPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -45,12 +45,16 @@
  * target names, and for each provides a description of what the permission
  * allows and a discussion of the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
+ * <tbody>
  *
  * <tr>
  *   <td>authProvider.{provider name}</td>
@@ -196,6 +200,7 @@
  * described under the "removeProvider.{provider name}" permission.</td>
  * </tr>
  *
+ * </tbody>
  * </table>
  *
  * <P>
@@ -204,13 +209,17 @@
  * {@link IdentityScope}, {@link Signer}. Use of them is discouraged. See the
  * applicable classes for more information.
  *
- * <table border=1 cellpadding=5 summary="target name,what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
  *
+ * <tbody>
  * <tr>
  *   <td>insertProvider.{provider name}</td>
  *   <td>Addition of a new provider, with the specified name</td>
@@ -308,6 +317,7 @@
  * data encrypted under that session key.</td>
  * </tr>
  *
+ * </tbody>
  * </table>
  *
  * @implNote
--- a/src/java.base/share/classes/java/security/Signature.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/Signature.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -106,9 +106,9 @@
  * <li>{@code SHA256withRSA}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
+ * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
  * Signature section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -164,8 +164,8 @@
      *
      * @param algorithm the standard string name of the algorithm.
      * See the Signature section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      */
     protected Signature(String algorithm) {
@@ -209,8 +209,8 @@
      *
      * @param algorithm the standard name of the algorithm requested.
      * See the Signature section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code Signature} object
@@ -332,8 +332,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the Signature section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -385,8 +385,8 @@
      *
      * @param algorithm the name of the algorithm requested.
      * See the Signature section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/cert/CertPath.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertPath.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,9 +91,9 @@
  * <li>{@code PkiPath}</li>
  * </ul>
  * These encodings are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathEncodings">
+ * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings">
  * CertPath Encodings section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other encodings are supported.
  * <p>
--- a/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -72,9 +72,9 @@
  * <li>{@code PKIX}</li>
  * </ul>
  * This algorithm is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathBuilder">
+ * "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms">
  * CertPathBuilder section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -152,8 +152,8 @@
      *
      * @param algorithm the name of the requested {@code CertPathBuilder}
      *  algorithm.  See the CertPathBuilder section in the <a href=
-     *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathBuilder">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *  "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return a {@code CertPathBuilder} object that implements the
@@ -190,8 +190,8 @@
      *
      * @param algorithm the name of the requested {@code CertPathBuilder}
      *  algorithm.  See the CertPathBuilder section in the <a href=
-     *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathBuilder">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *  "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -233,8 +233,8 @@
      *
      * @param algorithm the name of the requested {@code CertPathBuilder}
      *  algorithm.  See the CertPathBuilder section in the <a href=
-     *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathBuilder">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *  "{@docRoot}/../specs/security/standard-names.html#certpathbuilder-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -74,9 +74,9 @@
  * <li>{@code PKIX}</li>
  * </ul>
  * This algorithm is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathValidator">
+ * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms">
  * CertPathValidator section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -152,9 +152,9 @@
      * {@link Security#getProviders() Security.getProviders()}.
      *
      * @param algorithm the name of the requested {@code CertPathValidator}
-     *  algorithm. See the CertPathValidator section in the <a href=
-     *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathValidator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * algorithm. See the CertPathValidator section in the <a href=
+     * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return a {@code CertPathValidator} object that implements the
@@ -190,9 +190,9 @@
      * the {@link Security#getProviders() Security.getProviders()} method.
      *
      * @param algorithm the name of the requested {@code CertPathValidator}
-     *  algorithm. See the CertPathValidator section in the <a href=
-     *  "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathValidator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * algorithm. See the CertPathValidator section in the <a href=
+     * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -235,8 +235,8 @@
      *
      * @param algorithm the name of the requested {@code CertPathValidator}
      * algorithm. See the CertPathValidator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathValidator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certpathvalidator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/java/security/cert/CertStore.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertStore.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -67,9 +67,9 @@
  * <li>{@code Collection}</li>
  * </ul>
  * This type is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
+ * "{@docRoot}/../specs/security/standard-names.html#certstore-types">
  * CertStore section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other types are supported.
  *
@@ -212,8 +212,8 @@
      *
      * @param type the name of the requested {@code CertStore} type.
      * See the CertStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certstore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard types.
      *
      * @param params the initialization parameters (may be {@code null}).
@@ -276,8 +276,8 @@
      *
      * @param type the requested {@code CertStore} type.
      * See the CertStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certstore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard types.
      *
      * @param params the initialization parameters (may be {@code null}).
@@ -337,8 +337,8 @@
      *
      * @param type the requested {@code CertStore} type.
      * See the CertStore section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertStore">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certstore-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard types.
      *
      * @param params the initialization parameters (may be {@code null}).
--- a/src/java.base/share/classes/java/security/cert/Certificate.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/Certificate.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -74,8 +74,8 @@
      *
      * @param type the standard name of the certificate type.
      * See the CertificateFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard certificate types.
      */
     protected Certificate(String type) {
--- a/src/java.base/share/classes/java/security/cert/CertificateFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertificateFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -101,11 +101,11 @@
  * <li>{@code PkiPath}</li>
  * </ul>
  * The type and encodings are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
+ * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types">
  * CertificateFactory section</a> and the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathEncodings">
+ * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings">
  * CertPath Encodings section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other types or encodings are supported.
  *
@@ -172,8 +172,8 @@
      *
      * @param type the name of the requested certificate type.
      * See the CertificateFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard certificate types.
      *
      * @return a certificate factory object for the specified type
@@ -213,8 +213,8 @@
      *
      * @param type the certificate type.
      * See the CertificateFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard certificate types.
      *
      * @param provider the name of the provider.
@@ -260,8 +260,8 @@
      *
      * @param type the certificate type.
      * See the CertificateFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertificateFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certificatefactory-types">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard certificate types.
      * @param provider the provider.
      *
@@ -359,8 +359,8 @@
      * Returns an iteration of the {@code CertPath} encodings supported
      * by this certificate factory, with the default encoding first. See
      * the CertPath Encodings section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathEncodings">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard encoding names and their formats.
      * <p>
      * Attempts to modify the returned {@code Iterator} via its
@@ -399,8 +399,8 @@
      * the data read from the {@code InputStream} inStream. The data
      * is assumed to be in the specified encoding. See
      * the CertPath Encodings section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathEncodings">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard encoding names and their formats.
      *
      * @param inStream an {@code InputStream} containing the data
--- a/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/CertificateFactorySpi.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -183,8 +183,8 @@
      * Returns an iteration of the {@code CertPath} encodings supported
      * by this certificate factory, with the default encoding first. See
      * the CertPath Encodings section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#CertPathEncodings">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#certpath-encodings">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard encoding names.
      * <p>
      * Attempts to modify the returned {@code Iterator} via its
--- a/src/java.base/share/classes/java/security/cert/X509Extension.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/X509Extension.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -152,10 +152,14 @@
      * by periods.
      *
      * <p>For example:<br>
-     * <table border=groove summary="Examples of OIDs and extension names">
+     * <table class="plain">
+     * <caption style="display:none">Examples of OIDs and extension names</caption>
+     * <thead>
      * <tr>
      * <th>OID <em>(Object Identifier)</em></th>
      * <th>Extension Name</th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td>2.5.29.14</td>
      * <td>SubjectKeyIdentifier</td></tr>
      * <tr><td>2.5.29.15</td>
@@ -176,6 +180,7 @@
      * <td>AuthorityKeyIdentifier</td></tr>
      * <tr><td>2.5.29.36</td>
      * <td>PolicyConstraints</td></tr>
+     * </tbody>
      * </table>
      *
      * @param oid the Object Identifier value for the extension.
--- a/src/java.base/share/classes/java/security/cert/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/cert/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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,10 +39,9 @@
  *     Certificate Revocation List (CRL) Profile
  *   <li>RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate
  *     Status Protocol - OCSP
- *   <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- *     <b>Java&trade;
- *     Cryptography Architecture Standard Algorithm Name
- *     Documentation</b></a></li>
+ *   <li><a href="{@docRoot}/../specs/security/standard-names.html">
+ *     <b>Java&trade; Security Standard Algorithm Names Specification
+ *     </b></a></li>
  * </ul>
  *
  * <h2>Related Documentation</h2>
--- a/src/java.base/share/classes/java/security/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -53,10 +53,9 @@
  *   <li>PKCS #8: Private-Key Information Syntax Standard, Version 1.2,
  *     November 1993</li>
  *
- *   <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- *     <b>Java&trade;
- *     Cryptography Architecture Standard Algorithm Name
- *     Documentation</b></a></li>
+ *   <li><a href="{@docRoot}/../specs/security/standard-names.html">
+ *     <b>Java&trade; Security Standard Algorithm Names Specification
+ *     </b></a></li>
  * </ul>
  *
  * <h2>Related Documentation</h2>
--- a/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/spec/EncodedKeySpec.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -67,8 +67,8 @@
      * array are copied to protect against subsequent modification.
      * @param algorithm the algorithm name of the encoded key
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      * @throws NullPointerException if {@code encodedKey}
      * or {@code algorithm} is null.
--- a/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/spec/PKCS8EncodedKeySpec.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -85,8 +85,8 @@
      * the array are copied to protect against subsequent modification.
      * @param algorithm the algorithm name of the encoded private key
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      * @throws NullPointerException if {@code encodedKey}
      * or {@code algorithm} is null.
--- a/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/security/spec/X509EncodedKeySpec.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -75,8 +75,8 @@
      * array are copied to protect against subsequent modification.
      * @param algorithm the algorithm name of the encoded public key
      * See the KeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      * @throws NullPointerException if {@code encodedKey}
      * or {@code algorithm} is null.
--- a/src/java.base/share/classes/java/text/DecimalFormat.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/text/DecimalFormat.java	Fri May 12 10:43:28 2017 -0700
@@ -172,19 +172,22 @@
  * are not localized.
  *
  * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 summary="Chart showing symbol,
- *  location, localized, and meaning.">
- *     <tr style="background-color: rgb(204, 204, 255);">
+ * <table class="striped">
+ * <caption style="display:none">Chart showing symbol, location, localized, and meaning.</caption>
+ * <thead>
+ *     <tr>
  *          <th style="text-align:left">Symbol
  *          <th style="text-align:left">Location
  *          <th style="text-align:left">Localized?
  *          <th style="text-align:left">Meaning
+ * </thead>
+ * <tbody>
  *     <tr style="vertical-align:top">
  *          <td><code>0</code>
  *          <td>Number
  *          <td>Yes
  *          <td>Digit
- *     <tr style="vertical-align: top; background-color: rgb(238, 238, 255);">
+ *     <tr style="vertical-align: top">
  *          <td><code>#</code>
  *          <td>Number
  *          <td>Yes
@@ -194,7 +197,7 @@
  *          <td>Number
  *          <td>Yes
  *          <td>Decimal separator or monetary decimal separator
- *     <tr style="vertical-align: top; background-color: rgb(238, 238, 255);">
+ *     <tr style="vertical-align: top">
  *          <td><code>-</code>
  *          <td>Number
  *          <td>Yes
@@ -204,7 +207,7 @@
  *          <td>Number
  *          <td>Yes
  *          <td>Grouping separator
- *     <tr style="vertical-align: top; background-color: rgb(238, 238, 255);">
+ *     <tr style="vertical-align: top">
  *          <td><code>E</code>
  *          <td>Number
  *          <td>Yes
@@ -215,7 +218,7 @@
  *          <td>Subpattern boundary
  *          <td>Yes
  *          <td>Separates positive and negative subpatterns
- *     <tr style="vertical-align: top; background-color: rgb(238, 238, 255);">
+ *     <tr style="vertical-align: top">
  *          <td><code>%</code>
  *          <td>Prefix or suffix
  *          <td>Yes
@@ -225,7 +228,7 @@
  *          <td>Prefix or suffix
  *          <td>Yes
  *          <td>Multiply by 1000 and show as per mille value
- *     <tr style="vertical-align: top; background-color: rgb(238, 238, 255);">
+ *     <tr style="vertical-align: top">
  *          <td><code>&#164;</code> (<code>&#92;u00A4</code>)
  *          <td>Prefix or suffix
  *          <td>No
@@ -241,6 +244,7 @@
  *              for example, <code>"'#'#"</code> formats 123 to
  *              <code>"#123"</code>.  To create a single quote
  *              itself, use two in a row: <code>"# o''clock"</code>.
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/text/MessageFormat.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/text/MessageFormat.java	Fri May 12 10:43:28 2017 -0700
@@ -146,11 +146,15 @@
  * shown in the table are illegal. A <i>SubformatPattern</i> must
  * be a valid pattern string for the {@code Format} subclass used.
  *
- * <table border=1 summary="Shows how FormatType and FormatStyle values map to Format instances">
+ * <table class="plain">
+ * <caption style="display:none">Shows how FormatType and FormatStyle values map to Format instances</caption>
+ * <thead>
  *    <tr>
  *       <th id="ft" class="TableHeadingColor">FormatType
  *       <th id="fs" class="TableHeadingColor">FormatStyle
  *       <th id="sc" class="TableHeadingColor">Subformat Created
+ * </thead>
+ * <tbody>
  *    <tr>
  *       <td headers="ft"><i>(none)</i>
  *       <td headers="fs"><i>(none)</i>
@@ -213,6 +217,7 @@
  *       <td headers="ft"><code>choice</code>
  *       <td headers="fs"><i>SubformatPattern</i>
  *       <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
+ * </tbody>
  * </table>
  *
  * <h4>Usage Information</h4>
@@ -766,11 +771,15 @@
      * argument is <i>unavailable</i> if <code>arguments</code> is
      * <code>null</code> or has fewer than argumentIndex+1 elements.
      *
-     * <table border=1 summary="Examples of subformat,argument,and formatted text">
+     * <table class="plain">
+     * <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
+     * <thead>
      *    <tr>
      *       <th>Subformat
      *       <th>Argument
      *       <th>Formatted Text
+     * </thead>
+     * <tbody>
      *    <tr>
      *       <td><i>any</i>
      *       <td><i>unavailable</i>
@@ -805,6 +814,7 @@
      *       <td><code>null</code>
      *       <td><i>any</i>
      *       <td><code>argument.toString()</code>
+     * </tbody>
      * </table>
      * <p>
      * If <code>pos</code> is non-null, and refers to
--- a/src/java.base/share/classes/java/text/SimpleDateFormat.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/text/SimpleDateFormat.java	Fri May 12 10:43:28 2017 -0700
@@ -92,18 +92,22 @@
  * <code>'A'</code> to <code>'Z'</code> and from <code>'a'</code> to
  * <code>'z'</code> are reserved):
  * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 summary="Chart shows pattern letters, date/time component, presentation, and examples.">
- *     <tr style="background-color: rgb(204, 204, 255);">
+ * <table class="striped">
+ * <caption style="display:none">Chart shows pattern letters, date/time component, presentation, and examples.</caption>
+ * <thead>
+ *     <tr>
  *         <th style="text-align:left">Letter
  *         <th style="text-align:left">Date or Time Component
  *         <th style="text-align:left">Presentation
  *         <th style="text-align:left">Examples
+ * </thead>
+ * <tbody>
  *     <tr>
  *         <td><code>G</code>
  *         <td>Era designator
  *         <td><a href="#text">Text</a>
  *         <td><code>AD</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>y</code>
  *         <td>Year
  *         <td><a href="#year">Year</a>
@@ -113,7 +117,7 @@
  *         <td>Week year
  *         <td><a href="#year">Year</a>
  *         <td><code>2009</code>; <code>09</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>M</code>
  *         <td>Month in year (context sensitive)
  *         <td><a href="#month">Month</a>
@@ -123,7 +127,7 @@
  *         <td>Month in year (standalone form)
  *         <td><a href="#month">Month</a>
  *         <td><code>July</code>; <code>Jul</code>; <code>07</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>w</code>
  *         <td>Week in year
  *         <td><a href="#number">Number</a>
@@ -133,7 +137,7 @@
  *         <td>Week in month
  *         <td><a href="#number">Number</a>
  *         <td><code>2</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>D</code>
  *         <td>Day in year
  *         <td><a href="#number">Number</a>
@@ -143,7 +147,7 @@
  *         <td>Day in month
  *         <td><a href="#number">Number</a>
  *         <td><code>10</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>F</code>
  *         <td>Day of week in month
  *         <td><a href="#number">Number</a>
@@ -153,7 +157,7 @@
  *         <td>Day name in week
  *         <td><a href="#text">Text</a>
  *         <td><code>Tuesday</code>; <code>Tue</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>u</code>
  *         <td>Day number of week (1 = Monday, ..., 7 = Sunday)
  *         <td><a href="#number">Number</a>
@@ -163,7 +167,7 @@
  *         <td>Am/pm marker
  *         <td><a href="#text">Text</a>
  *         <td><code>PM</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>H</code>
  *         <td>Hour in day (0-23)
  *         <td><a href="#number">Number</a>
@@ -173,7 +177,7 @@
  *         <td>Hour in day (1-24)
  *         <td><a href="#number">Number</a>
  *         <td><code>24</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>K</code>
  *         <td>Hour in am/pm (0-11)
  *         <td><a href="#number">Number</a>
@@ -183,7 +187,7 @@
  *         <td>Hour in am/pm (1-12)
  *         <td><a href="#number">Number</a>
  *         <td><code>12</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>m</code>
  *         <td>Minute in hour
  *         <td><a href="#number">Number</a>
@@ -193,7 +197,7 @@
  *         <td>Second in minute
  *         <td><a href="#number">Number</a>
  *         <td><code>55</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>S</code>
  *         <td>Millisecond
  *         <td><a href="#number">Number</a>
@@ -203,7 +207,7 @@
  *         <td>Time zone
  *         <td><a href="#timezone">General time zone</a>
  *         <td><code>Pacific Standard Time</code>; <code>PST</code>; <code>GMT-08:00</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>Z</code>
  *         <td>Time zone
  *         <td><a href="#rfc822timezone">RFC 822 time zone</a>
@@ -213,6 +217,7 @@
  *         <td>Time zone
  *         <td><a href="#iso8601timezone">ISO 8601 time zone</a>
  *         <td><code>-08</code>; <code>-0800</code>;  <code>-08:00</code>
+ * </tbody>
  * </table>
  * </blockquote>
  * Pattern letters are usually repeated, as their number determines the
@@ -370,43 +375,48 @@
  * the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time
  * in the U.S. Pacific Time time zone.
  * <blockquote>
- * <table border=0 cellspacing=3 cellpadding=0 summary="Examples of date and time patterns interpreted in the U.S. locale">
- *     <tr style="background-color: rgb(204, 204, 255);">
+ * <table class="striped">
+ * <caption style="display:none">Examples of date and time patterns interpreted in the U.S. locale</caption>
+ * <thead>
+ *     <tr>
  *         <th style="text-align:left">Date and Time Pattern
  *         <th style="text-align:left">Result
+ * </thead>
+ * <tbody>
  *     <tr>
  *         <td><code>"yyyy.MM.dd G 'at' HH:mm:ss z"</code>
  *         <td><code>2001.07.04 AD at 12:08:56 PDT</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>"EEE, MMM d, ''yy"</code>
  *         <td><code>Wed, Jul 4, '01</code>
  *     <tr>
  *         <td><code>"h:mm a"</code>
  *         <td><code>12:08 PM</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>"hh 'o''clock' a, zzzz"</code>
  *         <td><code>12 o'clock PM, Pacific Daylight Time</code>
  *     <tr>
  *         <td><code>"K:mm a, z"</code>
  *         <td><code>0:08 PM, PDT</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>"yyyyy.MMMMM.dd GGG hh:mm aaa"</code>
  *         <td><code>02001.July.04 AD 12:08 PM</code>
  *     <tr>
  *         <td><code>"EEE, d MMM yyyy HH:mm:ss Z"</code>
  *         <td><code>Wed, 4 Jul 2001 12:08:56 -0700</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>"yyMMddHHmmssZ"</code>
  *         <td><code>010704120856-0700</code>
  *     <tr>
  *         <td><code>"yyyy-MM-dd'T'HH:mm:ss.SSSZ"</code>
  *         <td><code>2001-07-04T12:08:56.235-0700</code>
- *     <tr style="background-color: rgb(238, 238, 255);">
+ *     <tr>
  *         <td><code>"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"</code>
  *         <td><code>2001-07-04T12:08:56.235-07:00</code>
  *     <tr>
  *         <td><code>"YYYY-'W'ww-u"</code>
  *         <td><code>2001-W27-3</code>
+ * </tbody>
  * </table>
  * </blockquote>
  *
--- a/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Fri May 12 10:43:28 2017 -0700
@@ -103,17 +103,18 @@
  *
  * <p>
  * CLDR and LDML identify variants:
- * <table cellpadding="2" summary="Variants of Hijrah Calendars">
+ * <table class="striped">
+ * <caption style="display:none">Variants of Hijrah Calendars</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left" >Chronology ID</th>
- * <th class="colFirst" style="text-align:left" >Calendar Type</th>
- * <th class="colFirst" style="text-align:left" >Locale extension, see {@link java.util.Locale}</th>
- * <th class="colLast" style="text-align:left" >Description</th>
+ * <tr>
+ * <th style="text-align:left" >Chronology ID</th>
+ * <th style="text-align:left" >Calendar Type</th>
+ * <th style="text-align:left" >Locale extension, see {@link java.util.Locale}</th>
+ * <th style="text-align:left" >Description</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="altColor">
+ * <tr>
  * <td>Hijrah-umalqura</td>
  * <td>islamic-umalqura</td>
  * <td>ca-islamic-umalqura</td>
@@ -147,36 +148,37 @@
  * <p>
  * The Hijrah property resource is a set of properties that describe the calendar.
  * The syntax is defined by {@code java.util.Properties#load(Reader)}.
- * <table cellpadding="2" summary="Configuration of Hijrah Calendar">
+ * <table class="striped">
+ * <caption style="display:none">Configuration of Hijrah Calendar</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left" > Property Name</th>
- * <th class="colFirst" style="text-align:left" > Property value</th>
- * <th class="colLast" style="text-align:left" > Description </th>
+ * <tr>
+ * <th style="text-align:left" > Property Name</th>
+ * <th style="text-align:left" > Property value</th>
+ * <th style="text-align:left" > Description </th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="altColor">
+ * <tr>
  * <td>id</td>
  * <td>Chronology Id, for example, "Hijrah-umalqura"</td>
  * <td>The Id of the calendar in common usage</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td>type</td>
  * <td>Calendar type, for example, "islamic-umalqura"</td>
  * <td>LDML defines the calendar types</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>version</td>
  * <td>Version, for example: "1.8.0_1"</td>
  * <td>The version of the Hijrah variant data</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td>iso-start</td>
  * <td>ISO start date, formatted as {@code yyyy-MM-dd}, for example: "1900-04-30"</td>
  * <td>The ISO date of the first day of the minimum Hijrah year.</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>yyyy - a numeric 4 digit year, for example "1434"</td>
  * <td>The value is a sequence of 12 month lengths,
  * for example: "29 30 29 30 29 30 30 30 29 30 29 29"</td>
--- a/src/java.base/share/classes/java/time/chrono/IsoEra.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/chrono/IsoEra.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -70,25 +70,26 @@
  * A definition has therefore been created with two eras - 'Current era' (CE) for
  * years on or after 0001-01-01 (ISO), and 'Before current era' (BCE) for years before that.
  *
- * <table summary="ISO years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <table class="striped">
+ * <caption style="display:none">ISO years and eras</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left">year-of-era</th>
- * <th class="colFirst" style="text-align:left">era</th>
- * <th class="colLast" style="text-align:left">proleptic-year</th>
+ * <tr>
+ * <th style="text-align:left">year-of-era</th>
+ * <th style="text-align:left">era</th>
+ * <th style="text-align:left">proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="rowColor">
+ * <tr>
  * <td>2</td><td>CE</td><td>2</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>1</td><td>CE</td><td>1</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td>1</td><td>BCE</td><td>0</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>2</td><td>BCE</td><td>-1</td>
  * </tr>
  * </tbody>
--- a/src/java.base/share/classes/java/time/chrono/MinguoEra.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/chrono/MinguoEra.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -71,26 +71,27 @@
  * All previous years, zero or earlier in the proleptic count or one and greater
  * in the year-of-era count, are part of the 'Before Republic of China' era.
  *
- * <table summary="Minguo years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <table class="striped">
+ * <caption style="display:none">Minguo years and eras</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left">year-of-era</th>
- * <th class="colFirst" style="text-align:left">era</th>
- * <th class="colFirst" style="text-align:left">proleptic-year</th>
- * <th class="colLast" style="text-align:left">ISO proleptic-year</th>
+ * <tr>
+ * <th style="text-align:left">year-of-era</th>
+ * <th style="text-align:left">era</th>
+ * <th style="text-align:left">proleptic-year</th>
+ * <th style="text-align:left">ISO proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="rowColor">
+ * <tr>
  * <td>2</td><td>ROC</td><td>2</td><td>1913</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>1</td><td>ROC</td><td>1</td><td>1912</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td>1</td><td>BEFORE_ROC</td><td>0</td><td>1911</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>2</td><td>BEFORE_ROC</td><td>-1</td><td>1910</td>
  * </tr>
  * </tbody>
--- a/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -71,26 +71,27 @@
  * All previous years, zero or earlier in the proleptic count or one and greater
  * in the year-of-era count, are part of the 'Before Buddhist' era.
  *
- * <table summary="Buddhist years and eras" cellpadding="2" cellspacing="3" border="0" >
+ * <table class="striped">
+ * <caption style="display:none">Buddhist years and eras</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left">year-of-era</th>
- * <th class="colFirst" style="text-align:left">era</th>
- * <th class="colFirst" style="text-align:left">proleptic-year</th>
- * <th class="colLast" style="text-align:left">ISO proleptic-year</th>
+ * <tr>
+ * <th style="text-align:left">year-of-era</th>
+ * <th style="text-align:left">era</th>
+ * <th style="text-align:left">proleptic-year</th>
+ * <th style="text-align:left">ISO proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="rowColor">
+ * <tr>
  * <td>2</td><td>BE</td><td>2</td><td>-542</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>1</td><td>BE</td><td>1</td><td>-543</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td>1</td><td>BEFORE_BE</td><td>0</td><td>-544</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td>2</td><td>BEFORE_BE</td><td>-1</td><td>-545</td>
  * </tr>
  * </tbody>
--- a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -150,105 +150,106 @@
  * implementation of {@code java.text.Format}.
  *
  * <h3 id="predefined">Predefined Formatters</h3>
- * <table summary="Predefined Formatters" cellpadding="2" cellspacing="3" border="0" >
+ * <table class="striped">
+ * <caption>Predefined Formatters</caption>
  * <thead>
- * <tr class="tableSubHeadingColor">
- * <th class="colFirst" style="text-align:left">Formatter</th>
- * <th class="colFirst" style="text-align:left">Description</th>
- * <th class="colLast" style="text-align:left">Example</th>
+ * <tr>
+ * <th style="text-align:left">Formatter</th>
+ * <th style="text-align:left">Description</th>
+ * <th style="text-align:left">Example</th>
  * </tr>
  * </thead>
  * <tbody>
- * <tr class="rowColor">
+ * <tr>
  * <td>{@link #ofLocalizedDate ofLocalizedDate(dateStyle)} </td>
  * <td> Formatter with date style from the locale </td>
  * <td> '2011-12-03'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ofLocalizedTime ofLocalizedTime(timeStyle)} </td>
  * <td> Formatter with time style from the locale </td>
  * <td> '10:15:30'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ofLocalizedDateTime ofLocalizedDateTime(dateTimeStyle)} </td>
  * <td> Formatter with a style for date and time from the locale</td>
  * <td> '3 Jun 2008 11:05:30'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ofLocalizedDateTime ofLocalizedDateTime(dateStyle,timeStyle)}
  * </td>
  * <td> Formatter with date and time styles from the locale </td>
  * <td> '3 Jun 2008 11:05'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #BASIC_ISO_DATE}</td>
  * <td>Basic ISO date </td> <td>'20111203'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_LOCAL_DATE}</td>
  * <td> ISO Local Date </td>
  * <td>'2011-12-03'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_OFFSET_DATE}</td>
  * <td> ISO Date with offset </td>
  * <td>'2011-12-03+01:00'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_DATE}</td>
  * <td> ISO Date with or without offset </td>
  * <td> '2011-12-03+01:00'; '2011-12-03'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_LOCAL_TIME}</td>
  * <td> Time without offset </td>
  * <td>'10:15:30'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_OFFSET_TIME}</td>
  * <td> Time with offset </td>
  * <td>'10:15:30+01:00'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_TIME}</td>
  * <td> Time with or without offset </td>
  * <td>'10:15:30+01:00'; '10:15:30'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_LOCAL_DATE_TIME}</td>
  * <td> ISO Local Date and Time </td>
  * <td>'2011-12-03T10:15:30'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_OFFSET_DATE_TIME}</td>
  * <td> Date Time with Offset
  * </td><td>2011-12-03T10:15:30+01:00'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_ZONED_DATE_TIME}</td>
  * <td> Zoned Date Time </td>
  * <td>'2011-12-03T10:15:30+01:00[Europe/Paris]'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_DATE_TIME}</td>
  * <td> Date and time with ZoneId </td>
  * <td>'2011-12-03T10:15:30+01:00[Europe/Paris]'</td>
  * </tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_ORDINAL_DATE}</td>
  * <td> Year and day of year </td>
  * <td>'2012-337'</td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #ISO_WEEK_DATE}</td>
  * <td> Year and Week </td>
  * <td>2012-W48-6'</td></tr>
- * <tr class="altColor">
+ * <tr>
  * <td> {@link #ISO_INSTANT}</td>
  * <td> Date and Time of an Instant </td>
  * <td>'2011-12-03T10:15:30Z' </td>
  * </tr>
- * <tr class="rowColor">
+ * <tr>
  * <td> {@link #RFC_1123_DATE_TIME}</td>
  * <td> RFC 1123 / RFC 822 </td>
  * <td>'Tue, 3 Jun 2008 11:05:30 GMT'</td>
--- a/src/java.base/share/classes/java/time/temporal/IsoFields.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/temporal/IsoFields.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -136,15 +136,19 @@
  * <p>
  * For example:
  *
- * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
+ * <table class=striped style="text-align: left; width: 50%;">
  * <caption>Examples of Week based Years</caption>
+ * <thead>
  * <tr><th>Date</th><th>Day-of-week</th><th>Field values</th></tr>
+ * </thead>
+ * <tbody>
  * <tr><th>2008-12-28</th><td>Sunday</td><td>Week 52 of week-based-year 2008</td></tr>
  * <tr><th>2008-12-29</th><td>Monday</td><td>Week 1 of week-based-year 2009</td></tr>
  * <tr><th>2008-12-31</th><td>Wednesday</td><td>Week 1 of week-based-year 2009</td></tr>
  * <tr><th>2009-01-01</th><td>Thursday</td><td>Week 1 of week-based-year 2009</td></tr>
  * <tr><th>2009-01-04</th><td>Sunday</td><td>Week 1 of week-based-year 2009</td></tr>
  * <tr><th>2009-01-05</th><td>Monday</td><td>Week 2 of week-based-year 2009</td></tr>
+ * </tbody>
  * </table>
  *
  * @implSpec
--- a/src/java.base/share/classes/java/time/temporal/WeekFields.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/time/temporal/WeekFields.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -127,10 +127,13 @@
  * The earliest period is referred to as week 0 if it has less than the minimal number of days
  * and week 1 if it has at least the minimal number of days.
  *
- * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
+ * <table class=striped style="text-align: left">
  * <caption>Examples of WeekFields</caption>
+ * <thead>
  * <tr><th>Date</th><td>Day-of-week</td>
  *  <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr>
+ * </thead>
+ * <tbody>
  * <tr><th>2008-12-31</th><td>Wednesday</td>
  *  <td>Week 5 of December 2008</td><td>Week 5 of December 2008</td></tr>
  * <tr><th>2009-01-01</th><td>Thursday</td>
@@ -139,6 +142,7 @@
  *  <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr>
  * <tr><th>2009-01-05</th><td>Monday</td>
  *  <td>Week 2 of January 2009</td><td>Week 1 of January 2009</td></tr>
+ * </tbody>
  * </table>
  *
  * <h3>Week of Year</h3>
@@ -157,10 +161,13 @@
  * The first and last weeks of a year may contain days from the
  * previous calendar year or next calendar year respectively.
  *
- * <table cellpadding="0" cellspacing="3" border="0" style="text-align: left; width: 50%;">
+ * <table class=striped style="text-align: left;">
  * <caption>Examples of WeekFields for week-based-year</caption>
+ * <thead>
  * <tr><th>Date</th><td>Day-of-week</td>
  *  <td>First day: Monday<br>Minimal days: 4</td><td>First day: Monday<br>Minimal days: 5</td></tr>
+ * </thead>
+ * <tbody>
  * <tr><th>2008-12-31</th><td>Wednesday</td>
  *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
  * <tr><th>2009-01-01</th><td>Thursday</td>
@@ -169,6 +176,7 @@
  *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
  * <tr><th>2009-01-05</th><td>Monday</td>
  *  <td>Week 2 of 2009</td><td>Week 1 of 2009</td></tr>
+ * </tbody>
  * </table>
  *
  * @implSpec
--- a/src/java.base/share/classes/java/util/Deque.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/Deque.java	Fri May 12 10:43:28 2017 -0700
@@ -56,7 +56,7 @@
  * <p>The twelve methods described above are summarized in the
  * following table:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Summary of Deque methods</caption>
  *  <tr>
  *    <td></td>
@@ -99,7 +99,7 @@
  * inherited from the {@code Queue} interface are precisely equivalent to
  * {@code Deque} methods as indicated in the following table:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Comparison of Queue and Deque methods</caption>
  *  <tr>
  *    <td style="text-align:center"> <b>{@code Queue} Method</b></td>
@@ -137,7 +137,7 @@
  * beginning of the deque.  Stack methods are precisely equivalent to
  * {@code Deque} methods as indicated in the table below:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Comparison of Stack and Deque methods</caption>
  *  <tr>
  *    <td style="text-align:center"> <b>Stack Method</b></td>
--- a/src/java.base/share/classes/java/util/Formatter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/Formatter.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -290,12 +290,14 @@
  * <pre>
  *    out.toUpperCase(Locale.getDefault(Locale.Category.FORMAT)) </pre>
  *
- * <table cellpadding=5 summary="genConv">
- *
+ * <table class="striped">
+ * <caption style="display:none">genConv</caption>
+ * <thead>
  * <tr><th style="vertical-align:bottom"> Conversion
  *     <th style="vertical-align:bottom"> Argument Category
  *     <th style="vertical-align:bottom"> Description
- *
+ * </thead>
+ * <tbody>
  * <tr><td style="vertical-align:top"> {@code 'b'}, {@code 'B'}
  *     <td style="vertical-align:top"> general
  *     <td> If the argument <i>arg</i> is {@code null}, then the result is
@@ -365,6 +367,7 @@
  *     <td style="vertical-align:top"> line separator
  *     <td> The result is the platform-specific line separator
  *
+ * </tbody>
  * </table>
  *
  * <p> Any characters not explicitly defined as conversions are illegal and are
@@ -381,8 +384,9 @@
  *
  * <p> The following conversion characters are used for formatting times:
  *
- * <table cellpadding=5 summary="time">
- *
+ * <table class="striped">
+ * <caption style="display:none">time</caption>
+ * <tbody>
  * <tr><td style="vertical-align:top"> {@code 'H'}
  *     <td> Hour of the day for the 24-hour clock, formatted as two digits with
  *     a leading zero as necessary i.e. {@code 00 - 23}.
@@ -446,11 +450,14 @@
  *     1970 {@code 00:00:00} UTC, i.e. {@code Long.MIN_VALUE} to
  *     {@code Long.MAX_VALUE}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following conversion characters are used for formatting dates:
  *
- * <table cellpadding=5 summary="date">
+ * <table class="striped">
+ * <caption style="display:none">date</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code 'B'}
  *     <td> Locale-specific {@linkplain java.text.DateFormatSymbols#getMonths
@@ -502,12 +509,15 @@
  * <tr><td style="vertical-align:top">{@code 'e'}
  *     <td> Day of month, formatted as two digits, i.e. {@code 1 - 31}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following conversion characters are used for formatting common
  * date/time compositions.
  *
- * <table cellpadding=5 summary="composites">
+ * <table class="striped">
+ * <caption style="display:none">composites</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code 'R'}
  *     <td> Time formatted for the 24-hour clock as {@code "%tH:%tM"}
@@ -531,6 +541,7 @@
  *     <td> Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"},
  *     e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}.
  *
+ * </tbody>
  * </table>
  *
  * <p> Any characters not explicitly defined as date/time conversion suffixes
@@ -541,14 +552,16 @@
  * <p> The following table summarizes the supported flags.  <i>y</i> means the
  * flag is supported for the indicated argument types.
  *
- * <table cellpadding=5 summary="genConv">
- *
+ * <table class="striped">
+ * <caption style="display:none">genConv</caption>
+ * <thead>
  * <tr><th style="vertical-align:bottom"> Flag <th style="vertical-align:bottom"> General
  *     <th style="vertical-align:bottom"> Character <th style="vertical-align:bottom"> Integral
  *     <th style="vertical-align:bottom"> Floating Point
  *     <th style="vertical-align:bottom"> Date/Time
  *     <th style="vertical-align:bottom"> Description
- *
+ * </thead>
+ * <tbody>
  * <tr><td> '-' <td style="text-align:center; vertical-align:top"> y
  *     <td style="text-align:center; vertical-align:top"> y
  *     <td style="text-align:center; vertical-align:top"> y
@@ -599,6 +612,7 @@
  *     <td style="text-align:center"> -
  *     <td> The result will enclose negative numbers in parentheses
  *
+ * </tbody>
  * </table>
  *
  * <p> <sup>1</sup> Depends on the definition of {@link Formattable}.
@@ -705,7 +719,9 @@
  *
  * <p> The following general conversions may be applied to any argument type:
  *
- * <table cellpadding=5 summary="dgConv">
+ * <table class="striped">
+ * <caption style="display:none">dgConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'b'}
  *     <td style="vertical-align:top"> <code>'&#92;u0062'</code>
@@ -756,11 +772,14 @@
  *     <td style="vertical-align:top"> <code>'&#92;u0053'</code>
  *     <td> The upper-case variant of {@code 's'}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following <a id="dFlags">flags</a> apply to general conversions:
  *
- * <table cellpadding=5 summary="dFlags">
+ * <table class="striped">
+ * <caption style="display:none">dFlags</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code '-'}
  *     <td style="vertical-align:top"> <code>'&#92;u002d'</code>
@@ -775,6 +794,7 @@
  *     <td> Requires the output use an alternate form.  The definition of the
  *     form is specified by the conversion.
  *
+ * </tbody>
  * </table>
  *
  * <p> The <a id="genWidth">width</a> is the minimum number of characters to
@@ -801,7 +821,9 @@
  * {@code false} then an {@link IllegalFormatCodePointException} will be
  * thrown.
  *
- * <table cellpadding=5 summary="charConv">
+ * <table class="striped">
+ * <caption style="display:none">charConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'c'}
  *     <td style="vertical-align:top"> <code>'&#92;u0063'</code>
@@ -817,6 +839,7 @@
  *     <td style="vertical-align:top"> <code>'&#92;u0043'</code>
  *     <td> The upper-case variant of {@code 'c'}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The {@code '-'} flag defined for <a href="#dFlags">General
@@ -902,7 +925,9 @@
  * {@code short}, {@link Short}, {@code int} and {@link Integer},
  * {@code long}, and {@link Long}.
  *
- * <table cellpadding=5 summary="IntConv">
+ * <table class="striped">
+ * <caption style="display:none">IntConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'd'}
  *     <td style="vertical-align:top"> <code>'&#92;u0064'</code>
@@ -968,6 +993,7 @@
  *     all hexadecimal digits {@code 'a'} - {@code 'f'}
  *     (<code>'&#92;u0061'</code> -  <code>'&#92;u0066'</code>).
  *
+ * </tbody>
  * </table>
  *
  * <p> If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and
@@ -982,7 +1008,9 @@
  * <p> The following <a id="intFlags">flags</a> apply to numeric integral
  * conversions:
  *
- * <table cellpadding=5 summary="intFlags">
+ * <table class="striped">
+ * <caption style="display:none">intFlags</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code '+'}
  *     <td style="vertical-align:top"> <code>'&#92;u002b'</code>
@@ -1025,6 +1053,7 @@
  *     (<code>'&#92;u0028'</code>) and append a {@code ')'}
  *     (<code>'&#92;u0029'</code>) to negative values.
  *
+ * </tbody>
  * </table>
  *
  * <p> If no <a id="intdFlags">flags</a> are given the default formatting is
@@ -1060,7 +1089,9 @@
  * <p> The following conversions may be applied to {@link
  * java.math.BigInteger}.
  *
- * <table cellpadding=5 summary="BIntConv">
+ * <table class="striped">
+ * <caption style="display:none">bIntConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'd'}
  *     <td style="vertical-align:top"> <code>'&#92;u0064'</code>
@@ -1125,6 +1156,7 @@
  *     all hexadecimal digits {@code 'a'} - {@code 'f'}
  *     (<code>'&#92;u0061'</code> - <code>'&#92;u0066'</code>).
  *
+ * </tbody>
  * </table>
  *
  * <p> If the conversion is {@code 'o'}, {@code 'x'}, or {@code 'X'} and
@@ -1154,7 +1186,9 @@
  * <p> The following conversions may be applied to {@code float}, {@link
  * Float}, {@code double} and {@link Double}.
  *
- * <table cellpadding=5 summary="floatConv">
+ * <table class="striped">
+ * <caption style="display:none">floatConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'e'}
  *     <td style="vertical-align:top"> <code>'&#92;u0065'</code>
@@ -1331,6 +1365,7 @@
  *     (<code>'&#92;u0070'</code> and all hexadecimal digits {@code 'a'} -
  *     {@code 'f'} (<code>'&#92;u0061'</code> - <code>'&#92;u0066'</code>).
  *
+ * </tbody>
  * </table>
  *
  * <p> All <a href="#intFlags">flags</a> defined for Byte, Short, Integer, and
@@ -1388,7 +1423,9 @@
  * <p> The following conversions may be applied {@link java.math.BigDecimal
  * BigDecimal}.
  *
- * <table cellpadding=5 summary="floatConv">
+ * <table class="striped">
+ * <caption style="display:none">floatConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'e'}
  *     <td style="vertical-align:top"> <code>'&#92;u0065'</code>
@@ -1492,6 +1529,7 @@
  *     For a canonical representation of the value, use {@link
  *     BigDecimal#toString()}.
  *
+ * </tbody>
  * </table>
  *
  * <p> All <a href="#intFlags">flags</a> defined for Byte, Short, Integer, and
@@ -1512,7 +1550,9 @@
  * <p> This conversion may be applied to {@code long}, {@link Long}, {@link
  * Calendar}, {@link Date} and {@link TemporalAccessor TemporalAccessor}
  *
- * <table cellpadding=5 summary="DTConv">
+ * <table class="striped">
+ * <caption style="display:none">DTConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 't'}
  *     <td style="vertical-align:top"> <code>'&#92;u0074'</code>
@@ -1521,6 +1561,7 @@
  *     <td style="vertical-align:top"> <code>'&#92;u0054'</code>
  *     <td> The upper-case variant of {@code 't'}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following date and time conversion character suffixes are defined
@@ -1532,7 +1573,9 @@
  *
  * <p> The following conversion characters are used for formatting times:
  *
- * <table cellpadding=5 summary="time">
+ * <table class="striped">
+ * <caption style="display:none">time</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top"> {@code 'H'}
  *     <td style="vertical-align:top"> <code>'&#92;u0048'</code>
@@ -1620,11 +1663,14 @@
  *     {@code Long.MAX_VALUE}. The precision of this value is limited by
  *     the resolution of the underlying operating system or hardware.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following conversion characters are used for formatting dates:
  *
- * <table cellpadding=5 summary="date">
+ * <table class="striped">
+ * <caption style="display:none">date</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code 'B'}
  *     <td style="vertical-align:top"> <code>'&#92;u0042'</code>
@@ -1692,12 +1738,15 @@
  *     <td> Day of month, formatted as two digits, i.e. {@code 1 - 31} where
  *     "{@code 1}" is the first day of the month.
  *
+ * </tbody>
  * </table>
  *
  * <p> The following conversion characters are used for formatting common
  * date/time compositions.
  *
- * <table cellpadding=5 summary="composites">
+ * <table class="striped">
+ * <caption style="display:none">composites</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code 'R'}
  *     <td style="vertical-align:top"> <code>'&#92;u0052'</code>
@@ -1727,6 +1776,7 @@
  *     <td> Date and time formatted as {@code "%ta %tb %td %tT %tZ %tY"},
  *     e.g. {@code "Sun Jul 20 16:17:00 EDT 1969"}.
  *
+ * </tbody>
  * </table>
  *
  * <p> The {@code '-'} flag defined for <a href="#dFlags">General
@@ -1748,7 +1798,9 @@
  *
  * <p> The conversion does not correspond to any argument.
  *
- * <table cellpadding=5 summary="DTConv">
+ * <table class="striped">
+ * <caption style="display:none">DTConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code '%'}
  *     <td> The result is a literal {@code '%'} (<code>'&#92;u0025'</code>)
@@ -1767,18 +1819,22 @@
  * <p> The precision is not applicable.  If the precision is specified an
  * {@link IllegalFormatPrecisionException} will be thrown.
  *
+ * </tbody>
  * </table>
  *
  * <h4><a id="dls">Line Separator</a></h4>
  *
  * <p> The conversion does not correspond to any argument.
  *
- * <table cellpadding=5 summary="DTConv">
+ * <table class="striped">
+ * <caption style="display:none">DTConv</caption>
+ * <tbody>
  *
  * <tr><td style="vertical-align:top">{@code 'n'}
  *     <td> the platform-specific line separator as returned by {@link
  *     System#lineSeparator()}.
  *
+ * </tbody>
  * </table>
  *
  * <p> Flags, width, and precision are not applicable.  If any are provided an
--- a/src/java.base/share/classes/java/util/GregorianCalendar.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/GregorianCalendar.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -159,88 +159,89 @@
  * undefined. <code>GregorianCalendar</code> uses the following
  * default value for each calendar field if its value is undefined.
  *
- * <table cellpadding="0" cellspacing="3" border="0"
- *        summary="GregorianCalendar default field values"
- *        style="text-align: left; width: 66%;">
+ * <table class="striped" style="text-align: left; width: 66%;">
+ * <caption style="display:none">GregorianCalendar default field values</caption>
+ *   <thead>
+ *     <tr>
+ *       <th>
+ *          Field
+ *       </th>
+ *       <th>
+            Default Value
+ *       </th>
+ *     </tr>
+ *   </thead>
  *   <tbody>
  *     <tr>
- *       <th style="vertical-align: top; background-color: rgb(204, 204, 255);
- *           text-align: center;">Field<br>
- *       </th>
- *       <th style="vertical-align: top; background-color: rgb(204, 204, 255);
- *           text-align: center;">Default Value<br>
- *       </th>
- *     </tr>
- *     <tr>
- *       <td style="vertical-align: middle;">
- *              <code>ERA<br></code>
+ *       <td>
+ *              <code>ERA</code>
  *       </td>
- *       <td style="vertical-align: middle;">
- *              <code>AD<br></code>
+ *       <td>
+ *              <code>AD</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: middle; background-color: rgb(238, 238, 255);">
- *              <code>YEAR<br></code>
+ *       <td>
+ *              <code>YEAR</code>
  *       </td>
- *       <td style="vertical-align: middle; background-color: rgb(238, 238, 255);">
- *              <code>1970<br></code>
+ *       <td>
+ *              <code>1970</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: middle;">
- *              <code>MONTH<br></code>
+ *       <td>
+ *              <code>MONTH</code>
  *       </td>
- *       <td style="vertical-align: middle;">
- *              <code>JANUARY<br></code>
+ *       <td>
+ *              <code>JANUARY</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: top; background-color: rgb(238, 238, 255);">
- *              <code>DAY_OF_MONTH<br></code>
+ *       <td>
+ *              <code>DAY_OF_MONTH</code>
  *       </td>
- *       <td style="vertical-align: top; background-color: rgb(238, 238, 255);">
- *              <code>1<br></code>
+ *       <td>
+ *              <code>1</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: middle;">
- *              <code>DAY_OF_WEEK<br></code>
+ *       <td>
+ *              <code>DAY_OF_WEEK</code>
  *       </td>
- *       <td style="vertical-align: middle;">
- *              <code>the first day of week<br></code>
+ *       <td>
+ *              <code>the first day of week</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: top; background-color: rgb(238, 238, 255);">
- *              <code>WEEK_OF_MONTH<br></code>
+ *       <td>
+ *              <code>WEEK_OF_MONTH</code>
  *       </td>
- *       <td style="vertical-align: top; background-color: rgb(238, 238, 255);">
- *              <code>0<br></code>
+ *       <td>
+ *              <code>0</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: top;">
- *              <code>DAY_OF_WEEK_IN_MONTH<br></code>
+ *       <td>
+ *              <code>DAY_OF_WEEK_IN_MONTH</code>
  *       </td>
- *       <td style="vertical-align: top;">
- *              <code>1<br></code>
+ *       <td>
+ *              <code>1</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: middle; background-color: rgb(238, 238, 255);">
- *              <code>AM_PM<br></code>
+ *       <td>
+ *              <code>AM_PM</code>
  *       </td>
- *       <td style="vertical-align: middle; background-color: rgb(238, 238, 255);">
- *              <code>AM<br></code>
+ *       <td>
+ *              <code>AM</code>
  *       </td>
  *     </tr>
  *     <tr>
- *       <td style="vertical-align: middle;">
- *              <code>HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND<br></code>
+ *       <td>
+ *              <code>HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND</code>
  *       </td>
- *       <td style="vertical-align: middle;">
- *              <code>0<br></code>
+ *       <td>
+ *              <code>0</code>
  *       </td>
  *     </tr>
  *   </tbody>
--- a/src/java.base/share/classes/java/util/Locale.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/Locale.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1587,44 +1587,50 @@
      *
      * <p>Grandfathered tags with canonical replacements are as follows:
      *
-     * <table summary="Grandfathered tags with canonical replacements">
+     * <table class="striped">
+     * <caption style="display:none">Grandfathered tags with canonical replacements</caption>
+     * <thead style="text-align:center">
+     * <tr><th style="padding: 0 2px">grandfathered tag</th><th style="padding: 0 2px">modern replacement</th></tr>
+     * </thead>
      * <tbody style="text-align:center">
-     * <tr><th>grandfathered tag</th><th>&nbsp;</th><th>modern replacement</th></tr>
-     * <tr><td>art-lojban</td><td>&nbsp;</td><td>jbo</td></tr>
-     * <tr><td>i-ami</td><td>&nbsp;</td><td>ami</td></tr>
-     * <tr><td>i-bnn</td><td>&nbsp;</td><td>bnn</td></tr>
-     * <tr><td>i-hak</td><td>&nbsp;</td><td>hak</td></tr>
-     * <tr><td>i-klingon</td><td>&nbsp;</td><td>tlh</td></tr>
-     * <tr><td>i-lux</td><td>&nbsp;</td><td>lb</td></tr>
-     * <tr><td>i-navajo</td><td>&nbsp;</td><td>nv</td></tr>
-     * <tr><td>i-pwn</td><td>&nbsp;</td><td>pwn</td></tr>
-     * <tr><td>i-tao</td><td>&nbsp;</td><td>tao</td></tr>
-     * <tr><td>i-tay</td><td>&nbsp;</td><td>tay</td></tr>
-     * <tr><td>i-tsu</td><td>&nbsp;</td><td>tsu</td></tr>
-     * <tr><td>no-bok</td><td>&nbsp;</td><td>nb</td></tr>
-     * <tr><td>no-nyn</td><td>&nbsp;</td><td>nn</td></tr>
-     * <tr><td>sgn-BE-FR</td><td>&nbsp;</td><td>sfb</td></tr>
-     * <tr><td>sgn-BE-NL</td><td>&nbsp;</td><td>vgt</td></tr>
-     * <tr><td>sgn-CH-DE</td><td>&nbsp;</td><td>sgg</td></tr>
-     * <tr><td>zh-guoyu</td><td>&nbsp;</td><td>cmn</td></tr>
-     * <tr><td>zh-hakka</td><td>&nbsp;</td><td>hak</td></tr>
-     * <tr><td>zh-min-nan</td><td>&nbsp;</td><td>nan</td></tr>
-     * <tr><td>zh-xiang</td><td>&nbsp;</td><td>hsn</td></tr>
+     * <tr><td>art-lojban</td><td>jbo</td></tr>
+     * <tr><td>i-ami</td><td>ami</td></tr>
+     * <tr><td>i-bnn</td><td>bnn</td></tr>
+     * <tr><td>i-hak</td><td>hak</td></tr>
+     * <tr><td>i-klingon</td><td>tlh</td></tr>
+     * <tr><td>i-lux</td><td>lb</td></tr>
+     * <tr><td>i-navajo</td><td>nv</td></tr>
+     * <tr><td>i-pwn</td><td>pwn</td></tr>
+     * <tr><td>i-tao</td><td>tao</td></tr>
+     * <tr><td>i-tay</td><td>tay</td></tr>
+     * <tr><td>i-tsu</td><td>tsu</td></tr>
+     * <tr><td>no-bok</td><td>nb</td></tr>
+     * <tr><td>no-nyn</td><td>nn</td></tr>
+     * <tr><td>sgn-BE-FR</td><td>sfb</td></tr>
+     * <tr><td>sgn-BE-NL</td><td>vgt</td></tr>
+     * <tr><td>sgn-CH-DE</td><td>sgg</td></tr>
+     * <tr><td>zh-guoyu</td><td>cmn</td></tr>
+     * <tr><td>zh-hakka</td><td>hak</td></tr>
+     * <tr><td>zh-min-nan</td><td>nan</td></tr>
+     * <tr><td>zh-xiang</td><td>hsn</td></tr>
      * </tbody>
      * </table>
      *
      * <p>Grandfathered tags with no modern replacement will be
      * converted as follows:
      *
-     * <table summary="Grandfathered tags with no modern replacement">
+     * <table class="striped">
+     * <caption style="display:none">Grandfathered tags with no modern replacement</caption>
+     * <thead style="text-align:center">
+     * <tr><th style="padding: 0 2px">grandfathered tag</th><th style="padding: 0 2px">converts to</th></tr>
+     * </thead>
      * <tbody style="text-align:center">
-     * <tr><th>grandfathered tag</th><th>&nbsp;</th><th>converts to</th></tr>
-     * <tr><td>cel-gaulish</td><td>&nbsp;</td><td>xtg-x-cel-gaulish</td></tr>
-     * <tr><td>en-GB-oed</td><td>&nbsp;</td><td>en-GB-x-oed</td></tr>
-     * <tr><td>i-default</td><td>&nbsp;</td><td>en-x-i-default</td></tr>
-     * <tr><td>i-enochian</td><td>&nbsp;</td><td>und-x-i-enochian</td></tr>
-     * <tr><td>i-mingo</td><td>&nbsp;</td><td>see-x-i-mingo</td></tr>
-     * <tr><td>zh-min</td><td>&nbsp;</td><td>nan-x-zh-min</td></tr>
+     * <tr><td>cel-gaulish</td><td>xtg-x-cel-gaulish</td></tr>
+     * <tr><td>en-GB-oed</td><td>en-GB-x-oed</td></tr>
+     * <tr><td>i-default</td><td>en-x-i-default</td></tr>
+     * <tr><td>i-enochian</td><td>und-x-i-enochian</td></tr>
+     * <tr><td>i-mingo</td><td>see-x-i-mingo</td></tr>
+     * <tr><td>zh-min</td><td>nan-x-zh-min</td></tr>
      * </tbody>
      * </table>
      *
@@ -2767,12 +2773,16 @@
      *
      * The filtering method will behave as follows:
      *
-     * <table cellpadding=2 summary="Filtering method behavior">
+     * <table class="striped">
+     * <caption>Filtering method behavior</caption>
+     * <thead>
      * <tr>
      * <th>Filtering Mode</th>
      * <th>Language Priority List: {@code "de-DE"}</th>
      * <th>Language Priority List: {@code "de-*-DE"}</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      * <td style="vertical-align:top">
      * {@link FilteringMode#AUTOSELECT_FILTERING AUTOSELECT_FILTERING}
@@ -2832,6 +2842,7 @@
      * not a valid basic language range.
      * </td>
      * </tr>
+     * </tbody>
      * </table>
      *
      * @see #filter(List, Collection, FilteringMode)
--- a/src/java.base/share/classes/java/util/Queue.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/Queue.java	Fri May 12 10:43:28 2017 -0700
@@ -47,7 +47,7 @@
  * implementations; in most implementations, insert operations cannot
  * fail.
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Summary of Queue methods</caption>
  *  <tr>
  *    <td></td>
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Fri May 12 10:43:28 2017 -0700
@@ -1222,12 +1222,15 @@
      * <p>Calling <code>getBundle</code> with the locale arguments below will
      * instantiate resource bundles as follows:
      *
-     * <table summary="getBundle() locale to resource bundle mapping">
+     * <table class="borderless">
+     * <caption style="display:none">getBundle() locale to resource bundle mapping</caption>
+     * <tbody>
      * <tr><td>Locale("fr", "CH")</td><td>MyResources_fr_CH.class, parent MyResources_fr.properties, parent MyResources.class</td></tr>
      * <tr><td>Locale("fr", "FR")</td><td>MyResources_fr.properties, parent MyResources.class</td></tr>
      * <tr><td>Locale("de", "DE")</td><td>MyResources_en.properties, parent MyResources.class</td></tr>
      * <tr><td>Locale("en", "US")</td><td>MyResources_en.properties, parent MyResources.class</td></tr>
      * <tr><td>Locale("es", "ES")</td><td>MyResources_es_ES.class, parent MyResources.class</td></tr>
+     * </tbody>
      * </table>
      *
      * <p>The file MyResources_fr_CH.properties is never used because it is
@@ -1311,9 +1314,9 @@
      * sequence of locale-format combinations to be used to call
      * <code>control.newBundle</code>.
      *
-     * <table style="width: 50%; text-align: left; margin-left: 40px;"
-     *  border="0" cellpadding="2" cellspacing="2" summary="locale-format combinations for newBundle">
-     * <tbody>
+     * <table class=striped style="width: 50%; text-align: left; margin-left: 40px;">
+     * <caption style="display:none">locale-format combinations for newBundle</caption>
+     * <thead>
      * <tr>
      * <td
      * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;"><code>Locale</code><br>
@@ -1322,6 +1325,8 @@
      * style="vertical-align: top; text-align: left; font-weight: bold; width: 50%;"><code>format</code><br>
      * </td>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
      * <td style="vertical-align: top; width: 50%;"><code>Locale("de", "DE")</code><br>
      * </td>
--- a/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/BlockingDeque.java	Fri May 12 10:43:28 2017 -0700
@@ -53,7 +53,7 @@
  * and the fourth blocks for only a given maximum time limit before giving
  * up.  These methods are summarized in the following table:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Summary of BlockingDeque methods</caption>
  *  <tr>
  *    <td style="text-align:center" COLSPAN = 5> <b>First Element (Head)</b></td>
@@ -128,7 +128,7 @@
  * {@code BlockingQueue} interface are precisely equivalent to
  * {@code BlockingDeque} methods as indicated in the following table:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Comparison of BlockingQueue and BlockingDeque methods</caption>
  *  <tr>
  *    <td style="text-align:center"> <b>{@code BlockingQueue} Method</b></td>
--- a/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/BlockingQueue.java	Fri May 12 10:43:28 2017 -0700
@@ -53,7 +53,7 @@
  * and the fourth blocks for only a given maximum time limit before giving
  * up.  These methods are summarized in the following table:
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Summary of BlockingQueue methods</caption>
  *  <tr>
  *    <td></td>
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Fri May 12 10:43:28 2017 -0700
@@ -109,7 +109,7 @@
  * async event-style tasks that are not usually joined, in which case
  * there is little difference among choice of methods.
  *
- * <table BORDER CELLPADDING=3 CELLSPACING=1>
+ * <table class="plain">
  * <caption>Summary of task execution methods</caption>
  *  <tr>
  *    <td></td>
--- a/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/concurrent/ThreadLocalRandom.java	Fri May 12 10:43:28 2017 -0700
@@ -49,6 +49,7 @@
 import java.util.stream.LongStream;
 import java.util.stream.StreamSupport;
 import jdk.internal.misc.Unsafe;
+import jdk.internal.misc.VM;
 
 /**
  * A random number generator isolated to the current thread.  Like the
@@ -1093,11 +1094,8 @@
 
     // at end of <clinit> to survive static initialization circularity
     static {
-        if (java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<>() {
-                public Boolean run() {
-                    return Boolean.getBoolean("java.util.secureRandomSeed");
-                }})) {
+        String sec = VM.getSavedProperty("java.util.secureRandomSeed");
+        if (Boolean.parseBoolean(sec)) {
             byte[] seedBytes = java.security.SecureRandom.getSeed(8);
             long s = (long)seedBytes[0] & 0xffL;
             for (int i = 1; i < 8; ++i)
--- a/src/java.base/share/classes/java/util/regex/Pattern.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/regex/Pattern.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, 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
@@ -79,13 +79,15 @@
  *
  * <h3><a id="sum">Summary of regular-expression constructs</a></h3>
  *
- * <table border="0" cellpadding="1" cellspacing="0"
- *  summary="Regular expression constructs, and what they match">
- *
+ * <table class="borderless">
+ * <caption style="display:none">Regular expression constructs, and what they match</caption>
+ * <thead>
  * <tr style="text-align:left">
  * <th style="text-align:left" id="construct">Construct</th>
  * <th style="text-align:left" id="matches">Matches</th>
  * </tr>
+ * </thead>
+ * <tbody>
  *
  * <tr><th>&nbsp;</th></tr>
  * <tr style="text-align:left"><th colspan="2" id="characters">Characters</th></tr>
@@ -383,6 +385,7 @@
  * <tr><td style="vertical-align:top" headers="construct special">{@code (?>}<i>X</i>{@code )}</td>
  *     <td headers="matches"><i>X</i>, as an independent, non-capturing group</td></tr>
  *
+ * </tbody>
  * </table>
  *
  * <hr>
@@ -429,8 +432,9 @@
  *    <p> The precedence of character-class operators is as follows, from
  *    highest to lowest:
  *
- *    <blockquote><table border="0" cellpadding="1" cellspacing="0"
- *                 summary="Precedence of character class operators.">
+ *    <blockquote><table>
+ *      <caption style="display:none">Precedence of character class operators.</caption>
+ *      <tbody>
  *      <tr><th>1&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *        <td>Literal escape&nbsp;&nbsp;&nbsp;&nbsp;</td>
  *        <td>{@code \x}</td></tr>
@@ -446,6 +450,7 @@
  *      <tr><th>5&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *        <td>Intersection</td>
  *        <td>{@code [a-z&&[aeiou]]}</td></tr>
+ *      </tbody>
  *    </table></blockquote>
  *
  *    <p> Note that a different set of metacharacters are in effect inside
@@ -496,7 +501,9 @@
  * left to right.  In the expression {@code ((A)(B(C)))}, for example, there
  * are four such groups: </p>
  *
- * <blockquote><table cellpadding=1 cellspacing=0 summary="Capturing group numberings">
+ * <blockquote><table>
+ * <caption style="display:none">Capturing group numberings</caption>
+ * <tbody>
  * <tr><th>1&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *     <td>{@code ((A)(B(C)))}</td></tr>
  * <tr><th>2&nbsp;&nbsp;&nbsp;&nbsp;</th>
@@ -505,6 +512,7 @@
  *     <td>{@code (B(C))}</td></tr>
  * <tr><th>4&nbsp;&nbsp;&nbsp;&nbsp;</th>
  *     <td>{@code (C)}</td></tr>
+ * </tbody>
  * </table></blockquote>
  *
  * <p> Group zero always stands for the entire expression.
@@ -641,12 +649,15 @@
  * of <a href="http://www.unicode.org/reports/tr18/"><i>Unicode Regular Expression
  * </i></a>, when {@link #UNICODE_CHARACTER_CLASS} flag is specified.
  *
- * <table border="0" cellpadding="1" cellspacing="0"
- *  summary="predefined and posix character classes in Unicode mode">
+ * <table>
+ * <caption style="display:none">predefined and posix character classes in Unicode mode</caption>
+ * <thead>
  * <tr style="text-align:left">
  * <th style="text-align:left" id="predef_classes">Classes</th>
  * <th style="text-align:left" id="predef_matches">Matches</th>
- *</tr>
+ * </tr>
+ * </thead>
+ * <tbody>
  * <tr><td>{@code \p{Lower}}</td>
  *     <td>A lowercase character:{@code \p{IsLowercase}}</td></tr>
  * <tr><td>{@code \p{Upper}}</td>
@@ -685,6 +696,7 @@
  *     <td>A word character: {@code [\p{Alpha}\p{gc=Mn}\p{gc=Me}\p{gc=Mc}\p{Digit}\p{gc=Pc}\p{IsJoin_Control}]}</td></tr>
  * <tr><td>{@code \W}</td>
  *     <td>A non-word character: {@code [^\w]}</td></tr>
+ * </tbody>
  * </table>
  * <p>
  * <a id="jcc">
@@ -1207,11 +1219,14 @@
      * <p> The input {@code "boo:and:foo"}, for example, yields the following
      * results with these parameters:
      *
-     * <blockquote><table cellpadding=1 cellspacing=0
-     *              summary="Split examples showing regex, limit, and result">
+     * <blockquote><table>
+     * <caption>Split examples showing regex, limit, and result</caption>
+     * <thead>
      * <tr><th style="text-align:left"><i>Regex&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
      *     <th style="text-align:left"><i>Limit&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
      *     <th style="text-align:left"><i>Result&nbsp;&nbsp;&nbsp;&nbsp;</i></th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td style="text-align:center">:</td>
      *     <td style="text-align:center">2</td>
      *     <td>{@code { "boo", "and:foo" }}</td></tr>
@@ -1230,6 +1245,7 @@
      * <tr><td style="text-align:center">o</td>
      *     <td style="text-align:center">0</td>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
+     * </tbody>
      * </table></blockquote>
      *
      * @param  input
@@ -1294,14 +1310,18 @@
      * <p> The input {@code "boo:and:foo"}, for example, yields the following
      * results with these expressions:
      *
-     * <blockquote><table cellpadding=1 cellspacing=0
-     *              summary="Split examples showing regex and result">
+     * <blockquote><table>
+     * <caption style="display:none">Split examples showing regex and result</caption>
+     * <thead>
      * <tr><th style="text-align:left"><i>Regex&nbsp;&nbsp;&nbsp;&nbsp;</i></th>
      *     <th style="text-align:left"><i>Result</i></th></tr>
+     * </thead>
+     * <tbody>
      * <tr><td style="text-align:center">:</td>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
      * <tr><td style="text-align:center">o</td>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
+     * </tbody>
      * </table></blockquote>
      *
      *
--- a/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -46,12 +46,16 @@
  * Calendar}. The following are calendar-common fields and their values to be
  * supported for each calendar system.
  *
- * <table style="border-bottom:1px solid" border="1" cellpadding="3" cellspacing="0" summary="Field values">
+ * <table class="plain" style="border-bottom:1px solid">
+ * <caption style="display:none">Field values</caption>
+ * <thead>
  *   <tr>
  *     <th>Field</th>
  *     <th>Value</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td valign="top">{@link Calendar#MONTH}</td>
  *     <td valign="top">{@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER}</td>
@@ -73,17 +77,22 @@
  *     <td valign="top">{@link Calendar#AM} to {@link Calendar#PM}</td>
  *     <td>0 - AM, 1 - PM</td>
  *   </tr>
+ * </tbody>
  * </table>
  *
  * <p style="margin-top:20px">The following are calendar-specific fields and their values to be supported.
  *
- * <table style="border-bottom:1px solid" border="1" cellpadding="3" cellspacing="0" summary="Calendar type and field values">
+ * <table class="plain" style="border-bottom:1px solid">
+ * <caption style="display:none">Calendar type and field values</caption>
+ * <thead>
  *   <tr>
  *     <th>Calendar Type</th>
  *     <th>Field</th>
  *     <th>Value</th>
  *     <th>Description</th>
  *   </tr>
+ * </thead>
+ * <tbody>
  *   <tr>
  *     <td rowspan="2" valign="top">{@code "gregory"}</td>
  *     <td rowspan="2" valign="top">{@link Calendar#ERA}</td>
@@ -154,6 +163,7 @@
  *     <td>1</td>
  *     <td>Anno Hijrah (AH)</td>
  *   </tr>
+ * </tbody>
  * </table>
  *
  * <p>Calendar field value names for {@code "gregory"} must be consistent with
--- a/src/java.base/share/classes/java/util/stream/StreamOpFlag.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/java/util/stream/StreamOpFlag.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -41,7 +41,7 @@
  * contexts:
  *
  * <div>
- * <table>
+ * <table class="borderless">
  *   <caption>Type Characteristics</caption>
  *   <thead class="tableSubHeadingColor">
  *     <tr>
--- a/src/java.base/share/classes/javax/crypto/Cipher.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/Cipher.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -150,9 +150,9 @@
  * <li>{@code RSA/ECB/OAEPWithSHA-256AndMGF1Padding} (1024, 2048)</li>
  * </ul>
  * These transformations are described in the
- * <a href="{@docRoot}/../technotes/guides/security/StandardNames.html#Cipher">
+ * <a href="{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names">
  * Cipher section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other transformations are supported.
  *
@@ -489,8 +489,8 @@
      * @param transformation the name of the transformation, e.g.,
      * <i>DES/CBC/PKCS5Padding</i>.
      * See the Cipher section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Cipher">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard transformation names.
      *
      * @return a cipher that implements the requested transformation
@@ -567,8 +567,8 @@
      * @param transformation the name of the transformation,
      * e.g., <i>DES/CBC/PKCS5Padding</i>.
      * See the Cipher section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Cipher">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard transformation names.
      *
      * @param provider the name of the provider.
@@ -627,8 +627,8 @@
      * @param transformation the name of the transformation,
      * e.g., <i>DES/CBC/PKCS5Padding</i>.
      * See the Cipher section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Cipher">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#cipher-algorithm-names">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard transformation names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/CipherInputStream.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/CipherInputStream.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -93,7 +93,7 @@
     // stream status
     private boolean closed = false;
 
-    /**
+    /*
      * private convenience function.
      *
      * Entry condition: ostart = ofinish
--- a/src/java.base/share/classes/javax/crypto/CryptoPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/CryptoPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, 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
@@ -196,19 +196,19 @@
      * Checks if the specified permission is "implied" by
      * this object.
      * <p>
-     * More specifically, this method returns true if:<p>
+     * More specifically, this method returns true if:
      * <ul>
-     * <li> <i>p</i> is an instance of CryptoPermission, and<p>
+     * <li> <i>p</i> is an instance of CryptoPermission, and</li>
      * <li> <i>p</i>'s algorithm name equals or (in the case of wildcards)
-     *       is implied by this permission's algorithm name, and<p>
+     *       is implied by this permission's algorithm name, and</li>
      * <li> <i>p</i>'s maximum allowable key size is less or
-     *       equal to this permission's maximum allowable key size, and<p>
+     *       equal to this permission's maximum allowable key size, and</li>
      * <li> <i>p</i>'s algorithm parameter spec equals or is
-     *        implied by this permission's algorithm parameter spec, and<p>
+     *        implied by this permission's algorithm parameter spec, and</li>
      * <li> <i>p</i>'s exemptionMechanism equals or
      *        is implied by this permission's
      *        exemptionMechanism (a <code>null</code> exemption mechanism
-     *        implies any other exemption mechanism).
+     *        implies any other exemption mechanism).</li>
      * </ul>
      *
      * @param p the permission to check against.
--- a/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, 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
@@ -46,10 +46,12 @@
  *
  * The format of a permission entry in the jurisdiction policy file is:
  *
+ * <pre>{@code
  *   permission <crypto permission class name>[, <algorithm name>
  *              [[, <exemption mechanism name>][, <maxKeySize>
  *              [, <AlgrithomParameterSpec class name>, <parameters
  *              for constructing an AlgrithomParameterSpec object>]]]];
+ * }</pre>
  *
  * @author Sharon Liu
  *
@@ -526,8 +528,7 @@
 
     /**
      * Each grant entry in the policy configuration file is  represented by a
-     * GrantEntry object.  <p>
-     *
+     * GrantEntry object.
      * <p>
      * For example, the entry
      * <pre>
@@ -587,8 +588,7 @@
 
     /**
      * Each crypto permission entry in the policy configuration file is
-     * represented by a CryptoPermissionEntry object.  <p>
-     *
+     * represented by a CryptoPermissionEntry object.
      * <p>
      * For example, the entry
      * <pre>
--- a/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/ExemptionMechanism.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, 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
@@ -125,8 +125,8 @@
      * mechanism.
      * See the ExemptionMechanism section in the
      * <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Exemption">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard exemption mechanism names.
      *
      * @return the new {@code ExemptionMechanism} object
@@ -164,8 +164,8 @@
      * @param algorithm the standard name of the requested exemption mechanism.
      * See the ExemptionMechanism section in the
      * <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Exemption">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard exemption mechanism names.
      *
      * @param provider the name of the provider.
@@ -208,8 +208,8 @@
      * @param algorithm the standard name of the requested exemption mechanism.
      * See the ExemptionMechanism section in the
      * <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Exemption">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#exemption-mechanisms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard exemption mechanism names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/KeyAgreement.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -60,9 +60,9 @@
  * <li>{@code DiffieHellman}</li>
  * </ul>
  * This algorithm is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement">
+ * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms">
  * KeyAgreement section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -161,8 +161,8 @@
      * @param algorithm the standard name of the requested key agreement
      * algorithm.
      * See the KeyAgreement section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code KeyAgreement} object
@@ -208,8 +208,8 @@
      * @param algorithm the standard name of the requested key agreement
      * algorithm.
      * See the KeyAgreement section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -252,8 +252,8 @@
      * @param algorithm the standard name of the requested key agreement
      * algorithm.
      * See the KeyAgreement section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyAgreement">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keyagreement-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/KeyGenerator.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -95,9 +95,9 @@
  * <li>{@code HmacSHA256}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
+ * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms">
  * KeyGenerator section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -216,8 +216,8 @@
      *
      * @param algorithm the standard name of the requested key algorithm.
      * See the KeyGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code KeyGenerator} object
@@ -250,8 +250,8 @@
      *
      * @param algorithm the standard name of the requested key algorithm.
      * See the KeyGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -293,8 +293,8 @@
      *
      * @param algorithm the standard name of the requested key algorithm.
      * See the KeyGenerator section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#KeyGenerator">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#keygenerator-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/Mac.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/Mac.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -61,9 +61,9 @@
  * <li>{@code HmacSHA256}</li>
  * </ul>
  * These algorithms are described in the
- * <a href="{@docRoot}/../technotes/guides/security/StandardNames.html#Mac">
+ * <a href="{@docRoot}/../specs/security/standard-names.html#mac-algorithms">
  * Mac section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -162,8 +162,8 @@
      *
      * @param algorithm the standard name of the requested MAC algorithm.
      * See the Mac section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Mac">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#mac-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code Mac} object
@@ -206,8 +206,8 @@
      *
      * @param algorithm the standard name of the requested MAC algorithm.
      * See the Mac section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Mac">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#mac-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -247,8 +247,8 @@
      *
      * @param algorithm the standard name of the requested MAC algorithm.
      * See the Mac section in the <a href=
-     *   "{@docRoot}/../technotes/guides/security/StandardNames.html#Mac">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     *   "{@docRoot}/../specs/security/standard-names.html#mac-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/SecretKeyFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -65,9 +65,9 @@
  * <li>{@code DESede}</li>
  * </ul>
  * These algorithms are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
+ * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms">
  * SecretKeyFactory section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -148,8 +148,8 @@
      * @param algorithm the standard name of the requested secret-key
      * algorithm.
      * See the SecretKeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @return the new {@code SecretKeyFactory} object
@@ -183,8 +183,8 @@
      * @param algorithm the standard name of the requested secret-key
      * algorithm.
      * See the SecretKeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the name of the provider.
@@ -227,8 +227,8 @@
      * @param algorithm the standard name of the requested secret-key
      * algorithm.
      * See the SecretKeyFactory section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SecretKeyFactory">
-     * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#secretkeyfactory-algorithms">
+     * Java Security Standard Algorithm Names Specification</a>
      * for information about standard algorithm names.
      *
      * @param provider the provider.
--- a/src/java.base/share/classes/javax/crypto/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/crypto/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -42,9 +42,9 @@
  * having to add or rewrite code.
  *
  * <ul>
- *   <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- *     <b>Java&trade; Cryptography Architecture Standard Algorithm Name
- *     Documentation</b></a></li>
+ *   <li><a href="{@docRoot}/../specs/security/standard-names.html">
+ *     <b>Java&trade; Security Standard Algorithm Names Specification
+ *     </b></a></li>
  * </ul>
  *
  * <h2>Related Documentation</h2>
--- a/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, 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
@@ -45,9 +45,9 @@
  * <li>{@code TLSv1.2}</li>
  * </ul>
  * These protocols are described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#SSLContext">
+ * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
  * SSLContext section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
@@ -147,9 +147,8 @@
      *
      * @param protocol the standard name of the requested protocol.
      *          See the SSLContext section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SSLContext">
-     *          Java Cryptography Architecture Standard Algorithm Name
-     *          Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
+     *          Java Security Standard Algorithm Names Specification</a>
      *          for information about standard protocol names.
      *
      * @return the new {@code SSLContext} object
@@ -185,9 +184,8 @@
      *
      * @param protocol the standard name of the requested protocol.
      *          See the SSLContext section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SSLContext">
-     *          Java Cryptography Architecture Standard Algorithm Name
-     *          Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
+     *          Java Security Standard Algorithm Names Specification</a>
      *          for information about standard protocol names.
      *
      * @param provider the name of the provider.
@@ -228,9 +226,8 @@
      *
      * @param protocol the standard name of the requested protocol.
      *          See the SSLContext section in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#SSLContext">
-     *          Java Cryptography Architecture Standard Algorithm Name
-     *          Documentation</a>
+     * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
+     *          Java Security Standard Algorithm Names Specification</a>
      *          for information about standard protocol names.
      *
      * @param provider an instance of the provider.
--- a/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -866,7 +866,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -892,7 +892,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -914,7 +914,7 @@
      * <P>
      * Note that the standard list of cipher suite names may be found in the
      * <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list or might not
--- a/src/java.base/share/classes/javax/net/ssl/SSLParameters.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLParameters.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -110,7 +110,7 @@
      * constructor followed by
      * {@code setCipherSuites(cipherSuites);}.  Note that the
      * standard list of cipher suite names may be found in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list.
@@ -130,7 +130,7 @@
      * {@code setCipherSuites(cipherSuites); setProtocols(protocols);}.
      * Note that the standard list of cipher suite names may be found in the
      * <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list.
@@ -153,7 +153,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -170,7 +170,7 @@
      *
      * @param cipherSuites the array of ciphersuites (or null).  Note that the
      * standard list of cipher suite names may be found in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list or might not
@@ -675,4 +675,3 @@
         applicationProtocols = tempProtocols;
     }
 }
-
--- a/src/java.base/share/classes/javax/net/ssl/SSLPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,14 +44,17 @@
  * and for each provides a description of what the permission allows
  * and a discussion of the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5
- *  summary="permission name, what it allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">permission name, what it allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
  *
+ * <tbody>
  * <tr>
  *   <td>setHostnameVerifier</td>
  *   <td>The ability to set a callback which can decide whether to
@@ -84,6 +87,7 @@
  * </td>
  * </tr>
  *
+ * </tbody>
  * </table>
  *
  * @see java.security.BasicPermission
--- a/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLServerSocket.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -198,7 +198,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -224,7 +224,7 @@
      * <P>
      * Note that the standard list of cipher suite names may be found in the
      * <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list or might not
@@ -254,7 +254,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
--- a/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLServerSocketFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -126,7 +126,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -147,7 +147,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -270,7 +270,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -296,7 +296,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -318,7 +318,7 @@
      * <P>
      * Note that the standard list of cipher suite names may be found in the
      * <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation.  Providers
      * may support cipher suite names not found in this list or might not
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -151,7 +151,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
@@ -170,7 +170,7 @@
      * <P>
      * The returned array includes cipher suites from the list of standard
      * cipher suite names in the <a href=
-     * "{@docRoot}/../technotes/guides/security/StandardNames.html#ciphersuites">
+     * "{@docRoot}/../specs/security/standard-names.html#jsse-cipher-suite-names">
      * JSSE Cipher Suite Names</a> section of the Java Cryptography
      * Architecture Standard Algorithm Name Documentation, and may also
      * include other cipher suites that the provider supports.
--- a/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, 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
@@ -43,9 +43,9 @@
  * <li>{@code PKIX}</li>
  * </ul>
  * This algorithm is described in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#TrustManagerFactory">
+ * "{@docRoot}/../specs/security/standard-names.html#trustmanagerfactory-algorithms">
  * TrustManagerFactory section</a> of the
- * Java Cryptography Architecture Standard Algorithm Name Documentation.
+ * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
  * other algorithms are supported.
  *
--- a/src/java.base/share/classes/javax/net/ssl/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/net/ssl/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -31,9 +31,9 @@
  * the communicating peers.
  *
  * <ul>
- * <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- * <b>Java&trade; Cryptography Architecture Standard Algorithm Name
- * Documentation</b></a></li>
+ * <li><a href="{@docRoot}/../specs/security/standard-names.html">
+ * <b>Java&trade; Security Standard Algorithm Names Specification
+ * </b></a></li>
  * </ul>
  *
  * @since 1.4
--- a/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -178,8 +178,8 @@
  * constructed by invoking one of the {@code getInstance} factory methods
  * with a standard type.  The default policy type is "JavaLoginConfig".
  * See the Configuration section in the <a href=
- * "{@docRoot}/../technotes/guides/security/StandardNames.html#Configuration">
- * Java Cryptography Architecture Standard Algorithm Name Documentation</a>
+ * "{@docRoot}/../specs/security/standard-names.html#configuration-types">
+ * Java Security Standard Algorithm Names Specification</a>
  * for a list of standard Configuration types.
  *
  * @see javax.security.auth.login.LoginContext
@@ -323,9 +323,9 @@
      *
      * @param type the specified Configuration type.  See the Configuration
      *    section in the <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Configuration">
-     *    Java Cryptography Architecture Standard Algorithm Name
-     *    Documentation</a> for a list of standard Configuration types.
+     *    "{@docRoot}/../specs/security/standard-names.html#configuration-types">
+     *    Java Security Standard Algorithm Names Specification</a>
+     *    for a list of standard Configuration types.
      *
      * @param params parameters for the Configuration, which may be null.
      *
@@ -381,9 +381,9 @@
      *
      * @param type the specified Configuration type.  See the Configuration
      *    section in the <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Configuration">
-     *    Java Cryptography Architecture Standard Algorithm Name
-     *    Documentation</a> for a list of standard Configuration types.
+     *    "{@docRoot}/../specs/security/standard-names.html#configuration-types">
+     *    Java Security Standard Algorithm Names Specification</a>
+     *    for a list of standard Configuration types.
      *
      * @param params parameters for the Configuration, which may be null.
      *
@@ -448,9 +448,9 @@
      *
      * @param type the specified Configuration type.  See the Configuration
      *    section in the <a href=
-     *    "{@docRoot}/../technotes/guides/security/StandardNames.html#Configuration">
-     *    Java Cryptography Architecture Standard Algorithm Name
-     *    Documentation</a> for a list of standard Configuration types.
+     *    "{@docRoot}/../specs/security/standard-names.html#configuration-types">
+     *    Java Security Standard Algorithm Names Specification</a>
+     *    for a list of standard Configuration types.
      *
      * @param params parameters for the Configuration, which may be null.
      *
--- a/src/java.base/share/classes/javax/security/auth/login/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/javax/security/auth/login/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,9 @@
  * <h2>Package Specification</h2>
  *
  * <ul>
- *   <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
- *     <b>Java&trade;
- *     Cryptography Architecture Standard Algorithm Name
- *     Documentation</b></a></li>
+ *   <li><a href="{@docRoot}/../specs/security/standard-names.html">
+ *     <b>Java&trade; Security Standard Algorithm Names Specification
+ *     </b></a></li>
  * </ul>
  *
  * @since 1.4
--- a/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java	Fri May 12 10:43:28 2017 -0700
@@ -172,12 +172,10 @@
     }
 
     /**
-     * Register a module this this class loader. This has the effect of making
-     * the types in the module visible.
+     * Register a module this class loader. This has the effect of making the
+     * types in the module visible.
      */
     public void loadModule(ModuleReference mref) {
-        assert !VM.isModuleSystemInited();
-
         String mn = mref.descriptor().name();
         if (nameToModule.putIfAbsent(mn, mref) != null) {
             throw new InternalError(mn + " already defined to this loader");
@@ -191,6 +189,11 @@
                                         + other.mref().descriptor().name());
             }
         }
+
+        // clear resources cache if VM is already initialized
+        if (VM.isModuleSystemInited() && resourceCache != null) {
+            resourceCache = null;
+        }
     }
 
     /**
@@ -355,7 +358,10 @@
     private List<URL> findMiscResource(String name) throws IOException {
         SoftReference<Map<String, List<URL>>> ref = this.resourceCache;
         Map<String, List<URL>> map = (ref != null) ? ref.get() : null;
-        if (map != null) {
+        if (map == null) {
+            map = new ConcurrentHashMap<>();
+            this.resourceCache = new SoftReference<>(map);
+        } else {
             List<URL> urls = map.get(name);
             if (urls != null)
                 return urls;
@@ -381,23 +387,18 @@
                                 }
                             }
                         }
-                        return result;
+                        return (result != null) ? result : Collections.emptyList();
                     }
                 });
         } catch (PrivilegedActionException pae) {
             throw (IOException) pae.getCause();
         }
 
-        // only cache resources after all modules have been defined
+        // only cache resources after VM is fully initialized
         if (VM.isModuleSystemInited()) {
-            if (map == null) {
-                map = new ConcurrentHashMap<>();
-                this.resourceCache = new SoftReference<>(map);
-            }
-            if (urls == null)
-                urls = Collections.emptyList();
             map.putIfAbsent(name, urls);
         }
+
         return urls;
     }
 
--- a/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java	Fri May 12 10:43:28 2017 -0700
@@ -25,13 +25,11 @@
 
 package jdk.internal.misc;
 
-import java.io.IOException;
 import java.lang.annotation.Annotation;
 import java.lang.module.ModuleDescriptor;
 import java.lang.reflect.Executable;
 import java.lang.reflect.Method;
 import java.net.URI;
-import java.net.URL;
 import java.security.AccessControlContext;
 import java.security.ProtectionDomain;
 import java.util.Map;
@@ -157,12 +155,6 @@
     Class<?> findBootstrapClassOrNull(ClassLoader cl, String name);
 
     /**
-     * Returns a URL to a resource with the given name in a module that is
-     * defined to the given class loader.
-     */
-    URL findResource(ClassLoader cl, String moduleName, String name) throws IOException;
-
-    /**
      * Returns the Packages for the given class loader.
      */
     Stream<Package> packages(ClassLoader cl);
@@ -178,6 +170,11 @@
     String fastUUID(long lsb, long msb);
 
     /**
+     * Record the non-exported packages of the modules in the given layer
+     */
+    void addNonExportedPackages(ModuleLayer layer);
+
+    /**
      * Invalidate package access cache
      */
     void invalidatePackageAccessCache();
--- a/src/java.base/share/classes/jdk/internal/module/Checks.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/Checks.java	Fri May 12 10:43:28 2017 -0700
@@ -25,6 +25,8 @@
 
 package jdk.internal.module;
 
+import java.util.Set;
+
 /**
  * Utility class for checking module, package, and class names.
  */
@@ -45,18 +47,17 @@
         int next;
         int off = 0;
         while ((next = name.indexOf('.', off)) != -1) {
-            if (isJavaIdentifier(name, off, (next - off)) == -1) {
-                String id = name.substring(off, next);
+            String id = name.substring(off, next);
+            if (!isJavaIdentifier(id)) {
                 throw new IllegalArgumentException(name + ": Invalid module name"
                         + ": '" + id + "' is not a Java identifier");
             }
             off = next+1;
         }
-        int last = isJavaIdentifier(name, off, name.length() - off);
-        if (last == -1) {
-            String id = name.substring(off);
+        String last = name.substring(off);
+        if (!isJavaIdentifier(last)) {
             throw new IllegalArgumentException(name + ": Invalid module name"
-                    + ": '" + id + "' is not a Java identifier");
+                    + ": '" + last + "' is not a Java identifier");
         }
         return name;
     }
@@ -68,14 +69,13 @@
         int next;
         int off = 0;
         while ((next = name.indexOf('.', off)) != -1) {
-            if (isJavaIdentifier(name, off, (next - off)) == -1)
+            String id = name.substring(off, next);
+            if (!isJavaIdentifier(id))
                 return false;
             off = next+1;
         }
-        int last = isJavaIdentifier(name, off, name.length() - off);
-        if (last == -1)
-            return false;
-        return true;
+        String last = name.substring(off);
+        return isJavaIdentifier(last);
     }
 
     /**
@@ -144,12 +144,13 @@
         int next;
         int off = 0;
         while ((next = name.indexOf('.', off)) != -1) {
-            if (isJavaIdentifier(name, off, (next - off)) == -1)
+            String id = name.substring(off, next);
+            if (!isJavaIdentifier(id))
                 return false;
             off = next+1;
         }
-        int count = name.length() - off;
-        return (isJavaIdentifier(name, off, count) != -1);
+        String last = name.substring(off);
+        return isJavaIdentifier(last);
     }
 
     /**
@@ -164,76 +165,99 @@
         int next;
         int off = 0;
         while ((next = name.indexOf('.', off)) != -1) {
-            if (isJavaIdentifier(name, off, (next - off)) == -1) {
-                String id = name.substring(off, next);
+            String id = name.substring(off, next);
+            if (!isJavaIdentifier(id)) {
                 throw new IllegalArgumentException(name + ": Invalid " + what
                         + ": '" + id + "' is not a Java identifier");
             }
             off = next + 1;
         }
-        if (isJavaIdentifier(name, off, name.length() - off) == -1) {
-            String id = name.substring(off, name.length());
+        String last = name.substring(off);
+        if (!isJavaIdentifier(last)) {
             throw new IllegalArgumentException(name + ": Invalid " + what
-                    + ": '" + id + "' is not a Java identifier");
+                    + ": '" + last + "' is not a Java identifier");
         }
         return name;
     }
 
     /**
-     * Returns {@code true} if a given legal module name contains an identifier
-     * that doesn't end with a Java letter.
+     * Returns true if the given char sequence is a legal Java identifier,
+     * otherwise false.
      */
-    public static boolean hasJavaIdentifierWithTrailingDigit(String name) {
-        // quick scan to allow names that are just ASCII without digits
-        boolean needToParse = false;
-        int i = 0;
-        while (i < name.length()) {
-            int c = name.charAt(i);
-            if (c > 0x7F || (c >= '0' && c <= '9')) {
-                needToParse = true;
-                break;
-            }
-            i++;
-        }
-        if (!needToParse)
+    private static boolean isJavaIdentifier(CharSequence cs) {
+        if (cs.length() == 0 || RESERVED.contains(cs))
             return false;
 
-        // slow path
-        int next;
-        int off = 0;
-        while ((next = name.indexOf('.', off)) != -1) {
-            int last = isJavaIdentifier(name, off, (next - off));
-            if (!Character.isJavaIdentifierStart(last))
-                return true;
-            off = next+1;
-        }
-        int last = isJavaIdentifier(name, off, name.length() - off);
-        if (!Character.isJavaIdentifierStart(last))
-            return true;
-        return false;
-
-    }
+        int first = Character.codePointAt(cs, 0);
+        if (!Character.isJavaIdentifierStart(first))
+            return false;
 
-    /**
-     * Checks if a char sequence is a legal Java identifier, returning the code
-     * point of the last character if legal or {@code -1} if not legal.
-     */
-    private static int isJavaIdentifier(CharSequence cs, int offset, int count) {
-        if (count == 0)
-            return -1;
-        int first = Character.codePointAt(cs, offset);
-        if (!Character.isJavaIdentifierStart(first))
-            return -1;
-
-        int cp = first;
         int i = Character.charCount(first);
-        while (i < count) {
-            cp = Character.codePointAt(cs, offset+i);
+        while (i < cs.length()) {
+            int cp = Character.codePointAt(cs, i);
             if (!Character.isJavaIdentifierPart(cp))
-                return -1;
+                return false;
             i += Character.charCount(cp);
         }
 
-        return cp;
+        return true;
     }
+
+    // keywords, boolean and null literals, not allowed in identifiers
+    private static final Set<String> RESERVED = Set.of(
+            "abstract",
+            "assert",
+            "boolean",
+            "break",
+            "byte",
+            "case",
+            "catch",
+            "char",
+            "class",
+            "const",
+            "continue",
+            "default",
+            "do",
+            "double",
+            "else",
+            "enum",
+            "extends",
+            "final",
+            "finally",
+            "float",
+            "for",
+            "goto",
+            "if",
+            "implements",
+            "import",
+            "instanceof",
+            "int",
+            "interface",
+            "long",
+            "native",
+            "new",
+            "package",
+            "private",
+            "protected",
+            "public",
+            "return",
+            "short",
+            "static",
+            "strictfp",
+            "super",
+            "switch",
+            "synchronized",
+            "this",
+            "throw",
+            "throws",
+            "transient",
+            "try",
+            "void",
+            "volatile",
+            "while",
+            "true",
+            "false",
+            "null",
+            "_"
+    );
 }
--- a/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ClassFileAttributes.java	Fri May 12 10:43:28 2017 -0700
@@ -549,34 +549,26 @@
      *   u2 attribute_name_index;
      *   u4 attribute_length;
      *
-     *   // index to CONSTANT_utf8_info structure with the OS name
-     *   u2 os_name_index;
-     *   // index to CONSTANT_utf8_info structure with the OS arch
-     *   u2 os_arch_index
+     *   // index to CONSTANT_utf8_info structure with the target platform
+     *   u2 target_platform_index;
      * }
      *
      * } </pre>
      */
     public static class ModuleTargetAttribute extends Attribute {
-        private final String osName;
-        private final String osArch;
+        private final String targetPlatform;
 
-        public ModuleTargetAttribute(String osName, String osArch) {
+        public ModuleTargetAttribute(String targetPlatform) {
             super(MODULE_TARGET);
-            this.osName = osName;
-            this.osArch = osArch;
+            this.targetPlatform = targetPlatform;
         }
 
         public ModuleTargetAttribute() {
-            this(null, null);
+            this(null);
         }
 
-        public String osName() {
-            return osName;
-        }
-
-        public String osArch() {
-            return osArch;
+        public String targetPlatform() {
+            return targetPlatform;
         }
 
         @Override
@@ -588,20 +580,14 @@
                                  Label[] labels)
         {
 
-            String osName = null;
-            String osArch = null;
+            String targetPlatform = null;
 
-            int name_index = cr.readUnsignedShort(off);
-            if (name_index != 0)
-                osName = cr.readUTF8(off, buf);
+            int target_platform_index = cr.readUnsignedShort(off);
+            if (target_platform_index != 0)
+                targetPlatform = cr.readUTF8(off, buf);
             off += 2;
 
-            int arch_index = cr.readUnsignedShort(off);
-            if (arch_index != 0)
-                osArch = cr.readUTF8(off, buf);
-            off += 2;
-
-            return new ModuleTargetAttribute(osName, osArch);
+            return new ModuleTargetAttribute(targetPlatform);
         }
 
         @Override
@@ -613,15 +599,10 @@
         {
             ByteVector attr = new ByteVector();
 
-            int name_index = 0;
-            if (osName != null && osName.length() > 0)
-                name_index = cw.newUTF8(osName);
-            attr.putShort(name_index);
-
-            int arch_index = 0;
-            if (osArch != null && osArch.length() > 0)
-                arch_index = cw.newUTF8(osArch);
-            attr.putShort(arch_index);
+            int target_platform_index = 0;
+            if (targetPlatform != null && targetPlatform.length() > 0)
+                target_platform_index = cw.newUTF8(targetPlatform);
+            attr.putShort(target_platform_index);
 
             return attr;
         }
--- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java	Fri May 12 10:43:28 2017 -0700
@@ -84,8 +84,9 @@
     // The ModulePatcher for the initial configuration
     private static final ModulePatcher patcher = initModulePatcher();
 
-    // ModuleFinder for the initial configuration
-    private static ModuleFinder initialFinder;
+    // ModuleFinders for the initial configuration
+    private static ModuleFinder unlimitedFinder;
+    private static ModuleFinder limitedFinder;
 
     /**
      * Returns the ModulePatcher for the initial configuration.
@@ -95,11 +96,20 @@
     }
 
     /**
-     * Returns the ModuleFinder for the initial configuration
+     * Returns the ModuleFinder for the initial configuration before observability
+     * is limited by the --limit-modules command line option.
      */
-    public static ModuleFinder finder() {
-        assert initialFinder != null;
-        return initialFinder;
+    public static ModuleFinder unlimitedFinder() {
+        assert unlimitedFinder != null;
+        return unlimitedFinder;
+    }
+
+    /**
+     * Returns the ModuleFinder for the initial configuration.
+     */
+    public static ModuleFinder limitedFinder() {
+        assert limitedFinder != null;
+        return limitedFinder;
     }
 
     /**
@@ -134,6 +144,11 @@
 
         PerfCounters.defineBaseTime.addElapsedTimeFrom(t1);
 
+        // special mode to boot with only java.base, ignores other options
+        String propValue = getAndRemoveProperty("jdk.module.minimumBoot");
+        if (propValue != null) {
+            return createMinimalBootLayer();
+        }
 
         long t2 = System.nanoTime();
 
@@ -180,7 +195,8 @@
         }
 
         // --limit-modules
-        String propValue = getAndRemoveProperty("jdk.module.limitmods");
+        unlimitedFinder = finder;
+        propValue = getAndRemoveProperty("jdk.module.limitmods");
         if (propValue != null) {
             Set<String> mods = new HashSet<>();
             for (String mod: propValue.split(",")) {
@@ -188,6 +204,7 @@
             }
             finder = limitFinder(finder, mods, roots);
         }
+        limitedFinder = finder;
 
         // If there is no initial module specified then assume that the initial
         // module is the unnamed module of the application class loader. This
@@ -267,7 +284,8 @@
         }
 
         PrintStream traceOutput = null;
-        if (Boolean.getBoolean("jdk.launcher.traceResolver"))
+        propValue = getAndRemoveProperty("jdk.module.showModuleResolution");
+        if (propValue != null && Boolean.parseBoolean(propValue))
             traceOutput = System.out;
 
         // run the resolver to create the configuration
@@ -362,10 +380,21 @@
         // total time to initialize
         PerfCounters.bootstrapTime.addElapsedTimeFrom(t0);
 
-        // remember the ModuleFinder
-        initialFinder = finder;
+        return bootLayer;
+    }
 
-        return bootLayer;
+    /**
+     * Create a "minimal" boot module layer that only contains java.base.
+     */
+    private static ModuleLayer createMinimalBootLayer() {
+        Configuration cf = SharedSecrets.getJavaLangModuleAccess()
+            .resolveAndBind(ModuleFinder.ofSystem(),
+                            Set.of(JAVA_BASE),
+                            false,
+                            null);
+
+        Function<String, ClassLoader> clf = ModuleLoaderMap.mappingFunction(cf);
+        return ModuleLayer.empty().defineModules(cf, clf);
     }
 
     /**
--- a/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleHashesBuilder.java	Fri May 12 10:43:28 2017 -0700
@@ -138,7 +138,7 @@
     }
 
     /*
-     * Utilty class
+     * Utility class
      */
     static class Graph<T> {
         private final Set<T> nodes;
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -546,21 +546,15 @@
     private ModuleTarget readModuleTargetAttribute(DataInput in, ConstantPool cpool)
         throws IOException
     {
-        String osName = null;
-        String osArch = null;
-
-        int name_index = in.readUnsignedShort();
-        if (name_index != 0)
-            osName = cpool.getUtf8(name_index);
+        String targetPlatform = null;
 
-        int arch_index = in.readUnsignedShort();
-        if (arch_index != 0)
-            osArch = cpool.getUtf8(arch_index);
+        int index = in.readUnsignedShort();
+        if (index != 0)
+            targetPlatform = cpool.getUtf8(index);
 
-        return new ModuleTarget(osName, osArch);
+        return new ModuleTarget(targetPlatform);
     }
 
-
     /**
      * Reads the ModuleHashes attribute
      */
@@ -612,7 +606,6 @@
         return new ModuleResolution(flags);
     }
 
-
     /**
      * Returns true if the given attribute can be present at most once
      * in the class file. Returns false otherwise.
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java	Fri May 12 10:43:28 2017 -0700
@@ -62,9 +62,8 @@
     // the value of the ModuleMainClass attribute
     private String mainClass;
 
-    // the values for the ModuleTarget attribute
-    private String osName;
-    private String osArch;
+    // the value for the ModuleTarget attribute
+    private String targetPlatform;
 
     // the hashes for the ModuleHashes attribute
     private ModuleHashes hashes;
@@ -108,11 +107,10 @@
     }
 
     /**
-     * Sets the values for the ModuleTarget attribute.
+     * Sets the value for the ModuleTarget attribute.
      */
-    public ModuleInfoExtender targetPlatform(String osName, String osArch) {
-        this.osName = osName;
-        this.osArch = osArch;
+    public ModuleInfoExtender targetPlatform(String targetPlatform) {
+        this.targetPlatform = targetPlatform;
         return this;
     }
 
@@ -199,8 +197,8 @@
             cv.addAttribute(new ModulePackagesAttribute(packages));
         if (mainClass != null)
             cv.addAttribute(new ModuleMainClassAttribute(mainClass));
-        if (osName != null || osArch != null)
-            cv.addAttribute(new ModuleTargetAttribute(osName, osArch));
+        if (targetPlatform != null)
+            cv.addAttribute(new ModuleTargetAttribute(targetPlatform));
         if (hashes != null)
             cv.addAttribute(new ModuleHashesAttribute(hashes));
         if (moduleResolution != null)
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfoWriter.java	Fri May 12 10:43:28 2017 -0700
@@ -66,10 +66,9 @@
         // write ModuleMainClass if the module has a main class
         md.mainClass().ifPresent(mc -> cw.visitAttribute(new ModuleMainClassAttribute(mc)));
 
-        // write ModuleTarget if there is a platform OS/arch
+        // write ModuleTarget if there is a target platform
         if (target != null) {
-            cw.visitAttribute(new ModuleTargetAttribute(target.osName(),
-                                                        target.osArch()));
+            cw.visitAttribute(new ModuleTargetAttribute(target.targetPlatform()));
         }
 
         cw.visitEnd();
--- a/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java	Fri May 12 10:43:28 2017 -0700
@@ -37,36 +37,66 @@
 
 
 /**
- * The module to class loader map.  The list of boot modules and platform modules
- * are generated at build time.
+ * Supports the mapping of modules to class loaders. The set of modules mapped
+ * to the boot and platform class loaders is generated at build time from
+ * this source file.
  */
-final class ModuleLoaderMap {
+public final class ModuleLoaderMap {
+
+    /**
+     * Maps the system modules to the built-in class loaders.
+     */
+    public static final class Mapper implements Function<String, ClassLoader> {
+        private final Map<String, ClassLoader> map;
+
+        Mapper(Map<String, ClassLoader> map) {
+            this.map = map; // defensive copy not needed
+        }
+
+        @Override
+        public ClassLoader apply(String name) {
+            return map.get(name);
+        }
+    }
+
+    /**
+     * Returns the names of the modules defined to the boot loader.
+     */
+    public static Set<String> bootModules() {
+        // The list of boot modules generated at build time.
+        String[] BOOT_MODULES = new String[] { "@@BOOT_MODULE_NAMES@@" };
+        Set<String> bootModules = new HashSet<>(BOOT_MODULES.length);
+        for (String mn : BOOT_MODULES) {
+            bootModules.add(mn);
+        }
+        return bootModules;
+    }
+
+    /**
+     * Returns the names of the modules defined to the platform loader.
+     */
+    public static Set<String> platformModules() {
+        // The list of platform modules generated at build time.
+        String[] PLATFORM_MODULES = new String[] { "@@PLATFORM_MODULE_NAMES@@" };
+        Set<String> platformModules = new HashSet<>(PLATFORM_MODULES.length);
+        for (String mn : PLATFORM_MODULES) {
+            platformModules.add(mn);
+        }
+        return platformModules;
+    }
 
     /**
      * Returns the function to map modules in the given configuration to the
      * built-in class loaders.
      */
     static Function<String, ClassLoader> mappingFunction(Configuration cf) {
-
-        // The list of boot modules and platform modules are generated at build time.
-        final String[] BOOT_MODULES = new String[] { "@@BOOT_MODULE_NAMES@@" };
-        final String[] PLATFORM_MODULES = new String[] { "@@PLATFORM_MODULE_NAMES@@" };
-
-        Set<String> bootModules = new HashSet<>(BOOT_MODULES.length);
-        for (String mn : BOOT_MODULES) {
-            bootModules.add(mn);
-        }
-
-        Set<String> platformModules = new HashSet<>(PLATFORM_MODULES.length);
-        for (String mn : PLATFORM_MODULES) {
-            platformModules.add(mn);
-        }
+        Set<String> bootModules = bootModules();
+        Set<String> platformModules = platformModules();
 
         ClassLoader platformClassLoader = ClassLoaders.platformClassLoader();
         ClassLoader appClassLoader = ClassLoaders.appClassLoader();
 
         Map<String, ClassLoader> map = new HashMap<>();
-
         for (ResolvedModule resolvedModule : cf.modules()) {
             String mn = resolvedModule.name();
             if (!bootModules.contains(mn)) {
@@ -77,12 +107,6 @@
                 }
             }
         }
-
-        return new Function<String, ClassLoader> () {
-            @Override
-            public ClassLoader apply(String mn) {
-                return map.get(mn);
-            }
-        };
+        return new Mapper(map);
     }
 }
--- a/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java	Fri May 12 10:43:28 2017 -0700
@@ -120,7 +120,7 @@
 
                     // JAR file - do not open as a multi-release JAR as this
                     // is not supported by the boot class loader
-                    try (JarFile jf = new JarFile(file.toFile())) {
+                    try (JarFile jf = new JarFile(file.toString())) {
                         jf.stream()
                           .filter(e -> !e.isDirectory()
                                   && (!isAutomatic || e.getName().endsWith(".class")))
@@ -431,7 +431,7 @@
         private final URL csURL;
 
         JarResourceFinder(Path path) throws IOException {
-            this.jf = new JarFile(path.toFile());
+            this.jf = new JarFile(path.toString());
             this.csURL = path.toUri().toURL();
         }
 
@@ -505,7 +505,7 @@
         public Resource find(String name) throws IOException {
             Path file = Resources.toFilePath(dir, name);
             if (file != null) {
-                return  newResource(name, dir, file);
+                return newResource(name, dir, file);
             } else {
                 return null;
             }
--- a/src/java.base/share/classes/jdk/internal/module/ModulePath.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModulePath.java	Fri May 12 10:43:28 2017 -0700
@@ -59,6 +59,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
+import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
 import jdk.internal.jmod.JmodFile;
@@ -315,26 +316,42 @@
     {
         try {
 
+            // exploded module
             if (attrs.isDirectory()) {
                 return readExplodedModule(entry); // may return null
-            } else {
+            }
+
+            // JAR or JMOD file
+            if (attrs.isRegularFile()) {
                 String fn = entry.getFileName().toString();
-                if (attrs.isRegularFile()) {
-                    if (fn.endsWith(".jar")) {
+                boolean isDefaultFileSystem = isDefaultFileSystem(entry);
+
+                // JAR file
+                if (fn.endsWith(".jar")) {
+                    if (isDefaultFileSystem) {
                         return readJar(entry);
-                    } else if (isLinkPhase && fn.endsWith(".jmod")) {
-                        return readJMod(entry);
+                    } else {
+                        // the JAR file is in a custom file system so
+                        // need to copy it to the local file system
+                        Path tmpdir = Files.createTempDirectory("mlib");
+                        Path target = Files.copy(entry, tmpdir.resolve(fn));
+                        return readJar(target);
                     }
                 }
-                return null;
+
+                // JMOD file
+                if (isDefaultFileSystem && isLinkPhase && fn.endsWith(".jmod")) {
+                    return readJMod(entry);
+                }
             }
 
+            return null;
+
         } catch (InvalidModuleDescriptorException e) {
             throw new FindException("Error reading module: " + entry, e);
         }
     }
 
-
     /**
      * Returns a string with the file name of the module if possible.
      * If the module location is not a file URI then return the URI
@@ -434,7 +451,7 @@
      * 3. The contents of any META-INF/services configuration files are mapped
      *    to "provides" declarations
      * 4. The Main-Class attribute in the main attributes of the JAR manifest
-     *    is mapped to the module descriptor mainClass
+     *    is mapped to the module descriptor mainClass if possible
      */
     private ModuleDescriptor deriveModuleDescriptor(JarFile jf)
         throws IOException
@@ -530,12 +547,12 @@
             String mainClass = attrs.getValue(Attributes.Name.MAIN_CLASS);
             if (mainClass != null) {
                 mainClass = mainClass.replace("/", ".");
-                String pn = packageName(mainClass);
-                if (!packages.contains(pn)) {
-                    String msg = "Main-Class " + mainClass + " not in module";
-                    throw new InvalidModuleDescriptorException(msg);
+                if (Checks.isClassName(mainClass)) {
+                    String pn = packageName(mainClass);
+                    if (packages.contains(pn)) {
+                        builder.mainClass(mainClass);
+                    }
                 }
-                builder.mainClass(mainClass);
             }
         }
 
@@ -617,6 +634,8 @@
             }
 
             return ModuleReferences.newJarModule(attrs, patcher, file);
+        } catch (ZipException e) {
+            throw new FindException("Error reading " + file, e);
         }
     }
 
@@ -733,6 +752,16 @@
         }
     }
 
+
+    /**
+     * Return true if a path locates a path in the default file system
+     */
+    private boolean isDefaultFileSystem(Path path) {
+        return path.getFileSystem().provider()
+                .getScheme().equalsIgnoreCase("file");
+    }
+
+
     private static final PerfCounter scanTime
         = PerfCounter.newPerfCounter("jdk.module.finder.modulepath.scanTime");
     private static final PerfCounter moduleCount
--- a/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleReferences.java	Fri May 12 10:43:28 2017 -0700
@@ -25,6 +25,7 @@
 
 package jdk.internal.module;
 
+import java.io.File;
 import java.io.IOError;
 import java.io.IOException;
 import java.io.InputStream;
@@ -226,8 +227,8 @@
 
         static JarFile newJarFile(Path path) {
             try {
-                return new JarFile(path.toFile(),
-                                   true,               // verify
+                return new JarFile(new File(path.toString()),
+                                   true,                       // verify
                                    ZipFile.OPEN_READ,
                                    JarFile.runtimeVersion());
             } catch (IOException ioe) {
--- a/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleResolution.java	Fri May 12 10:43:28 2017 -0700
@@ -39,6 +39,10 @@
         this.value = value;
     }
 
+    public int value() {
+        return value;
+    }
+
     public static ModuleResolution empty() {
         return new ModuleResolution(0);
     }
@@ -74,35 +78,30 @@
             throw new InternalError("cannot add deprecated for removal to " + value);
         return new ModuleResolution(value | WARN_DEPRECATED_FOR_REMOVAL);
     }
+
     public ModuleResolution withIncubating() {
         if ((value & (WARN_DEPRECATED | WARN_DEPRECATED_FOR_REMOVAL)) != 0)
             throw new InternalError("cannot add incubating to " + value);
         return new ModuleResolution(value | WARN_INCUBATING);
     }
 
-    public int value() {
-        return value;
-    }
-
     public static boolean doNotResolveByDefault(ModuleReference mref) {
         // get the DO_NOT_RESOLVE_BY_DEFAULT flag, if any
-        if (!(mref instanceof ModuleReferenceImpl))
-            return false;
-
-        ModuleResolution mres = ((ModuleReferenceImpl)mref).moduleResolution();
-        if (mres != null)
-            return mres.doNotResolveByDefault();
+        if (mref instanceof ModuleReferenceImpl) {
+            ModuleResolution mres = ((ModuleReferenceImpl) mref).moduleResolution();
+            if (mres != null)
+                return mres.doNotResolveByDefault();
+        }
 
         return false;
     }
 
     public static boolean hasIncubatingWarning(ModuleReference mref) {
-        if (!(mref instanceof ModuleReferenceImpl))
-            return false;
-
-        ModuleResolution mres = ((ModuleReferenceImpl)mref).moduleResolution();
-        if (mres != null)
-            return mres.hasIncubatingWarning();
+        if (mref instanceof ModuleReferenceImpl) {
+            ModuleResolution mres = ((ModuleReferenceImpl) mref).moduleResolution();
+            if (mres != null)
+                return mres.hasIncubatingWarning();
+        }
 
         return false;
     }
--- a/src/java.base/share/classes/jdk/internal/module/ModuleTarget.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleTarget.java	Fri May 12 10:43:28 2017 -0700
@@ -25,22 +25,21 @@
 
 package jdk.internal.module;
 
+/**
+ * Represents the module target.
+ *
+ * For now, this is a single value for the target platform, e.g. "linux-x64".
+ */
 public final class ModuleTarget {
 
-    private final String osName;
-    private final String osArch;
+    private final String targetPlatform;
 
-    public ModuleTarget(String osName, String osArch) {
-        this.osName = osName;
-        this.osArch = osArch;
+    public ModuleTarget(String targetPlatform) {
+        this.targetPlatform = targetPlatform;
     }
 
-    public String osName() {
-        return osName;
-    }
-
-    public String osArch() {
-        return osArch;
+    public String targetPlatform() {
+        return targetPlatform;
     }
 
 }
--- a/src/java.base/share/classes/jdk/internal/module/Modules.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/Modules.java	Fri May 12 10:43:28 2017 -0700
@@ -25,12 +25,22 @@
 
 package jdk.internal.module;
 
+import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.lang.module.ResolvedModule;
 import java.net.URI;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 import jdk.internal.loader.BootLoader;
+import jdk.internal.loader.BuiltinClassLoader;
 import jdk.internal.loader.ClassLoaders;
 import jdk.internal.misc.JavaLangAccess;
 import jdk.internal.misc.SharedSecrets;
@@ -38,8 +48,8 @@
 /**
  * A helper class for creating and updating modules. This class is intended to
  * support command-line options, tests, and the instrumentation API. It is also
- * used by the VM to add read edges when agents are instrumenting code that
- * need to link to supporting classes.
+ * used by the VM to load modules or add read edges when agents are instrumenting
+ * code that need to link to supporting classes.
  *
  * The parameters that are package names in this API are the fully-qualified
  * names of the packages as defined in section 6.5.3 of <cite>The Java&trade;
@@ -154,4 +164,90 @@
         addReads(m, BootLoader.getUnnamedModule());
         addReads(m, ClassLoaders.appClassLoader().getUnnamedModule());
     }
+
+    /**
+     * Called by the VM to load a system module, typically "java.instrument" or
+     * "jdk.management.agent". If the module is not loaded then it is resolved
+     * and loaded (along with any dependences that weren't previously loaded)
+     * into a child layer.
+     */
+    public static synchronized Module loadModule(String name) {
+        ModuleLayer top = topLayer;
+        if (top == null)
+            top = ModuleLayer.boot();
+
+        Module module = top.findModule(name).orElse(null);
+        if (module != null) {
+            // module already loaded
+            return module;
+        }
+
+        // resolve the module with the top-most layer as the parent
+        ModuleFinder empty = ModuleFinder.of();
+        ModuleFinder finder = ModuleBootstrap.unlimitedFinder();
+        Set<String> roots = Set.of(name);
+        Configuration cf = top.configuration().resolveAndBind(empty, finder, roots);
+
+        // create the child layer
+        Function<String, ClassLoader> clf = ModuleLoaderMap.mappingFunction(cf);
+        ModuleLayer newLayer = top.defineModules(cf, clf);
+
+        // add qualified exports/opens to give access to modules in child layer
+        Map<String, Module> map = newLayer.modules().stream()
+                                          .collect(Collectors.toMap(Module::getName,
+                                                  Function.identity()));
+        ModuleLayer layer = top;
+        while (layer != null) {
+            for (Module m : layer.modules()) {
+                // qualified exports
+                m.getDescriptor().exports().stream()
+                    .filter(ModuleDescriptor.Exports::isQualified)
+                    .forEach(e -> e.targets().forEach(target -> {
+                        Module other = map.get(target);
+                        if (other != null) {
+                            addExports(m, e.source(), other);
+                        }}));
+
+                // qualified opens
+                m.getDescriptor().opens().stream()
+                    .filter(ModuleDescriptor.Opens::isQualified)
+                    .forEach(o -> o.targets().forEach(target -> {
+                        Module other = map.get(target);
+                        if (other != null) {
+                            addOpens(m, o.source(), other);
+                        }}));
+            }
+
+            List<ModuleLayer> parents = layer.parents();
+            assert parents.size() <= 1;
+            layer = parents.isEmpty() ? null : parents.get(0);
+        }
+
+        // update security manager before making types visible
+        JLA.addNonExportedPackages(newLayer);
+
+        // update the built-in class loaders to make the types visible
+        for (ResolvedModule resolvedModule : cf.modules()) {
+            ModuleReference mref = resolvedModule.reference();
+            String mn = mref.descriptor().name();
+            ClassLoader cl = clf.apply(mn);
+            if (cl == null) {
+                BootLoader.loadModule(mref);
+            } else {
+                ((BuiltinClassLoader) cl).loadModule(mref);
+            }
+        }
+
+        // new top layer
+        topLayer = newLayer;
+
+        // return module
+        return newLayer.findModule(name)
+                       .orElseThrow(() -> new InternalError("module not loaded"));
+
+    }
+
+    // the top-most system layer
+    private static ModuleLayer topLayer;
+
 }
--- a/src/java.base/share/classes/jdk/internal/module/Resources.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/module/Resources.java	Fri May 12 10:43:28 2017 -0700
@@ -26,10 +26,10 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.file.FileSystem;
 import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.nio.file.attribute.BasicFileAttributes;
 
 /**
@@ -94,7 +94,7 @@
         if (expectDirectory) {
             name = name.substring(0, name.length() - 1);  // drop trailing "/"
         }
-        Path path = toSafeFilePath(name);
+        Path path = toSafeFilePath(dir.getFileSystem(), name);
         if (path != null) {
             Path file = dir.resolve(path);
             try {
@@ -116,7 +116,7 @@
      * are rejected, as are resource names that translates to a file path
      * with a root component.
      */
-    private static Path toSafeFilePath(String name) {
+    private static Path toSafeFilePath(FileSystem fs, String name) {
         // scan elements of resource name
         int next;
         int off = 0;
@@ -135,12 +135,12 @@
         // convert to file path
         Path path;
         if (File.separatorChar == '/') {
-            path = Paths.get(name);
+            path = fs.getPath(name);
         } else {
             // not allowed to embed file separators
             if (name.contains(File.separator))
                 return null;
-            path = Paths.get(name.replace('/', File.separatorChar));
+            path = fs.getPath(name.replace('/', File.separatorChar));
         }
 
         // file path not allowed to have root component
--- a/src/java.base/share/classes/jdk/internal/reflect/Reflection.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/reflect/Reflection.java	Fri May 12 10:43:28 2017 -0700
@@ -31,6 +31,7 @@
 import java.util.Map;
 import java.util.Objects;
 import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.loader.ClassLoaders;
 import jdk.internal.misc.VM;
 
 /** Common utility routines used by both java.lang and
@@ -315,23 +316,13 @@
      */
     public static boolean isCallerSensitive(Method m) {
         final ClassLoader loader = m.getDeclaringClass().getClassLoader();
-        if (VM.isSystemDomainLoader(loader) || isExtClassLoader(loader))  {
+        if (VM.isSystemDomainLoader(loader) ||
+                loader == ClassLoaders.platformClassLoader()) {
             return m.isAnnotationPresent(CallerSensitive.class);
         }
         return false;
     }
 
-    private static boolean isExtClassLoader(ClassLoader loader) {
-        ClassLoader cl = ClassLoader.getSystemClassLoader();
-        while (cl != null) {
-            if (cl.getParent() == null && cl == loader) {
-                return true;
-            }
-            cl = cl.getParent();
-        }
-        return false;
-    }
-
     /**
      * Returns an IllegalAccessException with an exception message based on
      * the access that is denied.
--- a/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -135,6 +135,24 @@
         return soleInstance;
     }
 
+    /**
+     * Returns an alternate reflective Method instance for the given method
+     * intended for reflection to invoke, if present.
+     *
+     * A trusted method can define an alternate implementation for a method `foo`
+     * by defining a method named "reflected$foo" that will be invoked
+     * reflectively.
+     */
+    private static Method findMethodForReflection(Method method) {
+        String altName = "reflected$" + method.getName();
+        try {
+           return method.getDeclaringClass()
+                        .getDeclaredMethod(altName, method.getParameterTypes());
+        } catch (NoSuchMethodException ex) {
+            return null;
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     // Routines used by java.lang.reflect
@@ -161,6 +179,13 @@
     public MethodAccessor newMethodAccessor(Method method) {
         checkInitted();
 
+        if (Reflection.isCallerSensitive(method)) {
+            Method altMethod = findMethodForReflection(method);
+            if (altMethod != null) {
+                method = altMethod;
+            }
+        }
+
         if (noInflation && !ReflectUtil.isVMAnonymousClass(method.getDeclaringClass())) {
             return new MethodAccessorGenerator().
                 generateMethod(method.getDeclaringClass(),
--- a/src/java.base/share/classes/module-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -161,6 +161,7 @@
         java.security.jgss,
         java.sql,
         java.xml,
+        jdk.attach,
         jdk.charsets,
         jdk.compiler,   // reflective dependency
         jdk.incubator.httpclient,
@@ -189,7 +190,8 @@
         jdk.unsupported;
     exports jdk.internal.vm.annotation to
         jdk.unsupported,
-        jdk.internal.vm.ci;
+        jdk.internal.vm.ci,
+        jdk.incubator.httpclient;
     exports jdk.internal.util.jar to
         jdk.jartool,
         jdk.jdeps,
--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Fri May 12 10:43:28 2017 -0700
@@ -43,13 +43,17 @@
 import java.io.IOException;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
-import java.lang.module.ModuleFinder;
-import java.lang.module.ModuleReference;
+import java.lang.module.Configuration;
+import java.lang.module.FindException;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleDescriptor.Requires;
 import java.lang.module.ModuleDescriptor.Exports;
 import java.lang.module.ModuleDescriptor.Opens;
 import java.lang.module.ModuleDescriptor.Provides;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.lang.module.ResolvedModule;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.math.BigDecimal;
@@ -58,14 +62,16 @@
 import java.nio.charset.Charset;
 import java.nio.file.DirectoryStream;
 import java.nio.file.Files;
+import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.attribute.BasicFileAttributes;
 import java.text.Normalizer;
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashSet;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
@@ -83,6 +89,7 @@
 import java.util.stream.Stream;
 
 import jdk.internal.misc.VM;
+import jdk.internal.module.ModuleBootstrap;
 import jdk.internal.module.Modules;
 
 
@@ -98,6 +105,7 @@
             "javafx.application.Application";
     private static final String JAVAFX_FXHELPER_CLASS_NAME_SUFFIX =
             "sun.launcher.LauncherHelper$FXHelper";
+    private static final String LAUNCHER_AGENT_CLASS = "Launcher-Agent-Class";
     private static final String MAIN_CLASS = "Main-Class";
     private static final String ADD_EXPORTS = "Add-Exports";
     private static final String ADD_OPENS = "Add-Opens";
@@ -408,8 +416,12 @@
         ostream =  (printToStderr) ? System.err : System.out;
     }
 
+    static void initOutput(PrintStream ps) {
+        ostream = ps;
+    }
+
     static String getMainClassFromJar(String jarname) {
-        String mainValue = null;
+        String mainValue;
         try (JarFile jarFile = new JarFile(jarname)) {
             Manifest manifest = jarFile.getManifest();
             if (manifest == null) {
@@ -426,6 +438,22 @@
                 abort(null, "java.launcher.jar.error3", jarname);
             }
 
+            // Launcher-Agent-Class (only check for this when Main-Class present)
+            String agentClass = mainAttrs.getValue(LAUNCHER_AGENT_CLASS);
+            if (agentClass != null) {
+                ModuleLayer.boot().findModule("java.instrument").ifPresent(m -> {
+                    try {
+                        String cn = "sun.instrument.InstrumentationImpl";
+                        Class<?> clazz = Class.forName(cn, false, null);
+                        Method loadAgent = clazz.getMethod("loadAgent", String.class);
+                        loadAgent.invoke(null, jarname);
+                    } catch (Throwable e) {
+                        if (e instanceof InvocationTargetException) e = e.getCause();
+                        abort(e, "java.launcher.jar.error4", jarname);
+                    }
+                });
+            }
+
             // Add-Exports and Add-Opens
             String exports = mainAttrs.getValue(ADD_EXPORTS);
             if (exports != null) {
@@ -913,141 +941,350 @@
         }
     }
 
-    private static void formatCommaList(PrintStream out,
-                                        String prefix,
-                                        Collection<?> list)
-    {
-        if (list.isEmpty())
-            return;
-        out.format("%s", prefix);
-        boolean first = true;
-        for (Object ob : list) {
-            if (first) {
-                out.format(" %s", ob);
-                first = false;
-            } else {
-                out.format(", %s", ob);
-            }
-        }
-        out.format("%n");
+    /**
+     * Called by the launcher to list the observable modules.
+     */
+    static void listModules() {
+        initOutput(System.out);
+
+        ModuleBootstrap.limitedFinder().findAll().stream()
+            .sorted(new JrtFirstComparator())
+            .forEach(LauncherHelper::showModule);
+    }
+
+    /**
+     * Called by the launcher to show the resolved modules
+     */
+    static void showResolvedModules() {
+        initOutput(System.out);
+
+        ModuleLayer bootLayer = ModuleLayer.boot();
+        Configuration cf = bootLayer.configuration();
+
+        cf.modules().stream()
+            .map(ResolvedModule::reference)
+            .sorted(new JrtFirstComparator())
+            .forEach(LauncherHelper::showModule);
     }
 
     /**
-     * Called by the launcher to list the observable modules.
-     * If called without any sub-options then the output is a simple list of
-     * the modules. If called with sub-options then the sub-options are the
-     * names of the modules to list (e.g. --list-modules java.base,java.desktop)
+     * Called by the launcher to describe a module
      */
-    static void listModules(boolean printToStderr, String optionFlag)
-        throws IOException, ClassNotFoundException
-    {
-        initOutput(printToStderr);
+    static void describeModule(String moduleName) {
+        initOutput(System.out);
 
-        ModuleFinder finder = jdk.internal.module.ModuleBootstrap.finder();
-        int colon = optionFlag.indexOf('=');
-        if (colon == -1) {
-            finder.findAll().stream()
-                  .sorted(Comparator.comparing(ModuleReference::descriptor))
-                  .forEach(mref -> describeModule(finder, mref, false));
-        } else {
-            String[] names = optionFlag.substring(colon+1).split(",");
-            for (String name: names) {
-                ModuleReference mref = finder.find(name).orElse(null);
-                if (mref == null) {
-                    System.err.format("%s not found%n", name);
-                    continue;
-                }
-                describeModule(finder, mref, true);
-            }
+        ModuleFinder finder = ModuleBootstrap.limitedFinder();
+        ModuleReference mref = finder.find(moduleName).orElse(null);
+        if (mref == null) {
+            abort(null, "java.launcher.module.error4", moduleName);
         }
-    }
+        ModuleDescriptor md = mref.descriptor();
 
-    /**
-     * Describes the given module.
-     */
-    static void describeModule(ModuleFinder finder,
-                               ModuleReference mref,
-                               boolean verbose)
-    {
-        ModuleDescriptor md = mref.descriptor();
-        ostream.print("module " + midAndLocation(md, mref.location()));
-        if (md.isAutomatic())
-            ostream.print(" automatic");
-        ostream.println();
-
-        if (!verbose)
-            return;
+        // one-line summary
+        showModule(mref);
 
         // unqualified exports (sorted by package)
-        Set<Exports> exports = new TreeSet<>(Comparator.comparing(Exports::source));
-        md.exports().stream().filter(e -> !e.isQualified()).forEach(exports::add);
-        for (Exports e : exports) {
-            String modsAndSource = Stream.concat(toStringStream(e.modifiers()),
-                    Stream.of(e.source()))
+        md.exports().stream()
+            .filter(e -> !e.isQualified())
+            .sorted(Comparator.comparing(Exports::source))
+            .map(e -> Stream.concat(Stream.of(e.source()),
+                                    toStringStream(e.modifiers()))
+                    .collect(Collectors.joining(" ")))
+            .forEach(sourceAndMods -> ostream.format("exports %s%n", sourceAndMods));
+
+        // dependences
+        for (Requires r : md.requires()) {
+            String nameAndMods = Stream.concat(Stream.of(r.name()),
+                                               toStringStream(r.modifiers()))
                     .collect(Collectors.joining(" "));
-            ostream.format("  exports %s%n", modsAndSource);
+            ostream.format("requires %s", nameAndMods);
+            finder.find(r.name())
+                .map(ModuleReference::descriptor)
+                .filter(ModuleDescriptor::isAutomatic)
+                .ifPresent(any -> ostream.print(" automatic"));
+            ostream.println();
         }
 
-        for (Requires d : md.requires()) {
-            ostream.format("  requires %s", d);
-            String suffix = finder.find(d.name())
-                    .map(ModuleReference::descriptor)
-                    .map(any -> any.isAutomatic() ? " automatic" : "")
-                    .orElse(" not found");
-            ostream.println(suffix);
+        // service use and provides
+        for (String s : md.uses()) {
+            ostream.format("uses %s%n", s);
         }
-        for (String s : md.uses()) {
-            ostream.format("  uses %s%n", s);
-        }
+        for (Provides ps : md.provides()) {
+            String names = ps.providers().stream().collect(Collectors.joining(" "));
+            ostream.format("provides %s with %s%n", ps.service(), names);
 
-        for (Provides ps : md.provides()) {
-            ostream.format("  provides %s with %s%n", ps.service(),
-                    ps.providers().stream().collect(Collectors.joining(", ")));
         }
 
         // qualified exports
         for (Exports e : md.exports()) {
             if (e.isQualified()) {
-                String modsAndSource = Stream.concat(toStringStream(e.modifiers()),
-                        Stream.of(e.source()))
-                        .collect(Collectors.joining(" "));
-                ostream.format("  exports %s", modsAndSource);
-                formatCommaList(ostream, " to", e.targets());
+                String who = e.targets().stream().collect(Collectors.joining(" "));
+                ostream.format("qualified exports %s to %s%n", e.source(), who);
             }
         }
 
         // open packages
-        for (Opens obj: md.opens()) {
-            String modsAndSource = Stream.concat(toStringStream(obj.modifiers()),
-                    Stream.of(obj.source()))
+        for (Opens opens: md.opens()) {
+            if (opens.isQualified())
+                ostream.print("qualified ");
+            String sourceAndMods = Stream.concat(Stream.of(opens.source()),
+                                                 toStringStream(opens.modifiers()))
                     .collect(Collectors.joining(" "));
-            ostream.format("  opens %s", modsAndSource);
-            if (obj.isQualified())
-                formatCommaList(ostream, " to", obj.targets());
-            else
-                ostream.println();
+            ostream.format("opens %s", sourceAndMods);
+            if (opens.isQualified()) {
+                String who = opens.targets().stream().collect(Collectors.joining(" "));
+                ostream.format(" to %s", who);
+            }
+            ostream.println();
         }
 
         // non-exported/non-open packages
         Set<String> concealed = new TreeSet<>(md.packages());
         md.exports().stream().map(Exports::source).forEach(concealed::remove);
         md.opens().stream().map(Opens::source).forEach(concealed::remove);
-        concealed.forEach(p -> ostream.format("  contains %s%n", p));
+        concealed.forEach(p -> ostream.format("contains %s%n", p));
+    }
+
+    /**
+     * Prints a single line with the module name, version and modifiers
+     */
+    private static void showModule(ModuleReference mref) {
+        ModuleDescriptor md = mref.descriptor();
+        ostream.print(md.toNameAndVersion());
+        mref.location()
+                .filter(uri -> !isJrt(uri))
+                .ifPresent(uri -> ostream.format(" %s", uri));
+        if (md.isOpen())
+            ostream.print(" open");
+        if (md.isAutomatic())
+            ostream.print(" automatic");
+        ostream.println();
     }
 
-    static <T> String toString(Set<T> s) {
-        return toStringStream(s).collect(Collectors.joining(" "));
+    /**
+     * A ModuleReference comparator that considers modules in the run-time
+     * image to be less than modules than not in the run-time image.
+     */
+    private static class JrtFirstComparator implements Comparator<ModuleReference> {
+        private final Comparator<ModuleReference> real;
+
+        JrtFirstComparator() {
+            this.real = Comparator.comparing(ModuleReference::descriptor);
+        }
+
+        @Override
+        public int compare(ModuleReference a, ModuleReference b) {
+            if (isJrt(a)) {
+                return isJrt(b) ? real.compare(a, b) : -1;
+            } else {
+                return isJrt(b) ? 1 : real.compare(a, b);
+            }
+        }
     }
 
-    static <T> Stream<String> toStringStream(Set<T> s) {
+    private static <T> Stream<String> toStringStream(Set<T> s) {
         return s.stream().map(e -> e.toString().toLowerCase());
     }
 
-    static String midAndLocation(ModuleDescriptor md, Optional<URI> location ) {
-        URI loc = location.orElse(null);
-        if (loc == null || loc.getScheme().equalsIgnoreCase("jrt"))
-            return md.toNameAndVersion();
-        else
-            return md.toNameAndVersion() + " (" + loc + ")";
+    private static boolean isJrt(ModuleReference mref) {
+        return isJrt(mref.location().orElse(null));
+    }
+
+    private static boolean isJrt(URI uri) {
+        return (uri != null && uri.getScheme().equalsIgnoreCase("jrt"));
+    }
+
+    /**
+     * Called by the launcher to validate the modules on the upgrade and
+     * application module paths.
+     *
+     * @return {@code true} if no errors are found
+     */
+    private static boolean validateModules() {
+        initOutput(System.out);
+
+        ModuleValidator validator = new ModuleValidator();
+
+        // upgrade module path
+        String value = System.getProperty("jdk.module.upgrade.path");
+        if (value != null) {
+            Stream.of(value.split(File.pathSeparator))
+                    .map(Paths::get)
+                    .forEach(validator::scan);
+        }
+
+        // system modules
+        ModuleFinder.ofSystem().findAll().stream()
+                .sorted(Comparator.comparing(ModuleReference::descriptor))
+                .forEach(validator::process);
+
+        // application module path
+        value = System.getProperty("jdk.module.path");
+        if (value != null) {
+            Stream.of(value.split(File.pathSeparator))
+                    .map(Paths::get)
+                    .forEach(validator::scan);
+        }
+
+        return !validator.foundErrors();
+    }
+
+    /**
+     * A simple validator to check for errors and conflicts between modules.
+     */
+    static class ModuleValidator {
+        private static final String MODULE_INFO = "module-info.class";
+
+        private Map<String, ModuleReference> nameToModule = new HashMap<>();
+        private Map<String, ModuleReference> packageToModule = new HashMap<>();
+        private boolean errorFound;
+
+        /**
+         * Returns true if at least one error was found
+         */
+        boolean foundErrors() {
+            return errorFound;
+        }
+
+        /**
+         * Prints the module location and name.
+         */
+        private void printModule(ModuleReference mref) {
+            mref.location()
+                .filter(uri -> !isJrt(uri))
+                .ifPresent(uri -> ostream.print(uri + " "));
+            ModuleDescriptor descriptor = mref.descriptor();
+            ostream.print(descriptor.name());
+            if (descriptor.isAutomatic())
+                ostream.print(" automatic");
+            ostream.println();
+        }
+
+        /**
+         * Prints the module location and name, checks if the module is
+         * shadowed by a previously seen module, and finally checks for
+         * package conflicts with previously seen modules.
+         */
+        void process(ModuleReference mref) {
+            printModule(mref);
+
+            String name = mref.descriptor().name();
+            ModuleReference previous = nameToModule.putIfAbsent(name, mref);
+            if (previous != null) {
+                ostream.print(INDENT + "shadowed by ");
+                printModule(previous);
+            } else {
+                // check for package conflicts when not shadowed
+                for (String pkg :  mref.descriptor().packages()) {
+                    previous = packageToModule.putIfAbsent(pkg, mref);
+                    if (previous != null) {
+                        String mn = previous.descriptor().name();
+                        ostream.println(INDENT + "contains " + pkg
+                                        + " conflicts with module " + mn);
+                        errorFound = true;
+                    }
+                }
+            }
+        }
+
+        /**
+         * Scan an element on a module path. The element is a directory
+         * of modules, an exploded module, or a JAR file.
+         */
+        void scan(Path entry) {
+            BasicFileAttributes attrs;
+            try {
+                attrs = Files.readAttributes(entry, BasicFileAttributes.class);
+            } catch (NoSuchFileException ignore) {
+                return;
+            } catch (IOException ioe) {
+                ostream.println(entry + " " + ioe);
+                errorFound = true;
+                return;
+            }
+
+            String fn = entry.getFileName().toString();
+            if (attrs.isRegularFile() && fn.endsWith(".jar")) {
+                // JAR file, explicit or automatic module
+                scanModule(entry).ifPresent(this::process);
+            } else if (attrs.isDirectory()) {
+                Path mi = entry.resolve(MODULE_INFO);
+                if (Files.exists(mi)) {
+                    // exploded module
+                    scanModule(entry).ifPresent(this::process);
+                } else {
+                    // directory of modules
+                    scanDirectory(entry);
+                }
+            }
+        }
+
+        /**
+         * Scan the JAR files and exploded modules in a directory.
+         */
+        private void scanDirectory(Path dir) {
+            try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
+                Map<String, Path> moduleToEntry = new HashMap<>();
+
+                for (Path entry : stream) {
+                    BasicFileAttributes attrs;
+                    try {
+                        attrs = Files.readAttributes(entry, BasicFileAttributes.class);
+                    } catch (IOException ioe) {
+                        ostream.println(entry + " " + ioe);
+                        errorFound = true;
+                        continue;
+                    }
+
+                    ModuleReference mref = null;
+
+                    String fn = entry.getFileName().toString();
+                    if (attrs.isRegularFile() && fn.endsWith(".jar")) {
+                        mref = scanModule(entry).orElse(null);
+                    } else if (attrs.isDirectory()) {
+                        Path mi = entry.resolve(MODULE_INFO);
+                        if (Files.exists(mi)) {
+                            mref = scanModule(entry).orElse(null);
+                        }
+                    }
+
+                    if (mref != null) {
+                        String name = mref.descriptor().name();
+                        Path previous = moduleToEntry.putIfAbsent(name, entry);
+                        if (previous != null) {
+                            // same name as other module in the directory
+                            printModule(mref);
+                            ostream.println(INDENT + "contains same module as "
+                                            + previous.getFileName());
+                            errorFound = true;
+                        } else {
+                            process(mref);
+                        }
+                    }
+                }
+            } catch (IOException ioe) {
+                ostream.println(dir + " " + ioe);
+                errorFound = true;
+            }
+        }
+
+        /**
+         * Scan a JAR file or exploded module.
+         */
+        private Optional<ModuleReference> scanModule(Path entry) {
+            ModuleFinder finder = ModuleFinder.of(entry);
+            try {
+                return finder.findAll().stream().findFirst();
+            } catch (FindException e) {
+                ostream.println(entry);
+                ostream.println(INDENT + e.getMessage());
+                Throwable cause = e.getCause();
+                if (cause != null) {
+                    ostream.println(INDENT + cause);
+                }
+                errorFound = true;
+                return Optional.empty();
+            }
+        }
     }
 }
--- a/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Fri May 12 10:43:28 2017 -0700
@@ -53,26 +53,33 @@
 \                  A {0} separated list of directories, each directory\n\
 \                  is a directory of modules that replace upgradeable\n\
 \                  modules in the runtime image\n\
-\    --add-modules <modulename>[,<modulename>...]\n\
+\    --add-modules <module name>[,<module name>...]\n\
 \                  root modules to resolve in addition to the initial module.\n\
-\                  <modulename> can also be ALL-DEFAULT, ALL-SYSTEM,\n\
+\                  <module name> can also be ALL-DEFAULT, ALL-SYSTEM,\n\
 \                  ALL-MODULE-PATH.\n\
-\    --limit-modules <modulename>[,<modulename>...]\n\
-\                  limit the universe of observable modules\n\
-\    --list-modules [<modulename>[,<modulename>...]]\n\
-\                  list the observable modules and exit\n\
-\    --dry-run     create VM but do not execute main method.\n\
-\                  This --dry-run option may be useful for validating the\n\
+\    --list-modules\n\
+\                  list observable modules and exit\n\
+\    --d <module name>\n\
+\    --describe-module <module name>\n\
+\                  describe a module and exit\n\
+\    --dry-run     create VM and load main class but do not execute main method.\n\
+\                  The --dry-run option may be useful for validating the\n\
 \                  command-line options such as the module system configuration.\n\
+\    --validate-modules\n\
+\                  validate all modules and exit\n\
+\                  The --validate-modules option may be useful for finding\n\
+\                  conflicts and other errors with modules on the module path.\n\
 \    -D<name>=<value>\n\
 \                  set a system property\n\
-\    -verbose:[class|gc|jni]\n\
+\    -verbose:[class|module|gc|jni]\n\
 \                  enable verbose output\n\
 \    -version      print product version to the error stream and exit\n\
 \    --version     print product version to the output stream and exit\n\
 \    -showversion  print product version to the error stream and continue\n\
 \    --show-version\n\
 \                  print product version to the output stream and continue\n\
+\    --show-module-resolution\n\
+\                  show module resolution output during startup\n\
 \    -? -h -help\n\
 \                  print this help message to the error stream\n\
 \    --help        print this help message to the output stream\n\
@@ -119,7 +126,6 @@
 \    -Xcomp            forces compilation of methods on first invocation\n\
 \    -Xdebug           provided for backward compatibility\n\
 \    -Xdiag            show additional diagnostic messages\n\
-\    -Xdiag:resolver   show resolver diagnostic messages\n\
 \    -Xfuture          enable strictest checks, anticipating future default\n\
 \    -Xint             interpreted mode execution only\n\
 \    -Xinternalversion\n\
@@ -164,10 +170,12 @@
 \                      permit illegal access to members of types in named modules\n\
 \                      by code in unnamed modules. This compatibility option will\n\
 \                      be removed in the next release.\n\
-\    --disable-@files  disable further argument file expansion\n\
+\    --limit-modules <module name>[,<module name>...]\n\
+\                      limit the universe of observable modules\n\
 \    --patch-module <module>=<file>({0}<file>)*\n\
-\                      Override or augment a module with classes and resources\n\
-\                      in JAR files or directories.\n\n\
+\                      override or augment a module with classes and resources\n\
+\                      in JAR files or directories.\n\
+\    --disable-@files  disable further argument file expansion\n\n\
 These extra options are subject to change without notice.\n
 
 # Translators please note do not translate the options themselves
@@ -204,6 +212,7 @@
     Error: An unexpected error occurred while trying to open file {0}
 java.launcher.jar.error2=manifest not found in {0}
 java.launcher.jar.error3=no main manifest attribute, in {0}
+java.launcher.jar.error4=error loading java agent in {0}
 java.launcher.init.error=initialization error
 java.launcher.javafx.error1=\
     Error: The JavaFX launchApplication method has the wrong signature, it\n\
@@ -215,4 +224,5 @@
 java.launcher.module.error3=\
     Error: Unable to load main class {0} from module {1}\n\
     \t{2}
-
+java.launcher.module.error4=\
+    {0} not found
--- a/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/classes/sun/security/util/ConstraintsParameters.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2017 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
--- a/src/java.base/share/native/libjimage/endian.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/endian.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
--- a/src/java.base/share/native/libjimage/imageDecompressor.cpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/imageDecompressor.cpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
--- a/src/java.base/share/native/libjimage/imageDecompressor.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/imageDecompressor.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
--- a/src/java.base/share/native/libjimage/imageFile.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/imageFile.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
--- a/src/java.base/share/native/libjimage/inttypes.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/inttypes.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,4 +47,3 @@
 #endif
 
 #endif // LIBJIMAGE_INTTYPES_HPP
-
--- a/src/java.base/share/native/libjimage/jimage.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/jimage.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -202,4 +202,3 @@
 
 typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location,
         char* buffer, jlong size);
-
--- a/src/java.base/share/native/libjimage/osSupport.hpp	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjimage/osSupport.hpp	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
--- a/src/java.base/share/native/libjli/emessages.h	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjli/emessages.h	Fri May 12 10:43:28 2017 -0700
@@ -43,13 +43,14 @@
 #define ARG_ERROR2      "Error: %s requires jar file specification"
 #define ARG_ERROR3      "Error: The -J option should not be followed by a space."
 #define ARG_ERROR4      "Error: %s requires module path specification"
-#define ARG_ERROR5      "Error: %s requires module id"
+#define ARG_ERROR5      "Error: %s requires module name"
 #define ARG_ERROR6      "Error: %s requires modules to be specified"
 #define ARG_ERROR7      "Error: %s can only be specified once"
 #define ARG_ERROR8      "Error: Unmatched quote in environment variable %s"
 #define ARG_ERROR9      "Error: Option %s is not allowed in environment variable %s"
 #define ARG_ERROR10     "Error: Option %s in %s is not allowed in environment variable %s"
 #define ARG_ERROR11     "Error: Cannot specify main class in environment variable %s"
+#define ARG_ERROR12     "Error: %s requires module name"
 
 #define JVM_ERROR1      "Error: Could not create the Java Virtual Machine.\n" GEN_ERROR
 #define JVM_ERROR2      "Error: Could not detach main thread.\n" JNI_ERROR
--- a/src/java.base/share/native/libjli/java.c	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.base/share/native/libjli/java.c	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -71,7 +71,10 @@
 static jboolean printXUsage = JNI_FALSE;  /* print and exit*/
 static jboolean dryRun = JNI_FALSE;       /* initialize VM and exit */
 static char     *showSettings = NULL;     /* print but continue */
-static char     *listModules = NULL;
+static jboolean showResolvedModules = JNI_FALSE;
+static jboolean listModules = JNI_FALSE;
+static char     *describeModule = NULL;
+static jboolean validateModules = JNI_FALSE;
 
 static const char *_program_name;
 static const char *_launcher_name;
@@ -118,7 +121,10 @@
 static void PrintJavaVersion(JNIEnv *env, jboolean extraLF);
 static void PrintUsage(JNIEnv* env, jboolean doXUsage);
 static void ShowSettings(JNIEnv* env, char *optString);
-static void ListModules(JNIEnv* env, char *optString);
+static void ShowResolvedModules(JNIEnv* env);
+static void ListModules(JNIEnv* env);
+static void DescribeModule(JNIEnv* env, char* optString);
+static jboolean ValidateModules(JNIEnv* env);
 
 static void SetPaths(int argc, char **argv);
 
@@ -409,12 +415,34 @@
         CHECK_EXCEPTION_LEAVE(1);
     }
 
-    if (listModules != NULL) {
-        ListModules(env, listModules);
+    // show resolved modules and continue
+    if (showResolvedModules) {
+        ShowResolvedModules(env);
+        CHECK_EXCEPTION_LEAVE(1);
+    }
+
+    // list observable modules, then exit
+    if (listModules) {
+        ListModules(env);
         CHECK_EXCEPTION_LEAVE(1);
         LEAVE();
     }
 
+    // describe a module, then exit
+    if (describeModule != NULL) {
+        DescribeModule(env, describeModule);
+        CHECK_EXCEPTION_LEAVE(1);
+        LEAVE();
+    }
+
+    // validate modules on the module path, then exit
+    if (validateModules) {
+        jboolean okay = ValidateModules(env);
+        CHECK_EXCEPTION_LEAVE(1);
+        if (!okay) ret = 1;
+        LEAVE();
+    }
+
     if (printVersion || showVersion) {
         PrintJavaVersion(env, showVersion);
         CHECK_EXCEPTION_LEAVE(0);
@@ -552,7 +580,8 @@
 IsLauncherOption(const char* name) {
     return IsClassPathOption(name) ||
            IsLauncherMainOption(name) ||
-           JLI_StrCmp(name, "--list-modules") == 0;
+           JLI_StrCmp(name, "--describe-module") == 0 ||
+           JLI_StrCmp(name, "-d") == 0;
 }
 
 /*
@@ -1199,7 +1228,7 @@
 
     } else if (JLI_StrCCmp(arg, "--") == 0 && (equals = JLI_StrChr(arg, '=')) != NULL) {
         value = equals+1;
-        if (JLI_StrCCmp(arg, "--list-modules=") == 0 ||
+        if (JLI_StrCCmp(arg, "--describe-module=") == 0 ||
             JLI_StrCCmp(arg, "--module=") == 0 ||
             JLI_StrCCmp(arg, "--class-path=") == 0) {
             kind = LAUNCHER_OPTION_WITH_ARGUMENT;
@@ -1263,18 +1292,18 @@
             REPORT_ERROR (has_arg_any_len, ARG_ERROR1, arg);
             SetClassPath(value);
             mode = LM_CLASS;
-        } else if (JLI_StrCmp(arg, "--list-modules") == 0 ||
-                   JLI_StrCCmp(arg, "--list-modules=") == 0) {
-            listModules = arg;
-
-            // set listModules to --list-modules=<module-names> if argument is specified
-            if (JLI_StrCmp(arg, "--list-modules") == 0 && has_arg) {
-                static const char format[] = "%s=%s";
-                size_t buflen = JLI_StrLen(option) + 2 + JLI_StrLen(value);
-                listModules = JLI_MemAlloc(buflen);
-                JLI_Snprintf(listModules, buflen, format, option, value);
-            }
-            return JNI_TRUE;
+        } else if (JLI_StrCmp(arg, "--list-modules") == 0) {
+            listModules = JNI_TRUE;
+        } else if (JLI_StrCmp(arg, "--show-resolved-modules") == 0) {
+            showResolvedModules = JNI_TRUE;
+        } else if (JLI_StrCmp(arg, "--validate-modules") == 0) {
+            AddOption("-Djdk.module.minimumBoot=true", NULL);
+            validateModules = JNI_TRUE;
+        } else if (JLI_StrCmp(arg, "--describe-module") == 0 ||
+                   JLI_StrCCmp(arg, "--describe-module=") == 0 ||
+                   JLI_StrCmp(arg, "-d") == 0) {
+            REPORT_ERROR (has_arg_any_len, ARG_ERROR12, arg);
+            describeModule = value;
 /*
  * Parse white-space options
  */
@@ -1336,9 +1365,8 @@
             showSettings = arg;
         } else if (JLI_StrCmp(arg, "-Xdiag") == 0) {
             AddOption("-Dsun.java.launcher.diag=true", NULL);
-            AddOption("-Djdk.launcher.traceResolver=true", NULL);
-        } else if (JLI_StrCmp(arg, "-Xdiag:resolver") == 0) {
-            AddOption("-Djdk.launcher.traceResolver=true", NULL);
+        } else if (JLI_StrCmp(arg, "--show-module-resolution") == 0) {
+            AddOption("-Djdk.module.showModuleResolution=true", NULL);
 /*
  * The following case provide backward compatibility with old-style
  * command line options.
@@ -1399,7 +1427,10 @@
     }
 
     if (*pwhat == NULL) {
-        *pret = 1;
+        /* LM_UNKNOWN okay for options that exit */
+        if (!listModules && !describeModule && !validateModules) {
+            *pret = 1;
+        }
     } else if (mode == LM_UNKNOWN) {
         /* default to LM_CLASS if -m, -jar and -cp options are
          * not specified */
@@ -1828,21 +1859,61 @@
 }
 
 /**
- * List modules supported by the runtime
+ * Show resolved modules
+ */
+static void
+ShowResolvedModules(JNIEnv *env)
+{
+    jmethodID showResolvedModulesID;
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK(cls);
+    NULL_CHECK(showResolvedModulesID = (*env)->GetStaticMethodID(env, cls,
+            "showResolvedModules", "()V"));
+    (*env)->CallStaticVoidMethod(env, cls, showResolvedModulesID);
+}
+
+/**
+ * List observable modules
  */
 static void
-ListModules(JNIEnv *env, char *optString)
+ListModules(JNIEnv *env)
 {
     jmethodID listModulesID;
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK(cls);
+    NULL_CHECK(listModulesID = (*env)->GetStaticMethodID(env, cls,
+            "listModules", "()V"));
+    (*env)->CallStaticVoidMethod(env, cls, listModulesID);
+}
+
+/**
+ * Describe a module
+ */
+static void
+DescribeModule(JNIEnv *env, char *optString)
+{
+    jmethodID describeModuleID;
     jstring joptString = NULL;
     jclass cls = GetLauncherHelperClass(env);
     NULL_CHECK(cls);
-    NULL_CHECK(listModulesID = (*env)->GetStaticMethodID(env, cls,
-            "listModules", "(ZLjava/lang/String;)V"));
+    NULL_CHECK(describeModuleID = (*env)->GetStaticMethodID(env, cls,
+            "describeModule", "(Ljava/lang/String;)V"));
     NULL_CHECK(joptString = (*env)->NewStringUTF(env, optString));
-    (*env)->CallStaticVoidMethod(env, cls, listModulesID,
-                                 USE_STDOUT,
-                                 joptString);
+    (*env)->CallStaticVoidMethod(env, cls, describeModuleID, joptString);
+}
+
+/**
+ * Validate modules
+ */
+static jboolean
+ValidateModules(JNIEnv *env)
+{
+    jmethodID validateModulesID;
+    jclass cls = GetLauncherHelperClass(env);
+    NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
+    validateModulesID = (*env)->GetStaticMethodID(env, cls, "validateModules", "()Z");
+    NULL_CHECK_RETURN_VALUE(cls, JNI_FALSE);
+    return (*env)->CallStaticBooleanMethod(env, cls, validateModulesID);
 }
 
 /*
--- a/src/java.desktop/macosx/native/include/jawt_md.h	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/macosx/native/include/jawt_md.h	Fri May 12 10:43:28 2017 -0700
@@ -37,7 +37,7 @@
 #endif
 
 /*
- * Mac OS X specific declarations for AWT native interface.
+ * MacOS specific declarations for AWT native interface.
  * See notes in jawt.h for an example of use.
  */
 
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/WindowsComboBoxUI.java	Fri May 12 10:43:28 2017 -0700
@@ -339,11 +339,16 @@
     public Dimension getMinimumSize( JComponent c ) {
         Dimension d = super.getMinimumSize(c);
         if (XPStyle.getXP() != null) {
-            d.width += 5;
+            d.width += 7;
+            boolean isEditable = false;
+            if (c instanceof JComboBox) {
+                isEditable = ((JComboBox) c).isEditable();
+            }
+            d.height += isEditable ? 4 : 6;
         } else {
             d.width += 4;
+            d.height += 2;
         }
-        d.height += 2;
         return d;
     }
 
--- a/src/java.desktop/share/classes/java/awt/AlphaComposite.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/AlphaComposite.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -74,7 +74,7 @@
  *
  * <blockquote>
  * <table summary="layout">
- * <tr><th align=left>Factor&nbsp;&nbsp;<th align=left>Definition
+ * <tr><th style="text-align:left">Factor&nbsp;&nbsp;<th style="text-align:left">Definition
  * <tr><td><em>A<sub>s</sub></em><td>the alpha component of the source pixel
  * <tr><td><em>C<sub>s</sub></em><td>a color component of the source pixel in premultiplied form
  * <tr><td><em>A<sub>d</sub></em><td>the alpha component of the destination pixel
@@ -114,7 +114,7 @@
  *
  * <blockquote>
  * <table summary="layout">
- * <tr><th align=left>Factor&nbsp;&nbsp;<th align=left>Definition
+ * <tr><th style="text-align:left">Factor&nbsp;&nbsp;<th style="text-align:left">Definition
  * <tr><td><em>C<sub>sr</sub></em> <td>one of the raw color components of the source pixel
  * <tr><td><em>C<sub>dr</sub></em> <td>one of the raw color components of the destination pixel
  * <tr><td><em>A<sub>ac</sub></em>  <td>the "extra" alpha component from the AlphaComposite instance
@@ -205,7 +205,7 @@
  * appropriate conversions are performed before and after the compositing
  * operation.
  *
- * <h3><a name="caveats">Implementation Caveats</a></h3>
+ * <h3><a id="caveats">Implementation Caveats</a></h3>
  *
  * <ul>
  * <li>
--- a/src/java.desktop/share/classes/java/awt/Graphics2D.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/Graphics2D.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
  * <p>
  * When creating a {@code Graphics2D} object,  the
  * {@code GraphicsConfiguration}
- * specifies the <a name="deftransform">default transform</a> for
+ * specifies the <a id="deftransform">default transform</a> for
  * the target of the {@code Graphics2D} (a
  * {@link Component} or {@link Image}).  This default transform maps the
  * user space coordinate system to screen and printer device coordinates
@@ -129,7 +129,7 @@
  * of their particular rendering processes are:
  * <ol>
  * <li>
- * <b><a name="rendershape">{@code Shape} operations</a></b>
+ * <b><a id="rendershape">{@code Shape} operations</a></b>
  * <ol>
  * <li>
  * If the operation is a {@code draw(Shape)} operation, then
@@ -160,7 +160,7 @@
  * colors to render in device space.
  * </ol>
  * <li>
- * <b><a name=rendertext>Text operations</a></b>
+ * <b><a id=rendertext>Text operations</a></b>
  * <ol>
  * <li>
  * The following steps are used to determine the set of glyphs required
@@ -201,7 +201,7 @@
  * the colors to render in device space.
  * </ol>
  * <li>
- * <b><a name= renderingimage>{@code Image} Operations</a></b>
+ * <b><a id= renderingimage>{@code Image} Operations</a></b>
  * <ol>
  * <li>
  * The region of interest is defined by the bounding box of the source
--- a/src/java.desktop/share/classes/java/awt/GridBagLayout.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/GridBagLayout.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2015, 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
@@ -122,7 +122,7 @@
  * are not.  Baseline relative values are calculated relative to the
  * baseline.  Valid values are:
  *
- * <center><table BORDER=0 WIDTH=800
+ * <center><table BORDER=0 style="width:800"
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
  * <th><P style="text-align:left">Absolute Values</th>
@@ -198,7 +198,7 @@
  * The following figure shows a baseline layout and includes a
  * component that spans rows:
  * <center><table summary="Baseline Layout">
- * <tr ALIGN=CENTER>
+ * <tr style="text-align:center">
  * <td>
  * <img src="doc-files/GridBagLayout-baseline.png"
  *  alt="The following text describes this graphic (Figure 1)." style="float:center">
@@ -252,15 +252,15 @@
  * left-to-right container and Figure 3 shows the layout for a horizontal,
  * right-to-left container.
  *
- * <center><table WIDTH=600 summary="layout">
- * <tr ALIGN=CENTER>
+ * <center><table style="width:600" summary="layout">
+ * <tr style="text-align:center">
  * <td>
  * <img src="doc-files/GridBagLayout-1.gif" alt="The preceding text describes this graphic (Figure 1)." style="float:center; margin: 7px 10px;">
  * </td>
  * <td>
  * <img src="doc-files/GridBagLayout-2.gif" alt="The preceding text describes this graphic (Figure 2)." style="float:center; margin: 7px 10px;">
  * </td>
- * <tr ALIGN=CENTER>
+ * <tr style="text-align:center">
  * <td>Figure 2: Horizontal, Left-to-Right</td>
  * <td>Figure 3: Horizontal, Right-to-Left</td>
  * </tr>
--- a/src/java.desktop/share/classes/java/awt/GridLayout.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/GridLayout.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, 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
@@ -55,20 +55,20 @@
  * If the container's {@code ComponentOrientation} property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  *
- * <table style="float:center" WIDTH=600 summary="layout">
- * <tr ALIGN=CENTER>
+ * <table style="float:center;width:600" summary="layout">
+ * <tr style="text-align:center">
  * <td><img SRC="doc-files/GridLayout-1.gif"
  *      alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
  * Row 2 shows buttons 3 then 4. Row 3 shows buttons 5 then 6.">
  * </td>
  *
- * <td ALIGN=CENTER><img SRC="doc-files/GridLayout-2.gif"
- *                   alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 2 then 1.
+ * <td style="text-align:center"><img SRC="doc-files/GridLayout-2.gif"
+ *              alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 2 then 1.
  * Row 2 shows buttons 4 then 3. Row 3 shows buttons 6 then 5.">
  * </td>
  * </tr>
  *
- * <tr ALIGN=CENTER>
+ * <tr style="text-align:center">
  * <td>Figure 1: Horizontal, Left-to-Right</td>
  *
  * <td>Figure 2: Horizontal, Right-to-Left</td>
--- a/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/LinearGradientPaint.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,10 +91,9 @@
  * <p>
  * This image demonstrates the example code above for each
  * of the three cycle methods:
- * <center>
+ * <p style="text-align:center">
  * <img src = "doc-files/LinearGradientPaint.png"
  * alt="image showing the output of the example code">
- * </center>
  *
  * @see java.awt.Paint
  * @see java.awt.Graphics2D#setPaint
--- a/src/java.desktop/share/classes/java/awt/MenuBar.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/MenuBar.java	Fri May 12 10:43:28 2017 -0700
@@ -46,7 +46,7 @@
  * the menu bar with a {@code Frame} object, call the
  * frame's {@code setMenuBar} method.
  * <p>
- * <A NAME="mbexample"></A><!-- target for cross references -->
+ * <a id="mbexample"></a><!-- target for cross references -->
  * This is what a menu bar might look like:
  * <p>
  * <img src="doc-files/MenuBar-1.gif"
--- a/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -79,18 +79,18 @@
  * The gradient color proportions are equal for any particular line drawn
  * from the focus point. The following figure shows that the distance AB
  * is equal to the distance BC, and the distance AD is equal to the distance DE.
- * <center>
+ * <p style="text-align:center">
  * <img src = "doc-files/RadialGradientPaint-3.png" alt="image showing the
  * distance AB=BC, and AD=DE">
- * </center>
+ * <p>
  * If the gradient and graphics rendering transforms are uniformly scaled and
  * the user sets the focus so that it coincides with the center of the circle,
  * the gradient color proportions are equal for any line drawn from the center.
  * The following figure shows the distances AB, BC, AD, and DE. They are all equal.
- * <center>
+ * <p style="text-align:center">
  * <img src = "doc-files/RadialGradientPaint-4.png" alt="image showing the
  * distance of AB, BC, AD, and DE are all equal">
- * </center>
+ * <p>
  * Note that some minor variations in distances may occur due to sampling at
  * the granularity of a pixel.
  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
@@ -116,11 +116,9 @@
  * <p>
  * This image demonstrates the example code above, with default
  * (centered) focus for each of the three cycle methods:
- * <center>
+ * <p style="text-align:center">
  * <img src = "doc-files/RadialGradientPaint-1.png" alt="image showing the
  * output of the sameple code">
- * </center>
- *
  * <p>
  * It is also possible to specify a non-centered focus point, as
  * in the following code:
@@ -139,10 +137,9 @@
  * <p>
  * This image demonstrates the previous example code, with non-centered
  * focus for each of the three cycle methods:
- * <center>
+ * <p style="text-align:center">
  * <img src = "doc-files/RadialGradientPaint-2.png" alt="image showing the
  * output of the sample code">
- * </center>
  *
  * @see java.awt.Paint
  * @see java.awt.Graphics2D#setPaint
--- a/src/java.desktop/share/classes/java/awt/Rectangle.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/Rectangle.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2014, 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,7 +39,7 @@
  * that create a {@code Rectangle}, and the methods that can modify
  * one, do not prevent setting a negative value for width or height.
  * <p>
- * <a name="Empty">
+ * <a id="Empty">
  * A {@code Rectangle} whose width or height is exactly zero has location
  * along those axes with zero dimension, but is otherwise considered empty.</a>
  * The {@link #isEmpty} method will return true for such a {@code Rectangle}.
@@ -49,7 +49,7 @@
  * will include the location of the {@code Rectangle} on that axis in the
  * result as if the {@link #add(Point)} method were being called.
  * <p>
- * <a name="NonExistent">
+ * <a id="NonExistent">
  * A {@code Rectangle} whose width or height is negative has neither
  * location nor dimension along those axes with negative dimensions.
  * Such a {@code Rectangle} is treated as non-existent along those axes.
--- a/src/java.desktop/share/classes/java/awt/Shape.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/Shape.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * object that describes the trajectory path of the {@code Shape}
  * outline.
  * <p>
- * <a name="def_insideness"><b>Definition of insideness:</b></a>
+ * <a id="def_insideness"><b>Definition of insideness:</b></a>
  * A point is considered to lie inside a
  * {@code Shape} if and only if:
  * <ul>
--- a/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/dnd/DragSourceContext.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -65,7 +65,7 @@
  * itself between the platform and the
  * listeners provided by the initiator of the drag operation.
  * <p>
- * <a name="defaultCursor"></a>
+ * <a id="defaultCursor"></a>
  * By default, {@code DragSourceContext} sets the cursor as appropriate
  * for the current state of the drag and drop operation. For example, if
  * the user has chosen {@linkplain DnDConstants#ACTION_MOVE the move action},
--- a/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -96,14 +96,14 @@
  * </UL>
  *
  * <h4>Summary of attributes</h4>
- * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="95%"
+ * <table style="float:center;width:95%" border="0" cellspacing="0" cellpadding="2"
  *     summary="Key, value type, principal constants, and default value
  *     behavior of all TextAttributes">
  * <tr style="background-color:#ccccff">
- * <th valign="TOP" align="CENTER">Key</th>
- * <th valign="TOP" align="CENTER">Value Type</th>
- * <th valign="TOP" align="CENTER">Principal Constants</th>
- * <th valign="TOP" align="CENTER">Default Value</th>
+ * <th valign="TOP" style="text-align:center">Key</th>
+ * <th valign="TOP" style="text-align:center">Value Type</th>
+ * <th valign="TOP" style="text-align:center">Principal Constants</th>
+ * <th valign="TOP" style="text-align:center">Default Value</th>
  * </tr>
  * <tr>
  * <td valign="TOP">{@link #FAMILY}</td>
--- a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
  *      [ y'] = [  m10  m11  m12  ] [ y ] = [ m10x + m11y + m12 ]
  *      [ 1 ]   [   0    0    1   ] [ 1 ]   [         1         ]
  * </pre>
- * <h3><a name="quadrantapproximation">Handling 90-Degree Rotations</a></h3>
+ * <h3><a id="quadrantapproximation">Handling 90-Degree Rotations</a></h3>
  * <p>
  * In some variations of the {@code rotate} methods in the
  * {@code AffineTransform} class, a double-precision argument
--- a/src/java.desktop/share/classes/java/awt/geom/Arc2D.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/geom/Arc2D.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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,11 +33,11 @@
  * start angle, angular extent (length of the arc), and a closure type
  * ({@code OPEN}, {@code CHORD}, or {@code PIE}).
  * <p>
- * <a name="inscribes">
+ * <a id="inscribes">
  * The arc is a partial section of a full ellipse which
  * inscribes the framing rectangle of its parent</a> {@link RectangularShape}.
  *
- * <a name="angles">
+ * <a id="angles">
  * The angles are specified relative to the non-square
  * framing rectangle such that 45 degrees always falls on the line from
  * the center of the ellipse to the upper right corner of the framing
--- a/src/java.desktop/share/classes/java/awt/geom/Line2D.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/geom/Line2D.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -618,7 +618,7 @@
      *           specified line segment
      * @param y2 the Y coordinate of the end point of the
      *           specified line segment
-     * @return {@code <true>} if this line segment and the specified line segment
+     * @return {@code true} if this line segment and the specified line segment
      *                  intersect each other; {@code false} otherwise.
      * @since 1.2
      */
--- a/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/geom/Path2D.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -846,7 +846,7 @@
          * path.
          *
          * @serialData
-         * <a name="Path2DSerialData"><!-- --></a>
+         * <a id="Path2DSerialData"><!-- --></a>
          * <ol>
          * <li>The default serializable fields.
          * There are no default serializable fields as of 1.6.
@@ -1605,7 +1605,7 @@
          * path.
          *
          * @serialData
-         * <a name="Path2DSerialData"><!-- --></a>
+         * <a id="Path2DSerialData"><!-- --></a>
          * <ol>
          * <li>The default serializable fields.
          * There are no default serializable fields as of 1.6.
--- a/src/java.desktop/share/classes/java/awt/im/spi/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/im/spi/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -33,7 +33,7 @@
  * languages and the use of entirely different input mechanisms, such as
  * handwriting recognition.
  *
- * <h2><a name="Packaging"></a>Packaging Input Methods</h2>
+ * <h2><a id="Packaging"></a>Packaging Input Methods</h2>
  * Input methods can be made available by adding them to the application's class
  * path. The main JAR file of an input method must contain the file:
  * <pre>
@@ -61,14 +61,14 @@
  * that loading of the class implementing {@code InputMethod} can be deferred
  * until actually needed.
  *
- * <h2><a name="Loading"></a>Loading Input Methods</h2>
+ * <h2><a id="Loading"></a>Loading Input Methods</h2>
  * The input method framework will usually defer loading of input  method
  * classes until they are absolutely needed. It loads only the
  * {@code InputMethodDescriptor} implementations during AWT initialization. It
  * loads an {@code InputMethod} implementation when the input method has been
  * selected.
  *
- * <h2><a name="PeeredComponents"></a>Java Input Methods and Peered Text
+ * <h2><a id="PeeredComponents"></a>Java Input Methods and Peered Text
  * Components</h2>
  * The Java input method framework intends to support all combinations of input
  * methods (host input methods and Java input methods) and components (peered
--- a/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java	Fri May 12 10:43:28 2017 -0700
@@ -29,7 +29,8 @@
 
 /**
  * This class provides default implementations of several {@code Image} methods
- * for classes that want to implement the {@MultiResolutionImage} interface.
+ * for classes that want to implement the {@code MultiResolutionImage}
+ * interface.
  *
  * For example,
  * <pre> {@code
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferByte.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -42,7 +42,7 @@
  * Values stored in the byte array(s) of this {@code DataBuffer} are treated as
  * unsigned values.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferDouble.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, 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
@@ -31,7 +31,7 @@
  * This class extends {@code DataBuffer} and stores data internally
  * in {@code double} form.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferFloat.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, 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
@@ -31,7 +31,7 @@
  * This class extends {@code DataBuffer} and stores data internally
  * in {@code float} form.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferInt.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -41,7 +41,7 @@
  * This class extends {@code DataBuffer} and stores data internally
  * as integers.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferShort.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -40,7 +40,7 @@
 /**
  * This class extends {@code DataBuffer} and stores data internally as shorts.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/DataBufferUShort.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -42,7 +42,7 @@
  * shorts.  Values stored in the short array(s) of this {@code DataBuffer}
  * are treated as unsigned values.
  * <p>
- * <a name="optimizations">
+ * <a id="optimizations">
  * Note that some implementations may function more efficiently
  * if they can maintain control over how the data for an image is
  * stored.
--- a/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/image/IndexColorModel.java	Fri May 12 10:43:28 2017 -0700
@@ -55,7 +55,7 @@
  * {@code IndexColorModel} objects are never pre-multiplied with
  * the alpha components.
  * <p>
- * <a name="transparency">
+ * <a id="transparency">
  * The transparency of an {@code IndexColorModel} object is
  * determined by examining the alpha components of the colors in the
  * colormap and choosing the most specific value after considering
@@ -86,7 +86,7 @@
  * and {@code getNumComponents} returns 4.
  *
  * <p>
- * <a name="index_values">
+ * <a id="index_values">
  * The values used to index into the colormap are taken from the least
  * significant <em>n</em> bits of pixel representations where
  * <em>n</em> is based on the pixel size specified in the constructor.
--- a/src/java.desktop/share/classes/java/awt/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/java/awt/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -35,10 +35,10 @@
  * components can fire. See AWTEvent for a description of the AWT event model.
  * <p>
  * A container is a component that can contain components and other containers.
- * A con tainer can also have a layout manager that controls the visual
- * placement of components in the container. The AWT package contains several
- * layout manager classes and an interface for building your own layout manager.
- * See Container and LayoutManager for more information.
+ * A container can also have a layout manager that controls the visual placement
+ * of components in the container. The AWT package contains several layout
+ * manager classes and an interface for building your own layout manager. See
+ * Container and LayoutManager for more information.
  * <p>
  * Each {@code Component} object is limited in its maximum size and its location
  * because the values are stored as an integer. Also, a platform may further
@@ -54,6 +54,8 @@
  * <ul>
  *     <li><a href="doc-files/FocusSpec.html">The AWT Focus Subsystem</a>
  *     <li><a href="doc-files/Modality.html">The AWT Modality</a>
+ *     <li><a href="{@docRoot}/../specs/AWT_Native_Interface.html">
+ *                  The Java AWT Native Interface (JAWT)</a>
  * </ul>
  *
  * @since 1.0
--- a/src/java.desktop/share/classes/javax/accessibility/package-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/accessibility/package-info.java	Fri May 12 10:43:28 2017 -0700
@@ -37,7 +37,7 @@
  * interfaces, and 6 Java programming language classes. These are described
  * below.
  *
- * <h3><a name="Accessible"></a><a href="Accessible.html">Interface
+ * <h3><a id="Accessible"></a><a href="Accessible.html">Interface
  * Accessible</a></h3>
  * <a href="Accessible.html">Interface Accessible</a> is the main interface of
  * the Java Accessibility API. All components that support the Java
@@ -48,7 +48,7 @@
  * object that is part of the user interface of a Java application, if that
  * program is to be compatible with assistive technologies.
  *
- * <h3><a name="AccessibleContext"></a><a href="AccessibleContext.html">Class
+ * <h3><a id="AccessibleContext"></a><a href="AccessibleContext.html">Class
  * AccessibleContext</a></h3>
  * <a href="AccessibleContext.html">AccessibleContext</a> represents the minimum
  * information all accessible objects return and is obtained by calling the
@@ -108,7 +108,7 @@
  *     called on an AccessibleContext.</li>
  * </ul>
  *
- * <h3><a name="AccessibleRole"></a><a href="AccessibleRole.html">Class
+ * <h3><a id="AccessibleRole"></a><a href="AccessibleRole.html">Class
  * AccessibleRole</a></h3>
  * This class encapsulates the Accessible object's role in the user interface
  * and is obtained by calling the {@code getAccessibleRole} method on an
@@ -123,7 +123,7 @@
  * programmer-defined roles can be added in the future without needing to modify
  * the base class.
  *
- * <h3><a name="AccessibleState"></a><a href="AccessibleState.html">Class
+ * <h3><a id="AccessibleState"></a><a href="AccessibleState.html">Class
  * AccessibleState</a></h3>
  * This class encapsulates a particular state of the Accessible object.
  * Accessible states include things like "Armed", "Busy", "Checked", "Focused",
@@ -142,7 +142,7 @@
  * additional, programmer-defined roles can be added in the future without
  * needing to modify the base class.
  *
- * <h3><a name="AccessibleStateSet"></a><a href="AccessibleStateSet.html">Class
+ * <h3><a id="AccessibleStateSet"></a><a href="AccessibleStateSet.html">Class
  * AccessibleStateSet</a></h3>
  * This class encapsulates a collection of states of the Accessible object and
  * is obtained by calling the {@code getAccessibleStateSet} method on an
@@ -152,7 +152,7 @@
  * class provide for retrieving the individual
  * <a href="#AccessibleState">AccessibleStates</a> on the state set.
  *
- * <h3><a name="AccessibleBundle"></a><a href="AccessibleBundle.html">Class
+ * <h3><a id="AccessibleBundle"></a><a href="AccessibleBundle.html">Class
  * AccessibleBundle</a></h3>
  * This class is used to maintain a strongly typed enumeration. It is the super
  * class of both the <a href="#AccessibleRole">AccessibleRole</a> and
@@ -161,7 +161,7 @@
  * <a href="#AccessibleRole">AccessibleRole</a> and
  * <a href="#AccessibleState">AccessibleState</a> classes.
  *
- * <h3><a name="AccessibleAction"></a><a href="AccessibleAction.html">Interface
+ * <h3><a id="AccessibleAction"></a><a href="AccessibleAction.html">Interface
  * AccessibleAction</a></h3>
  * The <a href="AccessibleAction.html">AccessibleAction</a> interface should be
  * supported by any object that can perform one or more actions. This interface
@@ -177,7 +177,7 @@
  * <a href="#AccessibleContext">AccessibleContext</a>. If the return value is
  * not null, the object supports this interface.
  *
- * <h3> <a name="AccessibleComponent"></a><a href="AccessibleComponent.html">
+ * <h3> <a id="AccessibleComponent"></a><a href="AccessibleComponent.html">
  * Interface AccessibleComponent</a></h3>
  * The <a href="AccessibleComponent.html">AccessibleComponent</a> interface
  * should be supported by any object that is rendered on the screen. This
@@ -190,7 +190,7 @@
  * <a href="#AccessibleContext">AccessibleContext</a>. If the return value is
  * not null, the object supports this interface.
  *
- * <h3><a name="AccessibleSelection"></a><a href="AccessibleSelection.html">
+ * <h3><a id="AccessibleSelection"></a><a href="AccessibleSelection.html">
  * Interface AccessibleSelection</a></h3>
  * The <a href="AccessibleSelection.html">AccessibleSelection</a> interface
  * provides the standard mechanism for an assistive technology to determine what
@@ -206,7 +206,7 @@
  * <a href="#AccessibleContext">AccessibleContext</a>. If the return value is
  * not null, the object supports this interface.
  *
- * <h3><a name="AccessibleText"></a><a href="AccessibleText.html">Interface
+ * <h3><a id="AccessibleText"></a><a href="AccessibleText.html">Interface
  * AccessibleText</a></h3>
  * Interface <a href="AccessibleText.html">AccessibleText</a> is the contract
  * for making rich, editable text Accessible. Not all text displayed on the
@@ -230,7 +230,7 @@
  * <a href="#AccessibleContext">AccessibleContext</a>. If the return value is
  * not null, the object supports this interface.
  *
- * <h3><a name="AccessibleHypertext"></a> <a href="AccessibleHypertext.html">
+ * <h3><a id="AccessibleHypertext"></a> <a href="AccessibleHypertext.html">
  * Interface AccessibleHypertext</a></h3>
  * The <a href="AccessibleHypertext.html">AccessibleHypertext</a> interface
  * should be supported by any object that presents hypertext information on the
@@ -246,7 +246,7 @@
  * class which extends AccessibleHypertext, then that object supports
  * AccessibleHypertext.
  *
- * <h3><a name="AccessibleHyperlink"></a><a href="AccessibleHyperlink.html">
+ * <h3><a id="AccessibleHyperlink"></a><a href="AccessibleHyperlink.html">
  * Interface AccessibleHyperlink</a></h3>
  * An object that is a hyperlink should support the
  * <a href="AccessibleHyperlink.html">AccessibleHyperlink</a> interface.&nbsp;
@@ -254,7 +254,7 @@
  * getLink method on an <a href="#AccessibleHypertext">AccessibleHypertext</a>
  * object.
  *
- * <h3><a name="AccessibleValue"></a><a href="AccessibleValue.html">Interface
+ * <h3><a id="AccessibleValue"></a><a href="AccessibleValue.html">Interface
  * AccessibleValue</a></h3>
  * The <a href="AccessibleValue.html">AccessibleValue</a> interface should be
  * supported by any object that supports a numerical value (e.g., a scroll bar).
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFDirectory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -63,8 +63,8 @@
  * <p>A {@code TIFFDirectory} is aware of the tag numbers in the
  * group of {@link TIFFTagSet}s associated with it. When
  * a {@code TIFFDirectory} is created from a native image metadata
- * object, these tag sets are derived from the <tt>tagSets</tt> attribute
- * of the <tt>TIFFIFD</tt> node.</p>
+ * object, these tag sets are derived from the {@code tagSets} attribute
+ * of the {@code TIFFIFD} node.</p>
  *
  * <p>A {@code TIFFDirectory} might also have a parent {@link TIFFTag}.
  * This will occur if the directory represents an IFD other than the root
@@ -73,8 +73,8 @@
  * {@link TIFFTag#isIFDPointer} method of this parent {@code TIFFTag}
  * must return {@code true}.  When a {@code TIFFDirectory} is
  * created from a native image metadata object, the parent tag set is set
- * from the <tt>parentTagName</tt> attribute of the corresponding
- * <tt>TIFFIFD</tt> node. Note that a {@code TIFFDirectory} instance
+ * from the {@code parentTagName} attribute of the corresponding
+ * {@code TIFFIFD} node. Note that a {@code TIFFDirectory} instance
  * which has a non-{@code null} parent tag will be contained in the
  * data field of a {@code TIFFField} instance which has a tag field
  * equal to the contained directory's parent tag.</p>
@@ -133,8 +133,8 @@
      * an image metadata object. The supplied object must support an image
      * metadata format supported by the TIFF {@link javax.imageio.ImageWriter}
      * plug-in. This will usually be either the TIFF native image metadata
-     * format <tt>javax_imageio_tiff_image_1.0</tt> or the Java
-     * Image I/O standard metadata format <tt>javax_imageio_1.0</tt>.
+     * format {@code javax_imageio_tiff_image_1.0} or the Java
+     * Image I/O standard metadata format {@code javax_imageio_1.0}.
      *
      * @param tiffImageMetadata A metadata object which supports a compatible
      * image metadata format.
--- a/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java	Fri May 12 10:43:28 2017 -0700
@@ -62,7 +62,7 @@
  *
  * <tr>
  * <td>
- * <tt>BYTE</tt>
+ * {@code BYTE}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_BYTE}
@@ -77,7 +77,7 @@
  *
  * <tr>
  * <td>
- * <tt>ASCII</tt>
+ * {@code ASCII}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_ASCII}
@@ -92,7 +92,7 @@
  *
  * <tr>
  * <td>
- * <tt>SHORT</tt>
+ * {@code SHORT}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_SHORT}
@@ -107,7 +107,7 @@
  *
  * <tr>
  * <td>
- * <tt>LONG</tt>
+ * {@code LONG}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_LONG}
@@ -122,7 +122,7 @@
  *
  * <tr>
  * <td>
- * <tt>RATIONAL</tt>
+ * {@code RATIONAL}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_RATIONAL}
@@ -137,7 +137,7 @@
  *
  * <tr>
  * <td>
- * <tt>SBYTE</tt>
+ * {@code SBYTE}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_SBYTE}
@@ -152,7 +152,7 @@
  *
  * <tr>
  * <td>
- * <tt>UNDEFINED</tt>
+ * {@code UNDEFINED}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_UNDEFINED}
@@ -167,7 +167,7 @@
  *
  * <tr>
  * <td>
- * <tt>SSHORT</tt>
+ * {@code SSHORT}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_SSHORT}
@@ -182,7 +182,7 @@
  *
  * <tr>
  * <td>
- * <tt>SLONG</tt>
+ * {@code SLONG}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_SLONG}
@@ -197,7 +197,7 @@
  *
  * <tr>
  * <td>
- * <tt>SRATIONAL</tt>
+ * {@code SRATIONAL}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_SRATIONAL}
@@ -212,7 +212,7 @@
  *
  * <tr>
  * <td>
- * <tt>FLOAT</tt>
+ * {@code FLOAT}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_FLOAT}
@@ -227,7 +227,7 @@
  *
  * <tr>
  * <td>
- * <tt>DOUBLE</tt>
+ * {@code DOUBLE}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_DOUBLE}
@@ -242,7 +242,7 @@
  *
  * <tr>
  * <td>
- * <tt>IFD</tt>
+ * {@code IFD}
  * </td>
  * <td>
  * {@link TIFFTag#TIFF_IFD_POINTER}
@@ -941,14 +941,14 @@
 
     /**
      * Returns the {@code TIFFField} as a node named either
-     * <tt>"TIFFField"</tt> or <tt>"TIFFIFD"</tt> as described in the
+     * {@code "TIFFField"} or {@code "TIFFIFD"} as described in the
      * TIFF native image metadata specification. The node will be named
-     * <tt>"TIFFIFD"</tt> if and only if {@link #hasDirectory()} returns
+     * {@code "TIFFIFD"} if and only if {@link #hasDirectory()} returns
      * {@code true} and the field's type is either {@link TIFFTag#TIFF_LONG}
      * or {@link TIFFTag#TIFF_IFD_POINTER}.
      *
-     * @return a {@code Node} named <tt>"TIFFField"</tt> or
-     * <tt>"TIFFIFD"</tt>.
+     * @return a {@code Node} named {@code "TIFFField"} or
+     * {@code "TIFFIFD"}.
      */
     public Node getAsNativeNode() {
         return new TIFFFieldNode(this);
--- a/src/java.desktop/share/classes/javax/print/MimeType.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/print/MimeType.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, 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
@@ -50,7 +50,6 @@
  * <LI>
  * Since not all Java profiles include the AWT, the Jini Print Service should
  * not depend on an AWT class.
- * <P>
  * <LI>
  * The implementation of class java.awt.datatransfer.MimeType does not
  * guarantee
@@ -76,7 +75,6 @@
  * <LI> Quoting backslash characters inside parameter values are removed.
  * <LI> The parameters are arranged in ascending order of parameter name.
  * </UL>
- * <P>
  *
  * @author  Alan Kaminsky
  */
--- a/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/print/attribute/standard/Finishings.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, 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
@@ -40,7 +40,7 @@
  * for purposes of finishing.
  * <P>
  * Standard Finishings values are:
- * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
+ * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 style="width:100%" SUMMARY="layout">
  * <TR>
  * <TD STYLE="WIDTH:10%">
  * &nbsp;
@@ -76,7 +76,7 @@
  * <P>
  * The following Finishings values are more specific; they indicate a
  * corner or an edge as if the document were a portrait document:
- * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100% SUMMARY="layout">
+ * <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 style="width:100%" SUMMARY="layout">
  * <TR>
  * <TD STYLE="WIDTH:10%">
  * &nbsp;
--- a/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, 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
@@ -70,7 +70,7 @@
  * The standard MultipleDocumentHandling values are:
  * <UL>
  * <LI>
- * <a NAME="sdfi"></a>{@link #SINGLE_DOCUMENT
+ * <a id="sdfi"></a>{@link #SINGLE_DOCUMENT
  * <B>SINGLE_DOCUMENT</B>}. If a print job has multiple
  * documents -- say, the document data is called {@code a} and
  * {@code b} -- then the result of processing all the document data
@@ -85,7 +85,7 @@
  * each copy ({@code a(*),b(*)}) to start on a new media sheet.
  *
  * <LI>
- * <a NAME="sducfi"></a>{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
+ * <a id="sducfi"></a>{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
  * <B>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</B>}. If a print job
  * has multiple documents -- say, the document data is called {@code a} and
  * {@code b} -- then the result of processing the data in each document
@@ -98,7 +98,7 @@
  * {@code a(*),a(*),...,b(*),b(*)...}.
  *
  * <LI>
- * <a NAME="sdccfi"></a>{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
+ * <a id="sdccfi"></a>{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
  * <B>SEPARATE_DOCUMENTS_COLLATED_COPIES</B>}. If a print job
  * has multiple documents -- say, the document data is called {@code a} and
  * {@code b} -- then the result of processing the data in each document
@@ -111,7 +111,7 @@
  * {@code a(*),b(*),a(*),b(*),...}.
  *
  * <LI>
- * <a NAME="sdnsfi"></a>{@link #SINGLE_DOCUMENT_NEW_SHEET
+ * <a id="sdnsfi"></a>{@link #SINGLE_DOCUMENT_NEW_SHEET
  * <B>SINGLE_DOCUMENT_NEW_SHEET</B>}. Same as SINGLE_DOCUMENT,
  * except that the printer must ensure that the first impression of each
  * document instance in the job is placed on a new media sheet. This value
--- a/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Fri May 12 10:43:28 2017 -0700
@@ -59,7 +59,7 @@
      *
      * @see MidiMessage#getStatus
      */
-    public static final int META                                                = 0xFF; // 255
+    public static final int META = 0xFF; // 255
 
     /**
      * The length of the actual message in the data array. This is used to
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -47,15 +47,15 @@
  * {@code MidiMessage} includes methods to get, but not set, these values.
  * Setting them is a subclass responsibility.
  * <p>
- * <a name="integersVsBytes"></a> The MIDI standard expresses MIDI data in
+ * <a id="integersVsBytes"></a> The MIDI standard expresses MIDI data in
  * bytes. However, because Java<sup>TM</sup> uses signed bytes, the Java Sound
  * API uses integers instead of bytes when expressing MIDI data. For example,
  * the {@link #getStatus()} method of {@code MidiMessage} returns MIDI status
  * bytes as integers. If you are processing MIDI data that originated outside
  * Java Sound and now is encoded as signed bytes, the bytes can be
  * converted to integers using this conversion:
- *
- * <center>{@code int i = (int)(byte & 0xFF)}</center>
+ * <p style="text-align:center">
+ * {@code int i = (int)(byte & 0xFF)}
  * <p>
  * If you simply need to pass a known MIDI byte value as a method parameter, it
  * can be expressed directly as an integer, using (for example) decimal or
--- a/src/java.desktop/share/classes/javax/sound/midi/Sequence.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Sequence.java	Fri May 12 10:43:28 2017 -0700
@@ -58,7 +58,7 @@
      *
      * @see #Sequence(float, int)
      */
-    public static final float PPQ                                                       = 0.0f;
+    public static final float PPQ = 0.0f;
 
     /**
      * The SMPTE-based timing type with 24 frames per second (resolution is
@@ -66,7 +66,7 @@
      *
      * @see #Sequence(float, int)
      */
-    public static final float SMPTE_24                                          = 24.0f;
+    public static final float SMPTE_24 = 24.0f;
 
     /**
      * The SMPTE-based timing type with 25 frames per second (resolution is
@@ -74,7 +74,7 @@
      *
      * @see #Sequence(float, int)
      */
-    public static final float SMPTE_25                                          = 25.0f;
+    public static final float SMPTE_25 = 25.0f;
 
     /**
      * The SMPTE-based timing type with 29.97 frames per second (resolution is
@@ -82,7 +82,7 @@
      *
      * @see #Sequence(float, int)
      */
-    public static final float SMPTE_30DROP                                      = 29.97f;
+    public static final float SMPTE_30DROP = 29.97f;
 
     /**
      * The SMPTE-based timing type with 30 frames per second (resolution is
@@ -90,7 +90,7 @@
      *
      * @see #Sequence(float, int)
      */
-    public static final float SMPTE_30                                          = 30.0f;
+    public static final float SMPTE_30 = 30.0f;
 
     // Variables
 
--- a/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java	Fri May 12 10:43:28 2017 -0700
@@ -733,7 +733,7 @@
          * information from its internal clock. This is not a legal slave sync
          * mode.
          */
-        public static final SyncMode INTERNAL_CLOCK             = new SyncMode("Internal Clock");
+        public static final SyncMode INTERNAL_CLOCK = new SyncMode("Internal Clock");
 
         /**
          * A master or slave synchronization mode that specifies the use of MIDI
@@ -745,7 +745,7 @@
          * receiver. MIDI clock messages are sent at a rate of 24 per quarter
          * note.
          */
-        public static final SyncMode MIDI_SYNC                  = new SyncMode("MIDI Sync");
+        public static final SyncMode MIDI_SYNC = new SyncMode("MIDI Sync");
 
         /**
          * A master or slave synchronization mode that specifies the use of MIDI
@@ -756,13 +756,13 @@
          * sequencer sends MIDI Time Code messages to its receiver. (See the
          * MIDI 1.0 Detailed Specification for a description of MIDI Time Code.)
          */
-        public static final SyncMode MIDI_TIME_CODE             = new SyncMode("MIDI Time Code");
+        public static final SyncMode MIDI_TIME_CODE = new SyncMode("MIDI Time Code");
 
         /**
          * A slave synchronization mode indicating that no timing information
          * should be sent to the receiver. This is not a legal master sync mode.
          */
-        public static final SyncMode NO_SYNC                            = new SyncMode("No Timing");
+        public static final SyncMode NO_SYNC = new SyncMode("No Timing");
 
     }
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Fri May 12 10:43:28 2017 -0700
@@ -61,35 +61,35 @@
      *
      * @see MidiMessage#getStatus
      */
-    public static final int MIDI_TIME_CODE                              = 0xF1; // 241
+    public static final int MIDI_TIME_CODE = 0xF1; // 241
 
     /**
      * Status byte for Song Position Pointer message (0xF2, or 242).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int SONG_POSITION_POINTER               = 0xF2; // 242
+    public static final int SONG_POSITION_POINTER = 0xF2; // 242
 
     /**
      * Status byte for MIDI Song Select message (0xF3, or 243).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int SONG_SELECT                                 = 0xF3; // 243
+    public static final int SONG_SELECT = 0xF3; // 243
 
     /**
      * Status byte for Tune Request message (0xF6, or 246).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int TUNE_REQUEST                                = 0xF6; // 246
+    public static final int TUNE_REQUEST = 0xF6; // 246
 
     /**
      * Status byte for End of System Exclusive message (0xF7, or 247).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int END_OF_EXCLUSIVE                    = 0xF7; // 247
+    public static final int END_OF_EXCLUSIVE = 0xF7; // 247
 
     // System real-time messages
 
@@ -98,80 +98,80 @@
      *
      * @see MidiMessage#getStatus
      */
-    public static final int TIMING_CLOCK                                = 0xF8; // 248
+    public static final int TIMING_CLOCK = 0xF8; // 248
 
     /**
      * Status byte for Start message (0xFA, or 250).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int START                                               = 0xFA; // 250
+    public static final int START = 0xFA; // 250
 
     /**
      * Status byte for Continue message (0xFB, or 251).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int CONTINUE                                    = 0xFB; // 251
+    public static final int CONTINUE = 0xFB; // 251
 
     /**
      * Status byte for Stop message (0xFC, or 252).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int STOP                                                = 0xFC; //252
+    public static final int STOP = 0xFC; //252
 
     /**
      * Status byte for Active Sensing message (0xFE, or 254).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int ACTIVE_SENSING                              = 0xFE; // 254
+    public static final int ACTIVE_SENSING = 0xFE; // 254
 
     /**
      * Status byte for System Reset message (0xFF, or 255).
      *
      * @see MidiMessage#getStatus
      */
-    public static final int SYSTEM_RESET                                = 0xFF; // 255
+    public static final int SYSTEM_RESET = 0xFF; // 255
 
     // Channel voice message upper nibble defines
 
     /**
      * Command value for Note Off message (0x80, or 128).
      */
-    public static final int NOTE_OFF                                    = 0x80;  // 128
+    public static final int NOTE_OFF = 0x80;  // 128
 
     /**
      * Command value for Note On message (0x90, or 144).
      */
-    public static final int NOTE_ON                                             = 0x90;  // 144
+    public static final int NOTE_ON = 0x90;  // 144
 
     /**
      * Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or
      * 160).
      */
-    public static final int POLY_PRESSURE                               = 0xA0;  // 160
+    public static final int POLY_PRESSURE = 0xA0;  // 160
 
     /**
      * Command value for Control Change message (0xB0, or 176).
      */
-    public static final int CONTROL_CHANGE                              = 0xB0;  // 176
+    public static final int CONTROL_CHANGE = 0xB0;  // 176
 
     /**
      * Command value for Program Change message (0xC0, or 192).
      */
-    public static final int PROGRAM_CHANGE                              = 0xC0;  // 192
+    public static final int PROGRAM_CHANGE = 0xC0;  // 192
 
     /**
      * Command value for Channel Pressure (Aftertouch) message (0xD0, or 208).
      */
-    public static final int CHANNEL_PRESSURE                    = 0xD0;  // 208
+    public static final int CHANNEL_PRESSURE = 0xD0;  // 208
 
     /**
      * Command value for Pitch Bend message (0xE0, or 224).
      */
-    public static final int PITCH_BEND                                  = 0xE0;  // 224
+    public static final int PITCH_BEND = 0xE0;  // 224
 
     /**
      * Constructs a new {@code ShortMessage}. The contents of the new message
--- a/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Fri May 12 10:43:28 2017 -0700
@@ -81,7 +81,7 @@
      *
      * @see MidiMessage#getStatus
      */
-    public static final int SYSTEM_EXCLUSIVE                    = 0xF0; // 240
+    public static final int SYSTEM_EXCLUSIVE = 0xF0; // 240
 
     /**
      * Status byte for Special System Exclusive message (0xF7, or 247), which is
@@ -90,7 +90,7 @@
      *
      * @see MidiMessage#getStatus
      */
-    public static final int SPECIAL_SYSTEM_EXCLUSIVE    = 0xF7; // 247
+    public static final int SPECIAL_SYSTEM_EXCLUSIVE = 0xF7; // 247
 
     /**
      * The data bytes for this system exclusive message. These are initialized
--- a/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -51,7 +51,7 @@
  * given type of {@code Synthesizer} always has a fixed number of voices, equal
  * to the maximum number of simultaneous notes it is capable of sounding.
  * <p>
- * <a NAME="description_of_active"></a> If the voice is not currently processing
+ * <a id="description_of_active"></a> If the voice is not currently processing
  * a MIDI note, it is considered inactive. A voice is inactive when it has been
  * given no note-on commands, or when every note-on command received has been
  * terminated by a corresponding note-off (or by an "all notes off" message).
--- a/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/BooleanControl.java	Fri May 12 10:43:28 2017 -0700
@@ -141,14 +141,14 @@
          * Represents a control for the mute status of a line. Note that mute
          * status does not affect gain.
          */
-        public static final Type MUTE                           = new Type("Mute");
+        public static final Type MUTE = new Type("Mute");
 
         /**
          * Represents a control for whether reverberation is applied to a line.
          * Note that the status of this control not affect the reverberation
          * settings for a line, but does affect whether these settings are used.
          */
-        public static final Type APPLY_REVERB           = new Type("Apply Reverb");
+        public static final Type APPLY_REVERB = new Type("Apply Reverb");
 
         /**
          * Constructs a new boolean control type.
--- a/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/FloatControl.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, 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
@@ -361,8 +361,8 @@
          * loudness is unaffected. Note that gain measures dB, not amplitude.
          * The relationship between a gain in decibels and the corresponding
          * linear amplitude multiplier is:
-         *
-         * <CENTER>{@code linearScalar = pow(10.0, gainDB/20.0)}</CENTER>
+         * <p style="text-align:center">
+         * {@code linearScalar = pow(10.0, gainDB/20.0)}
          * <p>
          * The {@code FloatControl} class has methods to impose a maximum and
          * minimum allowable value for gain. However, because an audio signal
@@ -386,7 +386,7 @@
          * @see #REVERB_RETURN
          * @see #VOLUME
          */
-        public static final Type MASTER_GAIN            = new Type("Master Gain");
+        public static final Type MASTER_GAIN = new Type("Master Gain");
 
         /**
          * Represents a control for the auxiliary send gain on a line.
@@ -394,7 +394,7 @@
          * @see #MASTER_GAIN
          * @see #AUX_RETURN
          */
-        public static final Type AUX_SEND                       = new Type("AUX Send");
+        public static final Type AUX_SEND = new Type("AUX Send");
 
         /**
          * Represents a control for the auxiliary return gain on a line.
@@ -402,7 +402,7 @@
          * @see #MASTER_GAIN
          * @see #AUX_SEND
          */
-        public static final Type AUX_RETURN                     = new Type("AUX Return");
+        public static final Type AUX_RETURN = new Type("AUX Return");
 
         /**
          * Represents a control for the pre-reverb gain on a line. This control
@@ -413,7 +413,7 @@
          * @see #REVERB_RETURN
          * @see EnumControl.Type#REVERB
          */
-        public static final Type REVERB_SEND            = new Type("Reverb Send");
+        public static final Type REVERB_SEND = new Type("Reverb Send");
 
         /**
          * Represents a control for the post-reverb gain on a line. This control
@@ -423,7 +423,7 @@
          * @see #MASTER_GAIN
          * @see #REVERB_SEND
          */
-        public static final Type REVERB_RETURN          = new Type("Reverb Return");
+        public static final Type REVERB_RETURN = new Type("Reverb Return");
 
         /**
          * Represents a control for the volume on a line.
@@ -431,7 +431,7 @@
         /*
          * $$kk: 08.30.99: ISSUE: what units?  linear or dB?
          */
-        public static final Type VOLUME                         = new Type("Volume");
+        public static final Type VOLUME = new Type("Volume");
 
         /**
          * Represents a control for the relative pan (left-right positioning) of
@@ -442,7 +442,7 @@
          *
          * @see #BALANCE
          */
-        public static final Type PAN                            = new Type("Pan");
+        public static final Type PAN = new Type("Pan");
 
         /**
          * Represents a control for the relative balance of a stereo signal
@@ -452,7 +452,7 @@
          *
          * @see #PAN
          */
-        public static final Type BALANCE                        = new Type("Balance");
+        public static final Type BALANCE = new Type("Balance");
 
         /**
          * Represents a control that changes the sample rate of audio playback.
@@ -470,7 +470,7 @@
          * doubling the sample rate has the effect of doubling the frequencies
          * in the sound's spectrum, which raises the pitch by an octave.
          */
-        public static final Type SAMPLE_RATE            = new Type("Sample Rate");
+        public static final Type SAMPLE_RATE = new Type("Sample Rate");
 
         /**
          * Constructs a new float control type.
--- a/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/LineEvent.java	Fri May 12 10:43:28 2017 -0700
@@ -220,7 +220,7 @@
          * @see #CLOSE
          * @see Line#open
          */
-        public static final Type OPEN   = new Type("Open");
+        public static final Type OPEN = new Type("Open");
 
         /**
          * A type of event that is sent when a line closes, freeing the system
@@ -229,7 +229,7 @@
          * @see #OPEN
          * @see Line#close
          */
-        public static final Type CLOSE  = new Type("Close");
+        public static final Type CLOSE = new Type("Close");
 
         /**
          * A type of event that is sent when a line begins to engage in active
@@ -239,7 +239,7 @@
          * @see #STOP
          * @see DataLine#start
          */
-        public static final Type START  = new Type("Start");
+        public static final Type START = new Type("Start");
 
         /**
          * A type of event that is sent when a line ceases active input or
@@ -249,7 +249,7 @@
          * @see #START
          * @see DataLine#stop
          */
-        public static final Type STOP   = new Type("Stop");
+        public static final Type STOP = new Type("Stop");
 
         /**
          * A type of event that is sent when a line ceases to engage in active
--- a/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/SourceDataLine.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, 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
@@ -159,9 +159,9 @@
      * <p>
      * The number of bytes to write must represent an integral number of sample
      * frames, such that:
-     * <br>
-     * <center>{@code [ bytes written ] % [frame size in bytes ] == 0}</center>
-     * <br>
+     * <p style="text-align:center">
+     * {@code [ bytes written ] % [frame size in bytes ] == 0}
+     * <p>
      * The return value will always meet this requirement. A request to write a
      * number of bytes representing a non-integral number of sample frames
      * cannot be fulfilled and may result in an
--- a/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/TargetDataLine.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, 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
@@ -149,9 +149,9 @@
      * <p>
      * The number of bytes to be read must represent an integral number of
      * sample frames, such that:
-     * <br>
-     * <center>{@code [ bytes read ] % [frame size in bytes ] == 0}</center>
-     * <br>
+     * <p style="text-align:center">
+     * {@code [ bytes read ] % [frame size in bytes ] == 0}
+     * <p>
      * The return value will always meet this requirement. A request to read a
      * number of bytes representing a non-integral number of sample frames
      * cannot be fulfilled and may result in an IllegalArgumentException.
--- a/src/java.desktop/share/classes/javax/swing/Action.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/Action.java	Fri May 12 10:43:28 2017 -0700
@@ -69,7 +69,7 @@
  * are desired, and use simple <code>ActionListener</code>s elsewhere.
  * <br>
  *
- * <h3><a name="buttonActions"></a>Swing Components Supporting <code>Action</code></h3>
+ * <h3><a id="buttonActions"></a>Swing Components Supporting <code>Action</code></h3>
  * <p>
  * Many of Swing's components have an <code>Action</code> property.  When
  * an <code>Action</code> is set on a component, the following things
@@ -96,34 +96,34 @@
  *
  * <table border="1" cellpadding="1" cellspacing="0"
  *         summary="Supported Action properties">
- *  <tr valign="top"  align="left">
- *    <th style="background-color:#CCCCFF" align="left">Component Property
- *    <th style="background-color:#CCCCFF" align="left">Components
- *    <th style="background-color:#CCCCFF" align="left">Action Key
- *    <th style="background-color:#CCCCFF" align="left">Notes
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
+ *    <th style="background-color:#CCCCFF;text-align:left">Component Property
+ *    <th style="background-color:#CCCCFF;text-align:left">Components
+ *    <th style="background-color:#CCCCFF;text-align:left">Action Key
+ *    <th style="background-color:#CCCCFF;text-align:left">Notes
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>enabled</code></b>
  *      <td>All
  *      <td>The <code>isEnabled</code> method
  *      <td>&nbsp;
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>toolTipText</code></b>
  *      <td>All
  *      <td><code>SHORT_DESCRIPTION</code>
  *      <td>&nbsp;
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>actionCommand</code></b>
  *      <td>All
  *      <td><code>ACTION_COMMAND_KEY</code>
  *      <td>&nbsp;
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>mnemonic</code></b>
  *      <td>All buttons
  *      <td><code>MNEMONIC_KEY</code>
  *      <td>A <code>null</code> value or <code>Action</code> results in the
  *          button's <code>mnemonic</code> property being set to
  *          <code>'\0'</code>.
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>text</code></b>
  *      <td>All buttons
  *      <td><code>NAME</code>
@@ -139,7 +139,7 @@
  *          <code>true</code> if the <code>Action</code> has a
  *          non-<code>null</code> value for <code>LARGE_ICON_KEY</code> or
  *          <code>SMALL_ICON</code>.
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>displayedMnemonicIndex</code></b>
  *      <td>All buttons
  *      <td><code>DISPLAYED_MNEMONIC_INDEX_KEY</code>
@@ -150,7 +150,7 @@
  *          mnemonic index is not updated.  In any subsequent changes to
  *          <code>DISPLAYED_MNEMONIC_INDEX_KEY</code>, <code>null</code>
  *          is treated as -1.
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>icon</code></b>
  *      <td>All buttons except of <code>JCheckBox</code>,
  *      <code>JToggleButton</code> and <code>JRadioButton</code>.
@@ -160,13 +160,13 @@
  *         <code>SMALL_ICON</code>.  All other buttons will use
  *         <code>LARGE_ICON_KEY</code>; if the value is <code>null</code> they
  *         use <code>SMALL_ICON</code>.
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>accelerator</code></b>
  *      <td>All <code>JMenuItem</code> subclasses, with the exception of
  *          <code>JMenu</code>.
  *      <td><code>ACCELERATOR_KEY</code>
  *      <td>&nbsp;
- *  <tr valign="top"  align="left">
+ *  <tr valign="top" style="text-align:left">
  *      <td><b><code>selected</code></b>
  *      <td><code>JToggleButton</code>, <code>JCheckBox</code>,
  *          <code>JRadioButton</code>, <code>JCheckBoxMenuItem</code> and
--- a/src/java.desktop/share/classes/javax/swing/BoxLayout.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/BoxLayout.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -38,7 +38,7 @@
  * arranged when the frame is resized.
  * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
- *      <TD ALIGN="CENTER">
+ *      <TD style="text-align:center">
  *         <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/BoxLayout-1.gif"
  *          alt="The following text describes this graphic."
  *          WIDTH="191" HEIGHT="201" STYLE="FLOAT:BOTTOM; BORDER:0">
--- a/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/DefaultListCellRenderer.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -40,7 +40,7 @@
 /**
  * Renders an item in a list.
  * <p>
- * <strong><a name="override">Implementation Note:</a></strong>
+ * <strong><a id="override">Implementation Note:</a></strong>
  * This class overrides
  * <code>invalidate</code>,
  * <code>validate</code>,
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Fri May 12 10:43:28 2017 -0700
@@ -3735,7 +3735,7 @@
          * @since 1.3
          * @deprecated This class is no longer used or needed.
          * {@code java.awt.Component.AccessibleAWTComponent} provides
-         * the same functionality and it is handled in {@Component}.
+         * the same functionality and it is handled in {@code Component}.
          */
         @Deprecated
         protected class AccessibleFocusHandler implements FocusListener {
--- a/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JLayeredPane.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -49,7 +49,7 @@
  *
  * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  * <TR>
- *   <TD ALIGN="CENTER">
+ *   <TD style="text-align:center">
  *     <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JLayeredPane-1.gif"
  *     alt="The following text describes this image."
  *     WIDTH="269" HEIGHT="264" STYLE="FLOAT:BOTTOM; BORDER=0">
--- a/src/java.desktop/share/classes/javax/swing/JList.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JList.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -145,7 +145,7 @@
  * Responsibility for listening to selection changes in order to keep the list's
  * visual representation up to date lies with the list's {@code ListUI}.
  * <p>
- * <a name="renderer"></a>
+ * <a id="renderer"></a>
  * Painting of cells in a {@code JList} is handled by a delegate called a
  * cell renderer, installed on the list as the {@code cellRenderer} property.
  * The renderer provides a {@code java.awt.Component} that is used
@@ -201,7 +201,7 @@
  * To avoid these calculations, you can set a {@code fixedCellWidth} and
  * {@code fixedCellHeight} on the list, or have these values calculated
  * automatically based on a single prototype value:
- * <a name="prototype_example"></a>
+ * <a id="prototype_example"></a>
  * <pre>
  * {@code
  * JList<String> bigDataList = new JList<String>(bigData);
--- a/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -143,7 +143,7 @@
  * in which case a default <code>Frame</code> is used as the parent,
  * and the dialog will be
  * centered on the screen (depending on the {@literal L&F}).
- * <dt><a name=message>message</a><dd>
+ * <dt><a id=message>message</a><dd>
  * A descriptive message to be placed in the dialog box.
  * In the most common usage, message is just a <code>String</code> or
  * <code>String</code> constant.
--- a/src/java.desktop/share/classes/javax/swing/JRootPane.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JRootPane.java	Fri May 12 10:43:28 2017 -0700
@@ -72,7 +72,7 @@
  * </blockquote>
  * <table style="float:right" border="0" summary="layout">
  * <tr>
- * <td align="center">
+ * <td style="text-align:center">
  * <img src="doc-files/JRootPane-2.gif"
  * alt="The following text describes this graphic." HEIGHT=386 WIDTH=349>
  * </td>
--- a/src/java.desktop/share/classes/javax/swing/JScrollPane.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JScrollPane.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -57,7 +57,7 @@
  *
  * <TABLE STYLE="FLOAT:RIGHT" BORDER="0" SUMMARY="layout">
  *    <TR>
- *    <TD ALIGN="CENTER">
+ *    <TD style="text-align:center">
  *      <P STYLE="TEXT-ALIGN:CENTER"><IMG SRC="doc-files/JScrollPane-1.gif"
  *      alt="The following text describes this image."
  *      WIDTH="256" HEIGHT="248" STYLE="FLOAT:BOTTOM; BORDER:0px">
--- a/src/java.desktop/share/classes/javax/swing/JTree.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JTree.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -44,7 +44,7 @@
 import static sun.swing.SwingUtilities2.Section.*;
 
 /**
- * <a name="jtree_description"></a>
+ * <a id="jtree_description"></a>
  * A control that displays a set of hierarchical data as an outline.
  * You can find task-oriented documentation and examples of using trees in
  * <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
--- a/src/java.desktop/share/classes/javax/swing/LookAndFeel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/LookAndFeel.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -91,7 +91,7 @@
  * to provide a specific set of defaults. These are documented in the
  * classes that require the specific default.
  *
- * <h3><a name="defaultRecommendation">ComponentUIs and defaults</a></h3>
+ * <h3><a id="defaultRecommendation">ComponentUIs and defaults</a></h3>
  *
  * All {@code ComponentUIs} typically need to set various properties
  * on the {@code JComponent} the {@code ComponentUI} is providing the
@@ -121,7 +121,7 @@
  * provided by this class as they handle the necessary checking and install
  * the property using the recommended guidelines.
  *
- * <h3><a name="exceptions"></a>Exceptions</h3>
+ * <h3><a id="exceptions"></a>Exceptions</h3>
  *
  * All of the install methods provided by {@code LookAndFeel} need to
  * access the defaults if the value of the property being changed is
--- a/src/java.desktop/share/classes/javax/swing/SizeSequence.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/SizeSequence.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -53,11 +53,10 @@
  * The following figure shows the relationship between size and position data
  * for a multi-column component.
  *
- * <center>
+ * <p style="text-align:center">
  * <img src="doc-files/SizeSequence-1.gif" width=384 height = 100
  * alt="The first item begins at position 0, the second at the position equal
  to the size of the previous item, and so on.">
- * </center>
  * <p>
  * In the figure, the first index (0) corresponds to the first column,
  * the second index (1) to the second column, and so on.
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Fri May 12 10:43:28 2017 -0700
@@ -1283,14 +1283,13 @@
      * text component (i.e. the root of the hierarchy) that
      * can be traversed to determine how the model is being
      * represented spatially.
-     * <p>
-     * <font style="color: red;"><b>NOTE:</b>The View hierarchy can
+     * <p style="color:red;">
+     * <b>NOTE:</b>The View hierarchy can
      * be traversed from the root view, and other things
      * can be done as well.  Things done in this way cannot
      * be protected like simple method calls through the TextUI.
      * Therefore, proper operation in the presence of concurrency
      * must be arranged by any logic that calls this method!
-     * </font>
      *
      * @param tc the text component for which this UI is installed
      * @return the view
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/DefaultMetalTheme.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -42,7 +42,7 @@
  * All colors returned by {@code DefaultMetalTheme} are completely
  * opaque.
  *
- * <h3><a name="fontStyle"></a>Font Style</h3>
+ * <h3><a id="fontStyle"></a>Font Style</h3>
  *
  * {@code DefaultMetalTheme} uses bold fonts for many controls.  To make all
  * controls (with the exception of the internal frame title bars and
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Fri May 12 10:43:28 2017 -0700
@@ -292,85 +292,85 @@
      * added to {@code table}:
      * <table border="1" cellpadding="1" cellspacing="0"
      *         summary="Metal's system color mapping">
-     *  <tr valign="top"  align="left">
-     *    <th style="background-color:#CCCCFF" align="left">Key
-     *    <th style="background-color:#CCCCFF" align="left">Value
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
+     *    <th style="background-color:#CCCCFF;text-align:left">Key
+     *    <th style="background-color:#CCCCFF;text-align:left">Value
+     *  <tr valign="top" style="text-align:left">
      *    <td>"desktop"
      *    <td>{@code theme.getDesktopColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"activeCaption"
      *    <td>{@code theme.getWindowTitleBackground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"activeCaptionText"
      *    <td>{@code theme.getWindowTitleForeground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"activeCaptionBorder"
      *    <td>{@code theme.getPrimaryControlShadow()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"inactiveCaption"
      *    <td>{@code theme.getWindowTitleInactiveBackground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"inactiveCaptionText"
      *    <td>{@code theme.getWindowTitleInactiveForeground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"inactiveCaptionBorder"
      *    <td>{@code theme.getControlShadow()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"window"
      *    <td>{@code theme.getWindowBackground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"windowBorder"
      *    <td>{@code theme.getControl()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"windowText"
      *    <td>{@code theme.getUserTextColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"menu"
      *    <td>{@code theme.getMenuBackground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"menuText"
      *    <td>{@code theme.getMenuForeground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"text"
      *    <td>{@code theme.getWindowBackground()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"textText"
      *    <td>{@code theme.getUserTextColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"textHighlight"
      *    <td>{@code theme.getTextHighlightColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"textHighlightText"
      *    <td>{@code theme.getHighlightedTextColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"textInactiveText"
      *    <td>{@code theme.getInactiveSystemTextColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"control"
      *    <td>{@code theme.getControl()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"controlText"
      *    <td>{@code theme.getControlTextColor()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"controlHighlight"
      *    <td>{@code theme.getControlHighlight()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"controlLtHighlight"
      *    <td>{@code theme.getControlHighlight()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"controlShadow"
      *    <td>{@code theme.getControlShadow()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"controlDkShadow"
      *    <td>{@code theme.getControlDarkShadow()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"scrollbar"
      *    <td>{@code theme.getControl()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"info"
      *    <td>{@code theme.getPrimaryControl()}
-     *  <tr valign="top"  align="left">
+     *  <tr valign="top" style="text-align:left">
      *    <td>"infoText"
      *    <td>{@code theme.getPrimaryControlInfo()}
      * </table>
--- a/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/table/DefaultTableCellRenderer.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -41,7 +41,7 @@
  * in a <code>JTable</code>.
  * <p>
  *
- * <strong><a name="override">Implementation Note:</a></strong>
+ * <strong><a id="override">Implementation Note:</a></strong>
  * This class inherits from <code>JLabel</code>, a standard component class.
  * However <code>JTable</code> employs a unique mechanism for rendering
  * its cells and therefore requires some slightly modified behavior
--- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -999,17 +999,17 @@
      * </pre>
      *
      * <p>Invoking <code>setInnerHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
-     * results in the following structure (new elements are <font
-     * style="color: red;">in red</font>).</p>
+     * results in the following structure (new elements are <span
+     * style="color: red;">in red</span>).</p>
      *
      * <pre>
      *     &lt;body&gt;
      *       |
      *     <b>&lt;div&gt;</b>
      *         \
-     *         <font style="color: red;">&lt;ul&gt;</font>
+     *         <span style="color: red;">&lt;ul&gt;</span>
      *           \
-     *           <font style="color: red;">&lt;li&gt;</font>
+     *           <span style="color: red;">&lt;li&gt;</span>
      * </pre>
      *
      * <p>Parameter <code>elem</code> must not be a leaf element,
@@ -1083,15 +1083,15 @@
      * </pre>
      *
      * <p>Invoking <code>setOuterHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
-     * results in the following structure (new elements are <font
-     * style="color: red;">in red</font>).</p>
+     * results in the following structure (new elements are <span
+     * style="color: red;">in red</span>).</p>
      *
      * <pre>
      *    &lt;body&gt;
      *      |
-     *     <font style="color: red;">&lt;ul&gt;</font>
+     *     <span style="color: red;">&lt;ul&gt;</span>
      *       \
-     *       <font style="color: red;">&lt;li&gt;</font>
+     *       <span style="color: red;">&lt;li&gt;</span>
      * </pre>
      *
      * <p>If either <code>elem</code> or <code>htmlText</code>
@@ -1157,16 +1157,16 @@
      *
      * <p>Invoking <code>insertAfterStart(elem,
      * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
-     * (new elements are <font style="color: red;">in red</font>).</p>
+     * (new elements are <span style="color: red;">in red</span>).</p>
      *
      * <pre>
      *        &lt;body&gt;
      *          |
      *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *    <font style="color: red;">&lt;ul&gt;</font> &lt;p&gt; &lt;p&gt;
+     *    <span style="color: red;">&lt;ul&gt;</span> &lt;p&gt; &lt;p&gt;
      *     /
-     *  <font style="color: red;">&lt;li&gt;</font>
+     *  <span style="color: red;">&lt;li&gt;</span>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeStart</code> method, new
@@ -1229,17 +1229,17 @@
      * </pre>
      *
      * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
-     * results in the following structure (new elements are <font
-     * style="color: red;">in red</font>).</p>
+     * results in the following structure (new elements are <span
+     * style="color: red;">in red</span>).</p>
      *
      * <pre>
      *        &lt;body&gt;
      *          |
      *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *     &lt;p&gt; &lt;p&gt; <font style="color: red;">&lt;ul&gt;</font>
+     *     &lt;p&gt; &lt;p&gt; <span style="color: red;">&lt;ul&gt;</span>
      *               \
-     *               <font style="color: red;">&lt;li&gt;</font>
+     *               <span style="color: red;">&lt;li&gt;</span>
      * </pre>
      *
      * <p>Unlike the <code>insertAfterEnd</code> method, new elements
@@ -1300,14 +1300,14 @@
      *
      * <p>Invoking <code>insertBeforeStart(elem,
      * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
-     * (new elements are <font style="color: red;">in red</font>).</p>
+     * (new elements are <span style="color: red;">in red</span>).</p>
      *
      * <pre>
      *        &lt;body&gt;
      *         /  \
-     *      <font style="color: red;">&lt;ul&gt;</font> <b>&lt;div&gt;</b>
+     *      <span style="color: red;">&lt;ul&gt;</span> <b>&lt;div&gt;</b>
      *       /    /  \
-     *     <font style="color: red;">&lt;li&gt;</font> &lt;p&gt;  &lt;p&gt;
+     *     <span style="color: red;">&lt;li&gt;</span> &lt;p&gt;  &lt;p&gt;
      * </pre>
      *
      * <p>Unlike the <code>insertAfterStart</code> method, new
@@ -1360,15 +1360,15 @@
      * </pre>
      *
      * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
-     * results in the following structure (new elements are <font
-     * style="color: red;">in red</font>).</p>
+     * results in the following structure (new elements are <span
+     * style="color: red;">in red</span>).</p>
      *
      * <pre>
      *        &lt;body&gt;
      *         /  \
-     *      <b>&lt;div&gt;</b> <font style="color: red;">&lt;ul&gt;</font>
+     *      <b>&lt;div&gt;</b> <span style="color: red;">&lt;ul&gt;</span>
      *       / \    \
-     *     &lt;p&gt; &lt;p&gt;  <font style="color: red;">&lt;li&gt;</font>
+     *     &lt;p&gt; &lt;p&gt;  <span style="color: red;">&lt;li&gt;</span>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeEnd</code> method, new elements
--- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -1120,7 +1120,7 @@
      *
      * <table summary="Describes the tag and view created by this factory by default">
      * <tr>
-     * <th align=left>Tag<th align=left>View created
+     * <th style="text-align:left">Tag<th style="text-align:left">View created
      * </tr><tr>
      * <td>HTML.Tag.CONTENT<td>InlineView
      * </tr><tr>
--- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, 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
@@ -61,9 +61,9 @@
  * defaults table. The following table lists the mapping between
  * {@code DefaultTreeCellRenderer} property and defaults table key:
  * <table border="1" cellpadding="1" cellspacing="0" summary="">
- *   <tr valign="top"  align="left">
- *     <th style="background-color:#CCCCFF" align="left">Property:
- *     <th style="background-color:#CCCCFF" align="left">Key:
+ *   <tr valign="top" style="text-align:left">
+ *     <th style="background-color:#CCCCFF;text-align:left">Property:
+ *     <th style="background-color:#CCCCFF;text-align:left">Key:
  *   <tr><td>"leafIcon"<td>"Tree.leafIcon"
  *   <tr><td>"closedIcon"<td>"Tree.closedIcon"
  *   <tr><td>"openIcon"<td>"Tree.openIcon"
@@ -74,7 +74,7 @@
  *   <tr><td>"borderSelectionColor"<td>"Tree.selectionBorderColor"
  * </table>
  * <p>
- * <strong><a name="override">Implementation Note:</a></strong>
+ * <strong><a id="override">Implementation Note:</a></strong>
  * This class overrides
  * <code>invalidate</code>,
  * <code>validate</code>,
--- a/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, 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
@@ -57,11 +57,11 @@
  * upper-case letter in bold are significant, those in lower-case
  * and italicized are insignificant.
  * <p>
- * <a name="figure1"></a>
+ * <a id="figure1"></a>
  * <table border=0 summary="">
  * <tr><td>
  *     <img src="doc-files/UndoManager-1.gif" alt="">
- * <tr><td align=center>Figure 1
+ * <tr><td style="text-align:center">Figure 1
  * </table>
  * <p>
  * As shown in <a href="#figure1">figure 1</a>, if <b>D</b> was just added, the
@@ -70,11 +70,11 @@
  * index of the next edit to 3 (edit <i>c</i>), as shown in the following
  * figure.
  * <p>
- * <a name="figure2"></a>
+ * <a id="figure2"></a>
  * <table border=0 summary="">
  * <tr><td>
  *     <img src="doc-files/UndoManager-2.gif" alt="">
- * <tr><td align=center>Figure 2
+ * <tr><td style="text-align:center">Figure 2
  * </table>
  * <p>
  * The last significant edit is <b>A</b>, so that invoking
@@ -82,11 +82,11 @@
  * <i>b</i>, and <b>A</b>, in that order, setting the index of the
  * next edit to 0, as shown in the following figure.
  * <p>
- * <a name="figure3"></a>
+ * <a id="figure3"></a>
  * <table border=0 summary="">
  * <tr><td>
  *     <img src="doc-files/UndoManager-3.gif" alt="">
- * <tr><td align=center>Figure 3
+ * <tr><td style="text-align:center">Figure 3
  * </table>
  * <p>
  * Invoking <code>redo</code> results in invoking <code>redo</code> on
@@ -108,11 +108,11 @@
  * the new edit is added after <i>c</i>, as shown in the following
  * figure.
  * <p>
- * <a name="figure4"></a>
+ * <a id="figure4"></a>
  * <table border=0 summary="">
  * <tr><td>
  *     <img src="doc-files/UndoManager-4.gif" alt="">
- * <tr><td align=center>Figure 4
+ * <tr><td style="text-align:center">Figure 4
  * </table>
  * <p>
  * Once <code>end</code> has been invoked on an <code>UndoManager</code>
--- a/src/java.desktop/share/classes/module-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -114,10 +114,17 @@
     uses javax.sound.sampled.spi.FormatConversionProvider;
     uses javax.sound.sampled.spi.MixerProvider;
 
-    provides sun.datatransfer.DesktopDatatransferService with sun.awt.datatransfer.DesktopDatatransferServiceImpl;
-    provides java.net.ContentHandlerFactory with sun.awt.www.content.MultimediaContentHandlers;
-    provides javax.print.PrintServiceLookup with sun.print.PrintServiceLookupProvider;
-    provides javax.print.StreamPrintServiceFactory with sun.print.PSStreamPrinterFactory;
+    provides sun.datatransfer.DesktopDatatransferService with
+        sun.awt.datatransfer.DesktopDatatransferServiceImpl;
+
+    provides java.net.ContentHandlerFactory with
+        sun.awt.www.content.MultimediaContentHandlers;
+
+    provides javax.print.PrintServiceLookup with
+        sun.print.PrintServiceLookupProvider;
+
+    provides javax.print.StreamPrintServiceFactory with
+        sun.print.PSStreamPrinterFactory;
 
     provides javax.sound.midi.spi.MidiDeviceProvider with
         com.sun.media.sound.MidiInDeviceProvider,
@@ -125,14 +132,17 @@
         com.sun.media.sound.RealTimeSequencerProvider,
         com.sun.media.sound.SoftProvider;
 
-    provides javax.sound.midi.spi.MidiFileReader with com.sun.media.sound.StandardMidiFileReader;
-    provides javax.sound.midi.spi.MidiFileWriter with com.sun.media.sound.StandardMidiFileWriter;
+    provides javax.sound.midi.spi.MidiFileReader with
+        com.sun.media.sound.StandardMidiFileReader;
+
+    provides javax.sound.midi.spi.MidiFileWriter with
+        com.sun.media.sound.StandardMidiFileWriter;
 
     provides javax.sound.midi.spi.SoundbankReader with
-         com.sun.media.sound.AudioFileSoundbankReader,
-         com.sun.media.sound.DLSSoundbankReader,
-         com.sun.media.sound.JARSoundbankReader,
-         com.sun.media.sound.SF2SoundbankReader;
+        com.sun.media.sound.AudioFileSoundbankReader,
+        com.sun.media.sound.DLSSoundbankReader,
+        com.sun.media.sound.JARSoundbankReader,
+        com.sun.media.sound.SF2SoundbankReader;
 
     provides javax.sound.sampled.spi.AudioFileReader with
         com.sun.media.sound.AiffFileReader,
@@ -158,4 +168,3 @@
         com.sun.media.sound.DirectAudioDeviceProvider,
         com.sun.media.sound.PortMixerProvider;
 }
-
--- a/src/java.desktop/share/classes/sun/swing/LightweightContent.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/classes/sun/swing/LightweightContent.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/java.desktop/share/native/include/jawt.h	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/share/native/include/jawt.h	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, 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
@@ -38,18 +38,22 @@
  * 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
- * community who, at present, wish to do their own native rendering to canvases
- * for performance reasons.  Standard extensions such as Java3D also require a
- * means to access the underlying native data structures of AWT.
+ * developers who need to do their own native rendering to canvases
+ * for performance or other reasons.
  *
- * There may be future extensions to this API depending on demand.
+ * Conversely it also provides mechanisms for an application which already
+ * has a native window to provide that to AWT for AWT rendering.
  *
- * A VM does not have to implement this API in order to pass the JCK.
- * It is recommended, however, that this API is implemented on VMs that support
- * standard extensions, such as Java3D.
+ * 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.
  *
- * Since this is a native API, any program which uses it cannot be considered
- * 100% pure java.
+ * 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.
+ *
  */
 
 /*
@@ -58,7 +62,7 @@
  * 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 Win32 and Solaris support the existing structures in jawt_md.h.
+ * that VMs on all platforms support the existing structures in jawt_md.h.
  *
  *******************
  * EXAMPLE OF USAGE:
@@ -98,8 +102,8 @@
  *     jboolean result;
  *     jint lock;
  *
- *     // Get the AWT
- *     awt.version = JAWT_VERSION_1_3;
+ *     // Get the AWT. Request version 9 to access features in that release.
+ *     awt.version = JAWT_VERSION_9;
  *     result = JAWT_GetAWT(env, &awt);
  *     assert(result != JNI_FALSE);
  *
@@ -154,7 +158,7 @@
     /*
      * Pointer to the platform-specific information.  This can be safely
      * cast to a JAWT_Win32DrawingSurfaceInfo on Windows or a
-     * JAWT_X11DrawingSurfaceInfo on Solaris. On Mac OS X this is a
+     * JAWT_X11DrawingSurfaceInfo on Linux and Solaris. On Mac OS X this is a
      * pointer to a NSObject that conforms to the JAWT_SurfaceLayers
      * protocol. See jawt_md.h for details.
      */
@@ -237,7 +241,8 @@
 typedef struct jawt {
     /*
      * Version of this structure.  This must always be set before
-     * calling JAWT_GetAWT()
+     * calling JAWT_GetAWT(). It affects the functions returned.
+     * Must be one of the known pre-defined versions.
      */
     jint version;
     /*
@@ -332,6 +337,13 @@
 _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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/specs/AWT_Native_Interface.html	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,776 @@
+<!--
+ 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/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XContentWindow.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -139,6 +139,12 @@
 
     @Override
     public void handleExposeEvent(XEvent xev) {
+        if(parentFrame.isTargetUndecorated() &&
+           XWM.getWMID() != XWM.UNITY_COMPIZ_WM &&
+                width <= 0 && height <= 0) {
+            // WM didn't send initial ConfigureNotify, so set the bounds here
+            setContentBounds(parentFrame.getDimensions());
+        }
         if (width <= 0 || height <= 0) {
             return;
         }
--- a/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.desktop/unix/classes/sun/java2d/opengl/GLXSurfaceData.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -112,11 +112,13 @@
     }
 
     public static class GLXWindowSurfaceData extends GLXSurfaceData {
+        protected final int scale;
 
         public GLXWindowSurfaceData(X11ComponentPeer peer,
                                     GLXGraphicsConfig gc)
         {
             super(peer, gc, peer.getColorModel(), WINDOW);
+            scale = gc.getScale();
         }
 
         public SurfaceData getReplacement() {
@@ -126,6 +128,8 @@
         public Rectangle getBounds() {
             Rectangle r = peer.getBounds();
             r.x = r.y = 0;
+            r.width = (int) Math.ceil(r.width * scale);
+            r.height = (int) Math.ceil(r.height * scale);
             return r;
         }
 
@@ -135,6 +139,16 @@
         public Object getDestination() {
             return peer.getTarget();
         }
+
+        @Override
+        public double getDefaultScaleX() {
+            return scale;
+        }
+
+        @Override
+        public double getDefaultScaleY() {
+            return scale;
+        }
     }
 
     /**
@@ -177,6 +191,7 @@
 
         private Image offscreenImage;
         private int width, height;
+        private final int scale;
 
         public GLXOffScreenSurfaceData(X11ComponentPeer peer,
                                        GLXGraphicsConfig gc,
@@ -186,11 +201,12 @@
         {
             super(peer, gc, cm, type);
 
-            this.width = width;
-            this.height = height;
+            scale = gc.getDevice().getScaleFactor();
+            this.width = width * scale;
+            this.height = height * scale;
             offscreenImage = image;
 
-            initSurface(width, height);
+            initSurface(this.width, this.height);
         }
 
         public SurfaceData getReplacement() {
@@ -201,6 +217,8 @@
             if (type == FLIP_BACKBUFFER) {
                 Rectangle r = peer.getBounds();
                 r.x = r.y = 0;
+                r.width = (int) Math.ceil(r.width * scale);
+                r.height = (int) Math.ceil(r.height * scale);
                 return r;
             } else {
                 return new Rectangle(width, height);
@@ -213,5 +231,15 @@
         public Object getDestination() {
             return offscreenImage;
         }
+
+        @Override
+        public double getDefaultScaleX() {
+            return scale;
+        }
+
+        @Override
+        public double getDefaultScaleY() {
+            return scale;
+        }
     }
 }
--- a/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/classes/java/lang/instrument/Instrumentation.java	Fri May 12 10:43:28 2017 -0700
@@ -729,7 +729,8 @@
      * Tests whether a module can be modified with {@link #redefineModule
      * redefineModule}. If a module is modifiable then this method returns
      * {@code true}. If a module is not modifiable then this method returns
-     * {@code false}.
+     * {@code false}. This method always returns {@code true} when the module
+     * is an unnamed module (as redefining an unnamed module is a no-op).
      *
      * @param module the module to test if it can be modified
      * @return {@code true} if the module is modifiable, otherwise {@code false}
--- a/src/java.instrument/share/classes/java/lang/instrument/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/classes/java/lang/instrument/package.html	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -112,7 +112,9 @@
 The <code>premain</code> methods will be run under the same security and classloader 
 rules as the application <code>main</code> method.
 There are no modeling restrictions on what the agent <code>premain</code> method may do.
-Anything application <code>main</code> can do, including creating threads, is legal from <code>premain</code>.
+Anything application <code>main</code> can do, including creating threads, is legal from
+<code>premain</code>.
+
 
 <P>
 Each agent is passed its agent options via the <code>agentArgs</code> parameter.
@@ -126,7 +128,6 @@
 If a <code>premain</code> method throws an uncaught exception, the JVM will abort.
 
 
-
 <h3>Starting Agents After VM Startup</h3>
 
 <p>
@@ -191,76 +192,134 @@
 not abort. If the <code>agentmain</code> method throws an uncaught exception it will be ignored.
 
 
+<h3>Deploying Agents in Executable JAR file</h3>
+
+The JAR File Specification defines manifest attributes for standalone applications that are
+bundled as <em>executable JAR files</em>. If an implementation supports a mechanism to start
+an application as an executable JAR then the main manifest may include the
+<code>Launcher-Agent-Class</code> attribute to specify the class name
+of an agent to start before the application <code>main</code> method is invoked. The Java
+virtual machine attempts to invoke the following method on the agent class:
+
+<blockquote>
+    <code>public static void
+        agentmain(String agentArgs, Instrumentation inst);
+    </code>
+</blockquote>
+
+<P>
+If the agent class does not implement this method then the JVM will attempt to invoke:
+
+<blockquote>
+    <code>public static void
+        agentmain(String agentArgs);
+    </code>
+</blockquote>
+
+<p>
+The value of the <code>agentArgs</code> parameter is always the empty string.
+
+<P>
+The <code>agentmain</code> method should do any necessary initialization
+required to start the agent and return. If the agent cannot be started, for
+example the agent class cannot be loaded, the agent class does not define a
+conformant <code>agentmain</code> method, or the <code>agentmain</code> method
+throws an uncaught exception or error, the JVM will abort.
+
+
+<h3>Visibility</h3>
+
+The types visible to the agent class are the types visible to the system class
+loader. They minimally include the types in packages exported by
+<a href="{@docRoot}/java.base-summary.html">java.base</a> and
+<a href="{@docRoot}/java.instrument-summary.html">java.instrument</a>.
+Whether all {@linkplain ClassLoader#getPlatformClassLoader() platform classes}
+are visible or not will depend on the initial module or application.
+
+<p>
+Supporting classes that the agent makes visible to the bootstrap class loader
+(by means of {@link Instrumentation#appendToBootstrapClassLoaderSearch
+appendToBootstrapClassLoaderSearch} or the <code>Boot-Class-Path</code> attribute
+specified below) can only link to types defined to the bootstrap class loader.
+There is no guarantee that all platform classes are visible to the boot class
+loader.
+
 
 <h3>Manifest Attributes</h3>
+
 The following manifest attributes are defined for an agent JAR file:
 <blockquote>
 <dl>
 <dt><code>Premain-Class</code></dt>
 <dd>
-                        When an agent is specified at JVM launch time this attribute
-			specifies the agent class.
-			That is, the class containing the <code>premain</code> method.
-                        When an agent is specified at JVM launch time this attribute
-			is required. If the attribute is not present the JVM will abort.
-                        Note: this is a class name, not a file name or path.							
+            When an agent is specified at JVM launch time this attribute
+            specifies the agent class.
+            That is, the class containing the <code>premain</code> method.
+            When an agent is specified at JVM launch time this attribute
+            is required. If the attribute is not present the JVM will abort.
+            Note: this is a class name, not a file name or path.
 </dd>
-
 <dt><code>Agent-Class</code></dt>
 <dd>
-                        If an implementation supports a mechanism to start agents 
-                        sometime after the VM has started then this attribute specifies
-                        the agent class.
-                        That is, the class containing the <code>agentmain</code> method.
-                        This attribute is required, if it is not present the agent
-                        will not be started.
-                        Note: this is a class name, not a file name or path.
-</dd>			
-
+            If an implementation supports a mechanism to start agents
+            sometime after the VM has started then this attribute specifies
+            the agent class.
+            That is, the class containing the <code>agentmain</code> method.
+            This attribute is required, if it is not present the agent
+            will not be started.
+            Note: this is a class name, not a file name or path.
+</dd>
+<dt><code>Launcher-Agent-Class</code></dt>
+<dd>
+            If an implementation supports a mechanism to start an application
+            as an executable JAR then the main manifest may include this
+            attribute to specify the class name of an agent to start before the
+            application <code>main</code> method is invoked.
+</dd>
 <dt><code>Boot-Class-Path</code></dt>
 <dd>
-                        A list of paths to be searched by the bootstrap class
-                        loader. Paths represent directories or libraries
-                        (commonly referred to as JAR or zip libraries on
-                        many platforms). 			
-                        These paths are searched by the
-                        bootstrap class loader after the platform specific
-                        mechanisms of locating a class have failed.
-                        Paths are searched in the order listed.
-                        Paths in the list are separated by one or more spaces.
-                        A path takes the syntax of the path component of a
-                        hierarchical URI. The path is
-                        absolute if it begins with a slash character ('/'),
-                        otherwise it is relative. A relative path is resolved
-                        against the absolute path of the agent JAR file.
-                        Malformed and non-existent paths are ignored.	
-			When an agent is started sometime after the VM has
-			started then paths that do not represent a JAR file
-			are ignored.
-                        This attribute is optional.
+            A list of paths to be searched by the bootstrap class
+            loader. Paths represent directories or libraries
+            (commonly referred to as JAR or zip libraries on
+            many platforms).
+            These paths are searched by the
+            bootstrap class loader after the platform specific
+            mechanisms of locating a class have failed.
+            Paths are searched in the order listed.
+            Paths in the list are separated by one or more spaces.
+            A path takes the syntax of the path component of a
+            hierarchical URI. The path is
+            absolute if it begins with a slash character ('/'),
+            otherwise it is relative. A relative path is resolved
+            against the absolute path of the agent JAR file.
+            Malformed and non-existent paths are ignored.
+            When an agent is started sometime after the VM has
+            started then paths that do not represent a JAR file
+            are ignored.
+            This attribute is optional.
 </dd>
 <dt><code>Can-Redefine-Classes</code></dt>
 <dd>
-                        Boolean (<code>true</code> or <code>false</code>, case irrelevant).
-                        Is the ability to redefine classes
-                        needed by this agent.
-                        Values other than <code>true</code> are considered <code>false</code>.
-                        This attribute is optional, the default is <code>false</code>.
+            Boolean (<code>true</code> or <code>false</code>, case irrelevant).
+            Is the ability to redefine classes
+            needed by this agent.
+            Values other than <code>true</code> are considered <code>false</code>.
+            This attribute is optional, the default is <code>false</code>.
 </dd>
 <dt><code>Can-Retransform-Classes</code></dt>
 <dd>
-                        Boolean (<code>true</code> or <code>false</code>, case irrelevant).
-                        Is the ability to retransform classes
-                        needed by this agent.
-                        Values other than <code>true</code> are considered <code>false</code>.
-                        This attribute is optional, the default is <code>false</code>.
+            Boolean (<code>true</code> or <code>false</code>, case irrelevant).
+            Is the ability to retransform classes
+            needed by this agent.
+            Values other than <code>true</code> are considered <code>false</code>.
+            This attribute is optional, the default is <code>false</code>.
 </dd>
 <dt><code>Can-Set-Native-Method-Prefix</code></dt>
 <dd>
-                        Boolean (<code>true</code> or <code>false</code>, case irrelevant).
-                        Is the ability to set native method prefix needed by this agent.
-                        Values other than <code>true</code> are considered <code>false</code>.
-                        This attribute is optional, the default is <code>false</code>.
+            Boolean (<code>true</code> or <code>false</code>, case irrelevant).
+            Is the ability to set native method prefix needed by this agent.
+            Values other than <code>true</code> are considered <code>false</code>.
+            This attribute is optional, the default is <code>false</code>.
 </dd>
 </dl>
 </blockquote>
--- a/src/java.instrument/share/classes/module-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/classes/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -32,5 +32,8 @@
  */
 module java.instrument {
     exports java.lang.instrument;
+
+    // allow java launcher to load agents in executable JAR files
+    exports sun.instrument to java.base;
 }
 
--- a/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -555,4 +555,15 @@
                                     classfileBuffer);
         }
     }
+
+
+    /**
+     * Invoked by the java launcher to load a java agent that is packaged with
+     * the main application in an executable JAR file.
+     */
+    public static void loadAgent(String path) {
+        loadAgent0(path);
+    }
+
+    private static native void loadAgent0(String path);
 }
--- a/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/native/libinstrument/InstrumentationImplNativeMethods.c	Fri May 12 10:43:28 2017 -0700
@@ -159,3 +159,20 @@
   (JNIEnv * jnienv, jobject implThis, jlong agent, jobjectArray prefixArray, jboolean isRetransformable) {
     setNativeMethodPrefixes(jnienv, (JPLISAgent*)(intptr_t)agent, prefixArray, isRetransformable);
 }
+
+
+/*
+ * Class:     sun_instrument_InstrumentationImpl
+ * Method:    loadAgent0
+ */
+JNIEXPORT void JNICALL Java_sun_instrument_InstrumentationImpl_loadAgent0
+   (JNIEnv* env, jclass clazz, jstring jarfile)
+{
+    extern jint loadAgent(JNIEnv* env, jstring path);
+    if (loadAgent(env, jarfile) != JNI_OK) {
+        if (!(*env)->ExceptionCheck(env)) {
+            createAndThrowInternalError(env);
+        }
+    }
+}
+
--- a/src/java.instrument/share/native/libinstrument/InvocationAdapter.c	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.instrument/share/native/libinstrument/InvocationAdapter.c	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -106,7 +106,7 @@
  * convert them to JVM TI capabilities.
  */
 void
-convertCapabilityAtrributes(const jarAttribute* attributes, JPLISAgent* agent) {
+convertCapabilityAttributes(const jarAttribute* attributes, JPLISAgent* agent) {
     /* set redefineClasses capability */
     if (getBooleanAttribute(attributes, "Can-Redefine-Classes")) {
         addRedefineClassesCapability(agent);
@@ -229,7 +229,7 @@
         /*
          * Convert JAR attributes into agent capabilities
          */
-        convertCapabilityAtrributes(attributes, agent);
+        convertCapabilityAttributes(attributes, agent);
 
         /*
          * Track (record) the agent class name and options data
@@ -386,7 +386,7 @@
         /*
          * Convert JAR attributes into agent capabilities
          */
-        convertCapabilityAtrributes(attributes, agent);
+        convertCapabilityAttributes(attributes, agent);
 
         /*
          * Create the java.lang.instrument.Instrumentation instance
@@ -435,6 +435,109 @@
 DEF_Agent_OnUnload(JavaVM *vm) {
 }
 
+/**
+ * Invoked by the java launcher to load an agent in the main executable JAR.
+ * The Launcher-Agent-Class attribute in the main manifest of the JAR file
+ * is the agent class.
+ *
+ * Returns JNI_OK if the agent is loaded and initialized; JNI_ERR if this
+ * function fails, possibly with a pending exception.
+ */
+jint loadAgent(JNIEnv* env, jstring path) {
+    JavaVM* vm;
+    JPLISAgent* agent;
+    const char* jarfile = NULL;
+    jarAttribute* attributes = NULL;
+    char* agentClass = NULL;
+    char* bootClassPath;
+    int oldLen, newLen;
+    jint result = JNI_ERR;
+
+    if ((*env)->GetJavaVM(env, &vm) < 0) {
+        return JNI_ERR;
+    }
+
+    // create JPLISAgent with JVMTI environment
+    if (createNewJPLISAgent(vm, &agent) != JPLIS_INIT_ERROR_NONE) {
+        return JNI_ERR;
+    }
+
+    // get path to JAR file as UTF-8 string
+    jarfile = (*env)->GetStringUTFChars(env, path, NULL);
+    if (jarfile == NULL) {
+        return JNI_ERR;
+    }
+
+    // read the attributes in the main section of JAR manifest
+    attributes = readAttributes(jarfile);
+    if (attributes == NULL) {
+        goto releaseAndReturn;
+    }
+
+    // Launcher-Agent-Class is required
+    agentClass = getAttribute(attributes, "Launcher-Agent-Class");
+    if (agentClass == NULL) {
+        goto releaseAndReturn;
+    }
+
+    // The value of Launcher-Agent-Class is in UTF-8, convert it to modified UTF-8
+    oldLen = (int) strlen(agentClass);
+    newLen = modifiedUtf8LengthOfUtf8(agentClass, oldLen);
+    if (newLen == oldLen) {
+        agentClass = strdup(agentClass);
+    } else {
+        char* str = (char*) malloc(newLen + 1);
+        if (str != NULL) {
+            convertUtf8ToModifiedUtf8(agentClass, oldLen, str, newLen);
+        }
+        agentClass = str;
+    }
+    if (agentClass == NULL) {
+         jthrowable oome = createThrowable(env, "java/lang/OutOfMemoryError", NULL);
+         if (oome != NULL) (*env)->Throw(env, oome);
+         goto releaseAndReturn;
+    }
+
+    // Boot-Class-Path
+    bootClassPath = getAttribute(attributes, "Boot-Class-Path");
+    if (bootClassPath != NULL) {
+        appendBootClassPath(agent, jarfile, bootClassPath);
+    }
+
+    // Can-XXXX capabilities
+    convertCapabilityAttributes(attributes, agent);
+
+    // Create the java.lang.instrument.Instrumentation object
+    if (!createInstrumentationImpl(env, agent)) {
+        goto releaseAndReturn;
+    }
+
+    // Enable the ClassFileLoadHook
+    if (!setLivePhaseEventHandlers(agent)) {
+        goto releaseAndReturn;
+    }
+
+    // invoke the agentmain method
+    if (!startJavaAgent(agent, env, agentClass, "", agent->mAgentmainCaller)) {
+        goto releaseAndReturn;
+    }
+
+    // initialization complete
+    result = JNI_OK;
+
+    releaseAndReturn:
+        if (agentClass != NULL) {
+            free(agentClass);
+        }
+        if (attributes != NULL) {
+            freeAttributes(attributes);
+        }
+        if (jarfile != NULL) {
+            (*env)->ReleaseStringUTFChars(env, path, jarfile);
+        }
+
+    return result;
+}
 
 /*
  *  JVMTI callback support
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -1887,7 +1887,7 @@
      * The registered {@linkplain #addConfigurationListener configuration
      * listeners} will be invoked after the configuration is successfully updated.
      * <br><br>
-     * <table summary="Updating configuration properties">
+     * <table><caption style="display:none">Updating configuration properties</caption>
      * <tr>
      * <th>Property</th>
      * <th>Resulting Behavior</th>
--- a/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2016, 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
@@ -36,7 +36,7 @@
  * format.  The summary will typically be 1 or 2 lines.
  *
  * <p>
- * <a name="formatting">
+ * <a id="formatting">
  * <b>Configuration:</b></a>
  * The {@code SimpleFormatter} is initialized with the
  * <a href="../Formatter.html#syntax">format string</a>
--- a/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management.rmi/share/classes/javax/management/remote/rmi/package.html	Fri May 12 10:43:28 2017 -0700
@@ -98,7 +98,7 @@
       constructor.</p>
 
 
-    <h4><a name="servergen">Connector addresses generated by the
+    <h4><a id="servergen">Connector addresses generated by the
 	server</a></h4>
 
     <p>If the <code>serviceURL</code> you specify has an empty URL
@@ -157,7 +157,7 @@
       <code><em>port</em></code>.</p>
 
 
-    <h4><a name="directory">Connector addresses based on directory
+    <h4><a id="directory">Connector addresses based on directory
 	entries</a></h4>
 
     <p>As an alternative to the generated addresses just described,
--- a/src/java.management/share/classes/java/lang/management/LockInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/LockInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -34,7 +34,7 @@
  * an <em>ownable synchronizer</em>, or the {@link Condition Condition}
  * object associated with synchronizers.
  * <p>
- * <a name="OwnableSynchronizer">An ownable synchronizer</a> is
+ * <a id="OwnableSynchronizer">An ownable synchronizer</a> is
  * a synchronizer that may be exclusively owned by a thread and uses
  * {@link AbstractOwnableSynchronizer AbstractOwnableSynchronizer}
  * (or its subclass) to implement its synchronization property.
@@ -42,7 +42,7 @@
  * the read-lock) of {@link ReentrantReadWriteLock ReentrantReadWriteLock} are
  * two examples of ownable synchronizers provided by the platform.
  *
- * <h3><a name="MappedType">MXBean Mapping</a></h3>
+ * <h3><a id="MappedType">MXBean Mapping</a></h3>
  * {@code LockInfo} is mapped to a {@link CompositeData CompositeData}
  * as specified in the {@link #from from} method.
  *
@@ -105,10 +105,11 @@
      * given {@code CompositeData}.
      * The given {@code CompositeData} must contain the following attributes:
      * <blockquote>
-     * <table border summary="The attributes and the types the given CompositeData contains">
+     * <table border="1">
+     * <caption style="display:none">The attributes and the types the given CompositeData contains</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>className</td>
--- a/src/java.management/share/classes/java/lang/management/ManagementFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/ManagementFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -67,7 +67,7 @@
  * the management interface of a component of the Java virtual
  * machine.
  *
- * <h3><a name="MXBean">Platform MXBeans</a></h3>
+ * <h3><a id="MXBean">Platform MXBeans</a></h3>
  * <p>
  * A platform MXBean is a <i>managed bean</i> that
  * conforms to the <a href="../../../javax/management/package-summary.html">JMX</a>
@@ -83,7 +83,7 @@
  * See <a href="../../../javax/management/MXBean.html#MXBean-spec">
  * the specification of MXBeans</a> for details.
  *
- * <a name="MXBeanNames"></a>
+ * <a id="MXBeanNames"></a>
  * <p>Each platform MXBean is a {@link PlatformManagedObject}
  * and it has a unique
  * {@link javax.management.ObjectName ObjectName} for
@@ -141,7 +141,8 @@
  * interfaces:
  *
  * <blockquote>
- * <table border summary="The list of Management Interfaces and their single instances">
+ * <table border="1">
+ * <caption style="display:none">The list of Management Interfaces and their single instances</caption>
  * <tr>
  * <th>Management Interface</th>
  * <th>ObjectName</th>
@@ -184,7 +185,8 @@
  * the following management interfaces.
  *
  * <blockquote>
- * <table border summary="The list of Management Interfaces and their single instances">
+ * <table border="1">
+ * <caption style="display:none">The list of Management Interfaces and their single instances</caption>
  * <tr>
  * <th>Management Interface</th>
  * <th>ObjectName</th>
@@ -201,7 +203,8 @@
  * A Java virtual machine may have one or more instances of the following
  * management interfaces.
  * <blockquote>
- * <table border summary="The list of Management Interfaces and their single instances">
+ * <table border="1">
+ * <caption style="display:none">The list of Management Interfaces and their single instances</caption>
  * <tr>
  * <th>Management Interface</th>
  * <th>ObjectName</th>
--- a/src/java.management/share/classes/java/lang/management/ManagementPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/ManagementPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -34,7 +34,8 @@
  * provides a summary description of what the permission allows,
  * and discusses the risks of granting code the permission.
  *
- * <table border=1 cellpadding=5 summary="Table shows permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">Table shows permission target name, what the permission allows, and associated risks</caption>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
--- a/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/MemoryNotificationInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, 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
@@ -212,10 +212,11 @@
      * The given {@code CompositeData} must contain
      * the following attributes:
      * <blockquote>
-     * <table border summary="The attributes and the types the given CompositeData contains">
+     * <table border="1">
+     * <caption style="display:none">The attributes and the types the given CompositeData contains</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>poolName</td>
--- a/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/MemoryPoolMXBean.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -71,7 +71,7 @@
  *       (only supported by some <em>garbage-collected</em> memory pools)</li>
  * </ul>
  *
- * <h3><a name="Usage">1. Memory Usage</a></h3>
+ * <h3><a id="Usage">1. Memory Usage</a></h3>
  *
  * The {@link #getUsage} method provides an estimate
  * of the current usage of a memory pool.
@@ -86,14 +86,14 @@
  * the current memory usage.  An implementation should document when
  * this is the case.
  *
- * <h3><a name="PeakUsage">2. Peak Memory Usage</a></h3>
+ * <h3><a id="PeakUsage">2. Peak Memory Usage</a></h3>
  *
  * The Java virtual machine maintains the peak memory usage of a memory
  * pool since the virtual machine was started or the peak was reset.
  * The peak memory usage is returned by the {@link #getPeakUsage} method
  * and reset by calling the {@link #resetPeakUsage} method.
  *
- * <h3><a name="UsageThreshold">3. Usage Threshold</a></h3>
+ * <h3><a id="UsageThreshold">3. Usage Threshold</a></h3>
  *
  * Each memory pool has a manageable attribute
  * called the <i>usage threshold</i> which has a default value supplied
@@ -141,7 +141,7 @@
  * <a href="#ThresholdNotification">threshold notification</a> mechanisms.
  *
  * <ol type="a">
- *   <li><a name="Polling"><b>Polling</b></a>
+ *   <li><a id="Polling"><b>Polling</b></a>
  *       <p>
  *       An application can continuously monitor its memory usage
  *       by calling either the {@link #getUsage} method for all
@@ -231,7 +231,7 @@
  *       }
  *       </pre><hr>
  *   </li>
- *   <li><a name="ThresholdNotification"><b>Usage Threshold Notifications</b></a>
+ *   <li><a id="ThresholdNotification"><b>Usage Threshold Notifications</b></a>
  *       <p>
  *       Usage threshold notification will be emitted by {@link MemoryMXBean}.
  *       When the Java virtual machine detects that the memory usage of
@@ -304,7 +304,7 @@
  *   </li>
  * </ol>
  *
- * <h3><a name="CollectionThreshold">4. Collection Usage Threshold</a></h3>
+ * <h3><a id="CollectionThreshold">4. Collection Usage Threshold</a></h3>
  *
  * Collection usage threshold is a manageable attribute only applicable
  * to some garbage-collected memory pools.
--- a/src/java.management/share/classes/java/lang/management/MemoryUsage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/MemoryUsage.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -36,10 +36,11 @@
  * the heap or non-heap memory of the Java virtual machine as a whole.
  *
  * <p> A {@code MemoryUsage} object contains four values:
- * <table summary="Describes the MemoryUsage object content">
+ * <table>
+ * <caption style="display:none">Describes the MemoryUsage object content</caption>
  * <tr>
- * <td valign=top> {@code init} </td>
- * <td valign=top> represents the initial amount of memory (in bytes) that
+ * <td style="vertical-align:top"> {@code init} </td>
+ * <td style="vertical-align:top"> represents the initial amount of memory (in bytes) that
  *      the Java virtual machine requests from the operating system
  *      for memory management during startup.  The Java virtual machine
  *      may request additional memory from the operating system and
@@ -48,13 +49,13 @@
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> {@code used} </td>
- * <td valign=top> represents the amount of memory currently used (in bytes).
+ * <td style="vertical-align:top"> {@code used} </td>
+ * <td style="vertical-align:top"> represents the amount of memory currently used (in bytes).
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> {@code committed} </td>
- * <td valign=top> represents the amount of memory (in bytes) that is
+ * <td style="vertical-align:top"> {@code committed} </td>
+ * <td style="vertical-align:top"> represents the amount of memory (in bytes) that is
  *      guaranteed to be available for use by the Java virtual machine.
  *      The amount of committed memory may change over time (increase
  *      or decrease).  The Java virtual machine may release memory to
@@ -64,8 +65,8 @@
  * </td>
  * </tr>
  * <tr>
- * <td valign=top> {@code max} </td>
- * <td valign=top> represents the maximum amount of memory (in bytes)
+ * <td style="vertical-align:top"> {@code max} </td>
+ * <td style="vertical-align:top"> represents the maximum amount of memory (in bytes)
  *      that can be used for memory management. Its value may be undefined.
  *      The maximum amount of memory may change over time if defined.
  *      The amount of used and committed memory will always be less than
@@ -252,10 +253,11 @@
      * must contain the following attributes:
      *
      * <blockquote>
-     * <table border summary="The attributes and the types the given CompositeData contains">
+     * <table border="1">
+     * <caption style="display:none">The attributes and the types the given CompositeData contains</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>init</td>
--- a/src/java.management/share/classes/java/lang/management/MonitorInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/MonitorInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -106,10 +106,11 @@
      * <a href="LockInfo.html#MappedType">
      * mapped type</a> for the {@link LockInfo} class:
      * <blockquote>
-     * <table border summary="The attributes and their types the given CompositeData contains">
+     * <table border="1">
+     * <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>lockedStackFrame</td>
--- a/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/RuntimeMXBean.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -312,7 +312,8 @@
      * {@link javax.management.openmbean.TabularData TabularData}
      * with two items in each row as follows:
      * <blockquote>
-     * <table border summary="Name and Type for each item">
+     * <table border="1">
+     * <caption style="display:none">Name and Type for each item</caption>
      * <tr>
      *   <th>Item Name</th>
      *   <th>Item Type</th>
--- a/src/java.management/share/classes/java/lang/management/ThreadInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/ThreadInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -61,7 +61,7 @@
  *   <li>Thread priority</li>
  * </ul>
  *
- * <h4><a name="SyncStats">Synchronization Statistics</a></h4>
+ * <h4><a id="SyncStats">Synchronization Statistics</a></h4>
  * <ul>
  *   <li>The number of times that the thread has blocked for
  *       synchronization or waited for notification.</li>
@@ -695,10 +695,11 @@
      * The given {@code CompositeData} must contain the following attributes
      * unless otherwise specified below:
      * <blockquote>
-     * <table border summary="The attributes and their types the given CompositeData contains">
+     * <table class="plain">
+     * <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>threadId</td>
@@ -759,16 +760,17 @@
      *   <td>{@code java.lang.String}</td>
      * </tr>
      * <tr>
-     *   <td><a name="StackTrace">stackTrace</a></td>
+     *   <td><a id="StackTrace">stackTrace</a></td>
      *   <td>{@code javax.management.openmbean.CompositeData[]}
      *       <p>
      *       Each element is a {@code CompositeData} representing
      *       StackTraceElement containing the following attributes:
      *       <blockquote>
-     *       <table cellspacing=1 cellpadding=0 summary="The attributes and their types the given CompositeData contains">
+     *       <table class="borderless">
+     *       <caption style="display:none">The attributes and their types the given CompositeData contains</caption>
      *       <tr>
-     *         <th align=left>Attribute Name</th>
-     *         <th align=left>Type</th>
+     *         <th style="text-align:left">Attribute Name</th>
+     *         <th style="text-align:left">Type</th>
      *       </tr>
      *       <tr>
      *         <td>moduleName</td>
@@ -841,6 +843,9 @@
      * @return a {@code ThreadInfo} object represented
      *         by {@code cd} if {@code cd} is not {@code null};
      *         {@code null} otherwise.
+     *
+     * @revised 9
+     * @spec JPMS
      */
     public static ThreadInfo from(CompositeData cd) {
         if (cd == null) {
--- a/src/java.management/share/classes/java/lang/management/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/java/lang/management/package.html	Fri May 12 10:43:28 2017 -0700
@@ -32,7 +32,7 @@
 It allows both local and remote
 monitoring and management of the running Java virtual machine.
 
-<h4><a name="MXBean">Platform MXBean</a></h4>
+<h3><a id="MXBean">Platform MXBean</a></h3>
 <p>
 A platform MXBean is a <i>managed bean</i> that
 conforms to the <a href="../../../javax/management/package-summary.html">JMX</a>
@@ -40,7 +40,7 @@
 Each platform MXBean is a {@link java.lang.management.PlatformManagedObject}
 with a unique
 {@linkplain java.lang.management.PlatformManagedObject#getObjectName name}.
-<h4>ManagementFactory</h4>
+<h3>ManagementFactory</h3>
 
 <p>The {@link java.lang.management.ManagementFactory} class is the management
 factory class for the Java platform.  This class provides a set of
@@ -58,7 +58,7 @@
 This is a single MBeanServer that can be shared by different managed
 components running within the same Java virtual machine.
 
-<h4>Interoperability</h4>
+<h3>Interoperability</h3>
 
 <p>A management application and a platform MBeanServer of a running
 virtual machine can interoperate
@@ -72,7 +72,7 @@
 See the <a href="../../../javax/management/MXBean.html#MXBean-spec">
 MXBean</a> specification for details.
 
-<h4><a name="examples">Ways to Access MXBeans</a></h4>
+<h3><a id="examples">Ways to Access MXBeans</a></h3>
 
 <p>An application can monitor the instrumentation of the
 Java virtual machine and the runtime in the following ways:
@@ -163,7 +163,7 @@
 </ul>
 
 
-<h4><a name="extension">Platform Extension</a></h4>
+<h3><a id="extension">Platform Extension</a></h3>
 
 <p>A Java virtual machine implementation may add its platform extension to
 the management interface by defining platform-dependent
--- a/src/java.management/share/classes/javax/management/Descriptor.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/Descriptor.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,8 @@
  * of the mapped Java type, called <em>opendata</em>(J) in the <a
  * href="MXBean.html#mapping-rules">MXBean type mapping rules</a>.</p>
  *
- * <table border="1" cellpadding="5" summary="Descriptor Fields">
+ * <table class="striped">
+ * <caption style="display:none">Descriptor Fields</caption>
  *
  * <tr><th>Name</th><th>Type</th><th>Used in</th><th>Meaning</th></tr>
  *
@@ -330,7 +331,8 @@
  * interest outside Model MBeans, for example.  But only Model MBeans have
  * a predefined behavior for these fields.</p>
  *
- * <table border="1" cellpadding="5" summary="ModelMBean Fields">
+ * <table class="striped">
+ * <caption style="display:none">ModelMBean Fields</caption>
  *
  * <tr><th>Name</th><th>Type</th><th>Used in</th><th>Meaning</th></tr>
  *
--- a/src/java.management/share/classes/javax/management/DescriptorKey.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/DescriptorKey.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,8 @@
  * <p>then the resulting {@code Descriptor} will contain the following
  * fields:</p>
  *
- * <table border="2" summary="Descriptor Fields">
+ * <table border="1">
+ * <caption style="display:none">Descriptor Fields</caption>
  * <tr><th>Name</th><th>Value</th></tr>
  * <tr><td>units</td><td>"bytes"</td></tr>
  * <tr><td>descriptionResourceKey</td><td>"bytes.key"</td></tr>
@@ -143,7 +144,8 @@
  * or an array of annotations.  The value of the field is derived from
  * the value of the annotation element as follows:</p>
  *
- * <table border="2" summary="Descriptor Field Types">
+ * <table border="1">
+ * <caption style="display:none">Descriptor Field Types</caption>
  * <tr><th>Annotation element</th><th>Descriptor field</th></tr>
  * <tr><td>Primitive value ({@code 5}, {@code false}, etc)</td>
  *     <td>Wrapped value ({@code Integer.valueOf(5)},
--- a/src/java.management/share/classes/javax/management/MBeanPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/MBeanPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, 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
@@ -133,7 +133,7 @@
  * any value (including another null value) but does not imply any
  * other value.</p>
  *
- * <p><a name="action-list">The possible actions are these:</a></p>
+ * <p><a id="action-list">The possible actions are these:</a></p>
  *
  * <ul>
  * <li>addNotificationListener</li>
--- a/src/java.management/share/classes/javax/management/MXBean.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/MXBean.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -93,7 +93,8 @@
       Standard MBean concept.  Here is how a managed object might be
       represented as a Standard MBean, and as an MXBean:</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -133,7 +134,8 @@
 
     <p>So, we might define <code>MemoryUsage</code> like this:</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -195,7 +197,8 @@
     <p>This becomes clearer if we compare what the clients of the two
       models might look like:</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -232,7 +235,8 @@
       managed objects when you know the model beforehand, regardless
       of whether you are using Standard MBeans or MXBeans:</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -265,7 +269,8 @@
     <p>Implementing the MemoryPool object works similarly for both
       Standard MBeans and MXBeans.</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -292,7 +297,8 @@
     <p>Registering the MBean in the MBean Server works in the same way
       in both cases:</p>
 
-    <table border="1" cellpadding="5" summary="Standard Bean vs. MXBean">
+    <table class="plain">
+    <caption style="display:none">Standard Bean vs. MXBean</caption>
       <tr>
         <th>Standard MBean</th><th>MXBean</th>
       </tr>
@@ -478,13 +484,14 @@
 
     <p>The following table summarizes the type mapping rules.</p>
 
-    <table border="1" cellpadding="5" summary="Type Mapping Rules">
+    <table class="striped">
+    <caption style="display:none">Type Mapping Rules</caption>
       <tr>
         <th>Java type <em>J</em></th>
         <th><em>opentype(J)</em></th>
         <th><em>opendata(J)</em></th>
       </tr>
-      <tbody valign="top">
+      <tbody style="vertical-align:top">
         <tr>
           <td>{@code int}, {@code boolean}, etc<br>
             (the 8 primitive Java types)</td>
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -57,7 +57,8 @@
  * Note that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</P>
  *
- * <table border="1" cellpadding="5" summary="ModelMBeanAttributeInfo Fields">
+ * <table class="striped">
+ * <caption style="display:none">ModelMBeanAttributeInfo Fields</caption>
  * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
  * <tr><td>name</td><td>String</td>
  *     <td>Attribute name.</td></tr>
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanConstructorInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -58,7 +58,8 @@
  * Note that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</P>
  *
- * <table border="1" cellpadding="5" summary="ModelMBeanConstructorInfo Fields">
+ * <table class="striped">
+ * <caption style="display:none">ModelMBeanConstructorInfo Fields</caption>
  * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
  * <tr><td>name</td><td>String</td>
  *     <td>Constructor name.</td></tr>
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -165,7 +165,8 @@
      * following.  Note that when the Type in this table is Number, a String
      * that is the decimal representation of a Long can also be used.</P>
      *
-     * <table border="1" cellpadding="5" summary="ModelMBean Fields">
+     * <table class="striped">
+     * <caption style="display:none">ModelMBean Fields</caption>
      * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
      * <tr><td>name</td><td>String</td>
      *     <td>MBean name.</td></tr>
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -56,7 +56,8 @@
  * Note that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</P>
  *
- * <table border="1" cellpadding="5" summary="ModelMBeanNotificationInfo Fields">
+ * <table class="striped">
+ * <caption style="display:none">ModelMBeanNotificationInfo Fields</caption>
  * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
  * <tr><td>name</td><td>String</td>
  *     <td>Notification name.</td></tr>
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanOperationInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -59,7 +59,8 @@
  * Note that when the Type in this table is Number, a String that is the decimal
  * representation of a Long can also be used.</P>
  *
- * <table border="1" cellpadding="5" summary="ModelMBeanOperationInfo Fields">
+ * <table class="striped">
+ * <caption style="display:none">ModelMBeanOperationInfo Fields</caption>
  * <tr><th>Name</th><th>Type</th><th>Meaning</th></tr>
  * <tr><td>name</td><td>String</td>
  *     <td>Operation name.</td></tr>
--- a/src/java.management/share/classes/javax/management/modelmbean/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/modelmbean/package.html	Fri May 12 10:43:28 2017 -0700
@@ -110,7 +110,7 @@
 // returns "value"
     </pre>
 
-    <h2><a name="spec">Package Specification</a></h2>
+    <h2><a id="spec">Package Specification</a></h2>
 
     <ul>
 	  <li>See the <i>JMX 1.4 Specification</i>
--- a/src/java.management/share/classes/javax/management/openmbean/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/openmbean/package.html	Fri May 12 10:43:28 2017 -0700
@@ -77,7 +77,7 @@
       describes the items in the <code>CompositeData</code> instances
       for the attribute.</p>
 
-    <h2><a name="constraints">Default values and constraints</a></h2>
+    <h2><a id="constraints">Default values and constraints</a></h2>
 
     <p>In Open MBeans, attributes and parameters can have default values
       and/or constraints associated with them in the {@code
--- a/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.management/share/classes/javax/management/remote/JMXConnectionNotification.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -40,11 +40,12 @@
  *
  * <p>The notification type is one of the following:</p>
  *
- * <table summary="JMXConnectionNotification Types">
+ * <table>
+ * <caption style="display:none">JMXConnectionNotification Types</caption>
  *
  * <tr>
- * <th align=left>Type</th>
- * <th align=left>Meaning</th>
+ * <th style="text-align:left">Type</th>
+ * <th style="text-align:left">Meaning</th>
  * </tr>
  *
  * <tr>
--- a/src/java.naming/share/classes/javax/naming/CompositeName.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/CompositeName.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -78,7 +78,8 @@
  *the string form of a composite name and its corresponding structural form
  *({@code CompositeName}).
  *
-<table border="1" cellpadding=3 summary="examples showing string form of composite name and its corresponding structural form (CompositeName)">
+<table class="striped"><caption style="display:none">examples showing string
+ form of composite name and its corresponding structural form (CompositeName)</caption>
 
 <tr>
 <th>String Name</th>
@@ -144,7 +145,8 @@
  * string forms of two composite names simply involves concatenating
  * their string forms together.
 
-<table border="1" cellpadding=3 summary="composition examples showing string names and composite names">
+<table class="striped"><caption style="display:none">composition examples
+ showing string names and composite names</caption>
 
 <tr>
 <th>String Names</th>
--- a/src/java.naming/share/classes/javax/naming/Context.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/Context.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, 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
@@ -137,7 +137,7 @@
  * known to protect it.
  *
  *<p>
- *<a name=RESOURCEFILES></a>
+ *<a id=RESOURCEFILES></a>
  *<h1>Resource Files</h1>
  *<p>
  * To simplify the task of setting up the environment
@@ -184,7 +184,7 @@
  * {@code jndiprovider.properties}.
  *
  * <p>
- * <a name=LISTPROPS></a>
+ * <a id=LISTPROPS></a>
  * Certain methods in the JNDI class library make use of the standard
  * JNDI properties that specify lists of JNDI factories:
  * <ul>
--- a/src/java.naming/share/classes/javax/naming/InitialContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/InitialContext.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, 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,7 +36,7 @@
  * The initial context implements the Context interface and
  * provides the starting point for resolution of names.
  *<p>
- * <a name=ENVIRONMENT></a>
+ * <a id=ENVIRONMENT></a>
  * When the initial context is constructed, its environment
  * is initialized with properties defined in the environment parameter
  * passed to the constructor, and in any
--- a/src/java.naming/share/classes/javax/naming/directory/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/directory/package.html	Fri May 12 10:43:28 2017 -0700
@@ -45,7 +45,7 @@
 associated with objects stored in a directory, and to search for
 objects using specified attributes.
 
-<h4>The Directory Context</h4>
+<h3>The Directory Context</h3>
 
 The <code>DirContext</code>
 interface represents a <em>directory context</em>.
--- a/src/java.naming/share/classes/javax/naming/event/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/event/package.html	Fri May 12 10:43:28 2017 -0700
@@ -40,7 +40,7 @@
 implementation.  Thus a variety of services--new, emerging, and
 already deployed ones--can be accessed in a common way.
 
-<h4>Naming Events</h4>
+<h3>Naming Events</h3>
 <p>
 This package defines a <code>NamingEvent</code> class to represent an event
 that is generated by a naming/directory service.
@@ -78,7 +78,7 @@
 </pre>
 </blockquote>
 
-<a name=THREADING></a>
+<a id=THREADING></a>
 <h4>Threading Issues</h4>
 
 When an event is dispatched to a listener, the listener method (such
--- a/src/java.naming/share/classes/javax/naming/ldap/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/ldap/package.html	Fri May 12 10:43:28 2017 -0700
@@ -48,7 +48,7 @@
 methods on a context for performing extended operations and handling
 controls.
 
-<h4>Extended Operations</h4>
+<h3>Extended Operations</h3>
 <p>
 This package defines the interface <code>ExtendedRequest</code>
 to represent the argument to an extended operation,
@@ -125,7 +125,7 @@
 }
 </pre></blockquote>
 
-<h4>Controls</h4>
+<h3>Controls</h3>
 
 This package defines the interface <code>Control</code> to represent an LDAPv3
 control. It can be a control that is sent to an LDAP server
@@ -203,7 +203,7 @@
 Control[] respCtls = ectx.getResponseControls();
 if (respCtls != null) {
     // Find the one we want
-    for (int i = 0; i < respCtls; i++) {
+    for (int i = 0; i &lt; respCtls; i++) {
         if(respCtls[i] instanceof ChangeIDControl) {
 	    ChangeIDControl cctl = (ChangeIDControl)respCtls[i];
 	    System.out.println(cctl.getChangeID());
--- a/src/java.naming/share/classes/javax/naming/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/package.html	Fri May 12 10:43:28 2017 -0700
@@ -40,7 +40,7 @@
 already deployed ones--can be accessed in a common way.
 
 
-<h4>Context</h4>
+<h3>Context</h3>
 <p>
 This package defines the notion of a <em>context</em>, represented
 by the <code>Context</code> interface.
@@ -63,7 +63,7 @@
 </pre>
 </blockquote>
 
-<h4>Names</h4>
+<h3>Names</h3>
 <p>
 Every naming method in the <code>Context</code>
 interface has two
@@ -82,7 +82,7 @@
 for simple applications, such as those that simply read in a name
 and look up the corresponding object.
 
-<h4>Bindings</h4>
+<h3>Bindings</h3>
 
 The <code>Binding</code> class represents a name-to-object binding.
 It is a tuple containing the name of the bound object,
@@ -95,7 +95,7 @@
 information about the object's class and do not want to
 pay the extra cost of getting the object.
 
-<h4>References</h4>
+<h3>References</h3>
 Objects are stored in naming and directory services in different ways.
 If an object store supports storing Java objects, 
 it might support storing an object in its serialized form.
@@ -112,7 +112,7 @@
 is stored in the directory are Java objects. 
 
 
-<h4>The Initial Context</h4>
+<h3>The Initial Context</h3>
 
 In JNDI, all naming and directory operations are performed relative
 to a context. There are no absolute roots.
@@ -122,7 +122,7 @@
 Once you have an initial context, you can use it to
 look up other contexts and objects.
 
-<h4>Exceptions</h4>
+<h3>Exceptions</h3>
 
 JNDI defines a class hierarchy for exceptions that can be thrown in
 the course of performing naming and directory operations.  The root of
--- a/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/spi/ObjectFactory.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, 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
@@ -136,7 +136,7 @@
  *
  * <p>
  * <b>Name and Context Parameters.</b> &nbsp;&nbsp;&nbsp;
- * <a name=NAMECTX></a>
+ * <a id=NAMECTX></a>
  *
  * The {@code name} and {@code nameCtx} parameters may
  * optionally be used to specify the name of the object being created.
--- a/src/java.naming/share/classes/javax/naming/spi/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.naming/share/classes/javax/naming/spi/package.html	Fri May 12 10:43:28 2017 -0700
@@ -47,7 +47,7 @@
 directory services.
 
 
-<h4>Plug-in Architecture</h4>
+<h3>Plug-in Architecture</h3>
 
 The service provider package allows different implementations to be plugged in
 dynamically.
@@ -56,7 +56,7 @@
 and implementations for contexts that can be reached 
 from the initial context.
 
-<h4>Java Object Support</h4>
+<h3>Java Object Support</h3>
 
 The service provider package provides support
 for implementors of the
@@ -68,7 +68,7 @@
 back a printer object on which to operate.
 
 
-<h4>Multiple Naming Systems (Federation)</h4>
+<h3>Multiple Naming Systems (Federation)</h3>
 
 JNDI operations allow applications to supply names that span multiple
 naming systems.  So in the process of completing
--- a/src/java.rmi/share/classes/java/rmi/Remote.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.rmi/share/classes/java/rmi/Remote.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,8 @@
  * <code>java.rmi.activation.Activatable</code>.
  *
  * <p>For complete details on RMI, see the <a
- href=../../../platform/rmi/spec/rmiTOC.html>RMI Specification</a> which describes the RMI API and system.
+ * href="{@docRoot}/../specs/rmi/index.html">RMI Specification</a> which
+ * describes the RMI API and system.
  *
  * @since   1.1
  * @author  Ann Wollrath
--- a/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.rmi/share/classes/java/rmi/server/UnicastRemoteObject.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -171,9 +171,9 @@
  * By default, server sockets created by {@link RMISocketFactory}
  * listen on all network interfaces. See the
  * {@link RMISocketFactory} class and the section
- * <a href="{@docRoot}/../platform/rmi/spec/rmi-server29.html">RMI Socket Factories</a>
+ * <a href="{@docRoot}/../specs/rmi/server.html#rmi-socket-factories">RMI Socket Factories</a>
  * in the
- * <a href="{@docRoot}/../platform/rmi/spec/rmiTOC.html">Java RMI Specification</a>.
+ * <a href="{@docRoot}/../specs/rmi/index.html">Java RMI Specification</a>.
  *
  * @author  Ann Wollrath
  * @author  Peter Jones
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html	Fri May 12 10:43:28 2017 -0700
@@ -1,11 +1,11 @@
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!doctype html>
+<html lang="en">
 <head>
 
   <meta http-equiv="Content-Type"
  content="text/html; charset=iso-8859-1">
 <!--
-Copyright (c) 2003, 2014, 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
@@ -31,7 +31,7 @@
 -->
   <title>javax.sql.rowset Package</title>
 </head>
-  <body bgcolor="#ffffff">
+  <body>
 
 <!-- Description clause -->
 Standard interfaces and base classes for JDBC <code>RowSet</code>
@@ -48,7 +48,7 @@
 <li><a href="#reldocs">5.0 Related Documentation</a>
 </ul>
 
-<h3><a name="pkgspec">1.0 Package Specification</a></h3>
+<h3><a id="pkgspec">1.0 Package Specification</a></h3>
 This package specifies five standard JDBC <code>RowSet</code> interfaces.
  All five extend the 
 <a href="../RowSet.html">RowSet</a> interface described in the JDBC 3.0
@@ -63,7 +63,7 @@
 should pay particular attention to the assertions detailed in specification
 interfaces. 
 
-<h3><a name="stdrowset">2.0 Standard RowSet Definitions</a></h3>
+<h3><a id="stdrowset">2.0 Standard RowSet Definitions</a></h3>
 <ul>
 <li><a href="JdbcRowSet.html"><b><code>JdbcRowSet</code></b></a> - A wrapper around
 a <code>ResultSet</code> object that makes it possible to use the result set as a
@@ -136,7 +136,7 @@
 <code>RowSet</code> instances without the need to touch the originating data source.
 </ul>
 
-<h3><a name="impl">3.0 Implementer's Guide</a></h3>
+<h3><a id="impl">3.0 Implementer's Guide</a></h3>
 Compliant implementations of JDBC <code>RowSet</code> Implementations
 <b>must</b> follow the assertions described in this specification. In accordance
 with the terms of the <a href="http://www.jcp.org">Java Community Process</a>, a
@@ -173,47 +173,40 @@
 The following table illustrates the features that the <code>BaseRowSet</code>
 abstract class provides.
   <blockquote>
-    <table cellpadding="2" cellspacing="2" border="1" width="75%">
+    <table class="striped" style="vertical-align:top; width:75%">
+	<caption>Features in <code>BaseRowSet</code></caption>
+          <thead>
+            <tr>
+              <th>Feature</th>
+              <th>Details</th>
+            </tr>
+          </thead>
           <tbody>
             <tr>
-              <td valign="top"><b>Feature</b><br>
-              </td>
-              <td valign="top"><b>Details</b><br>
-              </td>
-            </tr>
-            <tr>
-              <td valign="top">Properties<br>
-              </td>
-              <td valign="top">Provides standard JavaBeans property manipulation
+              <td>Properties</td>
+              <td>Provides standard JavaBeans property manipulation
 mechanisms to allow applications to get and set <code>RowSet</code> command and
 property  values. Refer to the   documentation of the <code>javax.sql.RowSet</code>
 interface  (available in the JDBC 3.0 specification) for more details on
-the standard  <code>RowSet</code> properties.<br>
-              </td>
+the standard  <code>RowSet</code> properties.</td>
             </tr>
             <tr>
-              <td valign="top">Event notification<br>
-              </td>
-              <td valign="top">Provides standard JavaBeans event notifications
+              <td>Event notification</td>
+              <td>Provides standard JavaBeans event notifications
 to registered event listeners. Refer to the documentation of <code>javax.sql.RowSetEvent</code>
 interface (available in the JDBC 3.0 specification) for
 more details on how  to register and handle standard RowSet events generated
-by  compliant implementations.<br>
-              </td>
+by  compliant implementations.</td>
             </tr>
             <tr>
-              <td valign="top">Setters for a RowSet object's command<br>
-              </td>
-              <td valign="top">Provides a complete set of setter methods
-                 for setting RowSet command parameters.<br>
-              </td>
+              <td>Setters for a RowSet object's command</td>
+              <td>Provides a complete set of setter methods
+                 for setting RowSet command parameters.</td>
             </tr>
             <tr>
-              <td valign="top">Streams<br>
-              </td>
-              <td valign="top">Provides fields for storing of stream instances
-  in addition to providing a set of constants for stream type designation.<br>
-              </td>
+              <td>Streams</td>
+              <td>Provides fields for storing of stream instances
+  in addition to providing a set of constants for stream type designation.</td>
             </tr>
       </tbody>
     </table>
@@ -289,13 +282,13 @@
 </li>
 </ul>
 
-<h3><a name="relspec">4.0 Related Specifications</a></h3>
+<h3><a id="relspec">4.0 Related Specifications</a></h3>
 <ul>
 <li><a href="https://jcp.org/en/jsr/detail?id=221">JDBC 4.2 Specification</a>
 <li><a href="http://www.w3.org/XML/Schema">XML Schema</a>
 </ul>
 
-<h3><a name="reldocs">5.0 Related Documentation</a></h3>
+<h3><a id="reldocs">5.0 Related Documentation</a></h3>
 <ul>
 <li><a href="http://docs.oracle.com/javase/tutorial/jdbc/basics/rowset.html">
 JDBC RowSet Tutorial</a>
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
-<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
-<html>
+<!doctype html>
+<html lang="en">
 <head>
 
   <meta http-equiv="Content-Type"
@@ -8,7 +8,7 @@
   <meta name="GENERATOR"
  content="Mozilla/4.79 [en] (Windows NT 5.0; U) [Netscape]">
 <!--
-Copyright (c) 2003, 2014, 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,7 @@
   <title>javax.sql.rowset.spi</title>
 
 </head>
-  <body bgcolor="#ffffff">
+  <body>
 
 The standard classes and interfaces that a third party vendor has to
 use in its implementation of a synchronization provider. These classes and
@@ -57,7 +57,7 @@
 <li><a href="#reldocs">6.0 Related Documentation</a>
 </ul>
 
-<h3><a name="pkgspec">1.0 Package Specification</a></h3>
+<h3><a id="pkgspec">1.0 Package Specification</a></h3>
 <P>
 The following classes and interfaces make up the <code>javax.sql.rowset.spi</code>
 package:
@@ -202,7 +202,7 @@
 registering the fully qualified class name with Oracle Corporation at
 <code>jdbc@sun.com</code>. This process is discussed in further detail below.
 
-<h3><a name="arch">2.0 Service Provider Interface Architecture</a></h3>
+<h3><a id="arch">2.0 Service Provider Interface Architecture</a></h3>
 <b>2.1 Overview</b>
 <p>
 The Service Provider Interface provides a pluggable mechanism by which
@@ -267,7 +267,7 @@
 These policies are explored in more detail in the <a href="SyncFactory.html">
 <code>SyncFactory</code></a> class.
 
-<h3><a name="impl">3.0 SyncProvider Implementer's Guide</a></h3>
+<h3><a id="impl">3.0 SyncProvider Implementer's Guide</a></h3>
 
 <b>3.1 Requirements</b>
 <p>
@@ -442,7 +442,7 @@
 </pre>
 
 
-<h3><a name="resolving">4.0 Resolving Synchronization Conflicts</a></h3>
+<h3><a id="resolving">4.0 Resolving Synchronization Conflicts</a></h3>
 
 The interface <code>SyncResolver</code> provides a way for an application to
 decide manually what to do when a conflict occurs. When the <code>CachedRowSet</code>
@@ -487,13 +487,13 @@
 <P>
 The comment for the <code>SyncResolver</code> interface has more detail.
 
-<h3><a name="relspec">5.0 Related Specifications</a></h3>
+<h3><a id="relspec">5.0 Related Specifications</a></h3>
 <ul>
 <li><a href="http://docs.oracle.com/javase/jndi/tutorial/index.html">JNDI</a>
 <li><a href="{@docRoot}/../technotes/guides/logging/index.html">Java Logging
 APIs</a>
 </ul>
-<h3><a name="reldocs">6.0 Related Documentation</a></h3>
+<h3><a id="reldocs">6.0 Related Documentation</a></h3>
 <ul>
 <li><a href="{@docRoot}/../technotes/tools/index.html#basic">System
 properties</a>
--- a/src/java.sql/share/classes/java/sql/SQLPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.sql/share/classes/java/sql/SQLPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, 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
@@ -58,13 +58,17 @@
  * and a discussion of the risks of granting code the permission.
  *
  *
- * <table border=1 cellpadding=5 summary="permission target name, what the permission allows, and associated risks">
+ * <table class="striped">
+ * <caption style="display:none">permission target name, what the permission allows, and associated risks</caption>
+ * <thead>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
  * <th>Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
  *
+ * <tbody>
  * <tr>
  *   <td>setLog</td>
  *   <td>Setting of the logging stream</td>
@@ -103,6 +107,7 @@
  *   <td>Permits an application to remove a JDBC driver from the list of
  * registered Drivers and release its resources.</td>
  * </tr>
+ * </tbody>
  * </table>
  *
  * @since 1.3
--- a/src/java.sql/share/classes/java/sql/Statement.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.sql/share/classes/java/sql/Statement.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -686,7 +686,7 @@
      *         more results
      * @exception SQLException if a database access error occurs,
      * this method is called on a closed <code>Statement</code> or the argument
-         *         supplied is not one of the following:
+     *         supplied is not one of the following:
      *        <code>Statement.CLOSE_CURRENT_RESULT</code>,
      *        <code>Statement.KEEP_CURRENT_RESULT</code> or
      *        <code>Statement.CLOSE_ALL_RESULTS</code>
@@ -1379,16 +1379,20 @@
      * single quote within the string will be replaced by two single quotes.
      *
      * <blockquote>
-     * <table border = 1 cellspacing=0 cellpadding=5 >
+     * <table class="striped" >
      * <caption>Examples of the conversion:</caption>
+     * <thead>
      * <tr><th>Value</th><th>Result</th></tr>
-     * <tr> <td align='center'>Hello</td> <td align='center'>'Hello'</td> </tr>
-     * <tr> <td align='center'>G'Day</td> <td align='center'>'G''Day'</td> </tr>
-     * <tr> <td align='center'>'G''Day'</td>
-     * <td align='center'>'''G''''Day'''</td> </tr>
-     * <tr> <td align='center'>I'''M</td> <td align='center'>'I''''''M'</td>
+     * </thead>
+     * <tbody style="text-align:center">
+     * <tr> <td>Hello</td> <td>'Hello'</td> </tr>
+     * <tr> <td>G'Day</td> <td>'G''Day'</td> </tr>
+     * <tr> <td>'G''Day'</td>
+     * <td>'''G''''Day'''</td> </tr>
+     * <tr> <td>I'''M</td> <td>'I''''''M'</td>
      * </tr>
      *
+     * </tbody>
      * </table>
      * </blockquote>
      * @implNote
@@ -1446,52 +1450,56 @@
      * <li>The length of {@code identifier} is less than 1 or greater than 128 characters
      * </ul>
      * <blockquote>
-     * <table border = 1 cellspacing=0 cellpadding=5 >
+     * <table class="striped" >
      * <caption>Examples of the conversion:</caption>
+     * <thead>
      * <tr>
      * <th>identifier</th>
      * <th>alwaysQuote</th>
      * <th>Result</th></tr>
+     * </thead>
+     * <tbody>
      * <tr>
-     * <td align='center'>Hello</td>
-     * <td align='center'>false</td>
-     * <td align='center'>Hello</td>
+     * <td>Hello</td>
+     * <td>false</td>
+     * <td>Hello</td>
      * </tr>
      * <tr>
-     * <td align='center'>Hello</td>
-     * <td align='center'>true</td>
-     * <td align='center'>"Hello"</td>
+     * <td>Hello</td>
+     * <td>true</td>
+     * <td>"Hello"</td>
      * </tr>
      * <tr>
-     * <td align='center'>G'Day</td>
-     * <td align='center'>false</td>
-     * <td align='center'>"G'Day"</td>
+     * <td>G'Day</td>
+     * <td>false</td>
+     * <td>"G'Day"</td>
      * </tr>
      * <tr>
-     * <td align='center'>"Bruce Wayne"</td>
-     * <td align='center'>false</td>
-     * <td align='center'>"Bruce Wayne"</td>
+     * <td>"Bruce Wayne"</td>
+     * <td>false</td>
+     * <td>"Bruce Wayne"</td>
      * </tr>
      * <tr>
-     * <td align='center'>"Bruce Wayne"</td>
-     * <td align='center'>true</td>
-     * <td align='center'>"Bruce Wayne"</td>
+     * <td>"Bruce Wayne"</td>
+     * <td>true</td>
+     * <td>"Bruce Wayne"</td>
      * </tr>
      * <tr>
-     * <td align='center'>GoodDay$</td>
-     * <td align='center'>false</td>
-     * <td align='center'>"GoodDay$"</td>
+     * <td>GoodDay$</td>
+     * <td>false</td>
+     * <td>"GoodDay$"</td>
      * </tr>
      * <tr>
-     * <td align='center'>Hello"World</td>
-     * <td align='center'>false</td>
-     * <td align='center'>SQLException</td>
+     * <td>Hello"World</td>
+     * <td>false</td>
+     * <td>SQLException</td>
      * </tr>
      * <tr>
-     * <td align='center'>"Hello"World"</td>
-     * <td align='center'>false</td>
-     * <td align='center'>SQLException</td>
+     * <td>"Hello"World"</td>
+     * <td>false</td>
+     * <td>SQLException</td>
      * </tr>
+     * </tbody>
      * </table>
      * </blockquote>
      * @implNote
@@ -1542,36 +1550,40 @@
      * </ul>
      *
      * <blockquote>
-     * <table border = 1 cellspacing=0 cellpadding=5 >
+     * <table class="striped" >
      * <caption>Examples of the conversion:</caption>
+     * <thead>
      * <tr>
      * <th>identifier</th>
      * <th>Simple Identifier</th>
+     * </thead>
      *
+     * <tbody>
      * <tr>
-     * <td align='center'>Hello</td>
-     * <td align='center'>true</td>
+     * <td>Hello</td>
+     * <td>true</td>
      * </tr>
      * <tr>
-     * <td align='center'>G'Day</td>
-     * <td align='center'>false</td>
+     * <td>G'Day</td>
+     * <td>false</td>
      * </tr>
      * <tr>
-     * <td align='center'>"Bruce Wayne"</td>
-     * <td align='center'>false</td>
+     * <td>"Bruce Wayne"</td>
+     * <td>false</td>
      * </tr>
      * <tr>
-     * <td align='center'>GoodDay$</td>
-     * <td align='center'>false</td>
+     * <td>GoodDay$</td>
+     * <td>false</td>
      * </tr>
      * <tr>
-     * <td align='center'>Hello"World</td>
-     * <td align='center'>false</td>
+     * <td>Hello"World</td>
+     * <td>false</td>
      * </tr>
      * <tr>
-     * <td align='center'>"Hello"World"</td>
-     * <td align='center'>false</td>
+     * <td>"Hello"World"</td>
+     * <td>false</td>
      * </tr>
+     * </tbody>
      * </table>
      * </blockquote>
      * @implNote JDBC driver implementations may need to provide their own
@@ -1597,19 +1609,23 @@
     * by two single quotes.
     *
     * <blockquote>
-    * <table border = 1 cellspacing=0 cellpadding=5 >
+    * <table class="striped">
     * <caption>Examples of the conversion:</caption>
+    * <thead>
     * <tr>
     * <th>Value</th>
     * <th>Result</th>
     * </tr>
-    * <tr> <td align='center'>Hello</td> <td align='center'>N'Hello'</td> </tr>
-    * <tr> <td align='center'>G'Day</td> <td align='center'>N'G''Day'</td> </tr>
-    * <tr> <td align='center'>'G''Day'</td>
-    * <td align='center'>N'''G''''Day'''</td> </tr>
-    * <tr> <td align='center'>I'''M</td> <td align='center'>N'I''''''M'</td>
-    * <tr> <td align='center'>N'Hello'</td> <td align='center'>N'N''Hello'''</td> </tr>
+    * </thead>
+    * <tbody>
+    * <tr> <td>Hello</td> <td>N'Hello'</td> </tr>
+    * <tr> <td>G'Day</td> <td>N'G''Day'</td> </tr>
+    * <tr> <td>'G''Day'</td>
+    * <td>N'''G''''Day'''</td> </tr>
+    * <tr> <td>I'''M</td> <td>N'I''''''M'</td>
+    * <tr> <td>N'Hello'</td> <td>N'N''Hello'''</td> </tr>
     *
+    * </tbody>
     * </table>
     * </blockquote>
     * @implNote
--- a/src/java.sql/share/classes/java/sql/package.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.sql/share/classes/java/sql/package.html	Fri May 12 10:43:28 2017 -0700
@@ -59,6 +59,7 @@
 <h2>Versions</h2>
 The JDBC 4.3 API incorporates all of the previous JDBC API versions:
 <UL>
+    <LI> The JDBC 4.2 API</li>
     <LI> The JDBC 4.1 API</li>
     <LI> The JDBC 4.0 API</li>
     <LI> The JDBC 3.0 API</li>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLSignContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLSignContext.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -41,7 +41,7 @@
  * (for example, you should not use the same <code>XMLSignContext</code>
  * instance to sign two different {@link XMLSignature} objects).
  * <p>
- * <b><a name="SupportedProperties"></a>Supported Properties</b>
+ * <b><a id="SupportedProperties"></a>Supported Properties</b>
  * <p>The following properties can be set using the
  * {@link #setProperty setProperty} method.
  * <ul>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLValidateContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/XMLValidateContext.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -40,7 +40,7 @@
  * (for example, you should not use the same <code>XMLValidateContext</code>
  * instance to validate two different {@link XMLSignature} objects).
  * <p>
- * <b><a name="SupportedProperties"></a>Supported Properties</b>
+ * <b><a id="SupportedProperties"></a>Supported Properties</b>
  * <p>The following properties can be set by an application using the
  * {@link #setProperty setProperty} method.
  * <ul>
--- a/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -214,13 +214,14 @@
             // Special-case the "load" command so that the right exception is
             // thrown.
             if (cmd.equals("load")) {
-                throw new AgentLoadException("Failed to load agent library");
+                String msg = "Failed to load agent library";
+                if (!message.isEmpty())
+                    msg += ": " + message;
+                throw new AgentLoadException(msg);
             } else {
-                if (message == null) {
-                    throw new AttachOperationFailedException("Command failed in target VM");
-                } else {
-                    throw new AttachOperationFailedException(message);
-                }
+                if (message.isEmpty())
+                    message = "Command failed in target VM";
+                throw new AttachOperationFailedException(message);
             }
         }
 
--- a/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -211,13 +211,14 @@
             // Special-case the "load" command so that the right exception is
             // thrown.
             if (cmd.equals("load")) {
-                throw new AgentLoadException("Failed to load agent library");
+                String msg = "Failed to load agent library";
+                if (!message.isEmpty())
+                    msg += ": " + message;
+                throw new AgentLoadException(msg);
             } else {
-                if (message == null) {
-                    throw new AttachOperationFailedException("Command failed in target VM");
-                } else {
-                    throw new AttachOperationFailedException(message);
-                }
+                if (message.isEmpty())
+                    message = "Command failed in target VM";
+                throw new AttachOperationFailedException(message);
             }
         }
 
--- a/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -213,13 +213,14 @@
             // Special-case the "load" command so that the right exception is
             // thrown.
             if (cmd.equals("load")) {
-                throw new AgentLoadException("Failed to load agent library");
+                String msg = "Failed to load agent library";
+                if (!message.isEmpty())
+                    msg += ": " + message;
+                throw new AgentLoadException(msg);
             } else {
-                if (message == null) {
-                    throw new AttachOperationFailedException("Command failed in target VM");
-                } else {
-                    throw new AttachOperationFailedException(message);
-                }
+                if (message.isEmpty())
+                    message = "Command failed in target VM";
+                throw new AttachOperationFailedException(message);
             }
         }
 
--- a/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/share/classes/com/sun/tools/attach/AttachPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -40,8 +40,8 @@
  * permission allows, and discusses the risks of granting code the
  * permission.
  *
- * <table border=1 cellpadding=5 summary="Table shows permission
- * target name, what the permission allows, and associated risks">
+ * <table class="striped"><caption style="display:none">Table shows permission
+ * target name, what the permission allows, and associated risks</caption>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
--- a/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -25,15 +25,19 @@
 
 package sun.tools.attach;
 
+import com.sun.tools.attach.AttachNotSupportedException;
 import com.sun.tools.attach.VirtualMachine;
 import com.sun.tools.attach.AgentLoadException;
 import com.sun.tools.attach.AgentInitializationException;
 import com.sun.tools.attach.spi.AttachProvider;
+import jdk.internal.misc.VM;
 
 import java.io.BufferedReader;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Properties;
 import java.util.stream.Collectors;
 
@@ -43,8 +47,33 @@
 
 public abstract class HotSpotVirtualMachine extends VirtualMachine {
 
-    HotSpotVirtualMachine(AttachProvider provider, String id) {
+    private static final long CURRENT_PID;
+    private static final boolean ALLOW_ATTACH_SELF;
+    static {
+        PrivilegedAction<ProcessHandle> pa = ProcessHandle::current;
+        CURRENT_PID = AccessController.doPrivileged(pa).pid();
+
+        String s = VM.getSavedProperty("jdk.attach.allowAttachSelf");
+        ALLOW_ATTACH_SELF = "".equals(s) || Boolean.parseBoolean(s);
+    }
+
+    HotSpotVirtualMachine(AttachProvider provider, String id)
+        throws AttachNotSupportedException, IOException
+    {
         super(provider, id);
+
+        int pid;
+        try {
+            pid = Integer.parseInt(id);
+        } catch (NumberFormatException e) {
+            throw new AttachNotSupportedException("Invalid process identifier");
+        }
+
+        // The tool should be a different VM to the target. This check will
+        // eventually be enforced by the target VM.
+        if (!ALLOW_ATTACH_SELF && (pid == 0 || pid == CURRENT_PID)) {
+            throw new IOException("Can not attach to current VM");
+        }
     }
 
     /*
@@ -103,8 +132,6 @@
         }
         try {
             loadAgentLibrary("instrument", args);
-        } catch (AgentLoadException x) {
-            throw new InternalError("instrument library is missing in target VM", x);
         } catch (AgentInitializationException x) {
             /*
              * Translate interesting errors into the right exception and
@@ -116,13 +143,17 @@
                 case JNI_ENOMEM:
                     throw new AgentLoadException("Insuffient memory");
                 case ATTACH_ERROR_BADJAR:
-                    throw new AgentLoadException("Agent JAR not found or no Agent-Class attribute");
+                    throw new AgentLoadException(
+                        "Agent JAR not found or no Agent-Class attribute");
                 case ATTACH_ERROR_NOTONCP:
-                    throw new AgentLoadException("Unable to add JAR file to system class path");
+                    throw new AgentLoadException(
+                        "Unable to add JAR file to system class path");
                 case ATTACH_ERROR_STARTFAIL:
-                    throw new AgentInitializationException("Agent JAR loaded but agent failed to initialize");
+                    throw new AgentInitializationException(
+                        "Agent JAR loaded but agent failed to initialize");
                 default :
-                    throw new AgentLoadException("Failed to load agent - unknown reason: " + rc);
+                    throw new AgentLoadException("" +
+                        "Failed to load agent - unknown reason: " + rc);
             }
         }
     }
@@ -163,20 +194,20 @@
         return props;
     }
 
-    private static final String MANAGMENT_PREFIX = "com.sun.management.";
+    private static final String MANAGEMENT_PREFIX = "com.sun.management.";
 
     private static boolean checkedKeyName(Object key) {
         if (!(key instanceof String)) {
             throw new IllegalArgumentException("Invalid option (not a String): "+key);
         }
-        if (!((String)key).startsWith(MANAGMENT_PREFIX)) {
+        if (!((String)key).startsWith(MANAGEMENT_PREFIX)) {
             throw new IllegalArgumentException("Invalid option: "+key);
         }
         return true;
     }
 
     private static String stripKeyName(Object key) {
-        return ((String)key).substring(MANAGMENT_PREFIX.length());
+        return ((String)key).substring(MANAGEMENT_PREFIX.length());
     }
 
     @Override
@@ -204,9 +235,11 @@
     @Override
     public String startLocalManagementAgent() throws IOException {
         executeJCmd("ManagementAgent.start_local").close();
-        return getAgentProperties().getProperty("com.sun.management.jmxremote.localConnectorAddress");
+        String prop = MANAGEMENT_PREFIX + "jmxremote.localConnectorAddress";
+        return getAgentProperties().getProperty(prop);
     }
 
+
     // --- HotSpot specific methods ---
 
     // same as SIGQUIT
@@ -245,9 +278,9 @@
         return executeCommand("jcmd", command);
     }
 
+
     // -- Supporting methods
 
-
     /*
      * Execute the given command in the target VM - specific platform
      * implementation must implement this.
@@ -306,10 +339,10 @@
     /*
      * Utility method to read data into a String.
      */
-    String readErrorMessage(InputStream sis) throws IOException {
+    String readErrorMessage(InputStream in) throws IOException {
         String s;
         StringBuilder message = new StringBuilder();
-        BufferedReader br = new BufferedReader(new InputStreamReader(sis));
+        BufferedReader br = new BufferedReader(new InputStreamReader(in));
         while ((s = br.readLine()) != null) {
             message.append(s);
         }
--- a/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -160,13 +160,14 @@
             String message = readErrorMessage(sis);
             sis.close();
             if (cmd.equals("load")) {
-                throw new AgentLoadException("Failed to load agent library");
+                String msg = "Failed to load agent library";
+                if (!message.isEmpty())
+                    msg += ": " + message;
+                throw new AgentLoadException(msg);
             } else {
-                if (message == null) {
-                    throw new AttachOperationFailedException("Command failed in target VM");
-                } else {
-                    throw new AttachOperationFailedException(message);
-                }
+                if (message.isEmpty())
+                    message = "Command failed in target VM";
+                throw new AttachOperationFailedException(message);
             }
         }
 
--- a/src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -100,28 +100,29 @@
             connectPipe(hPipe);
 
             // create an input stream for the pipe
-            PipedInputStream is = new PipedInputStream(hPipe);
+            PipedInputStream in = new PipedInputStream(hPipe);
 
             // read completion status
-            int status = readInt(is);
+            int status = readInt(in);
             if (status != 0) {
                 // read from the stream and use that as the error message
-                String message = readErrorMessage(is);
-                is.close();
+                String message = readErrorMessage(in);
+                in.close();
                 // special case the load command so that the right exception is thrown
                 if (cmd.equals("load")) {
-                    throw new AgentLoadException("Failed to load agent library");
+                    String msg = "Failed to load agent library";
+                    if (!message.isEmpty())
+                        msg += ": " + message;
+                    throw new AgentLoadException(msg);
                 } else {
-                    if (message == null) {
-                        throw new AttachOperationFailedException("Command failed in target VM");
-                    } else {
-                        throw new AttachOperationFailedException(message);
-                    }
+                    if (message.isEmpty())
+                        message = "Command failed in target VM";
+                    throw new AttachOperationFailedException(message);
                 }
             }
 
             // return the input stream
-            return is;
+            return in;
 
         } catch (IOException ioe) {
             closePipe(hPipe);
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpServer.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -51,7 +51,7 @@
  * {@link java.util.concurrent.Executor} object. If none is provided a default
  * implementation is used.
  * <p>
- * <a name="mapping_description"></a>
+ * <a id="mapping_description"></a>
  * <b>Mapping request URIs to HttpContext paths</b><p>
  * When a HTTP request is received,
  * the appropriate HttpContext (and handler) is located by finding the context
@@ -59,7 +59,7 @@
  * Paths are matched literally, which means that the strings are compared
  * case sensitively, and with no conversion to or from any encoded forms.
  * For example. Given a HttpServer with the following HttpContexts configured.
- * <table>
+ * <table><caption style="display:none">description</caption>
  * <tr><td><i>Context</i></td><td><i>Context path</i></td></tr>
  * <tr><td>ctx1</td><td>"/"</td></tr>
  * <tr><td>ctx2</td><td>"/apps/"</td></tr>
@@ -68,7 +68,7 @@
  * <p>
  * the following table shows some request URIs and which, if any context they would
  * match with.
- * <table>
+ * <table><caption style="display:none">description</caption>
  * <tr><td><i>Request URI</i></td><td><i>Matches context</i></td></tr>
  * <tr><td>"http://foo.com/apps/foo/bar"</td><td>ctx3</td></tr>
  * <tr><td>"http://foo.com/apps/Foo/bar"</td><td>no match, wrong case</td></tr>
--- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsConfigurator.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -41,7 +41,7 @@
  * the {@link #configure(HttpsParameters)} method in order to change
  * the default configuration.
  * <p>
- * The following <a name="example">example</a> shows how this may be done:
+ * The following <a id="example">example</a> shows how this may be done:
  *
  * <blockquote><pre>
  * SSLContext sslContext = SSLContext.getInstance (....);
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -123,7 +123,7 @@
         this.method = method;
         this.systemHeaders = new HttpHeadersImpl();
         this.userHeaders = ImmutableHeaders.empty();
-        this.uri = null;
+        this.uri = URI.create("socket://" + authority.getHostString() + ":" + Integer.toString(authority.getPort()) + "/");
         this.requestProcessor = HttpRequest.noBody();
         this.authority = authority;
         this.secure = false;
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -27,6 +27,7 @@
 
 import jdk.incubator.http.internal.common.ByteBufferReference;
 import jdk.incubator.http.internal.common.MinimalFuture;
+import jdk.incubator.http.HttpResponse.BodyHandler;
 
 import java.io.IOException;
 import java.net.InetSocketAddress;
@@ -72,7 +73,8 @@
     public void connect() throws IOException, InterruptedException {
         delegate.connect();
         HttpRequestImpl req = new HttpRequestImpl("CONNECT", client, address);
-        Exchange<?> connectExchange = new Exchange<>(req, null);
+        MultiExchange<Void,Void> mul = new MultiExchange<>(req, client, BodyHandler.<Void>discard(null));
+        Exchange<Void> connectExchange = new Exchange<>(req, mul);
         Response r = connectExchange.responseImpl(delegate);
         if (r.statusCode() != 200) {
             throw new IOException("Tunnel failed");
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WebSocket.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -43,7 +43,7 @@
  * <p> To create a {@code WebSocket} use a {@linkplain HttpClient#newWebSocketBuilder(
  * URI, Listener) builder}. Once a {@code WebSocket} is built, it's ready
  * to send and receive messages. When the {@code WebSocket} is no longer needed
- * it must be closed: a Close message must both be {@linkplain #sendClose()
+ * it must be closed: a Close message must both be {@linkplain #sendClose
  * sent} and {@linkplain Listener#onClose(WebSocket, int, String) received}.
  * The {@code WebSocket} may be also closed {@linkplain #abort() abruptly}.
  *
@@ -94,17 +94,6 @@
     int NORMAL_CLOSURE = 1000;
 
     /**
-     * The WebSocket Close message status code (<code>{@value}</code>), is
-     * designated for use in applications expecting a status code to indicate
-     * that the connection was closed abnormally, e.g., without sending or
-     * receiving a Close message.
-     *
-     * @see Listener#onClose(WebSocket, int, String)
-     * @see #abort()
-     */
-    int CLOSED_ABNORMALLY = 1006;
-
-    /**
      * A builder for creating {@code WebSocket} instances.
      * {@Incubating}
      *
@@ -509,7 +498,7 @@
          *
          * <p> The {@code WebSocket} will close at the earliest of completion of
          * the returned {@code CompletionStage} or sending a Close message. In
-         * particular, if a Close message has been {@link WebSocket#sendClose()
+         * particular, if a Close message has been {@linkplain WebSocket#sendClose
          * sent} before, then this invocation completes the closing handshake
          * and by the time this method is invoked, the {@code WebSocket} will
          * have been closed.
@@ -643,44 +632,6 @@
     CompletableFuture<WebSocket> sendText(CharSequence message, boolean isLast);
 
     /**
-     * Sends a whole Text message with characters from the given {@code
-     * CharSequence}.
-     *
-     * <p> This is a convenience method. For the general case, use {@link
-     * #sendText(CharSequence, boolean)}.
-     *
-     * <p> Returns a {@code CompletableFuture<WebSocket>} which completes
-     * normally when the message has been sent or completes exceptionally if an
-     * error occurs.
-     *
-     * <p> The {@code CharSequence} must not be modified until the returned
-     * {@code CompletableFuture} completes (either normally or exceptionally).
-     *
-     * <p> The returned {@code CompletableFuture} can complete exceptionally
-     * with:
-     * <ul>
-     * <li> {@link IllegalArgumentException} -
-     *          if {@code message} is a malformed UTF-16 sequence
-     * <li> {@link IllegalStateException} -
-     *          if the {@code WebSocket} is closed;
-     *          or if a Close message has been sent;
-     *          or if there is an outstanding send operation;
-     *          or if a previous Binary message was sent with {@code isLast == false}
-     * <li> {@link IOException} -
-     *          if an I/O error occurs during this operation;
-     *          or if the {@code WebSocket} has been closed due to an error;
-     * </ul>
-     *
-     * @param message
-     *         the message
-     *
-     * @return a {@code CompletableFuture} with this {@code WebSocket}
-     */
-    default CompletableFuture<WebSocket> sendText(CharSequence message) {
-        return sendText(message, true);
-    }
-
-    /**
      * Sends a Binary message with bytes from the given {@code ByteBuffer}.
      *
      * <p> Returns a {@code CompletableFuture<WebSocket>} which completes
@@ -831,47 +782,10 @@
      *         the reason
      *
      * @return a {@code CompletableFuture} with this {@code WebSocket}
-     *
-     * @see #sendClose()
      */
     CompletableFuture<WebSocket> sendClose(int statusCode, String reason);
 
     /**
-     * Sends an empty Close message.
-     *
-     * <p> When this method has been invoked, no further messages can be sent.
-     *
-     * <p> For more details on Close message see RFC 6455 section
-     * <a href="https://tools.ietf.org/html/rfc6455#section-5.5.1">5.5.1. Close</a>
-     *
-     * <p> The method returns a {@code CompletableFuture<WebSocket>} which
-     * completes normally when the message has been sent or completes
-     * exceptionally if an error occurs.
-     *
-     * <p> The returned {@code CompletableFuture} can complete exceptionally
-     * with:
-     * <ul>
-     * <li> {@link IOException} -
-     *          if an I/O error occurs during this operation;
-     *          or the {@code WebSocket} has been closed due to an error
-     * </ul>
-     *
-     * <p> If this method has already been invoked or the {@code WebSocket} is
-     * closed, then subsequent invocations of this method have no effect and the
-     * returned {@code CompletableFuture} completes normally.
-     *
-     * <p> If a Close message has been {@linkplain Listener#onClose(WebSocket,
-     * int, String) received} before, then this invocation completes the closing
-     * handshake and by the time the returned {@code CompletableFuture}
-     * completes, the {@code WebSocket} will have been closed.
-     *
-     * @return a {@code CompletableFuture} with this {@code WebSocket}
-     *
-     * @see #sendClose(int, String)
-     */
-    CompletableFuture<WebSocket> sendClose();
-
-    /**
      * Allows {@code n} more messages to be received by the {@link Listener
      * Listener}.
      *
@@ -928,8 +842,7 @@
      * state.
      *
      * <p> As the result {@link Listener#onClose(WebSocket, int, String)
-     * Listener.onClose} will be invoked with the status code {@link
-     * #CLOSED_ABNORMALLY} unless either {@code onClose} or {@link
+     * Listener.onClose} will be invoked unless either {@code onClose} or {@link
      * Listener#onError(WebSocket, Throwable) onError} has been invoked before.
      * In which case no additional invocation will happen.
      *
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/WindowUpdateSender.java	Fri May 12 10:43:28 2017 -0700
@@ -20,6 +20,7 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 package jdk.incubator.http;
 
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/Decoder.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
  */
 package jdk.incubator.http.internal.hpack;
 
+import jdk.internal.vm.annotation.Stable;
+
 import java.io.IOException;
 import java.io.UncheckedIOException;
 import java.net.ProtocolException;
@@ -60,6 +62,7 @@
  */
 public final class Decoder {
 
+    @Stable
     private static final State[] states = new State[256];
 
     static {
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/hpack/HeaderTable.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,8 @@
  */
 package jdk.incubator.http.internal.hpack;
 
+import jdk.internal.vm.annotation.Stable;
+
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -40,6 +42,7 @@
 //
 final class HeaderTable {
 
+    @Stable
     private static final HeaderField[] staticTable = {
             null, // To make index 1-based, instead of 0-based
             new HeaderField(":authority"),
@@ -110,7 +113,7 @@
     private static final Map<String, LinkedHashMap<String, Integer>> staticIndexes;
 
     static {
-        staticIndexes = new HashMap<>(STATIC_TABLE_LENGTH);
+        staticIndexes = new HashMap<>(STATIC_TABLE_LENGTH); // TODO: Map.of
         for (int i = 1; i <= STATIC_TABLE_LENGTH; i++) {
             HeaderField f = staticTable[i];
             Map<String, Integer> values = staticIndexes
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/BuilderImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -46,7 +46,7 @@
     private final HttpClient client;
     private final URI uri;
     private final Listener listener;
-    private final List<Pair<String, String>> headers = new LinkedList<>();
+    private final Collection<Pair<String, String>> headers = new LinkedList<>();
     private final Collection<String> subprotocols = new LinkedList<>();
     private Duration timeout;
 
@@ -65,17 +65,18 @@
     }
 
     @Override
-    public Builder subprotocols(String mostPreferred, String... lesserPreferred)
+    public Builder subprotocols(String mostPreferred,
+                                String... lesserPreferred)
     {
         requireNonNull(mostPreferred, "mostPreferred");
         requireNonNull(lesserPreferred, "lesserPreferred");
         List<String> subprotocols = new LinkedList<>();
+        subprotocols.add(mostPreferred);
         for (int i = 0; i < lesserPreferred.length; i++) {
             String p = lesserPreferred[i];
             requireNonNull(p, "lesserPreferred[" + i + "]");
             subprotocols.add(p);
         }
-        subprotocols.add(0, mostPreferred);
         this.subprotocols.clear();
         this.subprotocols.addAll(subprotocols);
         return this;
@@ -98,20 +99,9 @@
 
     Listener getListener() { return listener; }
 
-    List<Pair<String, String>> getHeaders() { return headers; }
+    Collection<Pair<String, String>> getHeaders() { return headers; }
 
     Collection<String> getSubprotocols() { return subprotocols; }
 
     Duration getConnectTimeout() { return timeout; }
-
-    @Override
-    public String toString() {
-        return "WebSocket.Builder{"
-                + ", uri=" + uri
-                + ", listener=" + listener
-                + (!headers.isEmpty() ? ", headers=" + headers : "")
-                + (!subprotocols.isEmpty() ? ", subprotocols=" + subprotocols : "")
-                + ( timeout != null ? ", connectTimeout=" + timeout : "")
-                + '}';
-    }
 }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/CooperativeHandler.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,70 +25,184 @@
 
 package jdk.incubator.http.internal.websocket;
 
-import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Consumer;
 
 import static java.util.Objects.requireNonNull;
 
-final class CooperativeHandler {
+/*
+ * A synchronization aid that assists a number of parties in running a task
+ * in a mutually exclusive fashion.
+ *
+ * To run the task, a party invokes `handle`. To permanently prevent the task
+ * from subsequent runs, the party invokes `stop`.
+ *
+ * The parties do not have to operate in different threads.
+ *
+ * The task can be either synchronous or asynchronous.
+ *
+ * If the task is synchronous, it is represented with `Runnable`.
+ * The handler invokes `Runnable.run` to run the task.
+ *
+ * If the task is asynchronous, it is represented with `Consumer<Runnable>`.
+ * The handler invokes `Consumer.accept(end)` to begin the task. The task
+ * invokes `end.run()` when it has ended.
+ *
+ * The next run of the task will not begin until the previous run has finished.
+ *
+ * The task may invoke `handle()` by itself, it's a normal situation.
+ */
+public final class CooperativeHandler {
 
-    private static final long CONTINUE = 0;
-    private static final long OFF      = 1;
-    private static final long ON       = 2;
-    private static final long STOP     = 4;
+    /*
+       Since the task is fixed and known beforehand, no blocking synchronization
+       (locks, queues, etc.) is required. The job can be done solely using
+       nonblocking primitives.
+
+       The machinery below addresses two problems:
+
+         1. Running the task in a sequential order (no concurrent runs):
+
+                begin, end, begin, end...
+
+         2. Avoiding indefinite recursion:
 
-    private final AtomicLong state = new AtomicLong(OFF);
+                begin
+                  end
+                    begin
+                      end
+                        ...
+
+       Problem #1 is solved with a finite state machine with 4 states:
+
+           BEGIN, AGAIN, END, and STOP.
+
+       Problem #2 is solved with a "state modifier" OFFLOAD.
+
+       Parties invoke `handle()` to signal the task must run. A party that has
+       invoked `handle()` either begins the task or exploits the party that is
+       either beginning the task or ending it.
+
+       The party that is trying to end the task either ends it or begins it
+       again.
 
-    private final Runnable task;
+       To avoid indefinite recursion, before re-running the task tryEnd() sets
+       OFFLOAD bit, signalling to its "child" tryEnd() that this ("parent")
+       tryEnd() is available and the "child" must offload the task on to the
+       "parent". Then a race begins. Whichever invocation of tryEnd() manages
+       to unset OFFLOAD bit first does not do the work.
+
+       There is at most 1 thread that is beginning the task and at most 2
+       threads that are trying to end it: "parent" and "child". In case of a
+       synchronous task "parent" and "child" are the same thread.
+     */
 
-    CooperativeHandler(Runnable task) {
-        this.task = requireNonNull(task);
+    private static final int OFFLOAD =  1;
+    private static final int AGAIN   =  2;
+    private static final int BEGIN   =  4;
+    private static final int STOP    =  8;
+    private static final int END     = 16;
+
+    private final AtomicInteger state = new AtomicInteger(END);
+    private final Consumer<Runnable> begin;
+
+    public CooperativeHandler(Runnable task) {
+        this(asyncOf(task));
+    }
+
+    public CooperativeHandler(Consumer<Runnable> begin) {
+        this.begin = requireNonNull(begin);
     }
 
     /*
-     * Causes the task supplied to the constructor to run. The task may be run
-     * by this thread as well as by any other that has invoked this method.
+     * Runs the task (though maybe by a different party).
      *
      * The recursion which is possible here will have the maximum depth of 1:
      *
-     *     task.run()
-     *         this.startOrContinue()
-     *             task.run()
+     *     this.handle()
+     *         begin.accept()
+     *             this.handle()
      */
-    void startOrContinue() {
-        long s;
+    public void handle() {
         while (true) {
-            s = state.get();
-            if (s == OFF && state.compareAndSet(OFF, ON)) {
-                // No one is running the task, we are going to run it
-                break;
-            }
-            if (s == ON && state.compareAndSet(ON, CONTINUE)) {
-                // Some other thread is running the task. We have managed to
-                // update the state, it will be surely noticed by that thread.
+            int s = state.get();
+            if (s == END) {
+                if (state.compareAndSet(END, BEGIN)) {
+                    break;
+                }
+            } else if ((s & BEGIN) != 0) {
+                // Tries to change the state to AGAIN, preserving OFFLOAD bit
+                if (state.compareAndSet(s, AGAIN | (s & OFFLOAD))) {
+                    return;
+                }
+            } else if ((s & AGAIN) != 0 || s == STOP) {
                 return;
-            }
-            if (s == CONTINUE || s == STOP) {
-                return;
+            } else {
+                throw new InternalError(String.valueOf(s));
             }
         }
+        begin.accept(this::tryEnd);
+    }
+
+    private void tryEnd() {
         while (true) {
-            task.run();
-            // State checks are ordered by the probability of expected values
-            // (it might be different in different usage patterns, say, when
-            // invocations to `startOrContinue()` are concurrent)
-            if (state.compareAndSet(ON, OFF)) {
-                break; // The state hasn't changed, all done
+            int s;
+            while (((s = state.get()) & OFFLOAD) != 0) {
+                // Tries to offload ending of the task to the parent
+                if (state.compareAndSet(s, s & ~OFFLOAD)) {
+                    return;
+                }
             }
-            if (state.compareAndSet(CONTINUE, ON)) {
-                continue;
+            while (true) {
+                if (s == BEGIN) {
+                    if (state.compareAndSet(BEGIN, END)) {
+                        return;
+                    }
+                } else if (s == AGAIN) {
+                    if (state.compareAndSet(AGAIN, BEGIN | OFFLOAD)) {
+                        break;
+                    }
+                } else if (s == STOP) {
+                    return;
+                } else {
+                    throw new InternalError(String.valueOf(s));
+                }
+                s = state.get();
             }
-            // Other threads can change the state from CONTINUE to STOP only
-            // So if it's not ON and not CONTINUE, it can only be STOP
-            break;
+            begin.accept(this::tryEnd);
         }
     }
 
-    void stop() {
+    /*
+     * Checks whether or not this handler has been permanently stopped.
+     *
+     * Should be used from inside the task to poll the status of the handler,
+     * pretty much the same way as it is done for threads:
+     *
+     *     if (!Thread.currentThread().isInterrupted()) {
+     *         ...
+     *     }
+     */
+    public boolean isStopped() {
+        return state.get() == STOP;
+    }
+
+    /*
+     * Signals this handler to ignore subsequent invocations to `handle()`.
+     *
+     * If the task has already begun, this invocation will not affect it,
+     * unless the task itself uses `isStopped()` method to check the state
+     * of the handler.
+     */
+    public void stop() {
         state.set(STOP);
     }
+
+    private static Consumer<Runnable> asyncOf(Runnable task) {
+        requireNonNull(task);
+        return ender -> {
+            task.run();
+            ender.run();
+        };
+    }
 }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Frame.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -25,6 +25,8 @@
 
 package jdk.incubator.http.internal.websocket;
 
+import jdk.internal.vm.annotation.Stable;
+
 import java.nio.ByteBuffer;
 
 import static jdk.incubator.http.internal.common.Utils.dump;
@@ -58,6 +60,7 @@
         CONTROL_0xE    (0xE),
         CONTROL_0xF    (0xF);
 
+        @Stable
         private static final Opcode[] opcodes;
 
         static {
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/FrameConsumer.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -38,7 +38,7 @@
 import static java.util.Objects.requireNonNull;
 import static jdk.incubator.http.internal.common.Utils.dump;
 import static jdk.incubator.http.internal.websocket.StatusCodes.NO_STATUS_CODE;
-import static jdk.incubator.http.internal.websocket.StatusCodes.checkIncomingCode;
+import static jdk.incubator.http.internal.websocket.StatusCodes.isLegalToReceiveFromServer;
 
 /*
  * Consumes frame parts and notifies a message consumer, when there is
@@ -212,20 +212,20 @@
         }
         switch (opcode) {
             case CLOSE:
-                int statusCode = NO_STATUS_CODE;
+                char statusCode = NO_STATUS_CODE;
                 String reason = "";
                 if (payloadLen != 0) {
                     int len = binaryData.remaining();
                     assert 2 <= len && len <= 125 : dump(len, payloadLen);
+                    statusCode = binaryData.getChar();
+                    if (!isLegalToReceiveFromServer(statusCode)) {
+                        throw new FailWebSocketException(
+                                "Illegal status code: " + statusCode);
+                    }
                     try {
-                        statusCode = checkIncomingCode(binaryData.getChar());
                         reason = UTF_8.newDecoder().decode(binaryData).toString();
-                    } catch (CheckFailedException e) {
-                        throw new FailWebSocketException("Incorrect status code")
-                                .initCause(e);
                     } catch (CharacterCodingException e) {
-                        throw new FailWebSocketException(
-                                "Close reason is a malformed UTF-8 sequence")
+                        throw new FailWebSocketException("Illegal close reason")
                                 .initCause(e);
                     }
                 }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OpeningHandshake.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -37,6 +37,8 @@
 import jdk.incubator.http.HttpResponse;
 import jdk.incubator.http.HttpResponse.BodyHandler;
 import jdk.incubator.http.WebSocketHandshakeException;
+import jdk.incubator.http.internal.common.Pair;
+
 import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
@@ -66,7 +68,6 @@
     private static final String HEADER_KEY        = "Sec-WebSocket-Key";
     private static final String HEADER_PROTOCOL   = "Sec-WebSocket-Protocol";
     private static final String HEADER_VERSION    = "Sec-WebSocket-Version";
-    private static final String VALUE_VERSION     = "13"; // WebSocket's lucky number
 
     private static final Set<String> FORBIDDEN_HEADERS;
 
@@ -106,12 +107,18 @@
         if (connectTimeout != null) {
             requestBuilder.timeout(connectTimeout);
         }
+        for (Pair<String, String> p : b.getHeaders()) {
+            if (FORBIDDEN_HEADERS.contains(p.first)) {
+                throw illegal("Illegal header: " + p.first);
+            }
+            requestBuilder.header(p.first, p.second);
+        }
         this.subprotocols = createRequestSubprotocols(b.getSubprotocols());
         if (!this.subprotocols.isEmpty()) {
             String p = this.subprotocols.stream().collect(Collectors.joining(", "));
             requestBuilder.header(HEADER_PROTOCOL, p);
         }
-        requestBuilder.header(HEADER_VERSION, VALUE_VERSION);
+        requestBuilder.header(HEADER_VERSION, "13"); // WebSocket's lucky number
         this.nonce = createNonce();
         requestBuilder.header(HEADER_KEY, this.nonce);
         // Setting request version to HTTP/1.1 forcibly, since it's not possible
@@ -133,11 +140,7 @@
             if (s.trim().isEmpty() || !isValidName(s)) {
                 throw illegal("Bad subprotocol syntax: " + s);
             }
-            if (FORBIDDEN_HEADERS.contains(s)) {
-                throw illegal("Forbidden header: " + s);
-            }
-            boolean unique = sp.add(s);
-            if (!unique) {
+            if (!sp.add(s)) {
                 throw illegal("Duplicating subprotocol: " + s);
             }
         }
@@ -176,7 +179,7 @@
 
     CompletableFuture<Result> send() {
         return client.sendAsync(this.request, BodyHandler.<Void>discard(null))
-                     .thenCompose(this::resultFrom);
+                .thenCompose(this::resultFrom);
     }
 
     /*
@@ -283,7 +286,6 @@
 
     private static String requireSingle(HttpHeaders responseHeaders,
                                         String headerName)
-            throws CheckFailedException
     {
         List<String> values = responseHeaders.allValues(headerName);
         if (values.isEmpty()) {
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/OutgoingMessage.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -60,6 +60,7 @@
  */
 abstract class OutgoingMessage {
 
+    // Share per WebSocket?
     private static final SecureRandom maskingKeys = new SecureRandom();
 
     protected ByteBuffer[] frame;
@@ -71,6 +72,8 @@
      * convenient moment (up to the point where sentTo is invoked).
      */
     protected void contextualize(Context context) {
+        // masking and charset decoding should be performed here rather than in
+        // the constructor (as of today)
         if (context.isCloseSent()) {
             throw new IllegalStateException("Close sent");
         }
@@ -101,7 +104,7 @@
         private final boolean isLast;
 
         Text(CharSequence characters, boolean isLast) {
-            CharsetEncoder encoder = UTF_8.newEncoder();
+            CharsetEncoder encoder = UTF_8.newEncoder(); // Share per WebSocket?
             try {
                 payload = encoder.encode(CharBuffer.wrap(characters));
             } catch (CharacterCodingException e) {
@@ -172,11 +175,11 @@
 
         Close(int statusCode, CharSequence reason) {
             ByteBuffer payload = ByteBuffer.allocate(125)
-                                           .putChar((char) statusCode);
+                    .putChar((char) statusCode);
             CoderResult result = UTF_8.newEncoder()
-                                      .encode(CharBuffer.wrap(reason),
-                                              payload,
-                                              true);
+                    .encode(CharBuffer.wrap(reason),
+                            payload,
+                            true);
             if (result.isOverflow()) {
                 throw new IllegalArgumentException("Long reason");
             } else if (result.isError()) {
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -58,8 +58,8 @@
     private final Frame.Reader reader = new Frame.Reader();
     private final RawChannel.RawEvent event = createHandler();
     private final AtomicLong demand = new AtomicLong();
-    private final CooperativeHandler receiveHandler =
-              new CooperativeHandler(this::tryDeliver);
+    private final CooperativeHandler handler =
+              new CooperativeHandler(this::pushContinuously);
     /*
      * Used to ensure registering the channel event at most once (i.e. to avoid
      * multiple registrations).
@@ -72,8 +72,8 @@
         this.channel = channel;
         this.data = channel.initialByteBuffer();
         this.frameConsumer = new FrameConsumer(this.messageConsumer);
-        // To ensure the initial `data` will be read correctly (happens-before)
-        // after readable.get()
+        // To ensure the initial non-final `data` will be read correctly
+        // (happens-before) by reader after executing readable.get()
         readable.set(true);
     }
 
@@ -88,7 +88,7 @@
             @Override
             public void handle() {
                 readable.set(true);
-                receiveHandler.startOrContinue();
+                handler.handle();
             }
         };
     }
@@ -98,7 +98,7 @@
             throw new IllegalArgumentException("Negative: " + n);
         }
         demand.accumulateAndGet(n, (p, i) -> p + i < 0 ? Long.MAX_VALUE : p + i);
-        receiveHandler.startOrContinue();
+        handler.handle();
     }
 
     void acknowledge() {
@@ -113,41 +113,21 @@
      * regardless of the current demand.
      */
     void close() {
-        receiveHandler.stop();
+        handler.stop();
     }
 
-    private void tryDeliver() {
-        if (readable.get() && demand.get() > 0) {
-            deliverAtMostOne();
+    private void pushContinuously() {
+        while (readable.get() && demand.get() > 0 && !handler.isStopped()) {
+            pushOnce();
         }
     }
 
-    private void deliverAtMostOne() {
-        if (data == null) {
-            try {
-                data = channel.read();
-            } catch (IOException e) {
-                readable.set(false);
-                messageConsumer.onError(e);
-                return;
-            }
-            if (data == null || !data.hasRemaining()) {
-                readable.set(false);
-                if (!data.hasRemaining()) {
-                    try {
-                        channel.registerEvent(event);
-                    } catch (IOException e) {
-                        messageConsumer.onError(e);
-                        return;
-                    }
-                } else if (data == null) {
-                    messageConsumer.onComplete();
-                }
-                return;
-            }
+    private void pushOnce() {
+        if (data == null && !readData()) {
+            return;
         }
         try {
-            reader.readFrame(data, frameConsumer);
+            reader.readFrame(data, frameConsumer); // Pushing frame parts to the consumer
         } catch (FailWebSocketException e) {
             messageConsumer.onError(e);
             return;
@@ -156,4 +136,28 @@
             data = null;
         }
     }
+
+    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/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/StatusCodes.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,120 +25,72 @@
 
 package jdk.incubator.http.internal.websocket;
 
-import static jdk.incubator.http.WebSocket.CLOSED_ABNORMALLY;
-
 /*
- * Utilities and common constants for WebSocket status codes. For more details
- * on status codes and their meaning see:
+ * Utilities for WebSocket status codes.
  *
  *     1. https://tools.ietf.org/html/rfc6455#section-7.4
  *     2. http://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number
  */
 final class StatusCodes {
 
-    static final int PROTOCOL_ERROR        = 1002;
-    static final int CANNOT_ACCEPT         = 1003;
-    static final int NO_STATUS_CODE        = 1005;
-    static final int NOT_CONSISTENT        = 1007;
-    static final int TOO_BIG               = 1009;
-    static final int NO_EXTENSION          = 1010;
-    static final int SERVICE_RESTART       = 1012;
-    static final int TRY_AGAIN_LATER       = 1013;
-    static final int TLS_HANDSHAKE_FAILURE = 1015;
+    static final int PROTOCOL_ERROR    = 1002;
+    static final int NO_STATUS_CODE    = 1005;
+    static final int CLOSED_ABNORMALLY = 1006;
+    static final int NOT_CONSISTENT    = 1007;
 
     private StatusCodes() { }
 
-    /*
-     * Returns the given code if it doesn't violate any rules for outgoing
-     * codes, otherwise throws a CFE with a detailed description.
-     */
-    static int checkOutgoingCode(int code) {
-        checkCommon(code);
-        if (code > 4999) {
-            throw new CheckFailedException("Unspecified: " + code);
-        }
-        if (isNotUserSettable(code)) {
-            throw new CheckFailedException("Cannot set: " + code);
-        }
-        return code;
-    }
-
-    /*
-     * Returns the given code if it doesn't violate any rules for incoming
-     * codes, otherwise throws a CFE with a detailed description.
-     */
-    static int checkIncomingCode(int code) {
-        checkCommon(code);
-        if (code == NO_EXTENSION) {
-            throw new CheckFailedException("Bad server code: " + code);
+    static boolean isLegalToSendFromClient(int code) {
+        if (!isLegal(code)) {
+            return false;
         }
-        return code;
-    }
-
-    private static int checkCommon(int code) {
-        if (isOutOfRange(code)) {
-            throw new CheckFailedException("Out of range: " + code);
-        }
-        if (isForbidden(code)) {
-            throw new CheckFailedException("Forbidden: " + code);
+        // Codes from unreserved range
+        if (code > 4999) {
+            return false;
         }
-        if (isUnassigned(code)) {
-            throw new CheckFailedException("Unassigned: " + code);
-        }
-        return code;
-    }
-
-    /*
-     * Returns true if the given code cannot be set by a user of the WebSocket
-     * API. e.g. this code means something which only a WebSocket implementation
-     * is responsible for or it doesn't make sense to be send by a WebSocket
-     * client.
-     */
-    private static boolean isNotUserSettable(int code) {
+        // Codes below are not allowed to be sent using a WebSocket client API
         switch (code) {
             case PROTOCOL_ERROR:
-            case CANNOT_ACCEPT:
             case NOT_CONSISTENT:
-            case TOO_BIG:
-            case NO_EXTENSION:
-            case TRY_AGAIN_LATER:
-            case SERVICE_RESTART:
+            case 1003:
+            case 1009:
+            case 1010:
+            case 1012:  // code sent by servers
+            case 1013:  // code sent by servers
+            case 1014:  // code sent by servers
+                return false;
+            default:
                 return true;
-            default:
-                return false;
         }
     }
 
-    /*
-     * Returns true if the given code cannot appear on the wire. It's always an
-     * error to send a frame with such a code or to receive one.
-     */
-    private static boolean isForbidden(int code) {
+    static boolean isLegalToReceiveFromServer(int code) {
+        if (!isLegal(code)) {
+            return false;
+        }
+        return code != 1010;  // code sent by clients
+    }
+
+    private static boolean isLegal(int code) {
+        // 2-byte unsigned integer excluding first 1000 numbers from the range
+        // [0, 999] which are never used
+        if (code < 1000 || code > 65535) {
+            return false;
+        }
+        // Codes from the range below has no known meaning under the WebSocket
+        // specification (i.e. unassigned/undefined)
+        if ((code >= 1016 && code <= 2999) || code == 1004) {
+            return false;
+        }
+        // Codes below cannot appear on the wire. It's always an error either
+        // to send a frame with such a code or to receive one.
         switch (code) {
             case NO_STATUS_CODE:
             case CLOSED_ABNORMALLY:
-            case TLS_HANDSHAKE_FAILURE:
+            case 1015:
+                return false;
+            default:
                 return true;
-            default:
-                return false;
         }
     }
-
-    /*
-     * Returns true if the given code has no known meaning under the WebSocket
-     * specification (i.e. unassigned/undefined).
-     */
-    private static boolean isUnassigned(int code) {
-        return (code >= 1016 && code <= 2999) || code == 1004 || code == 1014;
-    }
-
-    /*
-     * Returns true if the given code is not in domain of status codes:
-     *
-     * 2-byte unsigned integer minus first 1000 numbers from the range [0, 999]
-     * that are never used.
-     */
-    private static boolean isOutOfRange(int code) {
-        return code < 1000 || code > 65535;
-    }
 }
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Transmitter.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -37,11 +37,12 @@
  *
  * No matter whether the message has been fully sent or an error has occurred,
  * the transmitter reports the outcome to the supplied handler and becomes ready
- * to accept a new message. Until then, it is considered "busy" and an
- * IllegalStateException will be thrown on each attempt to invoke send.
+ * to accept a new message. Until then, the transmitter is considered "busy" and
+ * an IllegalStateException will be thrown on each attempt to invoke send.
  */
 final class Transmitter {
 
+    /* This flag is used solely for assertions */
     private final AtomicBoolean busy = new AtomicBoolean();
     private OutgoingMessage message;
     private Consumer<Exception> completionHandler;
@@ -53,9 +54,10 @@
         this.event = createHandler();
     }
 
-    /*
-     * The supplied handler may be invoked in the calling thread, so watch out
-     * for stack overflow.
+    /**
+     * The supplied handler may be invoked in the calling thread.
+     * A {@code StackOverflowError} may thus occur if there's a possibility
+     * that this method is called again by the supplied handler.
      */
     void send(OutgoingMessage message, Consumer<Exception> completionHandler) {
         requireNonNull(message);
@@ -86,8 +88,9 @@
     private void send0(OutgoingMessage message, Consumer<Exception> handler) {
         boolean b = busy.get();
         assert b; // Please don't inline this, as busy.get() has memory
-                  // visibility effects and we don't want the correctness
-                  // of the algorithm to depend on assertions flag
+                  // visibility effects and we don't want the program behaviour
+                  // to depend on whether the assertions are turned on
+                  // or turned off
         try {
             boolean sent = message.sendTo(channel);
             if (sent) {
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -51,9 +51,9 @@
 import static java.util.Objects.requireNonNull;
 import static java.util.concurrent.CompletableFuture.failedFuture;
 import static jdk.incubator.http.internal.common.Pair.pair;
+import static jdk.incubator.http.internal.websocket.StatusCodes.CLOSED_ABNORMALLY;
 import static jdk.incubator.http.internal.websocket.StatusCodes.NO_STATUS_CODE;
-import static jdk.incubator.http.internal.websocket.StatusCodes.TLS_HANDSHAKE_FAILURE;
-import static jdk.incubator.http.internal.websocket.StatusCodes.checkOutgoingCode;
+import static jdk.incubator.http.internal.websocket.StatusCodes.isLegalToSendFromClient;
 
 /*
  * A WebSocket client.
@@ -74,8 +74,8 @@
     private final AtomicBoolean outstandingSend = new AtomicBoolean();
     private final CooperativeHandler sendHandler =
               new CooperativeHandler(this::sendFirst);
-    private final Queue<Pair<OutgoingMessage, Consumer<Exception>>> queue =
-              new ConcurrentLinkedQueue<>();
+    private final Queue<Pair<OutgoingMessage, CompletableFuture<WebSocket>>>
+            queue = new ConcurrentLinkedQueue<>();
     private final Context context = new OutgoingMessage.Context();
     private final Transmitter transmitter;
     private final Receiver receiver;
@@ -110,6 +110,9 @@
                                                  r.subprotocol,
                                                  r.channel,
                                                  b.getListener());
+            // The order of calls might cause a subtle effects, like CF will be
+            // returned from the buildAsync _after_ onOpen has been signalled.
+            // This means if onOpen is lengthy, it might cause some problems.
             ws.signalOpen();
             return ws;
         };
@@ -125,7 +128,8 @@
     WebSocketImpl(URI uri,
                   String subprotocol,
                   RawChannel channel,
-                  Listener listener) {
+                  Listener listener)
+    {
         this.uri = requireNonNull(uri);
         this.subprotocol = requireNonNull(subprotocol);
         this.channel = requireNonNull(channel);
@@ -182,15 +186,17 @@
      * Processes a Close event that came from the channel. Invoked at most once.
      */
     private void processClose(int statusCode, String reason) {
-        assert statusCode != TLS_HANDSHAKE_FAILURE; // TLS problems happen long before WebSocket is alive
         receiver.close();
         try {
             channel.shutdownInput();
         } catch (IOException e) {
             Log.logError(e);
         }
-        boolean wasComplete = !closeReceived.complete(null);
-        if (wasComplete) {
+        boolean alreadyCompleted = !closeReceived.complete(null);
+        if (alreadyCompleted) {
+            // This CF is supposed to be completed only once, the first time a
+            // Close message is received. No further messages are pulled from
+            // the socket.
             throw new InternalError();
         }
         int code;
@@ -261,19 +267,17 @@
     @Override
     public CompletableFuture<WebSocket> sendClose(int statusCode,
                                                   String reason) {
-        try {
-            checkOutgoingCode(statusCode);
-        } catch (CheckFailedException e) {
-            IllegalArgumentException ex = new IllegalArgumentException(
-                    "Bad status code: " + statusCode, e);
-            failedFuture(ex);
+        if (!isLegalToSendFromClient(statusCode)) {
+            return failedFuture(
+                    new IllegalArgumentException("statusCode: " + statusCode));
         }
-        return enqueueClose(new Close(statusCode, reason));
-    }
-
-    @Override
-    public CompletableFuture<WebSocket> sendClose() {
-        return enqueueClose(new Close());
+        Close msg;
+        try {
+            msg = new Close(statusCode, reason);
+        } catch (IllegalArgumentException e) {
+            return failedFuture(e);
+        }
+        return enqueueClose(msg);
     }
 
     /*
@@ -288,8 +292,8 @@
             } catch (IOException e) {
                 Log.logError(e);
             }
-            boolean wasComplete = !closeSent.complete(null);
-            if (wasComplete) {
+            boolean alreadyCompleted = !closeSent.complete(null);
+            if (alreadyCompleted) {
                 // Shouldn't happen as this callback must run at most once
                 throw new InternalError();
             }
@@ -316,40 +320,41 @@
 
     private CompletableFuture<WebSocket> enqueue(OutgoingMessage m) {
         CompletableFuture<WebSocket> cf = new CompletableFuture<>();
-        Consumer<Exception> h = e -> {
-            if (e == null) {
-                cf.complete(WebSocketImpl.this);
-                sendHandler.startOrContinue();
-            } else {
-
-//                what if this is not a users message? (must be different entry points for different messages)
-
-                // TODO: think about correct behaviour in the face of error in
-                // the queue, for now it seems like the best solution is to
-                // deliver the error and stop
-                cf.completeExceptionally(e);
-            }
-        };
-        queue.add(pair(m, h)); // Always returns true
-        sendHandler.startOrContinue();
+        boolean added = queue.add(pair(m, cf));
+        if (!added) {
+            // The queue is supposed to be unbounded
+            throw new InternalError();
+        }
+        sendHandler.handle();
         return cf;
     }
 
-    private void sendFirst() {
-        Pair<OutgoingMessage, Consumer<Exception>> p = queue.poll();
+    /*
+     * This is the main sending method. It may be run in different threads,
+     * but never concurrently.
+     */
+    private void sendFirst(Runnable whenSent) {
+        Pair<OutgoingMessage, CompletableFuture<WebSocket>> p = queue.poll();
         if (p == null) {
+            whenSent.run();
             return;
         }
         OutgoingMessage message = p.first;
-        Consumer<Exception> h = p.second;
+        CompletableFuture<WebSocket> cf = p.second;
         try {
-            // At this point messages are finally ordered and will be written
-            // one by one in a mutually exclusive fashion; thus it's a pretty
-            // convenient place to contextualize them
             message.contextualize(context);
+            Consumer<Exception> h = e -> {
+                if (e == null) {
+                    cf.complete(WebSocketImpl.this);
+                } else {
+                    cf.completeExceptionally(e);
+                }
+                sendHandler.handle();
+                whenSent.run();
+            };
             transmitter.send(message, h);
         } catch (Exception t) {
-            h.accept(t);
+            cf.completeExceptionally(t);
         }
     }
 
@@ -381,7 +386,7 @@
     @Override
     public String toString() {
         return super.toString()
-                + "[" + (closed.get() ? "OPEN" : "CLOSED") + "]: " + uri
+                + "[" + (closed.get() ? "CLOSED" : "OPEN") + "]: " + uri
                 + (!subprotocol.isEmpty() ? ", subprotocol=" + subprotocol : "");
     }
 
@@ -476,7 +481,9 @@
                     int code = ((FailWebSocketException) error).getStatusCode();
                     enqueueClose(new Close(code, ""))
                             .whenComplete((r, e) -> {
-                                ex.addSuppressed(e);
+                                if (e != null) {
+                                    ex.addSuppressed(e);
+                                }
                                 try {
                                     channel.close();
                                 } catch (IOException e1) {
--- a/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jartool/share/classes/jdk/security/jarsigner/JarSigner.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -172,7 +172,7 @@
          *
          * @param algorithm the standard name of the algorithm. See
          *      the {@code MessageDigest} section in the <a href=
-         *      "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
+         *      "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
          *      Java Cryptography Architecture Standard Algorithm Name
          *      Documentation</a> for information about standard algorithm names.
          * @return the {@code JarSigner.Builder} itself.
@@ -192,7 +192,7 @@
          *
          * @param algorithm the standard name of the algorithm. See
          *      the {@code MessageDigest} section in the <a href=
-         *      "{@docRoot}/../technotes/guides/security/StandardNames.html#MessageDigest">
+         *      "{@docRoot}/../specs/security/standard-names.html#messagedigest-algorithms">
          *      Java Cryptography Architecture Standard Algorithm Name
          *      Documentation</a> for information about standard algorithm names.
          * @param provider the provider.
@@ -218,7 +218,7 @@
          *
          * @param algorithm the standard name of the algorithm. See
          *      the {@code Signature} section in the <a href=
-         *      "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
+         *      "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
          *      Java Cryptography Architecture Standard Algorithm Name
          *      Documentation</a> for information about standard algorithm names.
          * @return the {@code JarSigner.Builder} itself.
@@ -245,7 +245,7 @@
          *
          * @param algorithm the standard name of the algorithm. See
          *      the {@code Signature} section in the <a href=
-         *      "{@docRoot}/../technotes/guides/security/StandardNames.html#Signature">
+         *      "{@docRoot}/../specs/security/standard-names.html#signature-algorithms">
          *      Java Cryptography Architecture Standard Algorithm Name
          *      Documentation</a> for information about standard algorithm names.
          * @param provider  the provider.
--- a/src/jdk.jartool/share/classes/sun/tools/jar/Main.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -71,6 +71,7 @@
 import static java.util.jar.JarFile.MANIFEST_NAME;
 import static java.util.stream.Collectors.joining;
 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+import static sun.tools.jar.Validator.ENTRYNAME_COMPARATOR;
 
 /**
  * This class implements a simple utility for creating files in the JAR
@@ -132,6 +133,10 @@
     // if --release option found followed by at least file
     boolean isMultiRelease;
 
+    // The last parsed --release value, if any. Used in conjunction with
+    // "-d,--describe-module" to select the operative module descriptor.
+    int releaseValue = -1;
+
     /*
      * cflag: create
      * uflag: update
@@ -413,7 +418,7 @@
                     }
                 } else {
                     try (FileInputStream fin = new FileInputStream(FileDescriptor.in)) {
-                        found = describeModule(fin);
+                        found = describeModuleFromStream(fin);
                     }
                 }
                 if (!found)
@@ -604,11 +609,6 @@
         /* parse file arguments */
         int n = args.length - count;
         if (n > 0) {
-            if (dflag) {
-                // "--describe-module/-d" does not require file argument(s)
-                usageError(formatMsg("error.bad.dflag", args[count]));
-                return false;
-            }
             int version = BASE_VERSION;
             int k = 0;
             String[] nameBuf = new String[n];
@@ -616,6 +616,12 @@
             try {
                 for (int i = count; i < args.length; i++) {
                     if (args[i].equals("-C")) {
+                        if (dflag) {
+                            // "--describe-module/-d" does not require file argument(s),
+                            // but does accept --release
+                            usageError(getMsg("error.bad.dflag"));
+                            return false;
+                        }
                         /* change the directory */
                         String dir = args[++i];
                         dir = (dir.endsWith(File.separator) ?
@@ -649,8 +655,15 @@
                         k = 0;
                         nameBuf = new String[n];
                         version = v;
+                        releaseValue = version;
                         pathsMap.put(version, new HashSet<>());
                     } else {
+                        if (dflag) {
+                            // "--describe-module/-d" does not require file argument(s),
+                            // but does accept --release
+                            usageError(getMsg("error.bad.dflag"));
+                            return false;
+                        }
                         nameBuf[k++] = args[i];
                     }
                 }
@@ -756,7 +769,7 @@
      * can be found by recursively descending directories.
      *
      * @param dir    parent directory
-     * @param file s list of files to expand
+     * @param files  list of files to expand
      * @param cpaths set of directories specified by -C option for the files
      * @throws IOException if an I/O error occurs
      */
@@ -1721,23 +1734,62 @@
 
     // Modular jar support
 
-    static <T> String toString(Collection<T> c,
-                               CharSequence prefix,
-                               CharSequence suffix ) {
-        if (c.isEmpty())
-            return "";
-        return c.stream().map(e -> e.toString())
-                           .collect(joining(", ", prefix, suffix));
+    /**
+     * Associates a module descriptor's zip entry name along with its
+     * bytes and an optional URI. Used when describing modules.
+     */
+    interface ModuleInfoEntry {
+       String name();
+       Optional<String> uriString();
+       InputStream bytes() throws IOException;
     }
 
+    static class ZipFileModuleInfoEntry implements ModuleInfoEntry {
+        private final ZipFile zipFile;
+        private final ZipEntry entry;
+        ZipFileModuleInfoEntry(ZipFile zipFile, ZipEntry entry) {
+            this.zipFile = zipFile;
+            this.entry = entry;
+        }
+        @Override public String name() { return entry.getName(); }
+        @Override public InputStream bytes() throws IOException {
+            return zipFile.getInputStream(entry);
+        }
+        /** Returns an optional containing the effective URI. */
+        @Override public Optional<String> uriString() {
+            String uri = (Paths.get(zipFile.getName())).toUri().toString();
+            uri = "jar:" + uri + "/!" + entry.getName();
+            return Optional.of(uri);
+        }
+    }
+
+    static class StreamedModuleInfoEntry implements ModuleInfoEntry {
+        private final String name;
+        private final byte[] bytes;
+        StreamedModuleInfoEntry(String name, byte[] bytes) {
+            this.name = name;
+            this.bytes = bytes;
+        }
+        @Override public String name() { return name; }
+        @Override public InputStream bytes() throws IOException {
+            return new ByteArrayInputStream(bytes);
+        }
+        /** Returns an empty optional. */
+        @Override public Optional<String> uriString() {
+            return Optional.empty();  // no URI can be derived
+        }
+    }
+
+    /** Describes a module from a given zip file. */
     private boolean describeModule(ZipFile zipFile) throws IOException {
-        ZipEntry[] zes = zipFile.stream()
-            .filter(e -> isModuleInfoEntry(e.getName()))
-            .sorted(Validator.ENTRY_COMPARATOR)
-            .toArray(ZipEntry[]::new);
+        ZipFileModuleInfoEntry[] infos = zipFile.stream()
+                .filter(e -> isModuleInfoEntry(e.getName()))
+                .sorted(Validator.ENTRY_COMPARATOR)
+                .map(e -> new ZipFileModuleInfoEntry(zipFile, e))
+                .toArray(ZipFileModuleInfoEntry[]::new);
 
-        if (zes.length == 0) {
-            // No module descriptor found, derive the automatic module name
+        if (infos.length == 0) {
+            // No module descriptor found, derive and describe the automatic module
             String fn = zipFile.getName();
             ModuleFinder mf = ModuleFinder.of(Paths.get(fn));
             try {
@@ -1747,8 +1799,8 @@
                     return true;
                 }
                 ModuleDescriptor md = mref.iterator().next().descriptor();
-                output(getMsg("out.automodule"));
-                describeModule(md, null, null, "automatic");
+                output(getMsg("out.automodule") + "\n");
+                describeModule(md, null, null, "");
             } catch (FindException e) {
                 String msg = formatMsg("error.unable.derive.automodule", fn);
                 Throwable t = e.getCause();
@@ -1757,46 +1809,117 @@
                 output(msg);
             }
         } else {
-            for (ZipEntry ze : zes) {
-                try (InputStream is = zipFile.getInputStream(ze)) {
-                    describeModule(is, ze.getName());
-                }
-            }
+            return describeModuleFromEntries(infos);
         }
         return true;
     }
 
-    private boolean describeModule(FileInputStream fis)
+    private boolean describeModuleFromStream(FileInputStream fis)
         throws IOException
     {
+        List<ModuleInfoEntry> infos = new LinkedList<>();
+
         try (BufferedInputStream bis = new BufferedInputStream(fis);
              ZipInputStream zis = new ZipInputStream(bis)) {
             ZipEntry e;
             while ((e = zis.getNextEntry()) != null) {
                 String ename = e.getName();
-                if (isModuleInfoEntry(ename)){
-                    moduleInfos.put(ename, zis.readAllBytes());
+                if (isModuleInfoEntry(ename)) {
+                    infos.add(new StreamedModuleInfoEntry(ename, zis.readAllBytes()));
                 }
             }
         }
-        if (moduleInfos.size() == 0)
+
+        if (infos.size() == 0)
             return false;
-        String[] names = moduleInfos.keySet().stream()
-            .sorted(Validator.ENTRYNAME_COMPARATOR)
-            .toArray(String[]::new);
-        for (String name : names) {
-            describeModule(new ByteArrayInputStream(moduleInfos.get(name)), name);
+
+        ModuleInfoEntry[] sorted = infos.stream()
+                .sorted(Comparator.comparing(ModuleInfoEntry::name, ENTRYNAME_COMPARATOR))
+                .toArray(ModuleInfoEntry[]::new);
+
+        return describeModuleFromEntries(sorted);
+    }
+
+    private boolean lessThanEqualReleaseValue(ModuleInfoEntry entry) {
+        return intVersionFromEntry(entry) <= releaseValue ? true : false;
+    }
+
+    private static String versionFromEntryName(String name) {
+        String s = name.substring(VERSIONS_DIR_LENGTH);
+        return s.substring(0, s.indexOf("/"));
+    }
+
+    private static int intVersionFromEntry(ModuleInfoEntry entry) {
+        String name = entry.name();
+        if (!name.startsWith(VERSIONS_DIR))
+            return BASE_VERSION;
+
+        String s = name.substring(VERSIONS_DIR_LENGTH);
+        s = s.substring(0, s.indexOf('/'));
+        return Integer.valueOf(s);
+    }
+
+    /**
+     * Describes a single module descriptor, determined by the specified
+     * --release, if any, from the given ordered entries.
+     * The given infos must be ordered as per ENTRY_COMPARATOR.
+     */
+    private boolean describeModuleFromEntries(ModuleInfoEntry[] infos)
+        throws IOException
+    {
+        assert infos.length > 0;
+
+        // Informative: output all non-root descriptors, if any
+        String releases = Arrays.stream(infos)
+                .filter(e -> !e.name().equals(MODULE_INFO))
+                .map(ModuleInfoEntry::name)
+                .map(Main::versionFromEntryName)
+                .collect(joining(" "));
+        if (!releases.equals(""))
+            output("releases: " + releases + "\n");
+
+        // Describe the operative descriptor for the specified --release, if any
+        if (releaseValue != -1) {
+            ModuleInfoEntry entry = null;
+            int i = 0;
+            while (i < infos.length && lessThanEqualReleaseValue(infos[i])) {
+                entry = infos[i];
+                i++;
+            }
+
+            if (entry == null) {
+                output(formatMsg("error.no.operative.descriptor",
+                                 String.valueOf(releaseValue)));
+                return false;
+            }
+
+            String uriString = entry.uriString().orElse("");
+            try (InputStream is = entry.bytes()) {
+                describeModule(is, uriString);
+            }
+        } else {
+            // no specific --release specified, output the root, if any
+            if (infos[0].name().equals(MODULE_INFO)) {
+                String uriString = infos[0].uriString().orElse("");
+                try (InputStream is = infos[0].bytes()) {
+                    describeModule(is, uriString);
+                }
+            } else {
+                // no root, output message to specify --release
+                output(getMsg("error.no.root.descriptor"));
+            }
         }
         return true;
     }
 
     static <T> String toString(Collection<T> set) {
         if (set.isEmpty()) { return ""; }
-        return set.stream().map(e -> e.toString().toLowerCase(Locale.ROOT))
-                  .collect(joining(" "));
+        return " " + set.stream().map(e -> e.toString().toLowerCase(Locale.ROOT))
+                  .sorted().collect(joining(" "));
     }
 
-    private void describeModule(InputStream entryInputStream, String ename)
+
+    private void describeModule(InputStream entryInputStream, String uriString)
         throws IOException
     {
         ModuleInfo.Attributes attrs = ModuleInfo.read(entryInputStream, null);
@@ -1804,71 +1927,94 @@
         ModuleTarget target = attrs.target();
         ModuleHashes hashes = attrs.recordedHashes();
 
-        describeModule(md, target, hashes, ename);
+        describeModule(md, target, hashes, uriString);
     }
 
     private void describeModule(ModuleDescriptor md,
                                 ModuleTarget target,
                                 ModuleHashes hashes,
-                                String ename)
+                                String uriString)
         throws IOException
     {
         StringBuilder sb = new StringBuilder();
-        sb.append("\nmodule ")
-          .append(md.toNameAndVersion())
-          .append(" (").append(ename).append(")");
+
+        sb.append(md.toNameAndVersion());
+
+        if (!uriString.equals(""))
+            sb.append(" ").append(uriString);
+        if (md.isOpen())
+            sb.append(" open");
+        if (md.isAutomatic())
+            sb.append(" automatic");
+        sb.append("\n");
 
-        if (md.isOpen())
-            sb.append("\n  open ");
+        // unqualified exports (sorted by package)
+        md.exports().stream()
+                .sorted(Comparator.comparing(Exports::source))
+                .filter(e -> !e.isQualified())
+                .forEach(e -> sb.append("exports ").append(e.source())
+                                .append(toString(e.modifiers())).append("\n"));
+
+        // dependences
+        md.requires().stream().sorted()
+                .forEach(r -> sb.append("requires ").append(r.name())
+                                .append(toString(r.modifiers())).append("\n"));
 
-        md.requires().stream()
-            .sorted(Comparator.comparing(Requires::name))
-            .forEach(r -> {
-                sb.append("\n  requires ");
-                if (!r.modifiers().isEmpty())
-                    sb.append(toString(r.modifiers())).append(" ");
-                sb.append(r.name());
-            });
+        // service use and provides
+        md.uses().stream().sorted()
+                .forEach(s -> sb.append("uses ").append(s).append("\n"));
+
+        md.provides().stream()
+                .sorted(Comparator.comparing(Provides::service))
+                .forEach(p -> sb.append("provides ").append(p.service())
+                                .append(" with")
+                                .append(toString(p.providers()))
+                                .append("\n"));
 
-        md.uses().stream().sorted()
-            .forEach(p -> sb.append("\n  uses ").append(p));
+        // qualified exports
+        md.exports().stream()
+                .sorted(Comparator.comparing(Exports::source))
+                .filter(Exports::isQualified)
+                .forEach(e -> sb.append("qualified exports ").append(e.source())
+                                .append(" to").append(toString(e.targets()))
+                                .append("\n"));
 
-        md.exports().stream()
-            .sorted(Comparator.comparing(Exports::source))
-            .forEach(p -> sb.append("\n  exports ").append(p));
+        // open packages
+        md.opens().stream()
+                .sorted(Comparator.comparing(Opens::source))
+                .filter(o -> !o.isQualified())
+                .forEach(o -> sb.append("opens ").append(o.source())
+                                 .append(toString(o.modifiers()))
+                                 .append("\n"));
 
         md.opens().stream()
-            .sorted(Comparator.comparing(Opens::source))
-            .forEach(p -> sb.append("\n  opens ").append(p));
+                .sorted(Comparator.comparing(Opens::source))
+                .filter(Opens::isQualified)
+                .forEach(o -> sb.append("qualified opens ").append(o.source())
+                                 .append(toString(o.modifiers()))
+                                 .append(" to").append(toString(o.targets()))
+                                 .append("\n"));
 
-        Set<String> concealed = new HashSet<>(md.packages());
+        // non-exported/non-open packages
+        Set<String> concealed = new TreeSet<>(md.packages());
         md.exports().stream().map(Exports::source).forEach(concealed::remove);
         md.opens().stream().map(Opens::source).forEach(concealed::remove);
-        concealed.stream().sorted()
-            .forEach(p -> sb.append("\n  contains ").append(p));
+        concealed.forEach(p -> sb.append("contains ").append(p).append("\n"));
 
-        md.provides().stream()
-            .sorted(Comparator.comparing(Provides::service))
-            .forEach(p -> sb.append("\n  provides ").append(p.service())
-                            .append(" with ")
-                            .append(toString(p.providers())));
-
-        md.mainClass().ifPresent(v -> sb.append("\n  main-class " + v));
+        md.mainClass().ifPresent(v -> sb.append("main-class ").append(v).append("\n"));
 
         if (target != null) {
-            String osName = target.osName();
-            if (osName != null)
-                sb.append("\n  operating-system-name " + osName);
-            String osArch = target.osArch();
-            if (osArch != null)
-                sb.append("\n  operating-system-architecture " + osArch);
+            String targetPlatform = target.targetPlatform();
+            if (!targetPlatform.isEmpty())
+                sb.append("platform ").append(targetPlatform).append("\n");
        }
 
        if (hashes != null) {
            hashes.names().stream().sorted().forEach(
-                   mod -> sb.append("\n  hashes ").append(mod).append(" ")
+                   mod -> sb.append("hashes ").append(mod).append(" ")
                             .append(hashes.algorithm()).append(" ")
-                            .append(toHex(hashes.hashFor(mod))));
+                            .append(toHex(hashes.hashFor(mod)))
+                            .append("\n"));
         }
 
         output(sb.toString());
--- a/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/Validator.java	Fri May 12 10:43:28 2017 -0700
@@ -116,7 +116,7 @@
             // version number strings need to be sorted numerically
             n = VERSIONS_DIR.length();   // skip the common prefix
             int i1 = s1.indexOf('/', n);
-            int i2 = s1.indexOf('/', n);
+            int i2 = s2.indexOf('/', n);
             if (i1 == -1) throw new InvalidJarException(s1);
             if (i2 == -1) throw new InvalidJarException(s2);
             // shorter version numbers go first
--- a/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties	Fri May 12 10:43:28 2017 -0700
@@ -45,7 +45,7 @@
 	'e' flag and manifest with the 'Main-Class' attribute cannot be specified \n\
 	 together!
 error.bad.dflag=\
-        '-d, --describe-module' option requires no input file(s) to be specified: {0}
+        '-d, --describe-module' option requires no input file(s) to be specified
 error.bad.reason=\
         bad reason: {0}, must be one of deprecated, deprecated-for-removal, or incubating
 error.nosuch.fileordir=\
@@ -62,6 +62,10 @@
         Hashing module {0} dependences, unable to find module {1} on module path
 error.module.options.without.info=\
         One of --module-version or --hash-modules without module-info.class
+error.no.operative.descriptor=\
+        No operative descriptor for release: {0}
+error.no.root.descriptor=\
+        No root module descriptor, specify --release
 error.unable.derive.automodule=\
         Unable to derive module descriptor for: {0}
 error.unexpected.module-info=\
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/ClassType.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -217,9 +217,6 @@
      * a member of this class or a superclass, if the size of the argument list
      * does not match the number of declared arguments for the method, or
      * if the method is an initializer, constructor or static intializer.
-     * @throws {@link InvalidTypeException} if any argument in the
-     * argument list is not assignable to the corresponding method argument
-     * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
      * through the appropriate class loader.
      * @throws IncompatibleThreadStateException if the specified thread has not
@@ -322,9 +319,6 @@
      * a member of this class, if the size of the argument list
      * does not match the number of declared arguments for the constructor,
      * or if the method is not a constructor.
-     * @throws {@link InvalidTypeException} if any argument in the
-     * argument list is not assignable to the corresponding method argument
-     * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
      * through the appropriate class loader.
      * @throws IncompatibleThreadStateException if the specified thread has not
--- a/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/InterfaceType.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -168,9 +168,6 @@
      * a member of this interface, if the size of the argument list
      * does not match the number of declared arguments for the method, or
      * if the method is not static or is a static initializer.
-     * @throws {@link InvalidTypeException} if any argument in the
-     * argument list is not assignable to the corresponding method argument
-     * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
      * through the appropriate class loader.
      * @throws IncompatibleThreadStateException if the specified thread has not
--- a/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, 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
@@ -40,8 +40,9 @@
  * permission allows, and discusses the risks of granting code the
  * permission.
  *
- * <table border=1 cellpadding=5 summary="Table shows permission
- * target name, what the permission allows, and associated risks">
+ * <table class="plain">
+ * <caption style="display:none">Table shows permission target name, what the
+ * permission allows, and associated risks</caption>
  * <tr>
  * <th>Permission Target Name</th>
  * <th>What the Permission Allows</th>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Location.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Location.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -41,7 +41,7 @@
  * Several mirror interfaces have locations. Each such mirror
  * extends a {@link Locatable} interface.
  * <p>
- * <a name="strata"><b>Strata</b></a>
+ * <a id="strata"><b>Strata</b></a>
  * <p>
  * The source information for a Location is dependent on the
  * <i>stratum</i> which is used. A stratum is a source code
--- a/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -249,9 +249,6 @@
      * if the method is a constructor or static initializer, or
      * if {@link #INVOKE_NONVIRTUAL} is specified and the method is
      * abstract.
-     * @throws {@link InvalidTypeException} if any argument in the
-     * argument list is not assignable to the corresponding method argument
-     * type.
      * @throws ClassNotLoadedException if any argument type has not yet been loaded
      * through the appropriate class loader.
      * @throws IncompatibleThreadStateException if the specified thread has not
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Type.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Type.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -45,13 +45,14 @@
  * <P>
  * The following table illustrates which subinterfaces of Type
  * are used to mirror types in the target VM --
- * <TABLE BORDER=1 SUMMARY="Maps each type declared in target to a mirrored
- *  instance of a subinterface of PrimitiveType or ReferenceType">
- * <TR BGCOLOR="#EEEEFF">
+ * <TABLE BORDER="1">
+ * <CAPTION style="display:none">Maps each type declared in target to a mirrored
+ *  instance of a subinterface of PrimitiveType or ReferenceType"</CAPTION>
+ * <TR style="background-color:#EEEEFF">
  *   <TH id="primtype" colspan=3>Subinterfaces of {@link PrimitiveType}</TH>
- * <TR BGCOLOR="#EEEEFF">
- *   <TH id="declared" align="left" colspan=2>Type declared in target as</TH>
- *   <TH id="mirrored" align="left">Is mirrored as an instance of</TH>
+ * <TR style="background-color:#EEEEFF">
+ *   <TH id="declared" style="text-align:left" colspan=2>Type declared in target as</TH>
+ *   <TH id="mirrored" style="text-align:left">Is mirrored as an instance of</TH>
  * <TR>
  *   <TD headers="primtype declared" colspan=2><CODE>boolean</CODE></TD>
  *   <TD headers="primtype mirrored"> {@link BooleanType}</TD>
@@ -79,12 +80,12 @@
  * <TR>
  *   <TD headers="primtype declared" colspan=2><CODE>void</CODE></TD>
  *   <TD headers="primtype mirrored">{@link VoidType}</TD>
- * <TR BGCOLOR="#EEEEFF">
+ * <TR style="background-color:#EEEEFF">
  *   <TH id="reftype"  colspan=3>Subinterfaces of {@link ReferenceType}</TH>
- * <TR BGCOLOR="#EEEEFF">
- *   <TH id="declared2" align="left">Type declared in target as</TH>
- *   <TH id="example2"  align="left">For example</TH>
- *   <TH id="mirrored2" align="left">Is mirrored as an instance of</TH>
+ * <TR style="background-color:#EEEEFF">
+ *   <TH id="declared2"style="text-align:left">Type declared in target as</TH>
+ *   <TH id="example2"  style="text-align:left">For example</TH>
+ *   <TH id="mirrored2" style="text-align:left">Is mirrored as an instance of</TH>
  * <TR>
  *   <TD headers="reftype declared2"><I>a class</I></TD>
  *   <TD headers="reftype example2"><CODE>Date</CODE></TD>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Fri May 12 10:43:28 2017 -0700
@@ -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,7 +31,7 @@
  * value hierarchy encompassing primitive values and object values.
  * <P>
  * Some examples of where values may be accessed:
- * <BLOCKQUOTE><TABLE SUMMARY="layout">
+ * <BLOCKQUOTE><TABLE><CAPTION style="display:none">layout</CAPTION>
  * <TR>
  *   <TD>{@link ObjectReference#getValue(com.sun.jdi.Field)
  *                 ObjectReference.getValue(Field)}
@@ -52,15 +52,16 @@
  * <P>
  * The following table illustrates which subinterfaces of Value
  * are used to mirror values in the target VM --
- * <TABLE BORDER=1 SUMMARY="Maps each kind of value to a mirrored
- *  instance of a subinterface of Value">
- * <TR BGCOLOR="#EEEEFF">
+ * <TABLE BORDER="1">
+ * <CAPTION style="display:none">Maps each kind of value to a mirrored
+ *  instance of a subinterface of Value</CAPTION>
+ * <TR style="background-color:#EEEEFF">
  *   <TH id="primval" colspan=4>Subinterfaces of {@link PrimitiveValue}</TH>
- * <TR BGCOLOR="#EEEEFF">
- *   <TH id="kind"     align="left">Kind of value</TH>
- *   <TH id="example"  align="left">For example -<br>expression in target</TH>
- *   <TH id="mirrored" align="left">Is mirrored as an<br>instance of</TH>
- *   <TH id="type"     align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
+ * <TR style="background-color:#EEEEFF">
+ *   <TH id="kind"     style="text-align:left">Kind of value</TH>
+ *   <TH id="example"  style="text-align:left">For example -<br>expression in target</TH>
+ *   <TH id="mirrored" style="text-align:left">Is mirrored as an<br>instance of</TH>
+ *   <TH id="type"     style="text-align:left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
  * <TR>
  *   <TD headers="primval kind">     a boolean</TD>
  *   <TD headers="primval example">  {@code true}</TD>
@@ -106,13 +107,13 @@
  *   <TD headers="primval example">  </TD>
  *   <TD headers="primval mirrored"> {@link VoidValue}</TD>
  *   <TD headers="primval type">     {@link VoidType}</TD>
- * <TR BGCOLOR="#EEEEFF">
+ * <TR style="background-color:#EEEEFF">
  *   <TH id="objref" colspan=4>Subinterfaces of {@link ObjectReference}</TH>
- * <TR BGCOLOR="#EEEEFF">
- *   <TH id="kind2"     align="left">Kind of value</TH>
- *   <TH id="example2"  align="left">For example -<br>expression in target</TH>
- *   <TH id="mirrored2" align="left">Is mirrored as an<br>instance of</TH>
- *   <TH id="type2"     align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
+ * <TR style="background-color:#EEEEFF">
+ *   <TH id="kind2"     style="text-align:left">Kind of value</TH>
+ *   <TH id="example2"  style="text-align:left">For example -<br>expression in target</TH>
+ *   <TH id="mirrored2" style="text-align:left">Is mirrored as an<br>instance of</TH>
+ *   <TH id="type2"     style="text-align:left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
  * <TR>
  *   <TD headers="objref kind2">     a class instance</TD>
  *   <TD headers="objref example2">  {@code this}</TD>
@@ -148,13 +149,13 @@
  *   <TD headers="objref example2">  {@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD>
  *   <TD headers="objref mirrored2"> {@link ClassLoaderReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
- * <TR BGCOLOR="#EEEEFF">
+ * <TR style="background-color:#EEEEFF">
  *   <TH id="other" colspan=4>Other</TH>
- * <TR BGCOLOR="#EEEEFF">
- *   <TD id="kind3"     align="left">Kind of value</TD>
- *   <TD id="example3"  align="left">For example -<br>expression in target</TD>
- *   <TD id="mirrored3" align="left">Is mirrored as</TD>
- *   <TD id="type3"     align="left">{@link Type} of value</TD>
+ * <TR style="background-color:#EEEEFF">
+ *   <TD id="kind3"     style="text-align:left">Kind of value</TD>
+ *   <TD id="example3"  style="text-align:left">For example -<br>expression in target</TD>
+ *   <TD id="mirrored3" style="text-align:left">Is mirrored as</TD>
+ *   <TD id="type3"     style="text-align:left">{@link Type} of value</TD>
  * <TR>
  *   <TD headers="other kind3">     null</TD>
  *   <TD headers="other example3">  {@code null}</TD>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -51,8 +51,8 @@
  * Some {@link com.sun.jdi.connect.Connector} implementations may require slightly
  * different handling than presented below.
  *
- * <TABLE BORDER WIDTH="75%" SUMMARY="Four scenarios for connecting a debugger
- *  to a virtual machine">
+ * <TABLE BORDER="1" style="width:75%">
+ * <CAPTION style="display:none">Four scenarios for connecting a debugger to a virtual machine"</CAPTION>
  * <TR>
  * <TH scope=col>Scenario</TH>
  * <TH scope=col>Description</TH>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Fri May 12 10:43:28 2017 -0700
@@ -1,10 +1,11 @@
+<!DOCTYPE HTML>
 <HTML>
 <HEAD>
 <TITLE>
 JDI Type Signatures
 </TITLE>
 </HEAD>
-<BODY BGCOLOR="white">
+<BODY style="background-color:white">
 <dl><dd>
 <Table Border="0">
 <caption><font size=5><b>JDI Type Signatures</b></font></caption>
--- a/src/jdk.jdi/share/classes/module-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jdi/share/classes/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -45,8 +45,8 @@
  * 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>
- * <font size="+1"><b>Global Exceptions:</b></font>
+ * <p style="font-size:larger">
+ * <b>Global Exceptions:</b>
  * <p>
  * This section documents exceptions which apply to the entire API and are thus
  * not documented on individual methods.
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java	Fri May 12 10:43:28 2017 -0700
@@ -152,14 +152,14 @@
     @Override
     public void storeFiles(ResourcePool files) {
         try {
-            String targetOsName = files.moduleView()
-                                       .findModule("java.base")
-                                       .map(ResourcePoolModule::osName)
-                                       .orElse(null);
-            if (targetOsName == null) {
+            String value = files.moduleView()
+                                .findModule("java.base")
+                                .map(ResourcePoolModule::targetPlatform)
+                                .orElse(null);
+            if (value == null) {
                 throw new PluginException("ModuleTarget attribute is missing for java.base module");
             }
-            this.targetPlatform = Platform.toPlatform(targetOsName);
+            this.targetPlatform = Platform.toPlatform(value);
 
             checkResourcePool(files);
 
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImagePluginStack.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ImagePluginStack.java	Fri May 12 10:43:28 2017 -0700
@@ -324,15 +324,9 @@
             }
 
             @Override
-            public String osName() {
+            public String targetPlatform() {
                 initModuleAttributes();
-                return target != null? target.osName() : null;
-            }
-
-            @Override
-            public String osArch() {
-                initModuleAttributes();
-                return target != null? target.osArch() : null;
+                return target != null? target.targetPlatform() : null;
             }
 
             private void initModuleAttributes() {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java	Fri May 12 10:43:28 2017 -0700
@@ -40,12 +40,17 @@
     UNKNOWN;
 
     /**
-     * Returns the {@code Platform} of the given OS name specified
+     * Returns the {@code Platform} derived from the target platform
      * in the {@code ModuleTarget} attribute.
-     *
-     * @param osName OS name in ModuleTarget attribute
      */
-    public static Platform toPlatform(String osName) {
+    public static Platform toPlatform(String targetPlatform) {
+        String osName;
+        int index = targetPlatform.indexOf("-");
+        if (index < 0) {
+            osName = targetPlatform;
+        } else {
+            osName = targetPlatform.substring(0, index);
+        }
         try {
             return Platform.valueOf(osName.toUpperCase(Locale.ENGLISH));
         } catch (IllegalArgumentException e) {
@@ -57,9 +62,9 @@
      * Returns the {@code Platform} to which the given module is target to.
      */
     public static Platform getTargetPlatform(ResourcePoolModule module) {
-        String osName = module.osName();
-        if (osName != null) {
-            return toPlatform(osName);
+        String targetPlatform = module.targetPlatform();
+        if (targetPlatform != null) {
+            return toPlatform(targetPlatform);
         } else {
             return Platform.UNKNOWN;
         }
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolManager.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -110,15 +110,9 @@
         }
 
         @Override
-        public String osName() {
+        public String targetPlatform() {
             initModuleAttributes();
-            return target != null? target.osName() : null;
-        }
-
-        @Override
-        public String osArch() {
-            initModuleAttributes();
-            return target != null? target.osArch() : null;
+            return target != null? target.targetPlatform() : null;
         }
 
         private void initModuleAttributes() {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ReleaseInfoPlugin.java	Fri May 12 10:43:28 2017 -0700
@@ -33,13 +33,13 @@
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Optional;
 import java.util.Properties;
 import java.util.Set;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import jdk.tools.jlink.internal.ModuleSorter;
 import jdk.tools.jlink.internal.Utils;
+import jdk.tools.jlink.plugin.PluginException;
 import jdk.tools.jlink.plugin.ResourcePool;
 import jdk.tools.jlink.plugin.ResourcePoolBuilder;
 import jdk.tools.jlink.plugin.ResourcePoolEntry;
@@ -132,18 +132,16 @@
     public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) {
         in.transformAndCopy(Function.identity(), out);
 
-        Optional<ResourcePoolModule> javaBase = in.moduleView().findModule("java.base");
-        javaBase.ifPresent(mod -> {
-            // fill release information available from transformed "java.base" module!
-            ModuleDescriptor desc = mod.descriptor();
-            desc.version().ifPresent(s -> release.put("JAVA_VERSION",
-                    quote(parseVersion(s.toString()))));
-            desc.version().ifPresent(s -> release.put("JAVA_FULL_VERSION",
-                    quote(s.toString())));
+        ResourcePoolModule javaBase = in.moduleView().findModule("java.base")
+                                                     .orElse(null);
+        if (javaBase == null || javaBase.targetPlatform() == null) {
+            throw new PluginException("ModuleTarget attribute is missing for java.base module");
+        }
 
-            release.put("OS_NAME", quote(mod.osName()));
-            release.put("OS_ARCH", quote(mod.osArch()));
-        });
+        // fill release information available from transformed "java.base" module!
+        ModuleDescriptor desc = javaBase.descriptor();
+        desc.version().ifPresent(v -> release.put("JAVA_VERSION",
+                                                  quote(parseVersion(v))));
 
         // put topological sorted module names separated by space
         release.put("MODULES",  new ModuleSorter(in.moduleView())
@@ -152,14 +150,15 @@
 
         // create a TOP level ResourcePoolEntry for "release" file.
         out.add(ResourcePoolEntry.create("/java.base/release",
-            ResourcePoolEntry.Type.TOP, releaseFileContent()));
+                                         ResourcePoolEntry.Type.TOP,
+                                         releaseFileContent()));
         return out.build();
     }
 
     // Parse version string and return a string that includes only version part
     // leaving "pre", "build" information. See also: java.lang.Runtime.Version.
-    private static String parseVersion(String str) {
-        return Runtime.Version.parse(str)
+    private static String parseVersion(ModuleDescriptor.Version v) {
+        return Runtime.Version.parse(v.toString())
                       .version()
                       .stream()
                       .map(Object::toString)
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java	Fri May 12 10:43:28 2017 -0700
@@ -211,8 +211,7 @@
             // drop target attribute only if any OS property is present
             ModuleTarget target = attrs.target();
             if (dropModuleTarget && target != null) {
-                this.dropModuleTarget = (target.osName() != null)
-                                        || (target.osArch() != null);
+                this.dropModuleTarget = (target.targetPlatform() != null);
             } else {
                 this.dropModuleTarget = false;
             }
@@ -377,7 +376,7 @@
             }
 
             void dropModuleTarget() {
-                extender.targetPlatform("", "");
+                extender.targetPlatform("");
             }
 
             byte[] getBytes() throws IOException {
@@ -527,8 +526,7 @@
                 ModuleDescriptor md = moduleInfo.descriptor;
                 // drop ModuleTarget attribute if java.base has all OS properties
                 ModuleTarget target = moduleInfo.target();
-                if (dropModuleTarget
-                    && (target.osName() != null) && (target.osArch() != null)) {
+                if (dropModuleTarget && target.targetPlatform() != null) {
                     dropModuleTarget = true;
                 } else {
                     dropModuleTarget = false;
@@ -543,7 +541,7 @@
             moduleInfo.validatePackages();
 
             // module-info.class may be overridden for optimization
-            // 1. update ModuleTarget attribute to drop osName, osArch, osVersion
+            // 1. update ModuleTarget attribute to drop targetPlartform
             // 2. add/update ModulePackages attribute
             if (moduleInfo.shouldRewrite()) {
                 entry = entry.copyWithContent(moduleInfo.getBytes());
@@ -655,10 +653,9 @@
                     // new ModuleTarget(String, String)
                     mv.visitTypeInsn(NEW, MODULE_TARGET_CLASSNAME);
                     mv.visitInsn(DUP);
-                    mv.visitLdcInsn(minfo.target().osName());
-                    mv.visitLdcInsn(minfo.target().osArch());
+                    mv.visitLdcInsn(minfo.target().targetPlatform());
                     mv.visitMethodInsn(INVOKESPECIAL, MODULE_TARGET_CLASSNAME,
-                        "<init>", "(Ljava/lang/String;Ljava/lang/String;)V", false);
+                        "<init>", "(Ljava/lang/String;)V", false);
 
                     mv.visitInsn(AASTORE);
                 }
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/ResourcePoolModule.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/plugin/ResourcePoolModule.java	Fri May 12 10:43:28 2017 -0700
@@ -58,18 +58,11 @@
     public ModuleDescriptor descriptor();
 
     /**
-     * The module target OS name for this module.
+     * The target platform
      *
-     * @return The module target OS name
+     * @return The target platform
      */
-    public String osName();
-
-    /**
-     * The module target OS arch for this module.
-     *
-     * @return The module target OS arch
-     */
-    public String osArch();
+    public String targetPlatform();
 
     /**
      * Retrieves all the packages located in this module.
--- a/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java	Fri May 12 10:43:28 2017 -0700
@@ -177,8 +177,7 @@
         ModuleFinder moduleFinder;
         Version moduleVersion;
         String mainClass;
-        String osName;
-        String osArch;
+        String targetPlatform;
         Pattern modulesToHash;
         ModuleResolution moduleResolution;
         boolean dryrun;
@@ -311,9 +310,9 @@
         try (JmodFile jf = new JmodFile(options.jmodFile)) {
             try (InputStream in = jf.getInputStream(Section.CLASSES, MODULE_INFO)) {
                 ModuleInfo.Attributes attrs = ModuleInfo.read(in, null);
-                printModuleDescriptor(attrs.descriptor(),
-                                      attrs.target(),
-                                      attrs.recordedHashes());
+                describeModule(attrs.descriptor(),
+                               attrs.target(),
+                               attrs.recordedHashes());
                 return true;
             } catch (IOException e) {
                 throw new CommandException("err.module.descriptor.not.found");
@@ -323,66 +322,92 @@
 
     static <T> String toString(Collection<T> c) {
         if (c.isEmpty()) { return ""; }
-        return c.stream().map(e -> e.toString().toLowerCase(Locale.ROOT))
-                  .collect(joining(" "));
+        return " " + c.stream().map(e -> e.toString().toLowerCase(Locale.ROOT))
+                .sorted().collect(joining(" "));
     }
 
-    private void printModuleDescriptor(ModuleDescriptor md,
-                                       ModuleTarget target,
-                                       ModuleHashes hashes)
+    private void describeModule(ModuleDescriptor md,
+                                ModuleTarget target,
+                                ModuleHashes hashes)
         throws IOException
     {
         StringBuilder sb = new StringBuilder();
-        sb.append("\n").append(md.toNameAndVersion());
+
+        sb.append(md.toNameAndVersion());
+
+        if (md.isOpen())
+            sb.append(" open");
+        if (md.isAutomatic())
+            sb.append(" automatic");
+        sb.append("\n");
+
+        // unqualified exports (sorted by package)
+        md.exports().stream()
+                .sorted(Comparator.comparing(Exports::source))
+                .filter(e -> !e.isQualified())
+                .forEach(e -> sb.append("exports ").append(e.source())
+                                .append(toString(e.modifiers())).append("\n"));
+
+        // dependences
+        md.requires().stream().sorted()
+                .forEach(r -> sb.append("requires ").append(r.name())
+                                .append(toString(r.modifiers())).append("\n"));
 
-        md.requires().stream()
-            .sorted(Comparator.comparing(Requires::name))
-            .forEach(r -> {
-                sb.append("\n  requires ");
-                if (!r.modifiers().isEmpty())
-                    sb.append(toString(r.modifiers())).append(" ");
-                sb.append(r.name());
-            });
+        // service use and provides
+        md.uses().stream().sorted()
+                .forEach(s -> sb.append("uses ").append(s).append("\n"));
+
+        md.provides().stream()
+                .sorted(Comparator.comparing(Provides::service))
+                .forEach(p -> sb.append("provides ").append(p.service())
+                                .append(" with")
+                                .append(toString(p.providers()))
+                                .append("\n"));
 
-        md.uses().stream().sorted()
-            .forEach(s -> sb.append("\n  uses ").append(s));
+        // qualified exports
+        md.exports().stream()
+                .sorted(Comparator.comparing(Exports::source))
+                .filter(Exports::isQualified)
+                .forEach(e -> sb.append("qualified exports ").append(e.source())
+                                .append(" to").append(toString(e.targets()))
+                                .append("\n"));
 
-        md.exports().stream()
-            .sorted(Comparator.comparing(Exports::source))
-            .forEach(p -> sb.append("\n  exports ").append(p));
+        // open packages
+        md.opens().stream()
+                .sorted(Comparator.comparing(Opens::source))
+                .filter(o -> !o.isQualified())
+                .forEach(o -> sb.append("opens ").append(o.source())
+                                 .append(toString(o.modifiers()))
+                                 .append("\n"));
 
         md.opens().stream()
-            .sorted(Comparator.comparing(Opens::source))
-            .forEach(p -> sb.append("\n  opens ").append(p));
+                .sorted(Comparator.comparing(Opens::source))
+                .filter(Opens::isQualified)
+                .forEach(o -> sb.append("qualified opens ").append(o.source())
+                                 .append(toString(o.modifiers()))
+                                 .append(" to").append(toString(o.targets()))
+                                 .append("\n"));
 
-        Set<String> concealed = new HashSet<>(md.packages());
+        // non-exported/non-open packages
+        Set<String> concealed = new TreeSet<>(md.packages());
         md.exports().stream().map(Exports::source).forEach(concealed::remove);
         md.opens().stream().map(Opens::source).forEach(concealed::remove);
-        concealed.stream().sorted()
-                 .forEach(p -> sb.append("\n  contains ").append(p));
+        concealed.forEach(p -> sb.append("contains ").append(p).append("\n"));
 
-        md.provides().stream()
-            .sorted(Comparator.comparing(Provides::service))
-            .forEach(p -> sb.append("\n  provides ").append(p.service())
-                            .append(" with ")
-                            .append(toString(p.providers())));
-
-        md.mainClass().ifPresent(v -> sb.append("\n  main-class " + v));
+        md.mainClass().ifPresent(v -> sb.append("main-class ").append(v).append("\n"));
 
         if (target != null) {
-            String osName = target.osName();
-            if (osName != null)
-                sb.append("\n  operating-system-name " + osName);
-            String osArch = target.osArch();
-            if (osArch != null)
-                sb.append("\n  operating-system-architecture " + osArch);
-        }
+            String targetPlatform = target.targetPlatform();
+            if (!targetPlatform.isEmpty())
+                sb.append("platform ").append(targetPlatform).append("\n");
+       }
 
-        if (hashes != null) {
-            hashes.names().stream().sorted().forEach(
-                    mod -> sb.append("\n  hashes ").append(mod).append(" ")
-                             .append(hashes.algorithm()).append(" ")
-                             .append(toHex(hashes.hashFor(mod))));
+       if (hashes != null) {
+           hashes.names().stream().sorted().forEach(
+                   mod -> sb.append("hashes ").append(mod).append(" ")
+                            .append(hashes.algorithm()).append(" ")
+                            .append(toHex(hashes.hashFor(mod)))
+                            .append("\n"));
         }
 
         out.println(sb.toString());
@@ -437,8 +462,7 @@
 
         final Version moduleVersion = options.moduleVersion;
         final String mainClass = options.mainClass;
-        final String osName = options.osName;
-        final String osArch = options.osArch;
+        final String targetPlatform = options.targetPlatform;
         final List<PathMatcher> excludes = options.excludes;
         final ModuleResolution moduleResolution = options.moduleResolution;
 
@@ -534,9 +558,10 @@
                 if (mainClass != null)
                     extender.mainClass(mainClass);
 
-                // --os-name, --os-arch
-                if (osName != null || osArch != null)
-                    extender.targetPlatform(osName, osArch);
+                // --target-platform
+                if (targetPlatform != null) {
+                    extender.targetPlatform(targetPlatform);
+                }
 
                 // --module-version
                 if (moduleVersion != null)
@@ -1327,15 +1352,10 @@
                         .withRequiredArg()
                         .withValuesConvertedBy(new ModuleVersionConverter());
 
-        OptionSpec<String> osName
-                = parser.accepts("os-name", getMessage("main.opt.os-name"))
+        OptionSpec<String> targetPlatform
+                = parser.accepts("target-platform", getMessage("main.opt.target-platform"))
                         .withRequiredArg()
-                        .describedAs(getMessage("main.opt.os-name.arg"));
-
-        OptionSpec<String> osArch
-                = parser.accepts("os-arch", getMessage("main.opt.os-arch"))
-                        .withRequiredArg()
-                        .describedAs(getMessage("main.opt.os-arch.arg"));
+                        .describedAs(getMessage("main.opt.target-platform.arg"));
 
         OptionSpec<Void> doNotResolveByDefault
                 = parser.accepts("do-not-resolve-by-default",
@@ -1400,10 +1420,8 @@
                 options.moduleVersion = getLastElement(opts.valuesOf(moduleVersion));
             if (opts.has(mainClass))
                 options.mainClass = getLastElement(opts.valuesOf(mainClass));
-            if (opts.has(osName))
-                options.osName = getLastElement(opts.valuesOf(osName));
-            if (opts.has(osArch))
-                options.osArch = getLastElement(opts.valuesOf(osArch));
+            if (opts.has(targetPlatform))
+                options.targetPlatform = getLastElement(opts.valuesOf(targetPlatform));
             if (opts.has(warnIfResolved))
                 options.moduleResolution = getLastElement(opts.valuesOf(warnIfResolved));
             if (opts.has(doNotResolveByDefault)) {
--- a/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.jlink/share/classes/jdk/tools/jmod/resources/jmod.properties	Fri May 12 10:43:28 2017 -0700
@@ -64,10 +64,8 @@
 main.opt.main-class=Main class
 main.opt.main-class.arg=class-name
 main.opt.man-pages=Location of man pages
-main.opt.os-name=Operating system name
-main.opt.os-name.arg=os-name
-main.opt.os-arch=Operating system architecture
-main.opt.os-arch.arg=os-arch
+main.opt.target-platform=Target platform
+main.opt.target-platform.arg=target-platform
 main.opt.module-path=Module path
 main.opt.hash-modules=Compute and record hashes to tie a packaged module\
 \ with modules matching the given <regex-pattern> and depending upon it directly\
--- a/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.management.agent/share/classes/jdk/internal/agent/Agent.java	Fri May 12 10:43:28 2017 -0700
@@ -393,7 +393,7 @@
         } catch (JdpException e) {
             error(e);
         } catch (AgentConfigurationError err) {
-            error(err.getError(), err.getParams());
+            error(err);
         }
     }
 
@@ -454,7 +454,7 @@
             }
 
         } catch (AgentConfigurationError e) {
-            error(e.getError(), e.getParams());
+            error(e);
         } catch (Exception e) {
             error(e);
         }
@@ -665,18 +665,6 @@
         throw new RuntimeException(keyText);
     }
 
-    public static void error(String key, String[] params) {
-        if (params == null || params.length == 0) {
-            error(key);
-        } else {
-            StringBuilder message = new StringBuilder(params[0]);
-            for (int i = 1; i < params.length; i++) {
-                message.append(' ').append(params[i]);
-            }
-            error(key, message.toString());
-        }
-    }
-
     public static void error(String key, String message) {
         String keyText = getText(key);
         System.err.print(getText("agent.err.error") + ": " + keyText);
@@ -690,6 +678,23 @@
         throw new RuntimeException(e);
     }
 
+    public static void error(AgentConfigurationError e) {
+        String keyText = getText(e.getError());
+        String[] params = e.getParams();
+
+        System.err.print(getText("agent.err.error") + ": " + keyText);
+
+        if (params != null && params.length != 0) {
+           StringBuffer message = new StringBuffer(params[0]);
+           for (int i = 1; i < params.length; i++) {
+               message.append(" " + params[i]);
+           }
+           System.err.println(": " + message);
+        }
+        e.printStackTrace();
+        throw new RuntimeException(e);
+    }
+
     public static void warning(String key, String message) {
         System.err.print(getText("agent.err.warning") + ": " + getText(key));
         System.err.println(": " + message);
--- a/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -106,7 +106,7 @@
  * The additional meta-data provided for an operation associated with a
  * diagnostic command are described in the table below:
  *
- * <table border="1" cellpadding="5">
+ * <table class="striped"><caption style="display:none">description</caption>
  *   <tr>
  *     <th>Name</th><th>Type</th><th>Description</th>
  *   </tr>
@@ -167,7 +167,7 @@
  * a Descriptor instance. The fields provided in this second Descriptor
  * instance are described in the table below:
  *
- * <table border="1" cellpadding="5">
+ * <table class="striped"><caption style="display:none">description</caption>
  *   <tr>
  *     <th>Name</th><th>Type</th><th>Description</th>
  *   </tr>
--- a/src/jdk.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, 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
@@ -181,10 +181,10 @@
      * The given {@code CompositeData} must contain
      * the following attributes:
      * <blockquote>
-     * <table border>
+     * <table class="striped"><caption style="display:none">description</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>gcName</td>
--- a/src/jdk.management/share/classes/com/sun/management/GcInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.management/share/classes/com/sun/management/GcInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -56,7 +56,7 @@
  * interface.  This is a historical relic, and other classes should
  * not copy this pattern.  Use {@link CompositeDataView} instead.
  *
- * <h4>MXBean Mapping</h4>
+ * <h3>MXBean Mapping</h3>
  * {@code GcInfo} is mapped to a {@link CompositeData CompositeData}
  * with attributes as specified in the {@link #from from} method.
  *
@@ -183,10 +183,10 @@
      * all the following attributes:
      *
      * <blockquote>
-     * <table border>
+     * <table class="striped"><caption style="display:none">description</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>index</td>
--- a/src/jdk.management/share/classes/com/sun/management/VMOption.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.management/share/classes/com/sun/management/VMOption.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -190,10 +190,10 @@
      * must contain the following attributes:
      *
      * <blockquote>
-     * <table border>
+     * <table class="striped"><caption style="display:none">description</caption>
      * <tr>
-     *   <th align=left>Attribute Name</th>
-     *   <th align=left>Type</th>
+     *   <th style="text-align:left">Attribute Name</th>
+     *   <th style="text-align:left">Type</th>
      * </tr>
      * <tr>
      *   <td>name</td>
--- a/src/jdk.net/share/classes/jdk/net/NetworkPermission.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.net/share/classes/jdk/net/NetworkPermission.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,8 +34,8 @@
  * <p>
  * The following targets are defined:
  *
- * <table border=1 cellpadding=5 summary="permission target name,
- *  what the target allows,and associated risks">
+ * <table class="striped"><caption style="display:none">permission target name,
+ *  what the target allows,and associated risks</caption>
  * <tr>
  *   <th>Permission Target Name</th>
  *   <th>What the Permission Allows</th>
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,7 @@
  * {@link #setOption(SctpSocketOption,Object) setOption} method. An SCTP
  * channel support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped"><caption style="display:none">Socket options</caption>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,7 +63,7 @@
  * {@link #setOption(SctpSocketOption,Object,Association) setOption} method. An
  * {@code SctpMultiChannel} supports the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table class="striped"><caption style="display:none">Socket options</caption>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,7 @@
  * {@link #setOption(SctpSocketOption,Object) setOption} method. SCTP server socket
  * channels support the following options:
  * <blockquote>
- * <table border summary="Socket options">
+ * <table><caption style="display:none">Socket options</caption>
  *   <tr>
  *     <th>Option Name</th>
  *     <th>Description</th>
--- a/test/ProblemList.txt	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/ProblemList.txt	Fri May 12 10:43:28 2017 -0700
@@ -291,8 +291,6 @@
 
 sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java    8057732 generic-all
 
-demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java       8151899 generic-all
-
 ############################################################################
 
 # jdk_other
@@ -303,7 +301,4 @@
 
 org/omg/CORBA/OrbPropertiesTest.java			        8175177 generic-all
 
-sample/mergesort/MergeSortTest.java				8178912 generic-all
-sample/chatserver/ChatTest.java					8178912 generic-all
-
 ############################################################################
--- a/test/TEST.groups	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/TEST.groups	Fri May 12 10:43:28 2017 -0700
@@ -249,8 +249,7 @@
     sun/tools \
     -sun/tools/java \
     -sun/tools/jrunscript \
-    sun/jvmstat \
-    demo/jvmti
+    sun/jvmstat
 
 jdk_tools = \
     :core_tools \
@@ -273,8 +272,7 @@
     com/sun/jndi \
     com/sun/corba \
     org/omg/CORBA \
-    lib/testlibrary \
-    sample
+    lib/testlibrary
 
 #
 # SCTP is its own group as it is highly sensitive to kernel/network config
@@ -466,7 +464,6 @@
 needs_jdk = \
   :jdk_jdi \
   com/sun/tools \
-  demo \
   jdk/security/jarsigner \
   sun/security/tools/jarsigner \
   sun/security/tools/policytool \
@@ -776,7 +773,6 @@
   javax \
   jdk \
   lib \
-  sample \
   sun \
   vm \
  -:needs_full_vm_compact1 \
--- a/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -102,4 +102,4 @@
         Objects.requireNonNull(menuItem, "The menu item should still be available at this point");
         sMenu.remove(menuItem);
     }
-}
\ No newline at end of file
+}
--- a/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestCICOWithGCMAndAAD.java	Fri May 12 10:43:28 2017 -0700
@@ -17,7 +17,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/com/sun/jdi/ArrayLengthDumpTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/ArrayLengthDumpTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -98,7 +98,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/BreakpointWithFullGC.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/BreakpointWithFullGC.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 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
--- a/test/com/sun/jdi/CatchAllTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/CatchAllTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -76,7 +76,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/CatchCaughtTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/CatchCaughtTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -67,7 +67,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/CatchPatternTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/CatchPatternTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -108,7 +108,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/CommandCommentDelimiter.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/CommandCommentDelimiter.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 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
@@ -70,7 +70,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/DeferredStepTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/DeferredStepTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -53,7 +53,7 @@
   static class  jj1 implements Runnable {
     public void  run() {
         int count = 0;
-        
+
         for ( int ii = 0; ii < 10; ii++) {  // line 6
             int intInPotato04 = 666;        // line 7
             ++count;                        // line 8; @1 breakpoint
@@ -65,7 +65,7 @@
   static class jj2 implements Runnable {
     public void run() {
         int count2 = 0;
-        
+
         for (int ii = 0; ii < 10; ii++) {      // line 18
             String StringInPotato05 = "I am";  // line 19
             ++count2;                          // line 20; @1 breakpoint
@@ -139,7 +139,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
@@ -157,7 +157,7 @@
 If this works right, you should see StepEvents/Breakpoint events for lines
    8, 9, 6, 7, 8, 9, 6, ....   for thread jj11
 and
-  20, 21, 18, 19, 20, 21, 18, ... for thread jj2 
+  20, 21, 18, 19, 20, 21, 18, ... for thread jj2
 
 Since both threads are running at the same time, these
 events can be intermixed.
@@ -179,5 +179,5 @@
 
 EOF
 runit
-#jdbFailIfPresent "Nothing suspended" 
+#jdbFailIfPresent "Nothing suspended"
 #pass
--- a/test/com/sun/jdi/DeoptimizeWalk.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/DeoptimizeWalk.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -96,7 +96,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/EvalArgs.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/EvalArgs.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -25,7 +25,7 @@
 
 #  @test
 #  @bug 4663146
-#  @summary Arguments match no method error 
+#  @summary Arguments match no method error
 #  @author Jim Holmlund/Suvasis
 #
 #  @run shell/timeout=300 EvalArgs.sh
@@ -72,13 +72,13 @@
         System.out.println( ffjj1(myjj1));
         System.out.println( ffjj1(myjj2));
 
-        System.out.println("$classname.ffoverload($classname.jjboolean) = " + 
+        System.out.println("$classname.ffoverload($classname.jjboolean) = " +
                             $classname.ffoverload($classname.jjboolean));
-        System.out.println("$classname.ffoverload($classname.jjbyte) = " + 
+        System.out.println("$classname.ffoverload($classname.jjbyte) = " +
                             $classname.ffoverload($classname.jjbyte));
-        System.out.println("$classname.ffoverload($classname.jjchar) = " + 
+        System.out.println("$classname.ffoverload($classname.jjchar) = " +
                             $classname.ffoverload($classname.jjchar));
-        System.out.println("$classname.ffoverload($classname.jjdouble) = " + 
+        System.out.println("$classname.ffoverload($classname.jjdouble) = " +
                             $classname.ffoverload($classname.jjdouble));
 
 
@@ -94,11 +94,11 @@
     public static String ffjj1(jj1 arg) {
         return arg.me;
     }
-    
+
     public static String ffjj2(jj2 arg) {
         return arg.me;
     }
-    
+
     static String ffboolean(boolean p1) {
         return "ffbool: p1 = " + p1;
     }
@@ -106,31 +106,31 @@
     static String ffbyte(byte p1) {
         return "ffbyte: p1 = " + p1;
     }
-        
+
     static String ffchar(char p1) {
         return "ffchar: p1 = " + p1;
     }
-        
+
     static String ffdouble(double p1) {
         return "ffdouble: p1 = " + p1;
     }
-        
+
     static String fffloat(float p1) {
         return "fffloat: p1 = " + p1;
     }
-        
+
     static String ffint(int p1) {
         return "ffint: p1 = " + p1;
     }
-        
+
     static String fflong(long p1) {
         return "fflong: p1 = " + p1;
     }
-        
+
     static String ffshort(short p1) {
         return "ffshort: p1 = " + p1;
     }
-        
+
     static String ffintArray(int[] p1) {
         return "ffintArray: p1 = " + p1;
     }
@@ -139,15 +139,15 @@
     public static String ffoverload(jj1 arg) {
         return arg.me;
     }
-    
+
     static String ffoverload(boolean p1) {
         return "ffoverload: boolean p1 = " + p1;
     }
-/***        
+/***
     static String ffoverload(byte p1) {
         return "ffoverload: byte p1 = " + p1;
     }
-***/        
+***/
     static String ffoverload(char p1) {
         return "ffoverload: char p1 = " + p1;
     }
@@ -159,11 +159,11 @@
     static String ffoverload(float p1) {
         return "ffoverload: float p1 = " + p1;
     }
-/***        
+/***
     static String ffoverload(int p1) {
         return "ffoverload: int p1 = " + p1;
     }
-***/        
+***/
     static String ffoverload(long p1) {
         return "ffoverload: long p1 = " + p1;
     }
@@ -171,7 +171,7 @@
     static String ffoverload(short p1) {
         return "ffoverload: short p1 = " + p1;
     }
-      
+
     static String ffoverload(int[] p1) {
         return "ffoverload: int array p1 = " + p1;
     }
@@ -184,7 +184,7 @@
     public String toString() {
         return me;
     }
-    
+
   }
 
   static class jj2 extends jj1 {
@@ -227,7 +227,7 @@
     # Provide a visual break in the output
     cmd print 1
 
-    # Verify mixing primitive types works ok 
+    # Verify mixing primitive types works ok
     # These should work even though the arg types are
     # not the same because there is only one
     # method with each name.
@@ -302,7 +302,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/GetLocalVariables3Test.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/GetLocalVariables3Test.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -67,7 +67,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/GetLocalVariables4Test.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/GetLocalVariables4Test.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -69,7 +69,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/JdbExprTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/JdbExprTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -53,7 +53,7 @@
     public static void bkpt() {
        int i = 0;     //@1 breakpoint
     }
-    
+
     public static void main(String[] args) {
         bkpt();
     }
@@ -73,7 +73,7 @@
 
     cmd print java.lang.Long.MIN_VALUE
     jdbFailIfNotPresent " \= \-9223372036854775808" 3
-    
+
     cmd print 9223372036854775807L
     jdbFailIfNotPresent "9223372036854775807L = 9223372036854775807" 3
     cmd print 9223372036854775807
@@ -83,7 +83,7 @@
     jdbFailIfNotPresent "\-9223372036854775807L = \-9223372036854775807" 3
     cmd print -9223372036854775807
     jdbFailIfNotPresent "\-9223372036854775807 = \-9223372036854775807" 3
-    
+
     cmd print -1
     jdbFailIfNotPresent "\-1 = \-1" 3
     cmd print 1L
@@ -92,7 +92,7 @@
     jdbFailIfNotPresent "\-1L = \-1" 3
     cmd print 0x1
     jdbFailIfNotPresent "0x1 = 1" 3
-    
+
     cmd set $classname.aLong = 9223372036854775807L
     cmd print $classname.aLong
     jdbFailIfNotPresent "$classname.aLong = 9223372036854775807" 3
@@ -142,7 +142,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/JdbLockTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/JdbLockTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2003, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 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
@@ -94,7 +94,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/MixedSuspendTest.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/MixedSuspendTest.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/jdi/NullLocalVariable.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/NullLocalVariable.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -40,10 +40,10 @@
     public static final void main(String args[]) {
         try {
             System.out.println("hi!");               // @1 breakpoint
-        } catch (Exception e) {         
+        } catch (Exception e) {
             e.printStackTrace();
         } finally {
-            System.out.println("done"); 
+            System.out.println("done");
         }
     }
 }
@@ -71,7 +71,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/NullThreadGroupNameTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/NullThreadGroupNameTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/jdi/RedefineChangeClassOrder.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/RedefineChangeClassOrder.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -135,7 +135,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/RedefineException.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/RedefineException.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 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
@@ -75,7 +75,7 @@
       }
       System.out.println("a2: done");
     }
-  
+
     public void a3() throws Exception {
       int a3local = 3;
       String a3string = "a3";
@@ -105,7 +105,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/RedefineImplementor.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/RedefineImplementor.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -81,7 +81,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/jdi/RedefineIntConstantToLong.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/jdi/RedefineIntConstantToLong.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2006, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 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
@@ -50,13 +50,13 @@
     }
 
     public long m2(int j) {
-        System.out.println(System.getProperty("line.separator") + 
+        System.out.println(System.getProperty("line.separator") +
                            "**** public long m2(int j) with value: " + j);
         return j;
     }
 
     public long m2(long j) {
-        System.out.println(System.getProperty("line.separator") + 
+        System.out.println(System.getProperty("line.separator") +
                            "**** public long m2(long j) with value: " + j);
         return j;
     }
@@ -102,7 +102,7 @@
 
     for ii in . $TESTSRC $TESTSRC/.. ; do
         if [ -r "$ii/ShellScaffold.sh" ] ; then
-            . $ii/ShellScaffold.sh 
+            . $ii/ShellScaffold.sh
             break
         fi
     done
--- a/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java	Fri May 12 10:43:28 2017 -0700
@@ -66,6 +66,7 @@
                     "-XX:+UseCodeAging",
                     "-XX:+UseCerealGC",         // Should be ignored.
                     "-XX:Flags=" + flagsFile.getAbsolutePath(),
+                    "-Djdk.attach.allowAttachSelf",
                     "-cp", System.getProperty("test.class.path"),
                     "CheckOrigin",
                     "-runtests");
--- a/test/com/sun/net/httpserver/SimpleHttpServerTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/net/httpserver/SimpleHttpServerTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/com/sun/net/httpserver/StopNoStartTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/net/httpserver/StopNoStartTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/com/sun/net/httpserver/bugs/B6433018.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/net/httpserver/bugs/B6433018.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -103,4 +103,3 @@
         }
     }
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/tools/attach/AttachSelf.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,61 @@
+/*
+ * 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 com.sun.tools.attach.VirtualMachine;
+
+import java.io.IOException;
+
+/**
+ * @test
+ * @modules jdk.attach
+ * @run main AttachSelf
+ * @run main/othervm -Djdk.attach.allowAttachSelf AttachSelf
+ * @run main/othervm -Djdk.attach.allowAttachSelf=true AttachSelf
+ * @run main/othervm -Djdk.attach.allowAttachSelf=false AttachSelf
+ */
+
+public class AttachSelf {
+
+    public static void main(String[] args) throws Exception {
+
+        String value = System.getProperty("jdk.attach.allowAttachSelf");
+        boolean canAttachSelf = (value != null) && !value.equals("false");
+
+        String vmid = "" + ProcessHandle.current().pid();
+
+        VirtualMachine vm = null;
+        try {
+            vm = VirtualMachine.attach(vmid);
+            if (!canAttachSelf)
+                throw new RuntimeException("Attached to self not expected");
+        } catch (IOException ioe) {
+            if (canAttachSelf)
+                throw ioe;
+        } finally {
+            if (vm != null) vm.detach();
+        }
+
+    }
+
+}
+
--- a/test/com/sun/tools/attach/PermissionTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/PermissionTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/tools/attach/ProviderTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/ProviderTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/tools/attach/RunnerUtil.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/RunnerUtil.java	Fri May 12 10:43:28 2017 -0700
@@ -48,7 +48,10 @@
      */
     public static ProcessThread startApplication(String... additionalOpts) throws Throwable {
         String classpath = System.getProperty("test.class.path", ".");
-        String[] myArgs = concat(additionalOpts, new String [] { "-XX:+UsePerfData", "-Dattach.test=true", "-classpath", classpath, "Application" });
+        String[] myArgs = concat(additionalOpts, new String [] {
+            "-XX:+UsePerfData", "-XX:+EnableDynamicAgentLoading",
+            "-Dattach.test=true", "-classpath", classpath, "Application"
+        });
         String[] args = Utils.addTestJavaOpts(myArgs);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
         ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb);
--- a/test/com/sun/tools/attach/StartManagementAgent.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/StartManagementAgent.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/tools/attach/TempDirTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/TempDirTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/com/sun/tools/attach/java.policy.allow	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/com/sun/tools/attach/java.policy.allow	Fri May 12 10:43:28 2017 -0700
@@ -8,7 +8,8 @@
     permission com.sun.tools.attach.AttachPermission "createAttachProvider";
 
     /* implementation specific */
-    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
+    permission java.lang.RuntimePermission "manageProcess";
+    permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc";
     permission java.lang.RuntimePermission "accessClassInPackage.sun.tools.attach";
     permission java.lang.RuntimePermission "accessClassInPackage.sun.jvmstat.monitor";
     permission java.lang.RuntimePermission "loadLibrary.attach";
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/tools/attach/modules/Agent.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
+ */
+
+import java.lang.instrument.Instrumentation;
+
+public class Agent {
+
+    public static void agentmain(String agentArgs, Instrumentation inst) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/tools/attach/modules/Driver.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,35 @@
+/*
+ * 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
+ * @modules jdk.attach
+ * @build m/* Agent
+ * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent
+ * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main javaagent jmx
+ * @run main/othervm --limit-modules=jdk.attach -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent
+ * @run main/othervm --limit-modules=jdk.attach -Djdk.attach.allowAttachSelf m/p.Main javaagent jmx
+ * @summary Basic test to ensure that a JMX agent or a tool agent can be loaded/started in
+  *         a modular application.
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/tools/attach/modules/m/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module m {
+    exports p;
+    requires jdk.attach;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/tools/attach/modules/m/p/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,164 @@
+/*
+ * 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.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+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.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+
+import com.sun.tools.attach.VirtualMachine;
+
+public class Main {
+
+    public static void main(String[] args) throws Exception {
+        System.out.println("#modules loaded: " + moduleInfoCont());
+
+        String vmid = "" + ProcessHandle.current().pid();
+        VirtualMachine vm = VirtualMachine.attach(vmid);
+
+        for (String test : args) {
+            switch (test) {
+                case "jmx" :
+                    startJMXAgent(vm);
+                    break;
+                case "javaagent" :
+                    startJavaAgent(vm, createAgentJar());
+                    break;
+            }
+
+            System.out.println("#modules loaded: " + moduleInfoCont());
+        }
+    }
+
+    /**
+     * Locates module-info.class resources to get a count of the module of system
+     * modules.
+     */
+    static long moduleInfoCont() {
+        ClassLoader scl = ClassLoader.getSystemClassLoader();
+        return scl.resources("module-info.class").count();
+    }
+
+    /**
+     * Starts a JMX agent and checks that java.management is loaded.
+     */
+    static void startJMXAgent(VirtualMachine vm) throws Exception {
+        System.out.println("Start JMX agent");
+        vm.startLocalManagementAgent();
+
+        // types in java.management should be visible
+        Class.forName("javax.management.MXBean");
+    }
+
+    /**
+     * Loads a java agent into the VM and checks that java.instrument is loaded.
+     */
+    static void startJavaAgent(VirtualMachine vm, Path agent) throws Exception {
+        System.out.println("Load java agent ...");
+        vm.loadAgent(agent.toString());
+
+        // the Agent class should be visible
+        Class.forName("Agent");
+
+        // types in java.instrument should be visible
+        Class.forName("java.lang.instrument.Instrumentation");
+    }
+
+    /**
+     * Creates a java agent, return the file path to the agent JAR file.
+     */
+    static Path createAgentJar() throws IOException {
+        Manifest man = new Manifest();
+        Attributes attrs = man.getMainAttributes();
+        attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
+        attrs.put(new Attributes.Name("Agent-Class"), "Agent");
+        Path agent = Paths.get("agent.jar");
+        Path dir = Paths.get(System.getProperty("test.classes"));
+        createJarFile(agent, man, dir, "Agent.class");
+        return agent;
+    }
+
+    /**
+     * Creates a JAR file.
+     *
+     * Equivalent to {@code jar cfm <jarfile> <manifest> -C <dir> file...}
+     *
+     * The input files are resolved against the given directory. Any input
+     * files that are directories are processed recursively.
+     */
+    static void createJarFile(Path jarfile, Manifest man, Path dir, String... files)
+        throws IOException
+    {
+        // create the target directory
+        Path parent = jarfile.getParent();
+        if (parent != null)
+            Files.createDirectories(parent);
+
+        List<Path> entries = new ArrayList<>();
+        for (String file : files) {
+            Files.find(dir.resolve(file), Integer.MAX_VALUE,
+                    (p, attrs) -> attrs.isRegularFile())
+                    .map(e -> dir.relativize(e))
+                    .forEach(entries::add);
+        }
+
+        try (OutputStream out = Files.newOutputStream(jarfile);
+             JarOutputStream jos = new JarOutputStream(out))
+        {
+            if (man != null) {
+                JarEntry je = new JarEntry(JarFile.MANIFEST_NAME);
+                jos.putNextEntry(je);
+                man.write(jos);
+                jos.closeEntry();
+            }
+
+            for (Path entry : entries) {
+                String name = toJarEntryName(entry);
+                jos.putNextEntry(new JarEntry(name));
+                Files.copy(dir.resolve(entry), jos);
+                jos.closeEntry();
+            }
+        }
+    }
+
+    /**
+     * Map a file path to the equivalent name in a JAR file
+     */
+    static String toJarEntryName(Path file) {
+        Path normalized = file.normalize();
+        return normalized.subpath(0, normalized.getNameCount())
+                .toString()
+                .replace(File.separatorChar, '/');
+    }
+}
--- a/test/demo/jvmti/Context.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2004, 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.
- */
-
-
-/*
- *
- *   Sample target application for jvmti demos
- *
- *     java Context [threadCount [iterationCount [sleepContention]]]
- *           Default: java Context 5 10 0
- *
- *      threadCount     Number of threads
- *      iterationCount  Total turns taken for all threads
- *      sleepContention Time for main thread to sleep while holding lock
- *                      (creates monitor contention on all other threads)
- *
- */
-
-/* Used to sync up turns and keep track of who's turn it is */
-final class TurnChecker {
-    int thread_index;
-    TurnChecker(int thread_index) {
-        this.thread_index = thread_index;
-    }
-}
-
-/* Creates a bunch of threads that sequentially take turns */
-public final class Context extends Thread {
-    /* Used to track threads */
-    private static long startTime;
-    private static TurnChecker turn = new TurnChecker(-1);
-    private static int total_turns_taken;
-
-    /* Used for each Context thread */
-    private final int thread_count;
-    private final int thread_index;
-    private final int thread_turns;
-
-    /* Main program */
-    public static void main(String[] argv) throws InterruptedException {
-        int default_thread_count = 5;
-        int default_thread_turns = 10;
-        int default_contention_sleep = 0;
-        int expected_turns_taken;
-        long sleepTime = 10L;
-
-        /* Override defaults */
-        if ( argv.length >= 1 ) {
-            default_thread_count = Integer.parseInt(argv[0]);
-        }
-        if ( argv.length >= 2 ) {
-            expected_turns_taken = Integer.parseInt(argv[1]);
-            default_thread_turns = expected_turns_taken/default_thread_count;
-        }
-        expected_turns_taken = default_thread_count*default_thread_turns;
-        if ( argv.length >= 3 ) {
-            default_contention_sleep = Integer.parseInt(argv[2]);
-        }
-
-        System.out.println("Context started with "
-                 + default_thread_count + " threads and "
-                 + default_thread_turns + " turns per thread");
-
-        /* Get all threads running (they will block until we set turn) */
-        for (int i = 0; i < default_thread_count; i++) {
-            new Context(default_thread_count, i, default_thread_turns).start();
-        }
-
-        /* Sleep to make sure thread_index 0 make it to the wait call */
-        System.out.println("Context sleeping, so threads will start wait");
-        Thread.yield();
-        Thread.sleep(sleepTime);
-
-        /* Save start time */
-        startTime = System.currentTimeMillis();
-
-        /* This triggers the starting of taking turns */
-        synchronized (turn) {
-            turn.thread_index = 0;
-            turn.notifyAll();
-        }
-        System.out.println("Context sleeping, so threads can run");
-        Thread.yield();
-        Thread.sleep(sleepTime);
-
-        /* Wait for threads to finish (after everyone has had their turns) */
-        while ( true ) {
-            boolean done;
-            done = false;
-            synchronized (turn) {
-                if ( total_turns_taken == expected_turns_taken ) {
-                    done = true;
-                }
-                /* Create some monitor contention by sleeping with lock */
-                if ( default_contention_sleep > 0 ) {
-                    System.out.println("Context sleeping, to create contention");
-                    Thread.yield();
-                    Thread.sleep((long)default_contention_sleep);
-                }
-            }
-            if ( done )
-                break;
-            System.out.println("Context sleeping, so threads will complete");
-            Thread.sleep(sleepTime);
-        }
-
-        long endTime   = System.currentTimeMillis();
-        long totalTime = endTime - startTime;
-
-        System.out.println("Total time (milliseconds): " + totalTime);
-        System.out.println("Milliseconds per thread: " +
-                           ((double)totalTime / (default_thread_count)));
-
-        System.out.println("Context completed");
-        System.exit(0);
-    }
-
-    /* Thread object to run */
-    Context(int thread_count, int thread_index, int thread_turns) {
-        this.thread_count = thread_count;
-        this.thread_index = thread_index;
-        this.thread_turns = thread_turns;
-    }
-
-    /* Main for thread */
-    public void run() {
-        int next_thread_index = (thread_index + 1) % thread_count;
-        int turns_taken       = 0;
-
-        try {
-
-            /* Loop until we make sure we get all our turns */
-            for (int i = 0; i < thread_turns * thread_count; i++) {
-                synchronized (turn) {
-                    /* Keep waiting for our turn */
-                    while (turn.thread_index != thread_index)
-                        turn.wait();
-                    /* MY TURN! Each thread gets thread_turns */
-                    total_turns_taken++;
-                    turns_taken++;
-                    System.out.println("Turn #" + total_turns_taken
-                                + " taken by thread " + thread_index
-                                + ", " + turns_taken
-                                + " turns taken by this thread");
-                    /* Give next thread a turn */
-                    turn.thread_index = next_thread_index;
-                    turn.notifyAll();
-                }
-                /* If we've had all our turns, break out of this loop */
-                if (thread_turns == turns_taken) {
-                    System.out.println("Loop end: thread got " + turns_taken
-                            + " turns, expected " + thread_turns);
-                    break;
-                }
-            }
-        } catch (InterruptedException intEx) {
-            System.out.println("Got an InterruptedException:" + intEx);
-            /* skip */
-        }
-
-        /* Make sure we got all our turns */
-        if ( thread_turns != turns_taken ) {
-            System.out.println("ERROR: thread got " + turns_taken
-                                        + " turns, expected " + thread_turns);
-            System.exit(1);
-        }
-    }
-}
--- a/test/demo/jvmti/DemoRun.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* DemoRun:
- *
- * Support classes for java jvmti demo tests
- *
- */
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-import java.io.BufferedInputStream;
-import java.io.PrintStream;
-
-/*
- * Helper class to direct process output to a StringBuffer
- */
-class MyInputStream implements Runnable {
-    private String              name;
-    private BufferedInputStream in;
-    private StringBuffer        buffer;
-
-    /* Create MyInputStream that saves all output to a StringBuffer */
-    MyInputStream(String name, InputStream in) {
-        this.name = name;
-        this.in = new BufferedInputStream(in);
-        buffer = new StringBuffer(4096);
-        Thread thr = new Thread(this);
-        thr.setDaemon(true);
-        thr.start();
-    }
-
-    /* Dump the buffer */
-    void dump(PrintStream x) {
-        String str = buffer.toString();
-        x.println("<beginning of " + name + " buffer>");
-        x.println(str);
-        x.println("<end of buffer>");
-    }
-
-    /* Check to see if a pattern is inside the output. */
-    boolean contains(String pattern) {
-        String str = buffer.toString();
-        return str.contains(pattern);
-    }
-
-    /* Runs as a separate thread capturing all output in a StringBuffer */
-    public void run() {
-        try {
-            byte b[] = new byte[100];
-            for (;;) {
-                int n = in.read(b);
-                String str;
-                if (n < 0) {
-                    break;
-                }
-                str = new String(b, 0, n);
-                buffer.append(str);
-                System.out.print(str);
-            }
-        } catch (IOException ioe) { /* skip */ }
-    }
-}
-
-/*
- * Main JVMTI Demo Run class.
- */
-public class DemoRun {
-
-    private String        demo_name;
-    private String        demo_options;
-    private MyInputStream output;
-    private MyInputStream error;
-
-    /* Create a Demo run process */
-    public DemoRun(String name, String options)
-    {
-        demo_name    = name;
-        demo_options = options;
-    }
-
-    /*
-     * Execute a process with an -agentpath or -agentlib command option
-     */
-    public void runit(String class_name)
-    {
-        runit(class_name, null);
-    }
-
-    /*
-     * Execute a process with an -agentpath or -agentlib command option
-     *    plus any set of other java options.
-     */
-    public void runit(String class_name, String vm_options[])
-    {
-        String sdk_home  = System.getProperty("java.home");
-        String cdir      = System.getProperty("test.classes", ".");
-        String os_arch   = System.getProperty("os.arch");
-        String os_name   = System.getProperty("os.name");
-        String libprefix = os_name.contains("Windows")?"":"lib";
-        String libsuffix = os_name.contains("Windows")?".dll":
-                                os_name.contains("OS X")?".dylib":".so";
-        String java      = sdk_home
-                             + File.separator + "bin"
-                             + File.separator + "java";
-        /* Array of strings to be passed in for exec:
-         *   1. java
-         *   2. -Dtest.classes=.
-         *   3. -Xcheck:jni          (Just because it finds bugs)
-         *   4. -Xverify:all         (Make sure verification is on full blast)
-         *   5. -agent
-         *       vm_options
-         *   6+i. classname
-         */
-        int nvm_options = 0;
-        if ( vm_options != null ) nvm_options = vm_options.length;
-        String cmd[]     = new String[1 + 7 + nvm_options];
-        String cmdLine;
-        int exitStatus;
-        int i,j;
-
-        i = 0;
-        cmdLine = "";
-        cmdLine += (cmd[i++] = java);
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = "-cp");
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = cdir);
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = "-Dtest.classes=" + cdir);
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = "-Xcheck:jni");
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = "-Xverify:all");
-        String libname = sdk_home
-                + File.separator + "demo"
-                + File.separator + "jvmti"
-                + File.separator + demo_name
-                + File.separator + "lib"
-                + File.separator + libprefix + demo_name + libsuffix;
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = "-agentpath:" + libname
-                + (demo_options.equals("") ? "" : ("=" + demo_options)));
-        /* Add any special VM options */
-        for ( j = 0; j < nvm_options; j++ ) {
-            cmdLine += " ";
-            cmdLine += (cmd[i++] = vm_options[j]);
-        }
-        /* Add classname */
-        cmdLine += " ";
-        cmdLine += (cmd[i++] = class_name);
-
-        /* Begin process */
-        Process p;
-
-        System.out.println("Starting: " + cmdLine);
-        try {
-            p = Runtime.getRuntime().exec(cmd);
-        } catch ( IOException e ) {
-            throw new RuntimeException("Test failed - exec got IO exception");
-        }
-
-        /* Save process output in StringBuffers */
-        output = new MyInputStream("Input Stream", p.getInputStream());
-        error  = new MyInputStream("Error Stream", p.getErrorStream());
-
-        /* Wait for process to complete, and if exit code is non-zero we fail */
-        try {
-            exitStatus = p.waitFor();
-            if ( exitStatus != 0) {
-                System.out.println("Exit code is " + exitStatus);
-                error.dump(System.out);
-                output.dump(System.out);
-                throw new RuntimeException("Test failed - " +
-                                    "exit return code non-zero " +
-                                    "(exitStatus==" + exitStatus + ")");
-            }
-        } catch ( InterruptedException e ) {
-            throw new RuntimeException("Test failed - process interrupted");
-        }
-        System.out.println("Completed: " + cmdLine);
-    }
-
-    /* Does the pattern appear in the output of this process */
-    public boolean output_contains(String pattern)
-    {
-        return output.contains(pattern) || error.contains(pattern);
-    }
-}
--- a/test/demo/jvmti/HeapUser.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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.
- */
-
-
-/*
- *
- *   Sample target application
- *
- */
-
-class Animal {
-    int category;
-    int age;
-}
-
-class Pet extends Animal {
-    String owner;
-    String name;
-    String vet;
-    String records;
-    String address;
-    Pet(String name) { this.name = name; }
-}
-
-class Dog extends Pet {
-    int breed;
-    int barks;
-    Dog(String name) { super(name); }
-}
-
-class Cat extends Pet {
-    int breed;
-    int claws;
-    Cat(String name) { super(name); }
-}
-
-public class HeapUser {
-    private static Dog dogs[];
-    private static Cat cats[];
-    public static void main(String args[]) {
-        System.out.println("HeapUser start, 101 dogs, 1000 cats");
-        dogs = new Dog[101];
-        for(int i=0; i<101; i++) {
-            dogs[i] = new Dog("fido " + i);
-        }
-        cats = new Cat[1000];
-        for(int i=0; i<1000; i++) {
-            cats[i] = new Cat("feefee " + i);
-        }
-        System.out.println("HeapUser end");
-    }
-}
--- a/test/demo/jvmti/Hello.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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.
- */
-
-
-/*
- *
- *   Sample target application for jvmti demos
- *
- */
-
-public class Hello {
-    public static void main(String args[]) {
-        System.out.println("Hello");
-    }
-}
--- a/test/demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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.
- */
-
-
-/* @test
- * @bug 6580131
- * @summary Test jvmti demo compiledMethodLoad
- *
- * @compile ../DemoRun.java ../Hello.java
- * @build CompiledMethodLoadTest
- * @run main CompiledMethodLoadTest Hello
- */
-
-public class CompiledMethodLoadTest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI compiledMethodLoad agent (no options) */
-        demo = new DemoRun("compiledMethodLoad", "" /* options to compiledMethodLoad */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/gctest/BigHello.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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.
- */
-
-
-/*
- *
- *   Sample target application for gctest demo
- *
- */
-
-public class BigHello {
-    private final static int NLOOPS = 20000;
-    private static Object garbage[];
-    public static void main(String args[]) {
-        long count = 0;
-        System.out.println("Big Hello start");
-        for(int i=1; i<=NLOOPS; i++) {
-            count += i;
-            garbage = new Object[i];
-            garbage[0] = new Object();
-        }
-        System.out.println("Allocated " + count +
-                           " array elements, and " + NLOOPS +
-                           " arrays and Objects.");
-        System.out.println("Big Hello end");
-    }
-}
--- a/test/demo/jvmti/gctest/Gctest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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 5027764
- * @summary Test jvmti demo gctest
- *
- * @compile ../DemoRun.java
- * @build BigHello Gctest
- * @run main Gctest BigHello
- */
-
-public class Gctest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI gctest agent (no options) */
-        demo = new DemoRun("gctest", "" /* options to gctest */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/heapTracker/HeapTrackerTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, 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 5050116 6299047
- * @summary Test jvmti demo heapTracker
- *
- * @compile ../DemoRun.java
- * @compile ../HeapUser.java
- * @build HeapTrackerTest
- * @run main HeapTrackerTest HeapUser
- */
-
-public class HeapTrackerTest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI heapTracker agent (no options) */
-        demo = new DemoRun("heapTracker", "" /* options to heapTracker */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/heapViewer/HeapViewerTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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 5033539
- * @summary Test jvmti demo heapViewer
- *
- * @compile ../DemoRun.java
- * @compile ../HeapUser.java
- * @build HeapViewerTest
- * @run main HeapViewerTest HeapUser
- */
-
-public class HeapViewerTest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI heapViewer agent (no options) */
-        demo = new DemoRun("heapViewer", "" /* options to heapViewer */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/minst/MinstExample.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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.
- */
-
-
-/* MinstExample:
- *
- */
-
-public class MinstExample {
-    private static int called = 0;
-    private static void foobar() {
-        called++;
-    }
-    public static void main(String[] args) {
-        System.out.println("MinstExample started");
-        for(int i=0; i<200; i++) foobar();
-        System.out.println("MinstExample ended");
-    }
-}
--- a/test/demo/jvmti/minst/MinstTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please 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 6377205
- * @summary Test jvmti demo minst
- *
- * @compile ../DemoRun.java
- * @compile MinstExample.java
- * @build MinstTest
- * @run main MinstTest MinstExample
- */
-
-public class MinstTest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI minst agent (no options) */
-        demo = new DemoRun("minst", "exclude=java/*,exclude=javax/*,exclude=com/*,exclude=jdk/*,exclude=sun/*" /* options to minst */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/versionCheck/FailsWhenJvmtiVersionDiffers.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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 5039613
- * @summary Test jvmti demo versionCheck
- *
- * @compile ../DemoRun.java ../Hello.java
- * @build FailsWhenJvmtiVersionDiffers
- * @run main FailsWhenJvmtiVersionDiffers Hello
- */
-
-public class FailsWhenJvmtiVersionDiffers {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI versionCheck agent (no options) */
-        demo = new DemoRun("versionCheck", "" /* options to versionCheck */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            System.out.println(
-             "NOTE: The jmvti.h file doesn't match the JVMTI in the VM.\n"
-            +"      This may or may not be a serious issue.\n"
-            +"      Check the jtr file for details.\n"
-            +"      Call your local serviceability representative for help."
-            );
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/demo/jvmti/waiters/WaitersTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute 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 5027764
- * @summary Test jvmti demo waiters
- *
- * @compile ../DemoRun.java
- * @compile ../Context.java
- * @build WaitersTest
- * @run main WaitersTest Context
- */
-
-public class WaitersTest {
-
-    public static void main(String args[]) throws Exception {
-        DemoRun demo;
-
-        /* Run demo that uses JVMTI waiters agent (no options) */
-        demo = new DemoRun("waiters", "" /* options to waiters */ );
-        demo.runit(args[0]);
-
-        /* Make sure patterns in output look ok */
-        if (demo.output_contains("ERROR")) {
-            throw new RuntimeException("Test failed - ERROR seen in output");
-        }
-
-        /* Must be a pass. */
-        System.out.println("Test passed - cleanly terminated");
-    }
-}
--- a/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Choice/UnfocusableToplevel/UnfocusableToplevel.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.html	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ 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
--- a/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/EventQueue/MainAppContext/MainAppContext.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/EventQueue/MainAppContext/MainAppContext.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011,2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/FileDialog/RegexpFilterTest/RegexpFilterTest.html	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 2007 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
 -->
 
 <html>
-<!--  
+<!--
   @test
   @bug 4934185
   @summary JCK1.5-runtime-interactive: XToolkit FileDialog does not work as expected
--- a/test/java/awt/Focus/WindowIsFocusableAccessByThreadsTest/WindowIsFocusableAccessByThreadsTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Focus/WindowIsFocusableAccessByThreadsTest/WindowIsFocusableAccessByThreadsTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/java/awt/Frame/FrameResize/ShowChildWhileResizingTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Frame/FrameResize/ShowChildWhileResizingTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,6 +1,5 @@
-
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
--- a/test/java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/LightweightComponent/LightweightEventTest/LightweightEventTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/GlassPaneOverlappingTestBase.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017 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
--- a/test/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/SimpleOverlappingTestBase.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017 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
@@ -165,4 +165,3 @@
     }
 
 }
-
--- a/test/java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Mouse/MaximizedFrameTest/MaximizedFrameTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/MouseInfo/JContainerMousePositionTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/MouseInfo/JContainerMousePositionTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017 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
--- a/test/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Toolkit/AutoShutdown/EventQueuePush/EventQueuePushAutoshutdown.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/ksh -p
 
 #
-# Copyright (c) 20015, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -39,7 +39,7 @@
 
 #Call this from anywhere to fail the test with an error message
 # usage: fail "reason why the test failed"
-fail() 
+fail()
  { echo "The test failed :-("
    echo "$*" 1>&2
    echo "exit status was $status"
@@ -48,7 +48,7 @@
 
 #Call this from anywhere to pass the test with a message
 # usage: pass "reason why the test passed if applicable"
-pass() 
+pass()
  { echo "The test passed!!!"
    echo "$*" 1>&2
    exit 0
@@ -76,8 +76,8 @@
 esac
 
 
-# Want this test to run standalone as well as in the harness, so do the 
-#  following to copy the test's directory into the harness's scratch directory 
+# Want this test to run standalone as well as in the harness, so do the
+#  following to copy the test's directory into the harness's scratch directory
 #  and set all appropriate variables:
 
 if [ -z "${TESTJAVA}" ] ; then
@@ -100,25 +100,25 @@
 echo "JDK under test is: $TESTJAVA"
 
 #Deal with .class files:
-if [ -n "${STANDALONE}" ] ; 
-   then 
+if [ -n "${STANDALONE}" ] ;
+   then
    #if standalone, remind user to cd to dir. containing test before running it
    echo "Just a reminder: cd to the dir containing this test when running it"
    # then compile all .java files (if there are any) into .class files
-   if [ -a *.java ] ; 
+   if [ -a *.java ] ;
       then echo "Reminder, this test should be in its own directory with all"
       echo "supporting files it needs in the directory with it."
-      ${TESTJAVA}/bin/javac ./*.java ; 
+      ${TESTJAVA}/bin/javac ./*.java ;
    fi
    # else in harness so copy all the class files from where jtreg put them
-   # over to the scratch directory this test is running in. 
+   # over to the scratch directory this test is running in.
    else cp ${TESTCLASSES}/*.class . ;
 fi
 
-#if in test harness, then copy the entire directory that the test is in over 
+#if in test harness, then copy the entire directory that the test is in over
 # to the scratch directory.  This catches any support files needed by the test.
-if [ -z "${STANDALONE}" ] ; 
-   then cp ${TESTSRC}/* . 
+if [ -z "${STANDALONE}" ] ;
+   then cp ${TESTSRC}/* .
 fi
 
 #Just before executing anything, make sure it has executable permission!
@@ -156,4 +156,3 @@
 
 #For additional examples of how to write platform independent KSH scripts,
 # see the jtreg file itself.  It is a KSH script for both Solaris and Win32
-
--- a/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
--- a/test/java/awt/Window/FindOwner/FindOwnerTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/Window/FindOwner/FindOwnerTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,4 +107,4 @@
             stop();
         }
     }
-}
\ No newline at end of file
+}
--- a/test/java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/dnd/MissingEventsOnModalDialog/MissingEventsOnModalDialogTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -76,7 +76,7 @@
 
         mouseDragAndDrop(robot, point, getCenterPoint(targetFrame));
 
-        long time = System.currentTimeMillis() + 200;
+        long time = System.currentTimeMillis() + 1000;
 
         while (!passed) {
             if (time < System.currentTimeMillis()) {
@@ -222,10 +222,12 @@
                 }
                 Thread.sleep(10);
             }
+            Robot robot = new Robot();
+            robot.setAutoDelay(50);
+            robot.waitForIdle();
+            robot.delay(200);
 
             Point point = getCenterPoint(dialog);
-            Robot robot = new Robot();
-            robot.setAutoDelay(50);
 
             robot.mouseMove(point.x, point.y);
             robot.mousePress(InputEvent.BUTTON1_MASK);
--- a/test/java/awt/event/MouseEvent/DisabledComponents/DisabledComponentsTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/event/MouseEvent/DisabledComponents/DisabledComponentsTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/awt/font/TextLayout/ArabicDiacriticTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/font/TextLayout/ArabicDiacriticTest.java	Fri May 12 10:43:28 2017 -0700
@@ -18,6 +18,7 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /* @test
--- a/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/awt/font/TextLayout/MissingCodePointLayoutTest.java	Fri May 12 10:43:28 2017 -0700
@@ -18,6 +18,7 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /* @test
--- a/test/java/io/FileInputStream/LargeFileAvailable.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/io/FileInputStream/LargeFileAvailable.java	Fri May 12 10:43:28 2017 -0700
@@ -24,7 +24,6 @@
 /*
  * @test
  * @bug 6402006 7030573 8011136
- * @key intermittent
  * @summary Test if available returns correct value when reading
  *          a large file.
  * @run main/timeout=300 LargeFileAvailable
--- a/test/java/io/RandomAccessFile/FileLengthTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/io/RandomAccessFile/FileLengthTest.java	Fri May 12 10:43:28 2017 -0700
@@ -9,7 +9,7 @@
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE randomAccessFile that
+ * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
  * You should have received a copy of the GNU General Public License version
--- a/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java	Fri May 12 10:43:28 2017 -0700
@@ -286,7 +286,11 @@
          * Filter deployment modules
          */
         static Set<String> systemModules() {
-            Set<String> mods = Set.of("javafx.deploy", "jdk.deploy", "jdk.plugin", "jdk.javaws");
+            Set<String> mods = Set.of("javafx.deploy", "jdk.deploy", "jdk.plugin", "jdk.javaws",
+                // All JVMCI packages other than jdk.vm.ci.services are dynamically
+                // exported to jdk.internal.vm.compiler and jdk.aot
+                "jdk.internal.vm.compiler", "jdk.aot"
+            );
             return ModuleFinder.ofSystem().findAll().stream()
                                .map(mref -> mref.descriptor().name())
                                .filter(mn -> !mods.contains(mn))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/ClassLoader/CustomSystemLoader/CustomLoader.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,59 @@
+/*
+ * 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.io.PrintStream;
+
+/*
+ * Custom system class loader.
+ */
+public class CustomLoader extends ClassLoader {
+    private static PrintStream out = System.out;
+    public  static ClassLoader INSTANCE;
+
+    public CustomLoader(ClassLoader classLoader) {
+        super("CustomSystemLoader", classLoader);
+        assert INSTANCE == null;
+        INSTANCE = this;
+
+        // test cases to validate that ClassLoader::getSystemClassLoader
+        // is not triggered during custom system class loader initialization
+        testEnumValueOf();
+    }
+
+    static void testEnumValueOf() {
+        TestEnum e = java.lang.Enum.valueOf(TestEnum.class, "C1");
+        if (e != TestEnum.C1) {
+            throw new RuntimeException("Expected: " + TestEnum.C1 + " got: " + e);
+        }
+    }
+
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+        out.println("CustomLoader: loading class: " + name);
+        return super.loadClass(name);
+    }
+
+    static enum TestEnum {
+        C1, C2, C3
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/ClassLoader/CustomSystemLoader/InitSystemLoaderTest.java	Fri May 12 10:43:28 2017 -0700
@@ -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 8179950
+ * @build CustomLoader InitSystemLoaderTest
+ * @run main/othervm -Djava.system.class.loader=CustomLoader InitSystemLoaderTest
+ * @summary Test custom system loader initialization and verify their ancestors
+ */
+
+public class InitSystemLoaderTest {
+    public static void main(String... args) {
+        // check that system class loader is the custom loader
+        ClassLoader loader = ClassLoader.getSystemClassLoader();
+        if (loader != CustomLoader.INSTANCE) {
+            throw new RuntimeException("Expected custom loader: "
+                + CustomLoader.INSTANCE + " got: " + loader);
+        }
+
+        // parent of the custom loader should be builtin system class loader
+        ClassLoader builtinSystemLoader = loader.getParent();
+        ClassLoader grandparent = builtinSystemLoader.getParent();
+        if (grandparent != ClassLoader.getPlatformClassLoader()) {
+            throw new RuntimeException("Expected class loader ancestor: "
+                + ClassLoader.getPlatformClassLoader() + " got: " + grandparent);
+        }
+    }
+}
--- a/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/ClassLoader/securityManager/ClassLoaderTest.java	Fri May 12 10:43:28 2017 -0700
@@ -28,8 +28,14 @@
  *          (in)valid security policy file.
  * @library /lib/testlibrary
  * @modules java.base/jdk.internal.module
- * @build JarUtils CompilerUtils
- * @run main/timeout=240 ClassLoaderTest
+ * @build JarUtils
+ * @build TestClassLoader TestClient
+ * @run main ClassLoaderTest -noPolicy
+ * @run main ClassLoaderTest -validPolicy
+ * @run main ClassLoaderTest -invalidPolicy
+ * @run main ClassLoaderTest -noPolicy      -customSCL
+ * @run main ClassLoaderTest -validPolicy   -customSCL
+ * @run main ClassLoaderTest -invalidPolicy -customSCL
  */
 import java.io.File;
 import java.io.OutputStream;
@@ -37,25 +43,23 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
-import java.util.Map;
-import java.util.HashMap;
+import java.util.stream.Stream;
 import java.lang.module.ModuleDescriptor;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
 import jdk.internal.module.ModuleInfoWriter;
 import jdk.testlibrary.ProcessTools;
 
 public class ClassLoaderTest {
 
     private static final String SRC = System.getProperty("test.src");
-    private static final Path CL_SRC = Paths.get(SRC, "TestClassLoader.java");
-    private static final Path C_SRC = Paths.get(SRC, "TestClient.java");
-    private static final Path CL_BIN = Paths.get("classes", "clbin");
-    private static final Path C_BIN = Paths.get("classes", "cbin");
+    private static final Path TEST_CLASSES =
+            Paths.get(System.getProperty("test.classes"));
     private static final Path ARTIFACT_DIR = Paths.get("jars");
     private static final Path VALID_POLICY = Paths.get(SRC, "valid.policy");
     private static final Path INVALID_POLICY
             = Paths.get(SRC, "malformed.policy");
-    private static final Path NO_POLICY = null;
-    private static final String LOCALE = "-Duser.language=en -Duser.region=US";
     /*
      * Here is the naming convention followed for each jar.
      * cl.jar   - Regular custom class loader jar.
@@ -69,180 +73,175 @@
     private static final Path C_JAR = ARTIFACT_DIR.resolve("c.jar");
     private static final Path MC_JAR = ARTIFACT_DIR.resolve("mc.jar");
     private static final Path AMC_JAR = ARTIFACT_DIR.resolve("amc.jar");
-    private static final Map<String, String> MSG_MAP = new HashMap<>();
+
+    // Expected output messages
+    private static final String MISSING_MODULE =
+            "Module cl not found, required by mc";
+    private static final String POLICY_ERROR =
+            "java.security.policy: error parsing file";
+    private static final String SYSTEM_CL_MSG =
+            "jdk.internal.loader.ClassLoaders$AppClassLoader";
+    private static final String CUSTOM_CL_MSG = "cl.TestClassLoader";
+
+    // Member vars
+    private final boolean useSCL;       // Use default system loader, or custom
+    private final String smMsg;         // Security manager message, or ""
+    private final String autoAddModArg; // Flag to add cl modules, or ""
+    private final String addmodArg;     // Flag to add mcl modules, or ""
+    private final String expectedStatus;// Expected exit status from client
+    private final String expectedMsg;   // Expected output message from client
+
+    // Common set of VM arguments used in all test cases
+    private final List<String> commonArgs;
+
+    public ClassLoaderTest(Path policy, boolean useSCL) {
+        this.useSCL = useSCL;
+
+        List<String> argList = new LinkedList<>();
+        argList.add("-Duser.language=en");
+        argList.add("-Duser.region=US");
 
-    static {
-        // This mapping help process finding expected message based
-        // on the key passed as argument while executing java command.
-        MSG_MAP.put("MissingModule", "Module cl not found, required by mc");
-        MSG_MAP.put("ErrorPolicy", "java.security.policy: error parsing file");
-        MSG_MAP.put(
-                "SystemCL", "jdk.internal.loader.ClassLoaders$AppClassLoader");
-        MSG_MAP.put("CustomCL", "cl.TestClassLoader");
+        boolean malformedPolicy = false;
+        if (policy == null) {
+            smMsg = "Without SecurityManager";
+        } else {
+            malformedPolicy = policy.equals(INVALID_POLICY);
+            argList.add("-Djava.security.manager");
+            argList.add("-Djava.security.policy=" +
+                    policy.toFile().getAbsolutePath());
+            smMsg = "With SecurityManager";
+        }
+
+        if (useSCL) {
+            autoAddModArg = "";
+            addmodArg = "";
+        } else {
+            argList.add("-Djava.system.class.loader=cl.TestClassLoader");
+            autoAddModArg = "--add-modules=cl";
+            addmodArg = "--add-modules=mcl";
+        }
+
+        if (malformedPolicy) {
+            expectedStatus = "FAIL";
+            expectedMsg = POLICY_ERROR;
+        } else if (useSCL) {
+            expectedStatus = "PASS";
+            expectedMsg = SYSTEM_CL_MSG;
+        } else {
+            expectedStatus = "PASS";
+            expectedMsg = CUSTOM_CL_MSG;
+        }
+        commonArgs = Collections.unmodifiableList(argList);
     }
 
     public static void main(String[] args) throws Exception {
+        Path policy;
+        if (args[0].equals("-noPolicy")) {
+            policy = null;
+        } else if (args[0].equals("-validPolicy")) {
+            policy = VALID_POLICY;
+        } else if (args[0].equals("-invalidPolicy")) {
+            policy = INVALID_POLICY;
+        } else {
+            throw new RuntimeException("Unknown policy arg: " + args[0]);
+        }
 
-        // Generates regular and modular jars before start processing it.
+        boolean useSystemLoader = true;
+        if (args.length > 1) {
+            if (args[1].equals("-customSCL")) {
+                useSystemLoader = false;
+            } else {
+                throw new RuntimeException("Unknown custom loader arg: " + args[1]);
+            }
+        }
+
+        ClassLoaderTest test = new ClassLoaderTest(policy, useSystemLoader);
         setUp();
-        processForEachPolicyFile();
+        test.processForPolicyFile();
     }
 
     /**
      * Test cases are based on the following logic,
-     *  for (policyFile : {"NO_POLICY", "VALID", "MALFORMED"}) {
-     *      for (classLoader : {"SystemClassLoader", "CustomClassLoader"}){
-     *          for (clientModule : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
-     *              for (classLoaderModule : {"NAMED", "AUTOMATIC", "UNNAMED"}) {
-     *                  Create and run java command for each possible Test case
-     *              }
-     *          }
+     *  given: a policyFile in {none, valid, malformed} and
+     *         a classLoader in {SystemClassLoader, CustomClassLoader}:
+     *  for (clientModule : {"NAMED", "UNNAMED"}) {
+     *      for (classLoaderModule : {"NAMED", "UNNAMED"}) {
+     *          Create and run java command for each possible Test case
      *      }
      *  }
      */
-    private static void processForEachPolicyFile() throws Exception {
-
-        final String regCLloc = CL_JAR.toFile().getAbsolutePath();
-        final String modCLloc = MCL_JAR.toFile().getAbsolutePath();
-        final String regCloc = C_JAR.toFile().getAbsolutePath();
-        final String modCloc = MC_JAR.toFile().getAbsolutePath();
+    private void processForPolicyFile() throws Exception {
+        final String regLoaderLoc = CL_JAR.toFile().getAbsolutePath();
+        final String modLoadrLoc = MCL_JAR.toFile().getAbsolutePath();
+        final String regClientLoc = C_JAR.toFile().getAbsolutePath();
+        final String modClientLoc = MC_JAR.toFile().getAbsolutePath();
         final String autoModCloc = AMC_JAR.toFile().getAbsolutePath();
         final String separator = File.pathSeparator;
 
-        for (Path policy
-                : new Path[]{NO_POLICY, VALID_POLICY, INVALID_POLICY}) {
-            final String policyFile = (policy != null)
-                    ? policy.toFile().getAbsolutePath() : null;
-            final boolean malformedPolicy
-                    = (policy == null) ? false : policy.equals(INVALID_POLICY);
-
-            for (boolean useSCL : new boolean[]{true, false}) {
-                final String clVmArg = (useSCL) ? ""
-                        : "-Djava.system.class.loader=cl.TestClassLoader";
-                final String autoAddModArg
-                        = (useSCL) ? "" : "--add-modules=cl";
-                final String addmodArg = (useSCL) ? "" : "--add-modules=mcl";
-                final String sMArg = (policy != null) ? String.format(
-                        "-Djava.security.manager -Djava.security.policy=%s",
-                        policyFile) : "";
-                final String smMsg = (policy != null) ? "With SecurityManager"
-                        : "Without SecurityManager";
-                final String expectedResult = ((!malformedPolicy)
-                        ? ((useSCL) ? "PASS SystemCL" : "PASS CustomCL")
-                        : "FAIL ErrorPolicy");
+        // NAMED-NAMED:
+        System.out.println("Case:- Modular Client and " +
+                ((useSCL) ? "SystemClassLoader"
+                        : "Modular CustomClassLoader") + " " + smMsg);
+        execute("--module-path", modClientLoc + separator + modLoadrLoc, "-m",
+                "mc/c.TestClient");
 
-                // NAMED-NAMED, NAMED-AUTOMATIC, NAMED-UNNAMED
-                System.out.printf("Case:- Modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s%s%s %s %s %s -m mc/c.TestClient",
-                    modCloc, separator, modCLloc, LOCALE, clVmArg, sMArg),
-                    expectedResult});
-                System.out.printf("Case:- Modular Client and %s %s%n", ((useSCL)
-                        ? "SystemClassLoader"
-                        : "Automatic modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s%s%s %s %s %s -m mc/c.TestClient",
-                    autoModCloc, separator, regCLloc, LOCALE, clVmArg, sMArg),
-                    expectedResult});
-                System.out.printf("Case:- Modular Client and %s %s%n", ((useSCL)
-                        ? "SystemClassLoader"
-                        : "Unknown modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s -cp %s %s %s %s -m mc/c.TestClient",
-                    autoModCloc, regCLloc, LOCALE, clVmArg, sMArg),
-                    "FAIL MissingModule"});
+        // NAMED-UNNAMED:
+        System.out.println("Case:- Modular Client and " + ((useSCL)
+                ? "SystemClassLoader"
+                : "Unknown modular CustomClassLoader") + " " + smMsg);
+        execute(new String[] {"--module-path", autoModCloc, "-cp", regLoaderLoc,
+                "-m", "mc/c.TestClient"},
+                "FAIL", MISSING_MODULE);
+
+        // UNNAMED-NAMED:
+        System.out.println("Case:- Unknown modular Client and " +
+                ((useSCL) ? "SystemClassLoader"
+                      : "Modular CustomClassLoader") + " " + smMsg);
+        execute("-cp", regClientLoc, "--module-path", modLoadrLoc, addmodArg,
+                "c.TestClient");
 
-                // AUTOMATIC-NAMED, AUTOMATIC-AUTOMATIC, AUTOMATIC-UNNAMED
-                System.out.printf("Case:- Automated modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s%s%s %s %s %s %s -m c/c.TestClient",
-                    regCloc, separator, modCLloc, addmodArg, LOCALE, clVmArg,
-                    sMArg), expectedResult});
-                System.out.printf("Case:- Automated modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Automatic modular CustomClassLoader"),
-                        smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s%s%s %s %s %s %s -m c/c.TestClient",
-                    regCloc, separator, regCLloc, autoAddModArg, LOCALE,
-                    clVmArg, sMArg), expectedResult});
-                System.out.printf("Case:- Automated modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Unknown modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s -cp %s %s %s %s -m c/c.TestClient",
-                    regCloc, regCLloc, LOCALE, clVmArg, sMArg),
-                    expectedResult});
+        // UNNAMED-UNNAMED:
+        System.out.println("Case:- Unknown modular Client and " +
+                ((useSCL) ? "SystemClassLoader"
+                        : "Unknown modular CustomClassLoader") + " " + smMsg);
+        execute("-cp", regClientLoc + separator + regLoaderLoc, "c.TestClient");
 
-                // UNNAMED-NAMED, UNNAMED-AUTOMATIC, UNNAMED-UNNAMED
-                System.out.printf("Case:- Unknown modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "-cp %s --module-path %s %s %s %s %s c.TestClient",
-                    regCloc, modCLloc, addmodArg, LOCALE, clVmArg, sMArg),
-                    expectedResult});
-                System.out.printf("Case:- Unknown modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Automatic modular CustomClassLoader"),
-                        smMsg);
-                execute(new String[]{String.format(
-                    "-cp %s --module-path %s %s %s %s %s c.TestClient",
-                    regCloc, regCLloc, autoAddModArg, LOCALE, clVmArg, sMArg),
-                    expectedResult});
-                System.out.printf("Case:- Unknown modular Client and %s %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Unknown modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "-cp %s%s%s %s %s %s c.TestClient", regCloc, separator,
-                    regCLloc, LOCALE, clVmArg, sMArg), expectedResult});
+        // Regular jars in module-path
+        System.out.println("Case:- Regular Client and " + ((useSCL)
+                ? "SystemClassLoader"
+                : "Unknown modular CustomClassLoader") +
+                " inside --module-path " + smMsg);
+        execute("--module-path", regClientLoc + separator + regLoaderLoc,
+                autoAddModArg, "-m", "c/c.TestClient");
 
-                // Regular jars in module-path and Modular jars in class-path.
-                System.out.printf("Case:- Regular Client and %s "
-                        + "inside --module-path %s.%n", ((useSCL)
-                                ? "SystemClassLoader"
-                                : "Unknown modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "--module-path %s%s%s %s %s %s %s -m c/c.TestClient",
-                    regCloc, separator, regCLloc, autoAddModArg, LOCALE,
-                    clVmArg, sMArg), expectedResult});
-                System.out.printf("Case:- Modular Client and %s in -cp %s%n",
-                        ((useSCL) ? "SystemClassLoader"
-                                : "Modular CustomClassLoader"), smMsg);
-                execute(new String[]{String.format(
-                    "-cp %s%s%s %s %s %s c.TestClient", modCloc, separator,
-                    modCLloc, LOCALE, clVmArg, sMArg), expectedResult});
-            }
-        }
+        // Modular jars in class-path
+        System.out.println("Case:- Modular Client and " +
+                ((useSCL) ? "SystemClassLoader"
+                        : "Modular CustomClassLoader") + " in -cp " + smMsg);
+        execute("-cp", modClientLoc + separator + modLoadrLoc, "c.TestClient");
+    }
+
+    private void execute(String... args) throws Exception {
+        execute(args, this.expectedStatus, this.expectedMsg);
     }
 
     /**
      * Execute with command arguments and process the result.
      */
-    private static void execute(String[] args) throws Exception {
+    private void execute(String[] args, String status, String msg) throws Exception {
 
-        String status = null;
-        String msgKey = null;
-        if ((args != null && args.length > 1)) {
-            String[] secArgs = args[1].split("\\s+");
-            status = (secArgs.length > 0) ? secArgs[0] : null;
-            msgKey = (secArgs.length > 1) ? secArgs[1] : null;
-        }
-        String out = ProcessTools.executeTestJvm(args[0].split("\\s+"))
-                .getOutput();
+        // Combine with commonArgs, and perform sanity check
+        String[] safeArgs = Stream.concat(commonArgs.stream(), Stream.of(args))
+                .filter(s -> {
+                    if (s.contains(" ")) { throw new RuntimeException("No spaces in args");}
+                    return !s.isEmpty();
+                }).toArray(String[]::new);
+        String out = ProcessTools.executeTestJvm(safeArgs).getOutput();
         // Handle response.
-        if ((status != null && "PASS".equals(status) && msgKey != null
-                && out.contains(MSG_MAP.get(msgKey)))) {
-            System.out.printf("PASS: Expected Result: %s.%n",
-                    MSG_MAP.get(msgKey));
-        } else if ((status != null && "FAIL".equals(status) && msgKey != null
-                && out.contains(MSG_MAP.get(msgKey)))) {
-            System.out.printf("PASS: Expected Failure: %s.%n",
-                    MSG_MAP.get(msgKey));
+        if ("PASS".equals(status) && out.contains(msg)) {
+            System.out.println("PASS: Expected Result: " + msg);
+        } else if ("FAIL".equals(status) && out.contains(msg)) {
+            System.out.printf("PASS: Expected Failure: " +  msg);
         } else if (out.contains("Exception") || out.contains("Error")) {
             System.out.printf("OUTPUT: %s", out);
             throw new RuntimeException("FAIL: Unknown Exception.");
@@ -257,23 +256,23 @@
      */
     private static void setUp() throws Exception {
 
-        boolean compiled = CompilerUtils.compile(CL_SRC, CL_BIN);
-        compiled &= CompilerUtils.compile(C_SRC, C_BIN);
-        if (!compiled) {
-            throw new RuntimeException("Test Setup failed.");
-        }
         // Generate regular jar files for TestClient and TestClassLoader
-        JarUtils.createJarFile(CL_JAR, CL_BIN);
-        JarUtils.createJarFile(C_JAR, C_BIN);
+        JarUtils.createJarFile(CL_JAR, TEST_CLASSES,
+                               "cl/TestClassLoader.class");
+        JarUtils.createJarFile(C_JAR, TEST_CLASSES,
+                               "c/TestClient.class");
         // Generate modular jar files for TestClient and TestClassLoader with
         // their corresponding ModuleDescriptor.
-        Files.copy(CL_JAR, MCL_JAR, StandardCopyOption.REPLACE_EXISTING);
+        Files.copy(CL_JAR, MCL_JAR,
+                StandardCopyOption.REPLACE_EXISTING);
         updateModuleDescr(MCL_JAR, ModuleDescriptor.newModule("mcl")
                 .exports("cl").requires("java.base").build());
-        Files.copy(C_JAR, MC_JAR, StandardCopyOption.REPLACE_EXISTING);
+        Files.copy(C_JAR, MC_JAR,
+                StandardCopyOption.REPLACE_EXISTING);
         updateModuleDescr(MC_JAR, ModuleDescriptor.newModule("mc")
                 .exports("c").requires("java.base").requires("mcl").build());
-        Files.copy(C_JAR, AMC_JAR, StandardCopyOption.REPLACE_EXISTING);
+        Files.copy(C_JAR, AMC_JAR,
+                StandardCopyOption.REPLACE_EXISTING);
         updateModuleDescr(AMC_JAR, ModuleDescriptor.newModule("mc")
                 .exports("c").requires("java.base").requires("cl").build());
     }
--- a/test/java/lang/instrument/RedefineBigClass.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/instrument/RedefineBigClass.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
     -Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
     -javaagent:RedefineBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RedefineBigClassApp \
-    > output.log 2>&1 
+    > output.log 2>&1
 result=$?
 
 cat output.log
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/executableJAR/Agent.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
+ */
+
+import java.lang.instrument.Instrumentation;
+
+public class Agent {
+
+    public static Instrumentation inst;
+
+    public static void agentmain(String agentArgs, Instrumentation inst) {
+        Agent.inst = inst;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/executableJAR/AgentHelper.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+public class AgentHelper {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/executableJAR/ExecJarWithAgent.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,138 @@
+/*
+ * 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
+ * @library /lib/testlibrary
+ * @build ExecJarWithAgent Main Agent AgentHelper JarUtils jdk.testlibrary.*
+ * @run testng ExecJarWithAgent
+ * @summary Test starting agents in executable JAR files
+ */
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+import java.util.stream.Stream;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+import jdk.testlibrary.ProcessTools;
+import jdk.testlibrary.OutputAnalyzer;
+
+@Test
+public class ExecJarWithAgent {
+
+    /**
+     * Basic test of java -jar with agent in the executable JAR
+     */
+    public void testBasic() throws Exception {
+        Manifest man = new Manifest();
+        Attributes attrs = man.getMainAttributes();
+        attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
+        attrs.put(Attributes.Name.MAIN_CLASS, "Main");
+        attrs.put(new Attributes.Name("Launcher-Agent-Class"), "Agent");
+
+        // require all capabilities
+        attrs.put(new Attributes.Name("Can-Redefine-Classes"), "true");
+        attrs.put(new Attributes.Name("Can-Retransform-Classes"), "true");
+        attrs.put(new Attributes.Name("Can-Set-Native-Method-Prefix"), "true");
+        attrs.put(new Attributes.Name("Boot-Class-Path"), "helper.jar");
+
+        Path app = Paths.get("app.jar");
+        Path dir = Paths.get(System.getProperty("test.classes"));
+
+        Path[] paths = Stream.of("Main.class", "Agent.class")
+                .map(Paths::get)
+                .toArray(Path[]::new);
+
+        JarUtils.createJarFile(app, man, dir, paths);
+
+        // helper API to test that the BCP has been extended
+        Path helper = Paths.get("helper.jar");
+        JarUtils.createJarFile(helper, dir, "AgentHelper.class");
+
+        // java -jar app.jar
+        assertEquals(exec(app).getExitValue(), 0);
+    }
+
+    /**
+     * Test that java -jar fails when the executable JAR has the
+     * Launcher-Agent-Class attribute but the class cannot be loaded.
+     */
+    public void testBadAgentClass() throws Exception {
+        Manifest man = new Manifest();
+        Attributes attrs = man.getMainAttributes();
+        attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
+        attrs.put(Attributes.Name.MAIN_CLASS, "Main");
+
+        // agent class does not exist
+        attrs.put(new Attributes.Name("Launcher-Agent-Class"), "BadAgent");
+
+        Path app = Paths.get("app.jar");
+        Path dir = Paths.get(System.getProperty("test.classes"));
+
+        JarUtils.createJarFile(app, man, dir, Paths.get("Main.class"));
+
+        // java -jar app.jar
+        int exitCode = exec(app).shouldContain("ClassNotFoundException").getExitValue();
+        assertNotEquals(exitCode, 0);
+    }
+
+    /**
+     * Test that java -jar fails when the executable JAR has the
+     * Launcher-Agent-Class attribute and the class does not define an
+     * agentmain method.
+     */
+    public void testNoAgentMain() throws Exception {
+        // manifest for the executable JAR
+        Manifest man = new Manifest();
+        Attributes attrs = man.getMainAttributes();
+        attrs.put(Attributes.Name.MANIFEST_VERSION, "1.0.0");
+        attrs.put(Attributes.Name.MAIN_CLASS, "Main");
+
+        // the main class does not define the agentmain method
+        attrs.put(new Attributes.Name("Launcher-Agent-Class"), "Main");
+
+        Path app = Paths.get("app.jar");
+        Path dir = Paths.get(System.getProperty("test.classes"));
+
+        JarUtils.createJarFile(app, man, dir, Paths.get("Main.class"));
+
+        // java -jar app.jar
+        int exitCode = exec(app).shouldContain("NoSuchMethodException").getExitValue();
+        assertNotEquals(exitCode, 0);
+    }
+
+    /**
+     * java -jar app.jar, returning the OutputAnalyzer to analyze the output
+     */
+    private OutputAnalyzer exec(Path appJar) throws Exception {
+        return ProcessTools.executeTestJava("-jar", appJar.toString())
+                .outputTo(System.out)
+                .errorTo(System.out);
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/instrument/executableJAR/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,41 @@
+/*
+ * 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.instrument.Instrumentation;
+
+public class Main {
+    public static void main(String[] args) throws Exception {
+        Instrumentation inst = Agent.inst;
+        if (inst == null)
+            throw new RuntimeException("Agent not loaded");
+
+        // check boot class path has been extended
+        Class<?> helper = Class.forName("AgentHelper");
+        if (helper.getClassLoader() != null)
+            throw new RuntimeException("AgentHelper not loaded by boot loader");
+
+        // check Instrumentation object can be used
+        Class<?>[] classes = inst.getAllLoadedClasses();
+        System.out.println(classes.length + " classes loaded");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/8177146/TestMethodHandleBind.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,96 @@
+/*
+ * 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 8177146
+ * @run testng/othervm TestMethodHandleBind
+ */
+
+import org.testng.annotations.Test;
+
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodType;
+
+import static java.lang.invoke.MethodHandles.lookup;
+
+import static org.testng.Assert.*;
+
+public class TestMethodHandleBind extends pkg.A {
+    static class B extends TestMethodHandleBind {}
+
+    @Test
+    public void testInstanceOfCallerClass() throws Throwable {
+        MethodHandle bound = lookup().bind(new TestMethodHandleBind() , "m1", MethodType.methodType(String.class));
+        String x = (String)bound.invoke();
+        assertEquals(x, this.getClass().getSimpleName());
+    }
+
+    @Test
+    public void testInstanceOfCallerSubclass() throws Throwable {
+        MethodHandle bound = lookup().bind(new B() , "m1", MethodType.methodType(String.class));
+        // MethodHandle bound = lookup().findVirtual(B.class,  "m1", MethodType.methodType(String.class)).bindTo(new B());
+        String x = (String)bound.invoke();
+        assertEquals(x, "B");
+    }
+
+    @Test
+    public void testInstanceOfReceiverClass() throws Throwable {
+        try {
+            MethodHandle bound = lookup().bind(new pkg.A() , "m1", MethodType.methodType(String.class));
+            bound.invoke();
+            fail("IllegalAccessException expected");
+        } catch (IllegalAccessException e) {
+        }
+    }
+
+    @Test
+    public void testPublicMethod() throws Throwable {
+        MethodHandle bound = lookup().bind(new pkg.A() , "m2", MethodType.methodType(String.class));
+        String x = (String)bound.invoke();
+        assertEquals(x, "A");
+    }
+
+    @Test
+    public void testPublicMethod2() throws Throwable {
+        MethodHandle bound = lookup().bind(new TestMethodHandleBind(), "m2", MethodType.methodType(String.class));
+        String x = (String)bound.invoke();
+        assertEquals(x, this.getClass().getSimpleName());
+    }
+
+    @Test
+    public void testInstanceOfCallerClassVarargs() throws Throwable {
+        MethodHandle bound = lookup().bind(new TestMethodHandleBind() , "m3", MethodType.methodType(String.class, String[].class));
+        String x = (String)bound.invoke("a", "b", "c");
+        assertEquals(x, this.getClass().getSimpleName() + "abc");
+    }
+
+    @Test
+    public void testInstanceOfReceiverClassVarargs() throws Throwable {
+        try {
+            MethodHandle bound = lookup().bind(new pkg.A(), "m3", MethodType.methodType(String.class, String[].class));
+            bound.invoke();
+            fail("IllegalAccessException expected");
+        } catch (IllegalAccessException e) {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/8177146/pkg/A.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package pkg;
+
+public class A {
+    protected String m1() {
+        return this.getClass().getSimpleName();
+    }
+
+    public String m2() {
+        return this.getClass().getSimpleName();
+    }
+
+    protected String m3(String... args) {
+        StringBuilder sb = new StringBuilder();
+        for (String s : args)
+            sb.append(s);
+        return this.getClass().getSimpleName() + sb.toString();
+    }
+}
--- a/test/java/lang/invoke/DefineClassTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/invoke/DefineClassTest.java	Fri May 12 10:43:28 2017 -0700
@@ -75,7 +75,7 @@
     @Test
     public void testDefineClass() throws Exception {
         final String CLASS_NAME = THIS_PACKAGE + ".Foo";
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
+        Lookup lookup = lookup();
         Class<?> clazz = lookup.defineClass(generateClass(CLASS_NAME));
 
         // test name
@@ -101,7 +101,7 @@
     public void testAccess() throws Exception {
         final String THIS_CLASS = this.getClass().getName();
         final String CLASS_NAME = THIS_PACKAGE + ".Runner";
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
+        Lookup lookup = lookup();
 
         // public
         byte[] classBytes = generateRunner(CLASS_NAME + nextNumber(), THIS_CLASS, "method1");
@@ -144,9 +144,8 @@
         final String CLASS_NAME = THIS_PACKAGE + ".ClassWithClinit";
 
         byte[] classBytes = generateClassWithInitializer(CLASS_NAME, THIS_CLASS, "fail");
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
+        Class<?> clazz = lookup().defineClass(classBytes);
 
-        Class<?> clazz = lookup.defineClass(classBytes);
         // trigger initializer to run
         try {
             clazz.newInstance();
@@ -186,14 +185,14 @@
         assertNotEquals(target1.getProtectionDomain(), target2.getProtectionDomain());
 
         // protection domain 1
-        Lookup lookup1 = privateLookupIn(target1, lookup()).dropLookupMode(PRIVATE);
+        Lookup lookup1 = privateLookupIn(target1, lookup());
 
         Class<?> clazz = lookup1.defineClass(generateClass("p.Foo"));
         testSameAbode(clazz, lookup1.lookupClass());
         testDiscoverable(clazz, lookup1);
 
         // protection domain 2
-        Lookup lookup2 = privateLookupIn(target2, lookup()).dropLookupMode(PRIVATE);
+        Lookup lookup2 = privateLookupIn(target2, lookup());
 
         clazz = lookup2.defineClass(generateClass("p.Bar"));
         testSameAbode(clazz, lookup2.lookupClass());
@@ -205,7 +204,7 @@
      */
     @Test
     public void testBootLoader() throws Exception {
-        Lookup lookup = privateLookupIn(Thread.class, lookup()).dropLookupMode(PRIVATE);
+        Lookup lookup = privateLookupIn(Thread.class, lookup());
         assertTrue(lookup.getClass().getClassLoader() == null);
 
         Class<?> clazz = lookup.defineClass(generateClass("java.lang.Foo"));
@@ -216,8 +215,7 @@
 
     @Test(expectedExceptions = { IllegalArgumentException.class })
     public void testWrongPackage() throws Exception {
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
-        lookup.defineClass(generateClass("other.C"));
+        lookup().defineClass(generateClass("other.C"));
     }
 
     @Test(expectedExceptions = { IllegalAccessException.class })
@@ -226,23 +224,14 @@
         lookup.defineClass(generateClass(THIS_PACKAGE + ".C"));
     }
 
-    @Test(expectedExceptions = { UnsupportedOperationException.class })
-    public void testHasPrivateAccess() throws Exception {
-        Lookup lookup = lookup();
-        assertTrue(lookup.hasPrivateAccess());
-        lookup.defineClass(generateClass(THIS_PACKAGE + ".C"));
-    }
-
     @Test(expectedExceptions = { ClassFormatError.class })
     public void testTruncatedClassFile() throws Exception {
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
-        lookup.defineClass(new byte[0]);
+        lookup().defineClass(new byte[0]);
     }
 
     @Test(expectedExceptions = { NullPointerException.class })
     public void testNull() throws Exception {
-        Lookup lookup = lookup().dropLookupMode(PRIVATE);
-        lookup.defineClass(null);
+        lookup().defineClass(null);
     }
 
     /**
--- a/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3288,4 +3288,3 @@
 #end[Bitwise]
     }
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/lookup/ReflectiveLookupTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,79 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8020801
+ * @summary Restriction on reflective call to MethodHandles.lookup method
+ * @run main java.base/java.lang.LookupTest
+ * @run main ReflectiveLookupTest
+ * @run main/othervm -Dsun.reflect.noInflation=true ReflectiveLookupTest
+ */
+
+import java.lang.invoke.*;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.reflect.Method;
+
+import static java.lang.invoke.MethodType.*;
+
+/*
+ * Lookup object can be obtained statically or reflectively.
+ */
+public class ReflectiveLookupTest {
+    public static void main(String... args) throws Throwable {
+        // Get a full power lookup
+        Lookup lookup1 =  MethodHandles.lookup();
+        MethodHandle mh1 = lookup1.findStatic(lookup1.lookupClass(),
+                                              "foo",
+                                              methodType(String.class));
+        assertEquals((String) mh1.invokeExact(), foo());
+
+        Method lookupMethod =  MethodHandles.class.getMethod("lookup");
+        System.out.println("reflection method: " + lookupMethod);
+        if (!lookupMethod.getName().equals("lookup")) {
+            throw new RuntimeException("Unexpected name: " + lookupMethod.getName());
+        }
+
+        // Get a full power Lookup reflectively.
+        Lookup lookup2 = (Lookup) lookupMethod.invoke(null);
+        assertEquals(lookup1.lookupClass(), lookup2.lookupClass());
+        assertEquals(lookup1.lookupModes(), lookup2.lookupModes());
+        MethodHandle mh2 = lookup2.findStatic(lookup2.lookupClass(),
+                                             "foo",
+                                              methodType(String.class));
+        assertEquals((String) mh2.invokeExact(), foo());
+    }
+
+    static String foo() {
+        return "foo!";
+    }
+
+    static void assertEquals(Object o1, Object o2) {
+        if (!o1.equals(o2)) {
+            throw new RuntimeException(o1 + " != " + o2);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/invoke/lookup/java.base/java/lang/LookupTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,72 @@
+/*
+ * 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.  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 java.lang;
+
+import java.lang.invoke.*;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.reflect.InvocationTargetException;
+
+import static java.lang.invoke.MethodType.*;
+
+/*
+ * Verify that a Lookup object can be obtained statically from java.base
+ * but fails when it's obtained via reflection from java.base.
+ */
+public class LookupTest {
+    public static void main(String... args) throws Throwable {
+        // Get a full power lookup
+        Lookup lookup1 =  MethodHandles.lookup();
+        MethodHandle mh1 = lookup1.findStatic(lookup1.lookupClass(),
+                                              "foo",
+                                              methodType(String.class));
+        assertEquals((String) mh1.invokeExact(), foo());
+
+        // access protected member
+        MethodHandle mh2 = lookup1.findVirtual(java.lang.ClassLoader.class,
+                                               "getPackage",
+                                               methodType(Package.class, String.class));
+        ClassLoader loader = ClassLoader.getPlatformClassLoader();
+        Package pkg = (Package)mh2.invokeExact(loader, "java.lang");
+        assertEquals(pkg.getName(), "java.lang");
+
+        // MethodHandles.lookup will fail if it's called reflectively
+        try {
+            MethodHandles.class.getMethod("lookup").invoke(null);
+        } catch (InvocationTargetException e) {
+            if (!(e.getCause() instanceof IllegalArgumentException)) {
+                throw e.getCause();
+            }
+        }
+    }
+
+    static String foo() { return "foo!"; }
+
+    static void assertEquals(Object o1, Object o2) {
+        if (!o1.equals(o2)) {
+            throw new RuntimeException(o1 + " != " + o2);
+        }
+    }
+}
--- a/test/java/lang/module/AutomaticModulesTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/module/AutomaticModulesTest.java	Fri May 12 10:43:28 2017 -0700
@@ -402,9 +402,7 @@
     // Main-Class files that do not map to a legal qualified type name
     @DataProvider(name = "badmainclass")
     public Object[][] createBadMainClass() {
-        return new Object[][]{
-
-            { "Main",        null },
+        return new Object[][] {
             { "p..Main",     null },
             { "p-.Main",     null },
 
@@ -415,7 +413,7 @@
      * Test that a JAR file with a Main-Class attribute that is not a qualified
      * type name.
      */
-    @Test(dataProvider = "badmainclass", expectedExceptions = FindException.class)
+    @Test(dataProvider = "badmainclass")
     public void testBadMainClass(String mainClass, String ignore) throws IOException {
         Manifest man = new Manifest();
         Attributes attrs = man.getMainAttributes();
@@ -426,14 +424,16 @@
         String entry = mainClass.replace('.', '/') + ".class";
         createDummyJarFile(dir.resolve("m.jar"), man, entry);
 
-        // should throw FindException
-        ModuleFinder.of(dir).findAll();
+        // bad Main-Class value should be ignored
+        Optional<ModuleReference> omref = ModuleFinder.of(dir).find("m");
+        assertTrue(omref.isPresent());
+        ModuleDescriptor descriptor = omref.get().descriptor();
+        assertFalse(descriptor.mainClass().isPresent());
     }
 
     /**
      * Test that a JAR file with a Main-Class attribute that is not in the module
      */
-    @Test(expectedExceptions = FindException.class)
     public void testMissingMainClassPackage() throws IOException {
         Manifest man = new Manifest();
         Attributes attrs = man.getMainAttributes();
@@ -443,8 +443,11 @@
         Path dir = Files.createTempDirectory(USER_DIR, "mods");
         createDummyJarFile(dir.resolve("m.jar"), man);
 
-        // should throw FindException
-        ModuleFinder.of(dir).findAll();
+        // Main-Class should be ignored because package p is not in module
+        Optional<ModuleReference> omref = ModuleFinder.of(dir).find("m");
+        assertTrue(omref.isPresent());
+        ModuleDescriptor descriptor = omref.get().descriptor();
+        assertFalse(descriptor.mainClass().isPresent());
     }
 
 
--- a/test/java/lang/module/ConfigurationTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/module/ConfigurationTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1843,17 +1843,9 @@
     public Object[][] createPlatformMatches() {
         return new Object[][]{
 
-            { "linux-arm",     "*-*" },
-            { "linux-*",       "*-*" },
-            { "*-arm",         "*-*" },
-
-            { "linux-*",       "linux-*" },
-            { "linux-arm",     "linux-*" },
-
-            { "*-arm",         "*-arm" },
-            { "linux-arm",     "*-arm" },
-
-            { "linux-arm",   "linux-arm" },
+            { "",              "" },
+            { "linux-arm",     "" },
+            { "linux-arm",     "linux-arm" },
 
         };
 
@@ -1863,9 +1855,8 @@
     public Object[][] createBad() {
         return new Object[][] {
 
-            { "linux-*",        "solaris-*"     },
-            { "*-arm",          "*-sparc"       },
-            { "linux-x86",      "solaris-sparc" },
+            { "linux-x64",        "linux-arm" },
+            { "linux-x64",        "windows-x64" },
 
         };
     }
@@ -1877,7 +1868,7 @@
     public void testPlatformMatch(String s1, String s2) throws IOException {
 
         ModuleDescriptor base =  ModuleDescriptor.newModule("java.base").build();
-        Path system = writeModule(base, "*-*");
+        Path system = writeModule(base, null);
 
         ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("m1")
                 .requires("m2")
@@ -1928,7 +1919,7 @@
         throws IOException
     {
         ModuleDescriptor base =  ModuleDescriptor.newModule("java.base").build();
-        Path system = writeModule(base, "*-*");
+        Path system = writeModule(base, null);
 
         ModuleDescriptor descriptor1 = ModuleDescriptor.newModule("m1").build();
         Path dir1 = writeModule(descriptor1, s1);
@@ -2113,17 +2104,18 @@
 
 
     /**
-     * Decodes the platform string and calls the builder osName/osArch/osVersion
-     * methods to set the platform constraints.
+     * Writes a module-info.class. If {@code targetPlatform} is not null then
+     * it includes the ModuleTarget class file attribute with the target platform.
      */
-    static Path writeModule(ModuleDescriptor descriptor, String platformString)
+    static Path writeModule(ModuleDescriptor descriptor, String targetPlatform)
         throws IOException
     {
-        String[] s = platformString.split("-");
-        String osName = !s[0].equals("*") ? s[0] : null;
-        String osArch = !s[1].equals("*") ? s[1] : null;
-        ModuleTarget target = new ModuleTarget(osName, osArch);
-
+        ModuleTarget target;
+        if (targetPlatform != null) {
+            target = new ModuleTarget(targetPlatform);
+        } else {
+            target = null;
+        }
         String name = descriptor.name();
         Path dir = Files.createTempDirectory(name);
         Path mi = dir.resolve("module-info.class");
--- a/test/java/lang/module/ModuleDescriptorTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/lang/module/ModuleDescriptorTest.java	Fri May 12 10:43:28 2017 -0700
@@ -65,8 +65,8 @@
 @Test
 public class ModuleDescriptorTest {
 
-    @DataProvider(name = "invalidjavaidentifiers")
-    public Object[][] invalidJavaIdentifiers() {
+    @DataProvider(name = "invalidNames")
+    public Object[][] invalidNames() {
         return new Object[][]{
 
             { null,             null },
@@ -84,6 +84,32 @@
             { "foo.bar.1gus",   null },
             { "foo.bar.[gus]",  null },
 
+            { "class",          null },
+            { "interface",      null },
+            { "true",           null },
+            { "false",          null },
+            { "null",           null },
+
+            { "x.class",        null },
+            { "x.interface",    null },
+            { "x.true",         null },
+            { "x.false",        null },
+            { "x.null",         null },
+
+            { "class.x",        null },
+            { "interface.x",    null },
+            { "true.x",         null },
+            { "false.x",        null },
+            { "null.x",         null },
+
+            { "x.class.x",      null },
+            { "x.interface.x",  null },
+            { "x.true.x",       null },
+            { "x.false.x",      null },
+            { "x.null.x",       null },
+
+            { "_",              null },
+
         };
     }
 
@@ -199,7 +225,7 @@
         ModuleDescriptor.newModule("m").requires(EnumSet.allOf(Modifier.class), "m");
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testRequiresWithBadModuleName(String mn, String ignore) {
         requires(EnumSet.noneOf(Modifier.class), mn);
@@ -406,7 +432,7 @@
         ModuleDescriptor.newModule("foo").exports("p", Collections.emptySet());
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testExportsWithBadName(String pn, String ignore) {
         ModuleDescriptor.newModule("foo").exports(pn);
@@ -568,7 +594,7 @@
         ModuleDescriptor.newModule("foo").opens("p", Collections.emptySet());
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
             expectedExceptions = IllegalArgumentException.class )
     public void testOpensWithBadName(String pn, String ignore) {
         ModuleDescriptor.newModule("foo").opens(pn);
@@ -664,7 +690,7 @@
         ModuleDescriptor.newModule("foo").uses("S");
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testUsesWithBadName(String service, String ignore) {
         ModuleDescriptor.newModule("foo").uses(service);
@@ -737,13 +763,13 @@
         ModuleDescriptor.newModule("foo").provides("p.S", List.of("P"));
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testProvidesWithBadService(String service, String ignore) {
         ModuleDescriptor.newModule("foo").provides(service, List.of("p.Provider"));
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testProvidesWithBadProvider(String provider, String ignore) {
         List<String> names = new ArrayList<>(); // allows nulls
@@ -928,7 +954,7 @@
         assertTrue(Objects.equals(packages, Set.of("p1", "p2", "p3", "p4", "p5")));
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testPackagesWithBadName(String pn, String ignore) {
         Set<String> pkgs = new HashSet<>();  // allows nulls
@@ -943,7 +969,7 @@
         assertEquals(mn, "foo");
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testBadModuleName(String mn, String ignore) {
         ModuleDescriptor.newModule(mn);
@@ -1264,7 +1290,7 @@
         ModuleDescriptor.newModule("foo").mainClass("Main");
     }
 
-    @Test(dataProvider = "invalidjavaidentifiers",
+    @Test(dataProvider = "invalidNames",
           expectedExceptions = IllegalArgumentException.class )
     public void testMainClassWithBadName(String mainClass, String ignore) {
         Builder builder = ModuleDescriptor.newModule("foo");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/module/customfs/ModulesInCustomFileSystem.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,142 @@
+/*
+ * 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
+ * @modules jdk.zipfs
+ * @library /lib/testlibrary
+ * @build ModulesInCustomFileSystem JarUtils m1/* m2/*
+ * @run testng/othervm ModulesInCustomFileSystem
+ * @summary Test ModuleFinder to find modules in a custom file system
+ */
+
+import java.io.File;
+import java.lang.module.Configuration;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReader;
+import java.lang.module.ModuleReference;
+import java.lang.reflect.Method;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Set;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class ModulesInCustomFileSystem {
+
+    /**
+     * Test exploded modules in a JAR file system.
+     */
+    public void testExplodedModulesInJarFileSystem() throws Exception {
+        Path m1 = findModuleDirectory("m1");
+        Path m2 = findModuleDirectory("m2");
+        Path mlib = m1.getParent();
+        assertEquals(mlib, m2.getParent());
+
+        // create JAR file containing m1/** and m2/**
+        Path jar = Files.createTempDirectory("mlib").resolve("modules.jar");
+        JarUtils.createJarFile(jar, mlib);
+        testJarFileSystem(jar);
+    }
+
+    /**
+     * Test modular JARs in a JAR file system
+     */
+    public void testModularJARsInJarFileSystem() throws Exception {
+        Path m1 = findModuleDirectory("m1");
+        Path m2 = findModuleDirectory("m2");
+        Path contents = Files.createTempDirectory("contents");
+        JarUtils.createJarFile(contents.resolve("m1.jar"), m1);
+        JarUtils.createJarFile(contents.resolve("m2.jar"), m2);
+
+        // create JAR file containing m1.jar and m2.jar
+        Path jar = Files.createTempDirectory("mlib").resolve("modules.jar");
+        JarUtils.createJarFile(jar, contents);
+        testJarFileSystem(jar);
+    }
+
+    /**
+     * Opens a JAR file as a file system
+     */
+    private void testJarFileSystem(Path jar) throws Exception {
+        ClassLoader scl = ClassLoader.getSystemClassLoader();
+        try (FileSystem fs = FileSystems.newFileSystem(jar, scl)) {
+            // ModuleFinder to find modules in top-level directory
+            Path top = fs.getPath("/");
+            ModuleFinder finder = ModuleFinder.of(top);
+
+            // list the modules
+            listAllModules(finder);
+
+            // load modules into child layer, invoking m1/p.Main
+            loadAndRunModule(finder);
+        }
+    }
+
+    /**
+     * List all modules that the finder finds and the resources in the module.
+     */
+    private void listAllModules(ModuleFinder finder) throws Exception {
+        for (ModuleReference mref : finder.findAll()) {
+            System.out.println(mref.descriptor());
+            try (ModuleReader reader = mref.open()) {
+                reader.list().forEach(name -> System.out.format("  %s%n", name));
+            }
+        }
+    }
+
+    /**
+     * Creates a child layer with m1 and m2, invokes m1/p.Main to ensure that
+     * classes can be loaded.
+     */
+    private void loadAndRunModule(ModuleFinder finder) throws Exception {
+        ModuleLayer bootLayer = ModuleLayer.boot();
+        Configuration cf = bootLayer.configuration()
+                .resolve(finder, ModuleFinder.of(), Set.of("m1"));
+        ClassLoader scl = ClassLoader.getSystemClassLoader();
+        ModuleLayer layer = bootLayer.defineModulesWithOneLoader(cf, scl);
+        Class<?> c = layer.findLoader("m1").loadClass("p.Main");
+        Method m = c.getMethod("main", String[].class);
+        m.invoke(null, (Object)new String[0]);
+    }
+
+    /**
+     * Find the directory for a module on the module path
+     */
+    private Path findModuleDirectory(String name) {
+        String mp = System.getProperty("jdk.module.path");
+        for (String element : mp.split(File.pathSeparator)) {
+            Path dir = Paths.get(element).resolve(name);
+            if (Files.exists(dir)) {
+                return dir;
+            }
+        }
+        assertFalse(true);
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/module/customfs/m1/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+module m1 {
+    exports p;
+    requires m2;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/module/customfs/m1/p/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -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;
+
+public class Main {
+    public static void main(String[] args) {
+        q.Hello.hello();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/module/customfs/m2/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
+ */
+
+module m2 {
+    exports q;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/module/customfs/m2/q/Hello.java	Fri May 12 10:43:28 2017 -0700
@@ -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 q;
+
+public class Hello {
+    public static void hello() {
+        System.out.println("hello");
+    }
+}
--- a/test/java/net/MulticastSocket/SetOutgoingIf.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/net/MulticastSocket/SetOutgoingIf.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2010, 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
@@ -40,6 +40,10 @@
         return osname.contains("Windows");
     }
 
+    static boolean isMacOS() {
+        return System.getProperty("os.name").contains("OS X");
+    }
+
     private static boolean hasIPv6() throws Exception {
         List<NetworkInterface> nics = Collections.list(
                                         NetworkInterface.getNetworkInterfaces());
@@ -71,7 +75,7 @@
         int index = 1;
         for (NetworkInterface nic : Collections.list(NetworkInterface.getNetworkInterfaces())) {
             // we should use only network interfaces with multicast support which are in "up" state
-            if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp()) {
+            if (!nic.isLoopback() && nic.supportsMulticast() && nic.isUp() && !isTestExcludedInterface(nic)) {
                 NetIf netIf = NetIf.create(nic);
 
                 // now determine what (if any) type of addresses are assigned to this interface
@@ -91,6 +95,8 @@
                     netIfs.add(netIf);
                     debug("Using: " + nic);
                 }
+            } else {
+                System.out.println("Ignore NetworkInterface nic == " + nic);
             }
         }
         if (netIfs.size() <= 1) {
@@ -170,6 +176,15 @@
         }
     }
 
+    private static boolean isTestExcludedInterface(NetworkInterface nif) {
+        if (isMacOS() && nif.getName().contains("awdl"))
+            return true;
+        String dName = nif.getDisplayName();
+        if (isWindows() && dName != null && dName.contains("Teredo"))
+            return true;
+        return false;
+    }
+
     private static boolean debug = true;
 
     static void debug(String message) {
--- a/test/java/net/ProxySelector/B8035158.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/net/ProxySelector/B8035158.java	Fri May 12 10:43:28 2017 -0700
@@ -158,8 +158,6 @@
         t.add(new TestCase("google.com|bing.com|yahoo.com", "http://127.0.0.1", false));
         t.add(new TestCase("google.com|bing.com|yahoo.com", "http://yahoo.com", false));
 
-        // example from
-        // http://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html
         t.add(new TestCase("localhost|host.example.com", "http://localhost",
                 false));
         t.add(new TestCase("localhost|host.example.com",
--- a/test/java/net/httpclient/ProxyAuthTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/net/httpclient/ProxyAuthTest.java	Fri May 12 10:43:28 2017 -0700
@@ -20,6 +20,7 @@
  *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /*
--- a/test/java/net/httpclient/whitebox/Driver.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/net/httpclient/whitebox/Driver.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,5 +26,6 @@
  * @bug 8151299 8164704
  * @modules jdk.incubator.httpclient
  * @run testng jdk.incubator.httpclient/jdk.incubator.http.SelectorTest
+ * @run testng jdk.incubator.httpclient/jdk.incubator.http.RawChannelTest
  * @run testng jdk.incubator.httpclient/jdk.incubator.http.ResponseHeadersTest
  */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/httpclient/whitebox/jdk.incubator.httpclient/jdk/incubator/http/RawChannelTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,287 @@
+/*
+ * 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 jdk.incubator.http;
+
+import jdk.incubator.http.internal.websocket.RawChannel;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.UncheckedIOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URI;
+import java.nio.ByteBuffer;
+import java.nio.channels.SelectionKey;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static jdk.incubator.http.HttpResponse.BodyHandler.discard;
+import static org.testng.Assert.assertEquals;
+
+/*
+ * This test exercises mechanics of _independent_ reads and writes on the
+ * RawChannel. It verifies that the underlying implementation can manage more
+ * than a single type of notifications at the same time.
+ */
+public class RawChannelTest {
+
+    private final AtomicLong clientWritten = new AtomicLong();
+    private final AtomicLong serverWritten = new AtomicLong();
+    private final AtomicLong clientRead = new AtomicLong();
+    private final AtomicLong serverRead = new AtomicLong();
+
+    /*
+     * Since at this level we don't have any control over the low level socket
+     * parameters, this latch ensures a write to the channel will stall at least
+     * once (socket's send buffer filled up).
+     */
+    private final CountDownLatch writeStall = new CountDownLatch(1);
+
+    /*
+     * This one works similarly by providing means to ensure a read from the
+     * channel will stall at least once (no more data available on the socket).
+     */
+    private final CountDownLatch readStall = new CountDownLatch(1);
+
+    private final AtomicInteger writeHandles = new AtomicInteger();
+    private final AtomicInteger readHandles = new AtomicInteger();
+
+    private final CountDownLatch exit = new CountDownLatch(1);
+
+    @Test
+    public void test() throws Exception {
+        try (ServerSocket server = new ServerSocket(0)) {
+            int port = server.getLocalPort();
+            new TestServer(server).start();
+            final RawChannel chan = channelOf(port);
+
+            // It's very important not to forget the initial bytes, possibly
+            // left from the HTTP thingy
+            int initialBytes = chan.initialByteBuffer().remaining();
+            print("RawChannel has %s initial bytes", initialBytes);
+            clientRead.addAndGet(initialBytes);
+
+            chan.registerEvent(new RawChannel.RawEvent() {
+
+                private final ByteBuffer reusableBuffer = ByteBuffer.allocate(32768);
+
+                @Override
+                public int interestOps() {
+                    return SelectionKey.OP_WRITE;
+                }
+
+                @Override
+                public void handle() {
+                    int i = writeHandles.incrementAndGet();
+                    print("OP_WRITE #%s", i);
+                    if (i > 3) { // Fill up the send buffer not more than 3 times
+                        try {
+                            chan.shutdownOutput();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        return;
+                    }
+                    long total = 0;
+                    try {
+                        long n;
+                        do {
+                            ByteBuffer[] array = {reusableBuffer.slice()};
+                            n = chan.write(array, 0, 1);
+                            total += n;
+                        } while (n > 0);
+                        print("OP_WRITE clogged SNDBUF with %s bytes", total);
+                        clientWritten.addAndGet(total);
+                        chan.registerEvent(this);
+                        writeStall.countDown(); // signal send buffer is full
+                    } catch (IOException e) {
+                        throw new UncheckedIOException(e);
+                    }
+                }
+            });
+
+            chan.registerEvent(new RawChannel.RawEvent() {
+
+                @Override
+                public int interestOps() {
+                    return SelectionKey.OP_READ;
+                }
+
+                @Override
+                public void handle() {
+                    int i = readHandles.incrementAndGet();
+                    print("OP_READ #%s", i);
+                    ByteBuffer read = null;
+                    long total = 0;
+                    while (true) {
+                        try {
+                            read = chan.read();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                        if (read == null) {
+                            print("OP_READ EOF");
+                            break;
+                        } else if (!read.hasRemaining()) {
+                            print("OP_READ stall");
+                            try {
+                                chan.registerEvent(this);
+                            } catch (IOException e) {
+                                e.printStackTrace();
+                            }
+                            readStall.countDown();
+                            break;
+                        }
+                        int r = read.remaining();
+                        total += r;
+                        clientRead.addAndGet(r);
+                    }
+                    print("OP_READ read %s bytes", total);
+                }
+            });
+            exit.await(); // All done, we need to compare results:
+            assertEquals(clientRead.get(), serverWritten.get());
+            assertEquals(serverRead.get(), clientWritten.get());
+        }
+    }
+
+    private static RawChannel channelOf(int port) throws Exception {
+        URI uri = URI.create("http://127.0.0.1:" + port + "/");
+        print("raw channel to %s", uri.toString());
+        HttpRequest req = HttpRequest.newBuilder(uri).build();
+        HttpResponse<?> r = HttpClient.newHttpClient().send(req, discard(null));
+        r.body();
+        return ((HttpResponseImpl) r).rawChannel();
+    }
+
+    private class TestServer extends Thread { // Powered by Slowpokes
+
+        private final ServerSocket server;
+
+        TestServer(ServerSocket server) throws IOException {
+            this.server = server;
+        }
+
+        @Override
+        public void run() {
+            try (Socket s = server.accept()) {
+                InputStream is = s.getInputStream();
+                OutputStream os = s.getOutputStream();
+
+                processHttp(is, os);
+
+                Thread reader = new Thread(() -> {
+                    try {
+                        long n = readSlowly(is);
+                        print("Server read %s bytes", n);
+                        serverRead.addAndGet(n);
+                        s.shutdownInput();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                });
+
+                Thread writer = new Thread(() -> {
+                    try {
+                        long n = writeSlowly(os);
+                        print("Server written %s bytes", n);
+                        serverWritten.addAndGet(n);
+                        s.shutdownOutput();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                });
+
+                reader.start();
+                writer.start();
+
+                reader.join();
+                writer.join();
+            } catch (Exception e) {
+                e.printStackTrace();
+            } finally {
+                exit.countDown();
+            }
+        }
+
+        private void processHttp(InputStream is, OutputStream os)
+                throws IOException
+        {
+            os.write("HTTP/1.1 200 OK\r\nContent-length: 0\r\n\r\n".getBytes());
+            byte[] buf = new byte[1024];
+            String s = "";
+            while (true) {
+                int n = is.read(buf);
+                if (n <= 0) {
+                    throw new RuntimeException("Unexpected end of request");
+                }
+                s = s + new String(buf, 0, n);
+                if (s.contains("\r\n\r\n")) {
+                    break;
+                }
+            }
+        }
+
+        private long writeSlowly(OutputStream os) throws Exception {
+            byte[] first = byteArrayOfSize(1024);
+            long total = first.length;
+            os.write(first);
+            // Let's wait for the signal from the raw channel that its read has
+            // stalled, and then continue sending a bit more stuff
+            readStall.await();
+            for (int i = 0; i < 32; i++) {
+                byte[] b = byteArrayOfSize(1024);
+                os.write(b);
+                total += b.length;
+                TimeUnit.MILLISECONDS.sleep(1);
+            }
+            return total;
+        }
+
+        private long readSlowly(InputStream is) throws Exception {
+            // Wait for the raw channel to fill up the its send buffer
+            writeStall.await();
+            long overall = 0;
+            byte[] array = new byte[1024];
+            for (int n = 0; n != -1; n = is.read(array)) {
+                TimeUnit.MILLISECONDS.sleep(1);
+                overall += n;
+            }
+            return overall;
+        }
+    }
+
+    private static void print(String format, Object... args) {
+        System.out.println(Thread.currentThread() + ": " + String.format(format, args));
+    }
+
+    private static byte[] byteArrayOfSize(int bound) {
+        return new byte[new Random().nextInt(1 + bound)];
+    }
+}
--- a/test/java/nio/channels/FileChannel/LoopingTruncate.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/channels/FileChannel/LoopingTruncate.java	Fri May 12 10:43:28 2017 -0700
@@ -24,7 +24,6 @@
 /**
  * @test
  * @bug 8137121 8137230
- * @key intermittent
  * @summary (fc) Infinite loop FileChannel.truncate
  * @library /lib/testlibrary
  * @build jdk.testlibrary.Utils
--- a/test/java/nio/channels/FileChannel/Transfer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/channels/FileChannel/Transfer.java	Fri May 12 10:43:28 2017 -0700
@@ -23,7 +23,6 @@
 
 /* @test
  * @bug 4434723 4482726 4559072 4795550 5081340 5103988 6984545
- * @key intermittent
  * @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed)
  * @library ..
  * @library /lib/testlibrary/
--- a/test/java/nio/channels/FileChannel/Transfers.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/channels/FileChannel/Transfers.java	Fri May 12 10:43:28 2017 -0700
@@ -22,7 +22,6 @@
  */
 
 /* @test
- * @key intermittent
  * @summary Comprehensive test for FileChannel.transfer{From,To}
  * @bug 4708120
  * @author Mark Reinhold
--- a/test/java/nio/channels/SocketChannel/VectorIO.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/channels/SocketChannel/VectorIO.java	Fri May 12 10:43:28 2017 -0700
@@ -87,8 +87,11 @@
         while (rem > 0L) {
             long bytesWritten = sc.write(bufs);
             if (bytesWritten == 0) {
-                if (sc.isBlocking())
+                if (sc.isBlocking()) {
                     throw new RuntimeException("write did not block");
+                } else {
+                    System.err.println("Non-blocking write() wrote zero bytes");
+                }
                 Thread.sleep(50);
             } else {
                 rem -= bytesWritten;
@@ -140,8 +143,10 @@
 
                 for (;;) {
                     sc = ssc.accept();
-                    if (sc != null)
+                    if (sc != null) {
+                        System.err.println("accept() succeeded");
                         break;
+                    }
                     Thread.sleep(50);
                 }
 
@@ -154,8 +159,12 @@
                     if (bytesRead < 0)
                         break;
                     if (bytesRead == 0) {
-                        if (sc.isBlocking())
+                        if (sc.isBlocking()) {
                             throw new RuntimeException("read did not block");
+                        } else {
+                            System.err.println
+                                ("Non-blocking read() read zero bytes");
+                        }
                         Thread.sleep(50);
                     }
                     avail -= bytesRead;
--- a/test/java/nio/file/WatchService/DeleteInterference.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/file/WatchService/DeleteInterference.java	Fri May 12 10:43:28 2017 -0700
@@ -15,6 +15,10 @@
  * You should have received a copy of the GNU General Public License version
  * 2 along with this work; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /**
--- a/test/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/file/attribute/BasicFileAttributeView/UnixSocketFile.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/nio/file/spi/SetDefaultProvider.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/file/spi/SetDefaultProvider.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, 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,23 +21,141 @@
  * questions.
  */
 
-/* @test
- * @bug 4313887 7006126
- * @summary Unit test for java.nio.file.spi.FileSystemProvider
- * @build TestProvider SetDefaultProvider
- * @run main/othervm -Djava.nio.file.spi.DefaultFileSystemProvider=TestProvider SetDefaultProvider
+/**
+ * @test
+ * @modules jdk.jartool
+ * @library /lib/testlibrary
+ * @build SetDefaultProvider TestProvider m/* jdk.testlibrary.ProcessTools
+ * @run testng/othervm SetDefaultProvider
+ * @summary Runs tests with -Djava.nio.file.spi.DefaultFileSystemProvider set on
+ *          the command line to override the default file system provider
  */
 
-import java.nio.file.*;
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.spi.ToolProvider;
 
+import jdk.testlibrary.ProcessTools;
+
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
 public class SetDefaultProvider {
-    public static void main(String[] args) throws Exception {
-        Class<?> c = FileSystems.getDefault().provider().getClass();
+
+    private static String SET_DEFAULT_FSP =
+        "-Djava.nio.file.spi.DefaultFileSystemProvider=TestProvider";
+
+    private static final ToolProvider JAR_TOOL = ToolProvider.findFirst("jar")
+        .orElseThrow(() ->
+            new RuntimeException("jar tool not found")
+        );
+
+    /**
+     * Test override of default FileSystemProvider with the main application
+     * on the class path.
+     */
+    public void testClassPath() throws Exception {
+        String moduleClasses = moduleClasses();
+        String testClasses = System.getProperty("test.classes");
+        String classpath = moduleClasses + File.pathSeparator + testClasses;
+        int exitValue = exec(SET_DEFAULT_FSP, "-cp", classpath, "p.Main");
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test override of default FileSystemProvider with the main application
+     * on the module path as an exploded module.
+     */
+    public void testExplodedModule() throws Exception {
+        String modulePath = System.getProperty("jdk.module.path");
+        int exitValue = exec(SET_DEFAULT_FSP, "-p", modulePath, "-m", "m/p.Main");
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test override of default FileSystemProvider with the main application
+     * on the module path as a modular JAR.
+     */
+    public void testModularJar() throws Exception {
+        String jarFile = createModularJar();
+        int exitValue = exec(SET_DEFAULT_FSP, "-p", jarFile, "-m", "m/p.Main");
+        assertTrue(exitValue == 0);
+    }
 
-        Class<?> expected = Class.forName("TestProvider", false,
-            ClassLoader.getSystemClassLoader());
+    /**
+     * Test override of default FileSystemProvider where the main application
+     * is a module that is patched by an exploded patch.
+     */
+    public void testExplodedModuleWithExplodedPatch() throws Exception {
+        Path patchdir = Files.createTempDirectory("patch");
+        String modulePath = System.getProperty("jdk.module.path");
+        int exitValue = exec(SET_DEFAULT_FSP,
+                             "--patch-module", "m=" + patchdir,
+                             "-p", modulePath,
+                             "-m", "m/p.Main");
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test override of default FileSystemProvider where the main application
+     * is a module that is patched by an exploded patch.
+     */
+    public void testExplodedModuleWithJarPatch() throws Exception {
+        Path patchdir = Files.createTempDirectory("patch");
+        Files.createDirectory(patchdir.resolve("m.properties"));
+        Path patch = createJarFile(patchdir);
+        String modulePath = System.getProperty("jdk.module.path");
+        int exitValue = exec(SET_DEFAULT_FSP,
+                             "--patch-module", "m=" + patch,
+                             "-p", modulePath,
+                             "-m", "m/p.Main");
+        assertTrue(exitValue == 0);
+    }
 
-        if (c != expected)
-            throw new RuntimeException();
+    /**
+     * Returns the directory containing the classes for module "m".
+     */
+    private String moduleClasses() {
+        String mp = System.getProperty("jdk.module.path");
+        for (String dir : mp.split(File.pathSeparator)) {
+            Path m = Paths.get(dir, "m");
+            if (Files.exists(m)) return m.toString();
+        }
+        assertFalse(true);
+        return null;
+    }
+
+    /**
+     * Creates a modular JAR containing module "m".
+     */
+    private String createModularJar() throws Exception {
+        Path dir = Paths.get(moduleClasses());
+        Path jar = createJarFile(dir);
+        return jar.toString();
+    }
+
+    /**
+     * Creates a JAR file containing the entries in the given file tree.
+     */
+    private Path createJarFile(Path dir) throws Exception {
+        Path jar = Files.createTempDirectory("tmp").resolve("m.jar");
+        String[] args = { "--create", "--file=" + jar, "-C", dir.toString(), "." };
+        int ret = JAR_TOOL.run(System.out, System.out, args);
+        assertTrue(ret == 0);
+        return jar;
+    }
+
+    /**
+     * Invokes the java launcher with the given arguments, returning the exit code.
+     */
+    private int exec(String... args) throws Exception {
+       return ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .getExitValue();
     }
 }
--- a/test/java/nio/file/spi/TestProvider.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/nio/file/spi/TestProvider.java	Fri May 12 10:43:28 2017 -0700
@@ -77,7 +77,7 @@
                              LinkOption... options)
         throws IOException
     {
-        throw new ReadOnlyFileSystemException();
+        throw new RuntimeException("not implemented");
     }
 
     @Override
@@ -110,19 +110,20 @@
 
     @Override
     public void delete(Path file) throws IOException {
-        throw new ReadOnlyFileSystemException();
+        Path delegate = theFileSystem.unwrap(file);
+        defaultProvider.delete(delegate);
     }
 
     @Override
     public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs)
         throws IOException
     {
-        throw new ReadOnlyFileSystemException();
+        throw new RuntimeException("not implemented");
     }
 
     @Override
     public void createLink(Path link, Path existing) throws IOException {
-        throw new ReadOnlyFileSystemException();
+        throw new RuntimeException("not implemented");
     }
 
     @Override
@@ -136,14 +137,14 @@
     public void copy(Path source, Path target, CopyOption... options)
         throws IOException
     {
-        throw new ReadOnlyFileSystemException();
+        throw new RuntimeException("not implemented");
     }
 
     @Override
     public void move(Path source, Path target, CopyOption... options)
         throws IOException
     {
-        throw new ReadOnlyFileSystemException();
+        throw new RuntimeException("not implemented");
     }
 
     @Override
@@ -158,7 +159,8 @@
     public void createDirectory(Path dir, FileAttribute<?>... attrs)
         throws IOException
     {
-        throw new ReadOnlyFileSystemException();
+        Path delegate = theFileSystem.unwrap(dir);
+        defaultProvider.createDirectory(delegate, attrs);
     }
 
     @Override
@@ -167,13 +169,8 @@
                                               FileAttribute<?>... attrs)
         throws IOException
     {
-        if (options.contains(StandardOpenOption.READ) && options.size() == 1) {
-            Path delegate = theFileSystem.unwrap(file);
-            options = Collections.singleton(StandardOpenOption.READ);
-            return defaultProvider.newByteChannel(delegate, options, attrs);
-        }
-
-        throw new RuntimeException("not implemented");
+        Path delegate = theFileSystem.unwrap(file);
+        return defaultProvider.newByteChannel(delegate, options, attrs);
     }
 
     @Override
@@ -236,7 +233,7 @@
 
         @Override
         public boolean isReadOnly() {
-            return true;
+            return false;
         }
 
         @Override
@@ -419,7 +416,7 @@
 
         @Override
         public File toFile() {
-            return delegate.toFile();
+            return new File(toString());
         }
 
         @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/nio/file/spi/m/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
+ */
+module m {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/nio/file/spi/m/p/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,62 @@
+/*
+ * 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.io.File;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+/**
+ * Launched by SetDefaultProvider to test startup with the default file system
+ * provider overridden.
+ */
+
+public class Main {
+    public static void main(String[] args) throws Exception {
+        FileSystem fs = FileSystems.getDefault();
+        if (fs.getClass().getModule() == Object.class.getModule())
+            throw new RuntimeException("FileSystemProvider not overridden");
+
+        // exercise the file system
+        Path dir = Files.createTempDirectory("tmp");
+        if (dir.getFileSystem() != fs)
+            throw new RuntimeException("'dir' not in default file system");
+        System.out.println("created: " + dir);
+
+        Path foo = Files.createFile(dir.resolve("foo"));
+        if (foo.getFileSystem() != fs)
+            throw new RuntimeException("'foo' not in default file system");
+        System.out.println("created: " + foo);
+
+        // exercise interop with java.io.File
+        File file = foo.toFile();
+        Path path = file.toPath();
+        if (path.getFileSystem() != fs)
+            throw new RuntimeException("'path' not in default file system");
+        if (!path.equals(foo))
+            throw new RuntimeException(path + " not equal to " + foo);
+    }
+}
--- a/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
--- a/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/security/AccessController/LimitedDoPrivilegedWithThread.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/driverModuleTests/DriverManagerModuleTests.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,146 @@
+/*
+ * 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.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import static org.testng.Assert.*;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/*
+ * @test
+ * @library /java/sql/modules
+ * @build luckydogdriver/* mystubdriver/*
+ * @run testng/othervm DriverManagerModuleTests
+ * @summary Tests that a JDBC Driver that is a module can be loaded
+ * via the service-provider loading mechanism.
+ */
+public class DriverManagerModuleTests {
+
+    private final String LUCKYDOGDRIVER_URL = "jdbc:tennis:myDB";
+    private static final String STUBDRIVERURL = "jdbc:stub:myDB";
+    private static final String CONNECTION_CLASS_NAME = "com.luckydogtennis.StubConnection";
+
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+    }
+
+    @AfterClass
+    public static void tearDownClass() throws Exception {
+    }
+
+    @BeforeMethod
+    public void setUpMethod() throws Exception {
+    }
+
+    @AfterMethod
+    public void tearDownMethod() throws Exception {
+    }
+
+    /**
+     * Validate JDBC drivers as modules will be accessible. One driver will be
+     * loaded and registered via the service-provider loading mechanism. The
+     * other driver will need to be explictly loaded
+     *
+     * @throws java.lang.Exception
+     */
+    @Test
+    public void test() throws Exception {
+        System.out.println("\n$$$ runing Test()\n");
+        dumpRegisteredDrivers();
+        Driver d = DriverManager.getDriver(STUBDRIVERURL);
+        assertNotNull(d, "StubDriver should not be null");
+        assertTrue(isDriverRegistered(d));
+        Driver d2 = null;
+
+        // This driver should not be found until it is explictly loaded
+        try {
+            d2 = DriverManager.getDriver(LUCKYDOGDRIVER_URL);
+        } catch (SQLException e) {
+            // ignore expected Exception
+        }
+        assertNull(d2, "LuckyDogDriver should  be null");
+        loadDriver();
+        d2 = DriverManager.getDriver(LUCKYDOGDRIVER_URL);
+        assertNotNull(d2, "LuckyDogDriver should not be null");
+        assertTrue(isDriverRegistered(d2), "Driver was NOT registered");
+
+        dumpRegisteredDrivers();
+        DriverManager.deregisterDriver(d2);
+        assertFalse(isDriverRegistered(d2), "Driver IS STILL registered");
+        dumpRegisteredDrivers();
+
+    }
+
+    /**
+     * Validate that a Connection can be obtained from a JDBC driver which is a
+     * module and loaded via the service-provider loading mechanism.
+     *
+     * @throws java.lang.Exception
+     */
+    @Test
+    public void test00() throws Exception {
+        System.out.println("\n$$$ runing Test00()\n");
+        Connection con = DriverManager.getConnection(STUBDRIVERURL);
+        assertNotNull(con, "Returned Connection should not be NULL");
+        System.out.println("con=" + con.getClass().getName());
+        assertTrue(con.getClass().getName().equals(CONNECTION_CLASS_NAME));
+
+    }
+
+    /**
+     * Utility method to see if a driver is registered
+     */
+    private static void dumpRegisteredDrivers() {
+        System.out.println("\n+++ Loaded Drivers +++");
+
+         DriverManager.drivers().forEach(d -> System.out.println("\t\t### Driver:" + d));
+
+        System.out.println("++++++++++++++++++++++++");
+    }
+
+    /**
+     * Utility method to load the LuckyDogDriver
+     */
+    private static void loadDriver() {
+        try {
+            Class.forName("luckydogtennis.LuckyDogDriver");
+        } catch (ClassNotFoundException ex) {
+            System.out.println("**** Error: luckydogtennis.LuckyDogDriver not found");
+        }
+        System.out.println("Driver Loaded");
+    }
+
+    /**
+     * Utility method to see if a driver is registered
+     */
+    private static boolean isDriverRegistered(Driver d) {
+        return DriverManager.drivers().filter(driver-> driver == d).findFirst().isPresent();
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/luckydogdriver/luckydogtennis/LuckyDogDriver.java	Fri May 12 10:43:28 2017 -0700
@@ -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.
+ */
+package luckydogtennis;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.DriverPropertyInfo;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class LuckyDogDriver implements Driver {
+
+    static {
+        registerDriver();
+        System.out.println("*****in static block LuckyDogDriver");
+    }
+
+    private static void registerDriver() {
+        try {
+            DriverManager.registerDriver(new LuckyDogDriver());
+        } catch (SQLException ex) {
+            Logger.getLogger(LuckyDogDriver.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public LuckyDogDriver() {
+        System.out.println("*****in LuckyDogDriver Constructor");
+    }
+
+    @Override
+    public Connection connect(String url, Properties info) throws SQLException {
+        if (acceptsURL(url)) {
+        return new StubConnection();
+        }
+        return null;
+    }
+
+    @Override
+    public boolean acceptsURL(String url) throws SQLException {
+        return url.matches("^jdbc:tennis:.*");
+    }
+
+    @Override
+    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getMajorVersion() {
+        return 1;
+    }
+
+    @Override
+    public int getMinorVersion() {
+        return 0;
+    }
+
+    @Override
+    public boolean jdbcCompliant() {
+        return true;
+    }
+
+    @Override
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/luckydogdriver/luckydogtennis/StubConnection.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,315 @@
+/*
+ * 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 luckydogtennis;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Executor;
+
+public class StubConnection implements Connection{
+
+    @Override
+    public Statement createStatement() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String nativeSQL(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAutoCommit(boolean autoCommit) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getAutoCommit() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void commit() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void rollback() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void close() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isClosed() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public DatabaseMetaData getMetaData() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setReadOnly(boolean readOnly) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isReadOnly() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCatalog(String catalog) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getCatalog() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTransactionIsolation(int level) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getTransactionIsolation() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLWarning getWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void clearWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Map<String, Class<?>> getTypeMap() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setHoldability(int holdability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getHoldability() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Savepoint setSavepoint() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Savepoint setSavepoint(String name) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void rollback(Savepoint savepoint) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void releaseSavepoint(Savepoint savepoint) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Clob createClob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Blob createBlob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public NClob createNClob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLXML createSQLXML() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isValid(int timeout) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClientInfo(String name, String value) throws SQLClientInfoException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClientInfo(Properties properties) throws SQLClientInfoException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getClientInfo(String name) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Properties getClientInfo() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setSchema(String schema) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getSchema() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void abort(Executor executor) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getNetworkTimeout() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isWrapperFor(Class<?> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/luckydogdriver/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+module luckydogdriver {
+    requires transitive java.logging;
+    requires transitive java.sql;
+    exports luckydogtennis;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubConnection.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,315 @@
+/*
+ * 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 com.luckydogtennis;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.sql.SQLXML;
+import java.sql.Savepoint;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Executor;
+
+public class StubConnection implements Connection{
+
+    @Override
+    public Statement createStatement() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String nativeSQL(String sql) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAutoCommit(boolean autoCommit) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean getAutoCommit() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void commit() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void rollback() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void close() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isClosed() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public DatabaseMetaData getMetaData() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setReadOnly(boolean readOnly) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isReadOnly() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setCatalog(String catalog) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getCatalog() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTransactionIsolation(int level) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getTransactionIsolation() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLWarning getWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void clearWarnings() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Map<String, Class<?>> getTypeMap() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setHoldability(int holdability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getHoldability() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Savepoint setSavepoint() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Savepoint setSavepoint(String name) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void rollback(Savepoint savepoint) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void releaseSavepoint(Savepoint savepoint) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Clob createClob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Blob createBlob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public NClob createNClob() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public SQLXML createSQLXML() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isValid(int timeout) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClientInfo(String name, String value) throws SQLClientInfoException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClientInfo(Properties properties) throws SQLClientInfoException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getClientInfo(String name) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Properties getClientInfo() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setSchema(String schema) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getSchema() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void abort(Executor executor) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getNetworkTimeout() throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public <T> T unwrap(Class<T> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public boolean isWrapperFor(Class<?> iface) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/mystubdriver/com/luckydogtennis/StubDriver.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,97 @@
+/*
+ * 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 com.luckydogtennis;
+
+import java.sql.Connection;
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.sql.DriverPropertyInfo;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+public class StubDriver implements Driver {
+
+    static {
+        System.out.println("*****in static block StubDriver");
+        registerDriver();
+    }
+
+    private static void registerDriver() {
+        try {
+            DriverManager.registerDriver(new StubDriver());
+        } catch (SQLException ex) {
+            Logger.getLogger(StubDriver.class.getName()).log(Level.SEVERE, null, ex);
+        }
+    }
+
+    public StubDriver() {
+        System.out.println("*****in StubDriver Constructor*************");
+        /*
+        for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
+            System.out.println(ste);
+        }
+        System.out.println("******************");
+        */
+    }
+
+    @Override
+    public Connection connect(String url, Properties info) throws SQLException {
+        if (acceptsURL(url)) {
+            return new StubConnection();
+        }
+        return null;
+    }
+
+    @Override
+    public boolean acceptsURL(String url) throws SQLException {
+        return url.matches("^jdbc:stub:.*");
+    }
+
+    @Override
+    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getMajorVersion() {
+        return 1;
+    }
+
+    @Override
+    public int getMinorVersion() {
+        return 0;
+    }
+
+    @Override
+    public boolean jdbcCompliant() {
+        return true;
+    }
+
+    @Override
+    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/sql/modules/mystubdriver/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -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 mystubdriver {
+    requires transitive java.logging;
+    requires transitive java.sql;
+    exports com.luckydogtennis;
+    provides java.sql.Driver with
+        com.luckydogtennis.StubDriver;
+}
--- a/test/java/time/test/java/time/temporal/TestIsoWeekFields.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/time/test/java/time/temporal/TestIsoWeekFields.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014,2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/util/Arrays/ParallelPrefix.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Arrays/ParallelPrefix.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -179,119 +179,65 @@
     @Test
     public void testNPEs() {
         // null array
-        assertThrows( () -> Arrays.parallelPrefix((int[]) null, Integer::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((long []) null, Long::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((double []) null, Double::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((String []) null, String::concat),
-                NullPointerException.class, "should throw NPE");
+        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
-        assertThrows( () -> Arrays.parallelPrefix((int[]) null, 0, 0, Integer::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((long []) null, 0, 0, Long::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((double []) null, 0, 0, Double::max),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix((String []) null, 0, 0, String::concat),
-                NullPointerException.class, "should throw NPE");
+        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
-        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, null),
-                NullPointerException.class, "should throw NPE");
+        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
-        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 0, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 0, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 0, null),
-                NullPointerException.class, "should throw NPE");
-        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 0, null),
-                NullPointerException.class, "should throw NPE");
+        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() {
-        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 1, 0, Integer::max),
-                IllegalArgumentException.class, "should throw IAE");
-        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 1, 0, Long::max),
-                IllegalArgumentException.class, "should throw IAE");
-        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 1, 0, Double::max),
-                IllegalArgumentException.class, "should throw IAE");
-        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 1, 0, String::concat),
-                IllegalArgumentException.class, "should throw IAE");
+        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 testAIOBEs() {
+    public void testAIOOBEs() {
         // bad "fromIndex"
-        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, -1, 0, Integer::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, -1, 0, Long::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, -1, 0, Double::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, -1, 0, String::concat),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        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"
-        assertThrows( () -> Arrays.parallelPrefix(new int[] {}, 0, 1, Integer::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new long[] {}, 0, 1, Long::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new double[] {}, 0, 1, Double::max),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
-        assertThrows( () -> Arrays.parallelPrefix(new String[] {}, 0, 1, String::concat),
-                ArrayIndexOutOfBoundsException.class, "should throw AIOBE");
+        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
 
-    public interface Thrower<T extends Throwable> {
-
-        public void run() throws T;
-    }
-
-
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
-        assertThrows(thrower, throwable, null);
+    private void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
     }
 
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
-        Throwable thrown;
-        try {
-            thrower.run();
-            thrown = null;
-        } catch (Throwable caught) {
-            thrown = caught;
-        }
-
-        assertInstance(thrown, throwable,
-            ((null != message) ? message : "") +
-            " Failed to throw " + throwable.getCanonicalName());
+    private void assertThrowsIAE(ThrowingRunnable r) {
+        assertThrows(IllegalArgumentException.class, r);
     }
 
-    public static <T extends Throwable> void assertThrows(Class<T> throwable, String message, Thrower<T>... throwers) {
-        for(Thrower<T> thrower : throwers) {
-            assertThrows(thrower, throwable, message);
-        }
-    }
-
-    public static void assertInstance(Object actual, Class<?> expected) {
-        assertInstance(expected.isInstance(actual), null);
-    }
-
-    public static void assertInstance(Object actual, Class<?> expected, String message) {
-        assertTrue(expected.isInstance(actual), message);
+    private void assertThrowsAIOOB(ThrowingRunnable r) {
+        assertThrows(ArrayIndexOutOfBoundsException.class, r);
     }
 
     static void assertArraysEqual(int[] actual, int[] expected) {
--- a/test/java/util/Arrays/StreamAndSpliterator.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Arrays/StreamAndSpliterator.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,9 @@
 import java.util.Arrays;
 import java.util.Spliterators;
 
-import static org.testng.Assert.assertNotNull;
+import org.testng.Assert.ThrowingRunnable;
+
+import static org.testng.Assert.assertThrows;
 
 public class StreamAndSpliterator {
     @Test
@@ -124,25 +126,11 @@
         assertThrowsAIOOB(() -> Spliterators.spliterator(new String[]{}, 0, 1, 0));
     }
 
-    void assertThrowsNPE(Runnable r) {
-        NullPointerException caught = null;
-        try {
-            r.run();
-        }
-        catch (NullPointerException e) {
-            caught = e;
-        }
-        assertNotNull(caught, "NullPointerException not thrown");
+    void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
     }
 
-    void assertThrowsAIOOB(Runnable r) {
-        ArrayIndexOutOfBoundsException caught = null;
-        try {
-            r.run();
-        }
-        catch (ArrayIndexOutOfBoundsException e) {
-            caught = e;
-        }
-        assertNotNull(caught, "ArrayIndexOutOfBoundsException not thrown");
+    void assertThrowsAIOOB(ThrowingRunnable r) {
+        assertThrows(ArrayIndexOutOfBoundsException.class, r);
     }
 }
--- a/test/java/util/BitSet/stream/BitSetStreamTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/BitSet/stream/BitSetStreamTest.java	Fri May 12 10:43:28 2017 -0700
@@ -42,6 +42,7 @@
 
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertThrows;
 import static org.testng.Assert.assertTrue;
 
 /**
@@ -167,8 +168,8 @@
 
     @Test(dataProvider = "BitSet.stream.spliterator")
     public void testIntNullPointerException(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((IntConsumer) null));
+        assertThrows(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null));
+        assertThrows(NullPointerException.class, () -> s.get().tryAdvance((IntConsumer) null));
     }
 
     @Test(dataProvider = "BitSet.stream.spliterator")
--- a/test/java/util/Collections/EmptyNavigableMap.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Collections/EmptyNavigableMap.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -36,10 +36,12 @@
 import java.util.NavigableMap;
 import java.util.SortedMap;
 import java.util.TreeMap;
+
+import org.testng.Assert;
+import org.testng.Assert.ThrowingRunnable;
 import org.testng.annotations.Test;
 import org.testng.annotations.DataProvider;
 
-import static org.testng.Assert.fail;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.assertFalse;
 
@@ -65,26 +67,27 @@
             ((null != message) ? message : "") + " Not empty. ");
     }
 
-    public interface Thrower<T extends Throwable> {
-
-        public void run() throws T;
-    }
-
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
-        assertThrows(thrower, throwable, null);
+    private <T extends Throwable> void assertThrows(Class<T> throwableClass,
+                                                    ThrowingRunnable runnable,
+                                                    String message) {
+        try {
+            Assert.assertThrows(throwableClass, runnable);
+        } catch (AssertionError e) {
+            throw new AssertionError(String.format("%s%n%s",
+                    ((null != message) ? message : ""), e.getMessage()), e);
+        }
     }
 
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
-        Throwable result;
-        try {
-            thrower.run();
-            fail(((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". ");
-            return;
-        } catch (Throwable caught) {
-            result = caught;
-        }
+    private void assertThrowsCCE(ThrowingRunnable r, String s) {
+        assertThrows(ClassCastException.class, r, s);
+    }
 
-        assertInstance(result, throwable, ((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". ");
+    private void assertThrowsNPE(ThrowingRunnable r, String s) {
+        assertThrows(NullPointerException.class, r, s);
+    }
+
+    private void assertThrowsIAE(ThrowingRunnable r, String s) {
+        assertThrows(IllegalArgumentException.class, r, s);
     }
 
     public static final boolean isDescending(SortedMap<?,?> set) {
@@ -121,10 +124,9 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testContainsRequiresComparable(String description, NavigableMap<?,?> navigableMap) {
-        assertThrows(() -> {
+        assertThrowsCCE(() -> {
             navigableMap.containsKey(new Object());
         },
-            ClassCastException.class,
             description + ": Compareable should be required");
     }
 
@@ -175,14 +177,12 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testHeadMap(String description, NavigableMap navigableMap) {
-        assertThrows(
+        assertThrowsNPE(
             () -> { NavigableMap ss = navigableMap.headMap(null, false); },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> { NavigableMap ss = navigableMap.headMap(new Object(), true); },
-            ClassCastException.class,
             description + ": Must throw ClassCastException for non-Comparable element");
 
         NavigableMap ss = navigableMap.headMap("1", false);
@@ -203,50 +203,44 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testSubMap(String description, NavigableMap navigableMap) {
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedMap ss = navigableMap.subMap(null, BigInteger.TEN);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedMap ss = navigableMap.subMap(BigInteger.ZERO, null);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedMap ss = navigableMap.subMap(null, null);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
         Object obj1 = new Object();
         Object obj2 = new Object();
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedMap ss = navigableMap.subMap(obj1, BigInteger.TEN);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedMap ss = navigableMap.subMap(BigInteger.ZERO, obj2);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedMap ss = navigableMap.subMap(obj1, obj2);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
         // minimal range
         navigableMap.subMap(BigInteger.ZERO, false, BigInteger.ZERO, false);
@@ -257,12 +251,11 @@
         Object first = isDescending(navigableMap) ? BigInteger.TEN : BigInteger.ZERO;
         Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO;
 
-            assertThrows(
+            assertThrowsIAE(
                 () -> {
                     navigableMap.subMap(last, true, first, false);
                 },
-                IllegalArgumentException.class, description
-                + ": Must throw IllegalArgumentException when fromElement is not less than toElement.");
+                description + ": Must throw IllegalArgumentException when fromElement is not less than toElement.");
 
         navigableMap.subMap(first, true, last, false);
     }
@@ -280,10 +273,9 @@
         // slightly smaller
         NavigableMap ns = subMap.subMap(first, false, last, false);
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.subMap(first, true, last, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -301,10 +293,9 @@
         NavigableMap ns = subMap.headMap(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.headMap(BigInteger.ONE, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -322,10 +313,9 @@
         NavigableMap ns = subMap.tailMap(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.tailMap(BigInteger.ONE, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -337,15 +327,15 @@
      */
     @Test(dataProvider = "NavigableMap<?,?>", dataProviderClass = EmptyNavigableMap.class)
     public void testTailMap(String description, NavigableMap navigableMap) {
-        assertThrows(() -> {
+        assertThrowsNPE(() -> {
             navigableMap.tailMap(null);
         },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(() -> {
+        assertThrowsCCE(() -> {
             navigableMap.tailMap(new Object());
-        }, ClassCastException.class);
+        },
+            description);
 
         NavigableMap ss = navigableMap.tailMap("1", true);
 
--- a/test/java/util/Collections/EmptyNavigableSet.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Collections/EmptyNavigableSet.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -37,10 +37,12 @@
 import java.util.NavigableSet;
 import java.util.SortedSet;
 import java.util.TreeSet;
+
+import org.testng.Assert;
+import org.testng.Assert.ThrowingRunnable;
 import org.testng.annotations.Test;
 import org.testng.annotations.DataProvider;
 
-import static org.testng.Assert.fail;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertSame;
 import static org.testng.Assert.assertTrue;
@@ -67,26 +69,31 @@
             ((null != message) ? message : "") + " Not empty. ");
     }
 
-    public interface Thrower<T extends Throwable> {
-
-        public void run() throws T;
-    }
-
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
-        assertThrows(thrower, throwable, null);
+    private <T extends Throwable> void assertThrows(Class<T> throwableClass,
+                                                    ThrowingRunnable runnable,
+                                                    String message) {
+        try {
+            Assert.assertThrows(throwableClass, runnable);
+        } catch (AssertionError e) {
+            throw new AssertionError(String.format("%s%n%s",
+                    ((null != message) ? message : ""), e.getMessage()), e);
+        }
     }
 
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
-        Throwable result;
-        try {
-            thrower.run();
-            fail(((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". ");
-            return;
-        } catch (Throwable caught) {
-            result = caught;
-        }
+    private void assertThrowsCCE(ThrowingRunnable r, String s) {
+        assertThrows(ClassCastException.class, r, s);
+    }
 
-        assertInstance(result, throwable, ((null != message) ? message : "") + "Failed to throw " + throwable.getCanonicalName() + ". ");
+    private void assertThrowsNPE(ThrowingRunnable r, String s) {
+        assertThrows(NullPointerException.class, r, s);
+    }
+
+    private void assertThrowsIAE(ThrowingRunnable r, String s) {
+        assertThrows(IllegalArgumentException.class, r, s);
+    }
+
+    private void assertThrowsNSEE(ThrowingRunnable r, String s) {
+        assertThrows(NoSuchElementException.class, r, s);
     }
 
     public static final boolean isDescending(SortedSet<?> set) {
@@ -123,10 +130,9 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testContainsRequiresComparable(String description, NavigableSet<?> navigableSet) {
-        assertThrows(() -> {
+        assertThrowsCCE(() -> {
             navigableSet.contains(new Object());
         },
-            ClassCastException.class,
             description + ": Compareable should be required");
     }
 
@@ -176,9 +182,9 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testFirst(String description, NavigableSet<?> navigableSet) {
-        assertThrows(() -> {
+        assertThrowsNSEE(() -> {
             navigableSet.first();
-        }, NoSuchElementException.class, description);
+        }, description);
     }
 
     /**
@@ -186,14 +192,12 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testHeadSet(String description, NavigableSet navigableSet) {
-        assertThrows(
+        assertThrowsNPE(
             () -> { NavigableSet ns = navigableSet.headSet(null, false); },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> { NavigableSet ns = navigableSet.headSet(new Object(), true); },
-            ClassCastException.class,
             description + ": Must throw ClassCastException for non-Comparable element");
 
         NavigableSet ns = navigableSet.headSet("1", false);
@@ -206,9 +210,9 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testLast(String description, NavigableSet<?> navigableSet) {
-        assertThrows(() -> {
+        assertThrowsNSEE(() -> {
             navigableSet.last();
-        }, NoSuchElementException.class, description);
+        }, description);
     }
 
     /**
@@ -224,50 +228,44 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testSubSet(String description, NavigableSet navigableSet) {
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedSet ss = navigableSet.subSet(null, BigInteger.TEN);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedSet ss = navigableSet.subSet(BigInteger.ZERO, null);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(
+        assertThrowsNPE(
             () -> {
                 SortedSet ss = navigableSet.subSet(null, null);
             },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
         Object obj1 = new Object();
         Object obj2 = new Object();
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedSet ss = navigableSet.subSet(obj1, BigInteger.TEN);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedSet ss = navigableSet.subSet(BigInteger.ZERO, obj2);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
-        assertThrows(
+        assertThrowsCCE(
             () -> {
                 SortedSet ss = navigableSet.subSet(obj1, obj2);
             },
-            ClassCastException.class, description
-            + ": Must throw ClassCastException for parameter which is not Comparable.");
+            description + ": Must throw ClassCastException for parameter which is not Comparable.");
 
         // minimal range
         navigableSet.subSet(BigInteger.ZERO, false, BigInteger.ZERO, false);
@@ -278,11 +276,11 @@
         Object first = isDescending(navigableSet) ? BigInteger.TEN : BigInteger.ZERO;
         Object last = (BigInteger.ZERO == first) ? BigInteger.TEN : BigInteger.ZERO;
 
-            assertThrows(
+            assertThrowsIAE(
                 () -> {
                     navigableSet.subSet(last, true, first, false);
                 },
-                IllegalArgumentException.class, description
+                description
                 + ": Must throw IllegalArgumentException when fromElement is not less than toElement.");
 
         navigableSet.subSet(first, true, last, false);
@@ -301,10 +299,9 @@
         // slightly smaller
         NavigableSet ns = subSet.subSet(first, false, last, false);
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.subSet(first, true, last, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -322,10 +319,9 @@
         NavigableSet ns = subSet.headSet(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.headSet(BigInteger.ONE, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -343,10 +339,9 @@
         NavigableSet ns = subSet.tailSet(BigInteger.ONE, false);
 
         // slight expansion
-        assertThrows(() -> {
+        assertThrowsIAE(() -> {
             ns.tailSet(BigInteger.ONE, true);
         },
-            IllegalArgumentException.class,
             description + ": Expansion should not be allowed");
 
         // much smaller
@@ -358,15 +353,14 @@
      */
     @Test(dataProvider = "NavigableSet<?>", dataProviderClass = EmptyNavigableSet.class)
     public void testTailSet(String description, NavigableSet navigableSet) {
-        assertThrows(() -> {
+        assertThrowsNPE(() -> {
             navigableSet.tailSet(null);
         },
-            NullPointerException.class,
             description + ": Must throw NullPointerException for null element");
 
-        assertThrows(() -> {
+        assertThrowsCCE(() -> {
             navigableSet.tailSet(new Object());
-        }, ClassCastException.class);
+        }, description);
 
         NavigableSet ss = navigableSet.tailSet("1", true);
 
--- a/test/java/util/Iterator/PrimitiveIteratorDefaults.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Iterator/PrimitiveIteratorDefaults.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -21,16 +21,16 @@
  * questions.
  */
 
-import org.testng.annotations.Test;
-
 import java.util.PrimitiveIterator;
 import java.util.function.Consumer;
 import java.util.function.DoubleConsumer;
 import java.util.function.IntConsumer;
 import java.util.function.LongConsumer;
 
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
+import org.testng.Assert.ThrowingRunnable;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertThrows;
 
 /**
  * @test
@@ -53,8 +53,8 @@
             }
         };
 
-        executeAndCatch(() -> i.forEachRemaining((IntConsumer) null));
-        executeAndCatch(() -> i.forEachRemaining((Consumer<Integer>) null));
+        assertThrowsNPE(() -> i.forEachRemaining((IntConsumer) null));
+        assertThrowsNPE(() -> i.forEachRemaining((Consumer<Integer>) null));
     }
 
     public void testLongForEachRemainingWithNull() {
@@ -70,8 +70,8 @@
             }
         };
 
-        executeAndCatch(() -> i.forEachRemaining((LongConsumer) null));
-        executeAndCatch(() -> i.forEachRemaining((Consumer<Long>) null));
+        assertThrowsNPE(() -> i.forEachRemaining((LongConsumer) null));
+        assertThrowsNPE(() -> i.forEachRemaining((Consumer<Long>) null));
     }
 
     public void testDoubleForEachRemainingWithNull() {
@@ -87,29 +87,12 @@
             }
         };
 
-        executeAndCatch(() -> i.forEachRemaining((DoubleConsumer) null));
-        executeAndCatch(() -> i.forEachRemaining((Consumer<Double>) null));
-    }
-
-    private void executeAndCatch(Runnable r) {
-        executeAndCatch(NullPointerException.class, r);
+        assertThrowsNPE(() -> i.forEachRemaining((DoubleConsumer) null));
+        assertThrowsNPE(() -> i.forEachRemaining((Consumer<Double>) null));
     }
 
-    private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
-        Exception caught = null;
-        try {
-            r.run();
-        }
-        catch (Exception e) {
-            caught = e;
-        }
-
-        assertNotNull(caught,
-                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
-                                    expected.getName()));
-        assertTrue(expected.isInstance(caught),
-                   String.format("Exception thrown %s not an instance of %s",
-                                 caught.getClass().getName(), expected.getName()));
+    private void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
     }
 
 }
--- a/test/java/util/Map/Defaults.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Map/Defaults.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 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
@@ -53,15 +53,19 @@
 import java.util.function.Function;
 import java.util.function.Supplier;
 
+import org.testng.Assert.ThrowingRunnable;
 import org.testng.annotations.Test;
 import org.testng.annotations.DataProvider;
+
 import static java.util.Objects.requireNonNull;
+
 import static org.testng.Assert.fail;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertNull;
 import static org.testng.Assert.assertSame;
+import static org.testng.Assert.assertThrows;
 
 public class Defaults {
 
@@ -159,14 +163,8 @@
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=nonNull values=nonNull")
     public static void testReplaceAllNoNullReplacement(String description, Map<IntegerEnum, String> map) {
-        assertThrows(
-            () -> { map.replaceAll(null); },
-            NullPointerException.class,
-            description);
-        assertThrows(
-            () -> { map.replaceAll((k,v) -> null); },
-            NullPointerException.class,
-            description + " should not allow replacement with null value");
+        assertThrowsNPE(() -> map.replaceAll(null));
+        assertThrowsNPE(() -> map.replaceAll((k,v) -> null)); //should not allow replacement with null value
     }
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
@@ -209,7 +207,7 @@
     public void testReplaceKVNoNulls(String description, Map<IntegerEnum, String> map) {
         assertTrue(map.containsKey(FIRST_KEY), "expected key missing");
         assertSame(map.get(FIRST_KEY), FIRST_VALUE, "found wrong value");
-        assertThrows( () -> {map.replace(FIRST_KEY, null);}, NullPointerException.class, description + ": should throw NPE");
+        assertThrowsNPE(() -> map.replace(FIRST_KEY, null));
         assertSame(map.replace(FIRST_KEY, EXTRA_VALUE), FIRST_VALUE, description + ": replaced wrong value");
         assertSame(map.get(FIRST_KEY), EXTRA_VALUE, "found wrong value");
     }
@@ -248,8 +246,13 @@
     public void testReplaceKVVNoNulls(String description, Map<IntegerEnum, String> map) {
         assertTrue(map.containsKey(FIRST_KEY), "expected key missing");
         assertSame(map.get(FIRST_KEY), FIRST_VALUE, "found wrong value");
-        assertThrows( () -> {map.replace(FIRST_KEY, FIRST_VALUE, null);}, NullPointerException.class, description + ": should throw NPE");
-        assertThrows( () -> {if (!map.replace(FIRST_KEY, null, EXTRA_VALUE)) throw new NullPointerException("default returns false rather than throwing");}, NullPointerException.class,  description + ": should throw NPE");
+        assertThrowsNPE(() -> map.replace(FIRST_KEY, FIRST_VALUE, null));
+        assertThrowsNPE(
+                () -> {
+                    if (!map.replace(FIRST_KEY, null, EXTRA_VALUE)) {
+                        throw new NullPointerException("default returns false rather than throwing");
+                    }
+                });
         assertTrue(map.replace(FIRST_KEY, FIRST_VALUE, EXTRA_VALUE), description + ": replaced wrong value");
         assertSame(map.get(FIRST_KEY), EXTRA_VALUE, "found wrong value");
     }
@@ -319,9 +322,7 @@
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
     public void testComputeIfAbsentNullFunction(String description, Map<IntegerEnum, String> map) {
-        assertThrows( () -> { map.computeIfAbsent(KEYS[1], null);},
-                NullPointerException.class,
-                "Should throw NPE");
+        assertThrowsNPE(() -> map.computeIfAbsent(KEYS[1], null));
     }
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
@@ -366,9 +367,7 @@
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
     public void testComputeIfPresentNullFunction(String description, Map<IntegerEnum, String> map) {
-        assertThrows( () -> { map.computeIfPresent(KEYS[1], null);},
-                NullPointerException.class,
-                "Should throw NPE");
+        assertThrowsNPE(() -> map.computeIfPresent(KEYS[1], null));
     }
 
      @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=withNull values=withNull")
@@ -459,9 +458,7 @@
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
     public void testComputeNullFunction(String description, Map<IntegerEnum, String> map) {
-        assertThrows( () -> { map.compute(KEYS[1], null);},
-                NullPointerException.class,
-                "Should throw NPE");
+        assertThrowsNPE(() -> map.compute(KEYS[1], null));
     }
 
     @Test(dataProvider = "MergeCases")
@@ -531,9 +528,7 @@
 
     @Test(dataProvider = "Map<IntegerEnum,String> rw=true keys=all values=all")
     public void testMergeNullMerger(String description, Map<IntegerEnum, String> map) {
-        assertThrows( () -> { map.merge(KEYS[1], VALUES[1], null);},
-                NullPointerException.class,
-                "Should throw NPE");
+        assertThrowsNPE(() -> map.merge(KEYS[1], VALUES[1], null));
     }
 
     /** A function that flipflops between running two other functions. */
@@ -973,41 +968,8 @@
         return cases;
     }
 
-    public interface Thrower<T extends Throwable> {
-
-        public void run() throws T;
-    }
-
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable) {
-        assertThrows(thrower, throwable, null);
-    }
-
-    public static <T extends Throwable> void assertThrows(Thrower<T> thrower, Class<T> throwable, String message) {
-        Throwable thrown;
-        try {
-            thrower.run();
-            thrown = null;
-        } catch (Throwable caught) {
-            thrown = caught;
-        }
-
-        assertInstance(thrown, throwable,
-            ((null != message) ? message : "") +
-            " Failed to throw " + throwable.getCanonicalName());
-    }
-
-    public static <T extends Throwable> void assertThrows(Class<T> throwable, String message, Thrower<T>... throwers) {
-        for (Thrower<T> thrower : throwers) {
-            assertThrows(thrower, throwable, message);
-        }
-    }
-
-    public static void assertInstance(Object actual, Class<?> expected) {
-        assertInstance(expected.isInstance(actual), null);
-    }
-
-    public static void assertInstance(Object actual, Class<?> expected, String message) {
-        assertTrue(expected.isInstance(actual), message);
+    public static void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
     }
 
     /**
--- a/test/java/util/Random/RandomTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Random/RandomTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, 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
@@ -21,14 +21,13 @@
  * questions.
  */
 
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
 import java.util.Random;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.LongAdder;
 import java.util.function.BiConsumer;
 
+import org.testng.annotations.Test;
+
 import static org.testng.Assert.*;
 
 /**
@@ -172,12 +171,12 @@
      */
     public void testBadStreamSize() {
         Random r = new Random();
-        executeAndCatchIAE(() -> r.ints(-1L));
-        executeAndCatchIAE(() -> r.ints(-1L, 2, 3));
-        executeAndCatchIAE(() -> r.longs(-1L));
-        executeAndCatchIAE(() -> r.longs(-1L, -1L, 1L));
-        executeAndCatchIAE(() -> r.doubles(-1L));
-        executeAndCatchIAE(() -> r.doubles(-1L, .5, .6));
+        assertThrowsIAE(() -> r.ints(-1L));
+        assertThrowsIAE(() -> r.ints(-1L, 2, 3));
+        assertThrowsIAE(() -> r.longs(-1L));
+        assertThrowsIAE(() -> r.longs(-1L, -1L, 1L));
+        assertThrowsIAE(() -> r.doubles(-1L));
+        assertThrowsIAE(() -> r.doubles(-1L, .5, .6));
     }
 
     /**
@@ -186,10 +185,10 @@
      */
     public void testBadStreamBounds() {
         Random r = new Random();
-        executeAndCatchIAE(() -> r.ints(2, 1));
-        executeAndCatchIAE(() -> r.ints(10, 42, 42));
-        executeAndCatchIAE(() -> r.longs(-1L, -1L));
-        executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
+        assertThrowsIAE(() -> r.ints(2, 1));
+        assertThrowsIAE(() -> r.ints(10, 42, 42));
+        assertThrowsIAE(() -> r.longs(-1L, -1L));
+        assertThrowsIAE(() -> r.longs(10, 1L, -2L));
 
         testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
     }
@@ -198,45 +197,28 @@
     static final double FINITE = Math.PI;
 
     void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
-        executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
-        executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
-        executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
-        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
-        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+        assertThrowsIAE(() -> bi.accept(17.0, 2.0));
+        assertThrowsIAE(() -> bi.accept(0.0, 0.0));
+        assertThrowsIAE(() -> bi.accept(Double.NaN, FINITE));
+        assertThrowsIAE(() -> bi.accept(FINITE, Double.NaN));
+        assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
 
         // Returns NaN
-//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
-//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+//        assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+//        assertThrowsIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
 
-        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+        assertThrowsIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
 
         // Returns Double.MAX_VALUE
-//        executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+//        assertThrowsIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
 
-        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
-        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
-        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
+        assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+        assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+        assertThrowsIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
     }
 
-    private void executeAndCatchIAE(Runnable r) {
-        executeAndCatch(IllegalArgumentException.class, r);
-    }
-
-    private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
-        Exception caught = null;
-        try {
-            r.run();
-        }
-        catch (Exception e) {
-            caught = e;
-        }
-
-        assertNotNull(caught,
-                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
-                                    expected.getName()));
-        Assert.assertTrue(expected.isInstance(caught),
-                          String.format("Exception thrown %s not an instance of %s",
-                                        caught.getClass().getName(), expected.getName()));
+    private void assertThrowsIAE(ThrowingRunnable r) {
+        assertThrows(IllegalArgumentException.class, r);
     }
 
     /**
--- a/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/ResourceBundle/getBaseBundleName/resources/PropertyBundle.properties	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -21,4 +21,3 @@
 # questions.
 #
 dummy=foo
-
--- a/test/java/util/Spliterator/SpliteratorCollisions.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Spliterator/SpliteratorCollisions.java	Fri May 12 10:43:28 2017 -0700
@@ -212,16 +212,16 @@
     void testNullPointerException(String description,
                                   Collection<HashableInteger> exp,
                                   Supplier<Spliterator<HashableInteger>> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null));
+        assertThrowsNPE(() -> s.get().forEachRemaining(null));
+        assertThrowsNPE(() -> s.get().tryAdvance(null));
     }
 
     @Test(dataProvider = "HashableIntSpliteratorWithNull")
     void testNullPointerExceptionWithNull(String description,
                                           Collection<HashableInteger> exp,
                                           Supplier<Spliterator<HashableInteger>> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null));
+        assertThrowsNPE(() -> s.get().forEachRemaining(null));
+        assertThrowsNPE(() -> s.get().tryAdvance(null));
     }
 
 
--- a/test/java/util/Spliterator/SpliteratorFailFastTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Spliterator/SpliteratorFailFastTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,9 +21,6 @@
  * questions.
  */
 
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.ConcurrentModificationException;
@@ -42,8 +39,11 @@
 import java.util.WeakHashMap;
 import java.util.function.Supplier;
 
-import static org.testng.Assert.assertNotNull;
-import static org.testng.Assert.assertTrue;
+import org.testng.Assert.ThrowingRunnable;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertThrows;
 
 /**
  * @test
@@ -125,7 +125,7 @@
             });
             source.update();
 
-            executeAndCatch(() -> s.tryAdvance(e -> {
+            assertThrowsCME(() -> s.tryAdvance(e -> {
             }));
         }
 
@@ -137,7 +137,7 @@
             });
             source.update();
 
-            executeAndCatch(() -> s.forEachRemaining(e -> {
+            assertThrowsCME(() -> s.forEachRemaining(e -> {
             }));
         }
     }
@@ -147,7 +147,7 @@
         Source<T> source = ss.get();
         Spliterator<T> s = source.spliterator();
 
-        executeAndCatch(() -> s.forEachRemaining(e -> {
+        assertThrowsCME(() -> s.forEachRemaining(e -> {
             source.update();
         }));
     }
@@ -161,7 +161,7 @@
             s.estimateSize();
             source.update();
 
-            executeAndCatch(() -> s.tryAdvance(e -> {
+            assertThrowsCME(() -> s.tryAdvance(e -> {
             }));
         }
 
@@ -172,30 +172,13 @@
             s.estimateSize();
             source.update();
 
-            executeAndCatch(() -> s.forEachRemaining(e -> {
+            assertThrowsCME(() -> s.forEachRemaining(e -> {
             }));
         }
     }
 
-    private void executeAndCatch(Runnable r) {
-        executeAndCatch(ConcurrentModificationException.class, r);
-    }
-
-    private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
-        Exception caught = null;
-        try {
-            r.run();
-        }
-        catch (Exception e) {
-            caught = e;
-        }
-
-        assertNotNull(caught,
-                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
-                                    expected.getName()));
-        assertTrue(expected.isInstance(caught),
-                   String.format("Exception thrown %s not an instance of %s",
-                                 caught.getClass().getName(), expected.getName()));
+    private void assertThrowsCME(ThrowingRunnable r) {
+        assertThrows(ConcurrentModificationException.class, r);
     }
 
 }
--- a/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Spliterator/SpliteratorLateBindingFailFastHelper.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java	Fri May 12 10:43:28 2017 -0700
@@ -666,8 +666,8 @@
 
     @Test(dataProvider = "Spliterator<Integer>")
     public void testNullPointerException(String description, Collection<Integer> exp, Supplier<Spliterator<Integer>> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining(null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance(null));
+        assertThrowsNPE(() -> s.get().forEachRemaining(null));
+        assertThrowsNPE(() -> s.get().tryAdvance(null));
     }
 
     @Test(dataProvider = "Spliterator<Integer>")
@@ -866,8 +866,8 @@
 
     @Test(dataProvider = "Spliterator.OfInt")
     public void testIntNullPointerException(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((IntConsumer) null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((IntConsumer) null));
+        assertThrowsNPE(() -> s.get().forEachRemaining((IntConsumer) null));
+        assertThrowsNPE(() -> s.get().tryAdvance((IntConsumer) null));
     }
 
     @Test(dataProvider = "Spliterator.OfInt")
@@ -1009,8 +1009,8 @@
 
     @Test(dataProvider = "Spliterator.OfLong")
     public void testLongNullPointerException(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((LongConsumer) null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((LongConsumer) null));
+        assertThrowsNPE(() -> s.get().forEachRemaining((LongConsumer) null));
+        assertThrowsNPE(() -> s.get().tryAdvance((LongConsumer) null));
     }
 
     @Test(dataProvider = "Spliterator.OfLong")
@@ -1152,8 +1152,8 @@
 
     @Test(dataProvider = "Spliterator.OfDouble")
     public void testDoubleNullPointerException(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
-        executeAndCatch(NullPointerException.class, () -> s.get().forEachRemaining((DoubleConsumer) null));
-        executeAndCatch(NullPointerException.class, () -> s.get().tryAdvance((DoubleConsumer) null));
+        assertThrowsNPE(() -> s.get().forEachRemaining((DoubleConsumer) null));
+        assertThrowsNPE(() -> s.get().tryAdvance((DoubleConsumer) null));
     }
 
     @Test(dataProvider = "Spliterator.OfDouble")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/jar/Pack200/SecurityTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,39 @@
+/*
+ * 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 8179645
+ * @run main/othervm SecurityTest
+ * @summary Verify Pack200 initialization with security manager
+ */
+
+import java.util.jar.Pack200;
+
+public class SecurityTest {
+    public static void main(String... args) {
+        System.setSecurityManager(new SecurityManager());
+        Pack200.newPacker();
+        Pack200.newUnpacker();
+    }
+}
--- a/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/logging/Logger/logrb/resources/PropertyBundle.properties	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -21,4 +21,3 @@
 # questions.
 #
 dummy=foo
-
--- a/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/logging/Logger/setResourceBundle/resources/PropertyBundle.properties	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 20013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -21,4 +21,3 @@
 # questions.
 #
 dummy=foo
-
--- a/test/java/util/logging/TestLoggerWeakRefLeak.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/logging/TestLoggerWeakRefLeak.java	Fri May 12 10:43:28 2017 -0700
@@ -41,8 +41,8 @@
  * @modules jdk.attach/sun.tools.attach
  *          java.logging
  * @build jdk.testlibrary.ProcessTools
- * @run main/othervm TestLoggerWeakRefLeak Logger
- * @run main/othervm TestLoggerWeakRefLeak AnonymousLogger
+ * @run main/othervm -Djdk.attach.allowAttachSelf TestLoggerWeakRefLeak Logger
+ * @run main/othervm -Djdk.attach.allowAttachSelf TestLoggerWeakRefLeak AnonymousLogger
  */
 public class TestLoggerWeakRefLeak {
 
--- a/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/java/util/stream/bootlib/java.base/java/util/SpliteratorTestHelper.java	Fri May 12 10:43:28 2017 -0700
@@ -26,8 +26,6 @@
 import java.util.stream.LambdaTestHelpers;
 
 import static org.testng.Assert.*;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.fail;
 
 /**
  * Assertion methods for spliterators, to be called from other tests
@@ -224,22 +222,22 @@
         // directly test the primitive methods
         if (sp instanceof Spliterator.OfInt) {
             Spliterator.OfInt psp = (Spliterator.OfInt) sp;
-            executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((IntConsumer) null));
-            executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((IntConsumer) null));
+            assertThrowsNPE(() -> psp.forEachRemaining((IntConsumer) null));
+            assertThrowsNPE(() -> psp.tryAdvance((IntConsumer) null));
         }
         else if (sp instanceof Spliterator.OfLong) {
             Spliterator.OfLong psp = (Spliterator.OfLong) sp;
-            executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((LongConsumer) null));
-            executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((LongConsumer) null));
+            assertThrowsNPE(() -> psp.forEachRemaining((LongConsumer) null));
+            assertThrowsNPE(() -> psp.tryAdvance((LongConsumer) null));
         }
         else if (sp instanceof Spliterator.OfDouble) {
             Spliterator.OfDouble psp = (Spliterator.OfDouble) sp;
-            executeAndCatch(NullPointerException.class, () -> psp.forEachRemaining((DoubleConsumer) null));
-            executeAndCatch(NullPointerException.class, () -> psp.tryAdvance((DoubleConsumer) null));
+            assertThrowsNPE(() -> psp.forEachRemaining((DoubleConsumer) null));
+            assertThrowsNPE(() -> psp.tryAdvance((DoubleConsumer) null));
         }
         else {
-            executeAndCatch(NullPointerException.class, () -> sp.forEachRemaining(null));
-            executeAndCatch(NullPointerException.class, () -> sp.tryAdvance(null));
+            assertThrowsNPE(() -> sp.forEachRemaining(null));
+            assertThrowsNPE(() -> sp.tryAdvance(null));
         }
     }
 
@@ -653,21 +651,8 @@
         }
     }
 
-    public static void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
-        Exception caught = null;
-        try {
-            r.run();
-        }
-        catch (Exception e) {
-            caught = e;
-        }
-
-        assertNotNull(caught,
-                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
-                                    expected.getName()));
-        assertTrue(expected.isInstance(caught),
-                   String.format("Exception thrown %s not an instance of %s",
-                                 caught.getClass().getName(), expected.getName()));
+    public static void assertThrowsNPE(ThrowingRunnable r) {
+        assertThrows(NullPointerException.class, r);
     }
 
     public static<U> void mixedTraverseAndSplit(Consumer<U> b, Spliterator<U> splTop) {
--- a/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/management/loading/LibraryLoader/LibraryLoaderTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/javax/management/monitor/ThreadPoolAccTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/management/monitor/ThreadPoolAccTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/javax/net/ssl/TLS/CipherTestUtils.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/CipherTestUtils.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/JSSEClient.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/JSSEClient.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/JSSEServer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/JSSEServer.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/TestJSSE.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/TestJSSE.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/TestJSSEClientDefaultProtocol.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/TestJSSEClientProtocol.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/TestJSSENoCommonProtocols.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/net/ssl/TLS/TestJSSEServerProtocol.java	Fri May 12 10:43:28 2017 -0700
@@ -2,21 +2,22 @@
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- * This code is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License version 2 only, as published by
- * the Free Software Foundation.
+ * This code is free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/print/attribute/TestUnsupportedResolution.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/print/attribute/TestUnsupportedResolution.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -104,4 +104,3 @@
     return PAGE_EXISTS;
 }
 }
-
--- a/test/javax/security/auth/Subject/Generic.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/security/auth/Subject/Generic.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
--- a/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/security/auth/login/JAASConfigSyntaxCheck/JAASConfigSyntaxTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,23 +1,23 @@
-
-/**
+/*
  * Copyright (c) 2007, 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 free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/security/auth/login/JAASConfigSyntaxCheck/SampleLoginModule.java	Fri May 12 10:43:28 2017 -0700
@@ -1,22 +1,23 @@
-/**
+/*
  * Copyright (c) 2007, 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 free software; you can redistribute 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).
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
  *
- * You should have received a copy of the GNU General Public License version 2
- * along with this work; if not, write to the Free Software Foundation, Inc., 51
- * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA or
- * visit www.oracle.com if you need additional information or have any
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
--- a/test/javax/swing/JComboBox/6632953/bug6632953.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JComboBox/6632953/bug6632953.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,90 @@
+/*
+ * 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 8179027
+ * @requires (os.family == "windows")
+ * @summary JComboBox too small under Windows LAF
+ * @run main WindowsComboBoxSizeTest
+ */
+
+import javax.swing.*;
+import java.awt.FlowLayout;
+import java.awt.Robot;
+
+public class WindowsComboBoxSizeTest {
+    private static JTextField textField;
+    private static JComboBox<String> comboBox;
+    private static JComboBox<String> comboBoxEd;
+    private static JFrame frame;
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+
+        SwingUtilities.invokeAndWait(() -> {
+            frame = new JFrame();
+            frame.getContentPane().setLayout( new FlowLayout() );
+
+            textField = new JTextField("item 1");
+            frame.getContentPane().add(textField);
+
+            comboBox = new JComboBox<>(new String[]
+                                                {"item 1", "item 2", "item 3"});
+            frame.getContentPane().add(comboBox);
+
+            comboBoxEd = new JComboBox<>(new String[]
+                                                {"item 1", "item 2", "item 3"});
+            comboBoxEd.setEditable( true );
+            frame.getContentPane().add(comboBoxEd);
+
+            frame.pack();
+            frame.setVisible( true );
+        });
+        Robot robot = new Robot();
+        robot.waitForIdle();
+
+        try {
+            test();
+        } finally {
+            SwingUtilities.invokeLater(frame::dispose);
+        }
+    }
+
+    private static void test() throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            int expected = textField.getSize().height;
+            if (comboBox.getSize().height != expected ) {
+                throw new RuntimeException(
+                        "Wrong non-editable JComboBox height " +
+                                              comboBox.getSize().height);
+            }
+            if (comboBoxEd.getSize().height != expected ) {
+                throw new RuntimeException(
+                        "Wrong editable JComboBox height " +
+                                            comboBoxEd.getSize().height);
+            }
+        });
+    }
+}
+
--- a/test/javax/swing/JFileChooser/4150029/bug4150029.html	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JFileChooser/4150029/bug4150029.html	Fri May 12 10:43:28 2017 -0700
@@ -1,6 +1,6 @@
 <html>
 <!--
- Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2013, 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
@@ -40,4 +40,4 @@
 3.Push OPEN button.
 4.Push DONE button.
 </body>
-</html> 
+</html>
--- a/test/javax/swing/JInternalFrame/8069348/bug8069348.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JInternalFrame/8069348/bug8069348.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 /**
  * @test
  * @key headful
- * @bug 8069348
+ * @bug 8069348 8159902
  * @summary SunGraphics2D.copyArea() does not properly work for scaled graphics
  * @author Alexandr Scherbatiy
  * @modules java.desktop/sun.awt
--- a/test/javax/swing/JInternalFrame/Test6325652.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JInternalFrame/Test6325652.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009,2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017 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
--- a/test/javax/swing/JPopupMenu/6694823/bug6694823.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/JPopupMenu/6694823/bug6694823.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/javax/swing/plaf/nimbus/8041642/bug8041642.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/plaf/nimbus/8041642/bug8041642.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @key headful
- * @bug 8041642 8079450
+ * @bug 8041642 8079450 8140237
  * @summary Incorrect paint of JProgressBar in Nimbus LF
  * @author Semyon Sadetsky
  */
@@ -39,16 +39,7 @@
     private static JProgressBar bar;
 
     public static void main(String[] args) throws Exception {
-        for (UIManager.LookAndFeelInfo info : UIManager
-                .getInstalledLookAndFeels()) {
-            if ("Nimbus".equals(info.getName())) {
-                try {
-                    UIManager.setLookAndFeel(info.getClassName());
-                } catch (Exception ex) {
-                }
-                break;
-            }
-        }
+        UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
         try {
             SwingUtilities.invokeAndWait(new Runnable() {
                 public void run() {
@@ -58,14 +49,14 @@
                     setup(frame);
                 }
             });
+            final Robot robot = new Robot();
+            robot.delay(300);
             SwingUtilities.invokeAndWait(new Runnable() {
                 @Override
                 public void run() {
                     point = bar.getLocationOnScreen();
                 }
             });
-            final Robot robot = new Robot();
-            robot.delay(100);
             Color color = robot.getPixelColor(point.x + 1, point.y + 7);
             System.out.println(color);
             if (color.getGreen() < 150 || color.getBlue() > 30 ||
@@ -77,7 +68,7 @@
             SwingUtilities.invokeAndWait(new Runnable() {
                 @Override
                 public void run() {
-                    //frame.dispose();
+                    frame.dispose();
                 }
             });
         }
--- a/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2017 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
--- a/test/javax/swing/text/html/parser/Parser/8028616/bug8028616.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/javax/swing/text/html/parser/Parser/8028616/bug8028616.java	Fri May 12 10:43:28 2017 -0700
@@ -8,7 +8,7 @@
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
--- a/test/lib/testlibrary/ModuleTargetHelper.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/lib/testlibrary/ModuleTargetHelper.java	Fri May 12 10:43:28 2017 -0700
@@ -41,19 +41,14 @@
     private ModuleTargetHelper() {}
 
     public static final class ModuleTarget {
-        private String osName, osArch;
+        private String targetPlatform;
 
-        public ModuleTarget(String osName, String osArch) {
-            this.osName = osName;
-            this.osArch = osArch;
+        public ModuleTarget(String targetPlatform) {
+            this.targetPlatform = targetPlatform;
         }
 
-        public String osName() {
-            return osName;
-        }
-
-        public String osArch() {
-            return osArch;
+        public String targetPlatform() {
+            return targetPlatform;
         }
     }
 
@@ -84,7 +79,7 @@
         ClassReader cr = new ClassReader(in);
         cr.accept(cv, attrs, 0);
         if (modTargets[0] != null) {
-            return new ModuleTarget(modTargets[0].osName(), modTargets[0].osArch());
+            return new ModuleTarget(modTargets[0].targetPlatform());
         }
 
         return null;
--- a/test/sample/TEST.properties	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-external.lib.roots = ../../
--- a/test/sample/chatserver/ChatTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,402 +0,0 @@
-/*
- * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* @test
- * @summary Test chat server chatserver test
- *
- * @library /src/sample/share/nio/chatserver
- * @build ChatTest ChatServer Client ClientReader DataReader MessageReader NameReader
- * @run testng ChatTest
- */
-
-import java.io.*;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.CyclicBarrier;
-
-import org.testng.annotations.Test;
-
-public class ChatTest {
-    public static int listeningPort = 0;
-
-    @Test
-    public static void doTest() throws Throwable {
-        testStartStop();
-        testPortOpen();
-        testAsksForName();
-        testUseName();
-        testConnectDisconnectConnect();
-        testUsernameAndMessage();
-        testDontReceiveMessageInNameState();
-    }
-
-    private static ChatServer startServer() throws IOException {
-        ChatServer server = new ChatServer(0);
-        InetSocketAddress address = (InetSocketAddress) server.getSocketAddress();
-        listeningPort = address.getPort();
-        server.run();
-        return server;
-    }
-
-    public static void testStartStop() throws Exception {
-        ChatServer server = startServer();
-        server.shutdown();
-    }
-
-    public static void testPortOpen() throws Exception {
-        ChatServer server = startServer();
-        try {
-            Socket socket = new Socket("localhost", listeningPort);
-            if (!socket.isConnected()) {
-                throw new RuntimeException("Failed to connect to server: port not open");
-            }
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    public static void testAsksForName() throws Exception {
-        ChatServer server = startServer();
-        try {
-            Socket socket = new Socket("localhost", listeningPort);
-
-            Reader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-            String string = readAvailableString(reader);
-            if (!string.equals("Name: ")) {
-                throw new RuntimeException("Server doesn't send Name: ");
-            }
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    public static void testUseName() throws Throwable {
-        ChatServer server = startServer();
-        try {
-            performTestUseName();
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    public static void testConnectDisconnectConnect() throws Exception {
-        ChatServer server = startServer();
-        try {
-            performTestConnectDisconnectConnect();
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    public static void testUsernameAndMessage() throws Exception {
-        ChatServer server = startServer();
-        try {
-            performTestUsernameAndMessage();
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    public static void testDontReceiveMessageInNameState() throws Exception {
-        ChatServer server = startServer();
-        try {
-            performDontReceiveMessageInNameState();
-        } finally {
-            server.shutdown();
-        }
-    }
-
-    private static void assertEqual(List<Exception> exception, Object value, Object expected) {
-        if (expected == value) {
-            return;
-        }
-        if (expected == null) {
-            exception.add(new RuntimeException("Expected null, but was: " + value));
-            return;
-        }
-        if (!expected.equals(value)) {
-            exception.add(new RuntimeException("Expected: " + expected + " but was: " + value));
-            return;
-        }
-    }
-
-    private static void performDontReceiveMessageInNameState() throws Exception {
-        final CyclicBarrier barrier1 = new CyclicBarrier(2);
-        final CyclicBarrier barrier2 = new CyclicBarrier(2);
-        final CyclicBarrier barrier3 = new CyclicBarrier(2);
-        final List<Exception> exceptions = Collections.synchronizedList(new ArrayList<Exception>());
-
-        ChatConnection chatConnection = new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "Name: ");
-                writer.write("testClient1\n");
-                waitForJoin(reader, "testClient1");
-                barrier1.await();
-                writer.write("Ignore this!\n");
-                barrier2.await();
-                barrier3.await();
-            }
-        };
-
-        Thread client2 = new Thread(new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                barrier1.await();
-                barrier2.await();
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "Name: ");
-                string = readAvailableString(reader, true);
-                assertEqual(exceptions, string, null);
-                writer.write("testClient2\n");
-                barrier3.await();
-            }
-        });
-
-        client2.start();
-        chatConnection.run();
-        if (!exceptions.isEmpty()) {
-            throw exceptions.get(0);
-        }
-
-    }
-
-    private static void waitForJoin(BufferedReader reader, String s) throws IOException {
-        String joined;
-        do {
-            joined = readAvailableString(reader);
-        } while (!(joined != null && joined.contains("Welcome " + s)));
-    }
-
-    private static void performTestUsernameAndMessage() throws Exception {
-        final CyclicBarrier barrier1 = new CyclicBarrier(2);
-        final CyclicBarrier barrier2 = new CyclicBarrier(2);
-        final CyclicBarrier barrier3 = new CyclicBarrier(2);
-        final List<Exception> exceptions = Collections.synchronizedList(new ArrayList<Exception>());
-
-        ChatConnection chatConnection = new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "Name: ");
-                writer.write("testClient1\n");
-                waitForJoin(reader, "testClient1");
-                barrier1.await();
-                barrier2.await();
-                string = readAvailableString(reader);
-                assertEqual(exceptions, string, "testClient2: Hello world!\n");
-                barrier3.await();
-            }
-        };
-
-        Thread client2 = new Thread(new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "Name: ");
-                barrier1.await();
-                writer.write("testClient2\nHello world!\n");
-                barrier2.await();
-                barrier3.await();
-            }
-        });
-
-        client2.start();
-        chatConnection.run();
-        if (!exceptions.isEmpty()) {
-            throw exceptions.get(0);
-        }
-    }
-
-    private static void performTestConnectDisconnectConnect() throws Exception {
-        final CyclicBarrier barrier1 = new CyclicBarrier(2);
-        final CyclicBarrier barrier2 = new CyclicBarrier(2);
-        final CyclicBarrier barrier3 = new CyclicBarrier(2);
-        final List<Exception> exceptions = new ArrayList<Exception>();
-
-        ChatConnection chatConnection = new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "Name: ");
-                writer.write("testClient1\n");
-            }
-        };
-
-        ChatConnection chatConnection2 = new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                readAvailableString(reader);
-                writer.write("testClient1\n");
-                waitForJoin(reader, "testClient1");
-                barrier1.await();
-                writer.write("Good morning!\n");
-                barrier2.await();
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "testClient2: Hello world!\n");
-                barrier3.await();
-            }
-        };
-
-        Thread client2 = new Thread(new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                readAvailableString(reader);
-                writer.write("testClient2\n");
-                waitForJoin(reader, "testClient2");
-                barrier1.await();
-                writer.write("Hello world!\n");
-                barrier2.await();
-                String string = readAvailableString(reader);
-                assertEqual(exceptions, string, "testClient1: Good morning!\n");
-                barrier3.await();
-            }
-        });
-
-        client2.start();
-        chatConnection.run();
-        chatConnection2.run();
-        if (!exceptions.isEmpty()) {
-            throw exceptions.get(0);
-        }
-    }
-
-    private static void performTestUseName() throws Exception {
-        final CyclicBarrier barrier1 = new CyclicBarrier(2);
-        final CyclicBarrier barrier2 = new CyclicBarrier(2);
-        final CyclicBarrier barrier3 = new CyclicBarrier(2);
-        final List<Exception> exceptions = new ArrayList<Exception>();
-
-        ChatConnection chatConnection = new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                if (!"Name: ".equals(string)) {
-                    exceptions.add(new RuntimeException("Expected Name: "));
-                }
-                writer.write("testClient1\n");
-                waitForJoin(reader, "testClient1");
-                barrier1.await();
-                barrier2.await();
-                string = readAvailableString(reader);
-                if (!"testClient2: Hello world!\n".equals(string)) {
-                    exceptions.add(new RuntimeException("testClient2: Hello world!\n"));
-                }
-                barrier3.await();
-            }
-        };
-
-        Thread client2 = new Thread(new ChatConnection() {
-            @Override
-            public void run(Socket socket, BufferedReader reader, Writer writer) throws Exception {
-                String string = readAvailableString(reader);
-                if (!"Name: ".equals(string)) {
-                    exceptions.add(new RuntimeException("Expected Name: "));
-                }
-                writer.write("testClient2\n");
-                waitForJoin(reader, "testClient2");
-                barrier1.await();
-                writer.write("Hello world!\n");
-                barrier2.await();
-                barrier3.await();
-            }
-        });
-
-        client2.start();
-        chatConnection.run();
-        if (!exceptions.isEmpty()) {
-            throw exceptions.get(0);
-        }
-    }
-
-    private static String readAvailableString(Reader reader) throws IOException {
-        return readAvailableString(reader, false);
-    }
-
-    private static String readAvailableString(Reader reader, boolean now) throws IOException {
-        StringBuilder builder = new StringBuilder();
-        int bytes;
-        if (now && !reader.ready()) {
-            return null;
-        }
-        do {
-            char[] buf = new char[256];
-            bytes = reader.read(buf);
-            builder.append(buf, 0, bytes);
-        } while (bytes == 256);
-        return builder.toString();
-    }
-
-    private abstract static class ChatConnection implements Runnable {
-        public Exception exception;
-
-        @Override
-        public void run() {
-            try (Socket socket = new Socket("localhost", listeningPort);
-            BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-            Writer writer = new FlushingWriter(new OutputStreamWriter(socket.getOutputStream()))) {
-                socket.setTcpNoDelay(true);
-
-                run(socket, reader, writer);
-            } catch (Exception e) {
-                exception = e;
-            }
-        }
-
-        public abstract void run(Socket socket, BufferedReader reader, Writer writer) throws Exception;
-    }
-
-    private static class FlushingWriter extends Writer {
-        public final Writer delegate;
-
-        private FlushingWriter(Writer delegate) {
-            this.delegate = delegate;
-        }
-
-        @Override
-        public void write(char[] cbuf, int off, int len) throws IOException {
-            delegate.write(cbuf, off, len);
-        }
-
-        @Override
-        public void flush() throws IOException {
-            delegate.flush();
-        }
-
-        @Override
-        public void close() throws IOException {
-            delegate.close();
-        }
-
-        @Override
-        public void write(String str) throws IOException {
-            super.write(str);
-            flush();
-        }
-    }
-}
--- a/test/sample/mergesort/MergeSortTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-/* @test
- * @summary Test MergeSort
- *
- * @library /src/sample/share/forkjoin/mergesort
- * @build MergeSortTest MergeDemo MergeSort
- * @run testng MergeSortTest
- */
-
-import java.util.Arrays;
-import java.util.Random;
-
-import org.testng.annotations.Test;
-
-public class MergeSortTest {
-    private Random random;
-    private MergeSort target;
-
-    public MergeSortTest(Random random, MergeSort target) {
-        this.random = random;
-        this.target = target;
-    }
-
-    @Test
-    public static void doTest() {
-        MergeSortTest test = new MergeSortTest(new Random(), new MergeSort(Runtime.getRuntime().availableProcessors() * 4));
-        test.run();
-    }
-
-    private int[] generateArray(int elements) {
-        int[] array = new int[elements];
-        for (int i = 0; i < array.length; ++i) {
-            array[i] = random.nextInt(10);
-        }
-        return array;
-    }
-
-    private void run() {
-        testSort();
-        testSortSingle();
-        testSortEmpty();
-        testLong();
-    }
-
-    public void testLong() {
-        for (int i = 0; i < 1000; ++i) {
-            int elements = 1 + i * 100;
-
-            int[] array = generateArray(elements);
-            int[] copy = Arrays.copyOf(array, array.length);
-            Arrays.sort(copy);
-            target.sort(array);
-            assertEqual(copy, array);
-        }
-   }
-
-    private void testSortEmpty() {
-        int[] array = { };
-        target.sort(array);
-        assertEqual(new int[] { }, array);
-    }
-
-    private void testSortSingle() {
-        int[] array = { 1 };
-        target.sort(array);
-        assertEqual(new int[] { 1 }, array);
-    }
-
-    private void testSort() {
-        int[] array = { 7, 3, 9, 0, -6, 12, 54, 3, -6, 88, 1412};
-        target.sort(array);
-        assertEqual(new int[] { -6, -6, 0, 3, 3, 7, 9, 12, 54, 88, 1412 }, array);
-    }
-
-    private void assertEqual(int[] expected, int[] array) {
-        if (!Arrays.equals(expected, array)) {
-            throw new RuntimeException("Invalid sorted array!");
-        }
-    }
-
-
-}
--- a/test/sun/awt/dnd/8024061/bug8024061.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/awt/dnd/8024061/bug8024061.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017 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
--- a/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/management/jmxremote/bootstrap/JvmstatCountersTest.java	Fri May 12 10:43:28 2017 -0700
@@ -37,7 +37,7 @@
  * @run main/othervm/timeout=600 -XX:+UsePerfData JvmstatCountersTest 1
  * @run main/othervm/timeout=600 -XX:+UsePerfData -Dcom.sun.management.jmxremote JvmstatCountersTest 2
  * @run main/othervm/timeout=600 -XX:+UsePerfData -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3
- * @run main/othervm/timeout=600 -XX:+UsePerfData JvmstatCountersTest 4
+ * @run main/othervm/timeout=600 -XX:+UsePerfData -Djdk.attach.allowAttachSelf JvmstatCountersTest 4
  */
 
 import java.io.*;
--- a/test/sun/net/idn/NFS4StringPrep.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/net/idn/NFS4StringPrep.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/krb5/auto/BogusKDC.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/auto/BogusKDC.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/krb5/auto/NoAddresses.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/auto/NoAddresses.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/krb5/auto/Renew.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/auto/Renew.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017 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
--- a/test/sun/security/krb5/auto/Renewal.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/auto/Renewal.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/krb5/auto/SSLwithPerms.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/auto/SSLwithPerms.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/krb5/canonicalize/Test.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/krb5/canonicalize/Test.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/mscapi/CastError.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/mscapi/CastError.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * 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
--- a/test/sun/security/mscapi/PrngSlow.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/mscapi/PrngSlow.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/mscapi/PublicKeyInterop.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/mscapi/PublicKeyInterop.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/pkcs12/StoreSecretKeyTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/pkcs12/StoreSecretKeyTest.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/provider/SeedGenerator/SeedGeneratorChoice.java	Fri May 12 10:43:28 2017 -0700
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, 2016, Oracle and/or its affiliates. All rights
- * reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/test/sun/security/ssl/CertPathRestrictions/JSSEClient.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/ssl/CertPathRestrictions/JSSEClient.java	Fri May 12 10:43:28 2017 -0700
@@ -1,6 +1,24 @@
 /*
  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.InputStream;
--- a/test/sun/security/ssl/CertPathRestrictions/JSSEServer.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/ssl/CertPathRestrictions/JSSEServer.java	Fri May 12 10:43:28 2017 -0700
@@ -1,6 +1,24 @@
 /*
  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.InputStream;
--- a/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java	Fri May 12 10:43:28 2017 -0700
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute 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.
+ * 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
--- a/test/sun/security/tools/jarsigner/nameclash.sh	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/tools/jarsigner/nameclash.sh	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009, 2014 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -63,4 +63,3 @@
 $JARSIGNER -verify -debug -strict $JFILE || exit 3
 
 exit 0
-
--- a/test/sun/security/x509/URICertStore/SocksProxy.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/sun/security/x509/URICertStore/SocksProxy.java	Fri May 12 10:43:28 2017 -0700
@@ -8,7 +8,7 @@
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
--- a/test/tools/jar/mmrjar/Basic.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jar/mmrjar/Basic.java	Fri May 12 10:43:28 2017 -0700
@@ -221,7 +221,8 @@
         Assert.assertEquals(actual, expected);
     }
 
-    // jar tool does two updates, no exported packages, all concealed
+    // jar tool does two updates, no exported packages, all concealed.
+    // Along with various --describe-module variants
     @Test
     public void test5() throws IOException {
         // compile the mr10 directory
@@ -266,10 +267,13 @@
 
         jar("-d --file mr.jar");
 
+        String uri = (Paths.get("mr.jar")).toUri().toString();
+        uri = "jar:" + uri + "/!module-info.class";
+
         actual = lines(outbytes);
         expected = Set.of(
-                "module hi (module-info.class)",
-                "requires mandated java.base",
+                "hi " + uri,
+                "requires java.base mandated",
                 "contains p",
                 "contains p.internal"
         );
@@ -304,13 +308,19 @@
 
         actual = lines(outbytes);
         expected = Set.of(
-                "module hi (module-info.class)",
-                "requires mandated java.base",
+                "hi " + uri,
+                "requires java.base mandated",
                 "contains p",
                 "contains p.internal",
                 "contains p.internal.bar"
         );
         Assert.assertEquals(actual, expected);
+
+        for (String release : new String[] {"9" , "10", "100", "1000"}) {
+            jar("-d --file mr.jar --release " + release);
+            actual = lines(outbytes);
+            Assert.assertEquals(actual, expected);
+        }
     }
 
     // root and versioned module-info entries have different main-class, version
@@ -399,15 +409,42 @@
         Assert.assertEquals(rc, 0);
 
         jar("-d --file=mmr.jar");
-        System.out.println("-----------------------");
-        System.out.println( new String(outbytes.toByteArray()));
-        Assert.assertEquals(lines(outbytes),
-                            Set.of(
-                           "module m1 (META-INF/versions/9/module-info.class)",
-                           "module m1 (META-INF/versions/10/module-info.class)",
-                           "requires mandated java.base",
-                           "exports p",
-                           "main-class p.Main"));
+        Set<String> actual = lines(outbytes);
+        Set<String> expected = Set.of(
+                "releases: 9 10",
+                "No root module descriptor, specify --release"
+        );
+        Assert.assertEquals(actual, expected);
+
+        String uriPrefix = "jar:" + (Paths.get("mmr.jar")).toUri().toString();
+
+        jar("-d --file=mmr.jar --release 9");
+        actual = lines(outbytes);
+        expected = Set.of(
+                "releases: 9 10",
+                "m1 " + uriPrefix + "/!META-INF/versions/9/module-info.class",
+                "requires java.base mandated",
+                "exports p",
+                "main-class p.Main"
+        );
+        Assert.assertEquals(actual, expected);
+
+        jar("-d --file=mmr.jar --release 10");
+        actual = lines(outbytes);
+        expected = Set.of(
+                "releases: 9 10",
+                "m1 " + uriPrefix + "/!META-INF/versions/10/module-info.class",
+                "requires java.base mandated",
+                "exports p",
+                "main-class p.Main"
+        );
+        Assert.assertEquals(actual, expected);
+
+        for (String release : new String[] {"11", "12", "15", "100"}) {
+            jar("-d --file mmr.jar --release " + release);
+            actual = lines(outbytes);
+            Assert.assertEquals(actual, expected);
+        }
 
         Optional<String> exp = Optional.of("p.Main");
         try (ZipFile zf = new ZipFile("mmr.jar")) {
--- a/test/tools/jar/modularJar/Basic.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jar/modularJar/Basic.java	Fri May 12 10:43:28 2017 -0700
@@ -478,13 +478,13 @@
             "--file=" + modularJar.toString())
             .assertSuccess()
             .resultChecker(r -> {
-                // Expect similar output: "bar, requires mandated foo, ...
+                // Expect "bar jar:file:/.../!module-info.class"
                 // conceals jdk.test.foo, conceals jdk.test.foo.internal"
-                Pattern p = Pattern.compile("module bar \\(module-info.class\\)\\s+requires\\s++foo");
-                assertTrue(p.matcher(r.output).find(),
-                           "Expecting to find \"bar, requires foo,...\"",
+                String uri = "jar:" + modularJar.toUri().toString() + "/!module-info.class";
+                assertTrue(r.output.contains("bar " + uri),
+                           "Expecting to find \"bar " + uri + "\"",
                            "in output, but did not: [" + r.output + "]");
-                p = Pattern.compile(
+                Pattern p = Pattern.compile(
                         "contains\\s+jdk.test.foo\\s+contains\\s+jdk.test.foo.internal");
                 assertTrue(p.matcher(r.output).find(),
                            "Expecting to find \"contains jdk.test.foo,...\"",
@@ -758,14 +758,15 @@
         for (String option : new String[]  {"--describe-module", "-d" }) {
 
             jar(option,
-                "--file=" + modularJar.toString())
+                "--file=" + modularJar.toString(),
+                "--release", "9")
                 .assertSuccess()
                 .resultChecker(r ->
                     assertTrue(r.output.contains("main-class jdk.test.baz.Baz"),
                               "Expected to find ", "main-class jdk.test.baz.Baz",
                                " in [", r.output, "]"));
 
-            jarWithStdin(modularJar.toFile(),  option)
+            jarWithStdin(modularJar.toFile(), option, "--release", "9")
                 .assertSuccess()
                 .resultChecker(r ->
                     assertTrue(r.output.contains("main-class jdk.test.baz.Baz"),
@@ -773,7 +774,7 @@
                                " in [", r.output, "]"));
 
         }
-        // run module maain class
+        // run module main class
         java(mp, "baz/jdk.test.baz.Baz")
             .assertSuccess()
             .resultChecker(r ->
@@ -900,7 +901,7 @@
                 .resultChecker(r -> {
                     assertTrue(r.output.contains("No module descriptor found"));
                     assertTrue(r.output.contains("Derived automatic module"));
-                    assertTrue(r.output.contains("module " + mid),
+                    assertTrue(r.output.contains(mid + " automatic"),
                                "Expected [", "module " + mid,"] in [", r.output, "]");
                     }
                 );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jar/multiRelease/whitebox/Driver.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @modules jdk.jartool/sun.tools.jar
+ * @run testng/othervm jdk.jartool/sun.tools.jar.ValidatorComparatorTest
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/jar/multiRelease/whitebox/jdk.jartool/sun/tools/jar/ValidatorComparatorTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+/*
+ * @summary White-box test for Validator.ENTRYNAME_COMPARATOR ( currently just
+ *          checks module descriptors ).
+ */
+package sun.tools.jar;
+
+import java.util.List;
+import static java.util.stream.Collectors.toList;
+import static sun.tools.jar.Validator.ENTRYNAME_COMPARATOR;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class ValidatorComparatorTest {
+
+    @Test
+    public void testModuleInfo() throws Throwable {
+        List<String> list =
+                List.of("module-info.class",
+                        "META-INF/versions/9/module-info.class",
+                        "META-INF/versions/10/module-info.class");
+        List<String> sorted = list.stream()
+                .sorted(ENTRYNAME_COMPARATOR)
+                .collect(toList());
+        List<String> expected = list;
+        Assert.assertEquals(sorted, expected);
+
+
+        list =  List.of("META-INF/versions/10/module-info.class",
+                        "META-INF/versions/9/module-info.class",
+                        "module-info.class");
+        sorted = list.stream().sorted(ENTRYNAME_COMPARATOR).collect(toList());
+        expected =
+                List.of("module-info.class",
+                        "META-INF/versions/9/module-info.class",
+                        "META-INF/versions/10/module-info.class");
+        Assert.assertEquals(sorted, expected);
+
+
+        list =  List.of("META-INF/versions/1001/module-info.class",
+                        "META-INF/versions/1000/module-info.class",
+                        "META-INF/versions/999/module-info.class",
+                        "META-INF/versions/101/module-info.class",
+                        "META-INF/versions/100/module-info.class",
+                        "META-INF/versions/99/module-info.class",
+                        "META-INF/versions/31/module-info.class",
+                        "META-INF/versions/30/module-info.class",
+                        "META-INF/versions/29/module-info.class",
+                        "META-INF/versions/21/module-info.class",
+                        "META-INF/versions/20/module-info.class",
+                        "META-INF/versions/13/module-info.class",
+                        "META-INF/versions/12/module-info.class",
+                        "META-INF/versions/11/module-info.class",
+                        "META-INF/versions/10/module-info.class",
+                        "META-INF/versions/9/module-info.class",
+                        "module-info.class");
+        sorted = list.stream().sorted(ENTRYNAME_COMPARATOR).collect(toList());
+        expected =
+                List.of("module-info.class",
+                        "META-INF/versions/9/module-info.class",
+                        "META-INF/versions/10/module-info.class",
+                        "META-INF/versions/11/module-info.class",
+                        "META-INF/versions/12/module-info.class",
+                        "META-INF/versions/13/module-info.class",
+                        "META-INF/versions/20/module-info.class",
+                        "META-INF/versions/21/module-info.class",
+                        "META-INF/versions/29/module-info.class",
+                        "META-INF/versions/30/module-info.class",
+                        "META-INF/versions/31/module-info.class",
+                        "META-INF/versions/99/module-info.class",
+                        "META-INF/versions/100/module-info.class",
+                        "META-INF/versions/101/module-info.class",
+                        "META-INF/versions/999/module-info.class",
+                        "META-INF/versions/1000/module-info.class",
+                        "META-INF/versions/1001/module-info.class");
+        Assert.assertEquals(sorted, expected);
+    }
+}
--- a/test/tools/jlink/IntegrationTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/IntegrationTest.java	Fri May 12 10:43:28 2017 -0700
@@ -207,11 +207,6 @@
         }
 
         checkReleaseProperty(props, "JAVA_VERSION");
-        checkReleaseProperty(props, "JAVA_FULL_VERSION");
-        checkReleaseProperty(props, "OS_NAME");
-        checkReleaseProperty(props, "OS_ARCH");
-        // OS_VERSION is added from makefile. We're testing API-way to create image here!
-        // checkReleaseProperty(props, "OS_VERSION");
 
         if (!Files.exists(output.resolve("toto.txt"))) {
             throw new AssertionError("Post processing not called");
--- a/test/tools/jlink/JLinkNegativeTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/JLinkNegativeTest.java	Fri May 12 10:43:28 2017 -0700
@@ -178,7 +178,7 @@
                     .output(imageFile)
                     .addMods("not_zip")
                     .modulePath(helper.defaultModulePath())
-                    .call().assertFailure("Error: java.util.zip.ZipException: zip file is empty");
+                    .call().assertFailure("Error: Error reading");
         } finally {
             deleteDirectory(jar);
         }
--- a/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java	Fri May 12 10:43:28 2017 -0700
@@ -113,12 +113,13 @@
         try {
             if (modRef.descriptor().name().equals("java.base")) {
                 ModuleTargetHelper.ModuleTarget mt = ModuleTargetHelper.read(modRef);
-                assertTrue(checkOSName(mt.osName()));
-                assertTrue(checkOSArch(mt.osArch()));
+                String[] values = mt.targetPlatform().split("-");
+                assertTrue(checkOSName(values[0]));
+                assertTrue(checkOSArch(values[1]));
             } else {
                 // target platform attribute is dropped by jlink plugin for other modules
                 ModuleTargetHelper.ModuleTarget mt = ModuleTargetHelper.read(modRef);
-                assertTrue(mt == null || (mt.osName() == null && mt.osArch() == null));
+                assertTrue(mt == null || mt.targetPlatform() == null);
             }
         } catch (IOException exp) {
             throw new UncheckedIOException(exp);
--- a/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java	Fri May 12 10:43:28 2017 -0700
@@ -220,16 +220,16 @@
             throw new RuntimeException("ModuleTarget is missing for java.base");
         }
 
-        String osName = mt.osName();
-        String osArch = mt.osArch();
+        String[] values = mt.targetPlatform().split("-");
+        String osName = values[0];
+        String osArch = values[1];
 
         // create JMOD files
         Files.createDirectories(JMODS_DIR);
         Stream.of(modules).forEach(mn ->
             assertTrue(jmod("create",
                 "--class-path", MODS_DIR.resolve(mn).toString(),
-                "--os-name", osName,
-                "--os-arch", osArch,
+                "--target-platform", mt.targetPlatform(),
                 "--main-class", mn.replace('m', 'p') + ".Main",
                 JMODS_DIR.resolve(mn + ".jmod").toString()) == 0)
         );
--- a/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/plugins/SystemModuleDescriptors/src/m1/p1/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -62,8 +62,7 @@
         // parse module-info.class
         ClassReader cr = new ClassReader(in);
         cr.accept(cv, attrs, 0);
-        return modTargets[0] != null &&
-            (modTargets[0].osName() != null || modTargets[0].osArch() != null);
+        return modTargets[0] != null && modTargets[0].targetPlatform() != null;
     }
 
     public static void main(String... args) throws Exception {
--- a/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jlink/plugins/SystemModuleDescriptors/src/m4/p4/Main.java	Fri May 12 10:43:28 2017 -0700
@@ -63,8 +63,7 @@
         // parse module-info.class
         ClassReader cr = new ClassReader(in);
         cr.accept(cv, attrs, 0);
-        return modTargets[0] != null &&
-            (modTargets[0].osName() != null || modTargets[0].osArch() != null);
+        return modTargets[0] != null && modTargets[0].targetPlatform() != null;
     }
 
     private static boolean hasModuleTarget(String modName) throws IOException {
--- a/test/tools/jmod/JmodTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/jmod/JmodTest.java	Fri May 12 10:43:28 2017 -0700
@@ -393,16 +393,17 @@
              MODS_DIR.resolve("describeFoo.jmod").toString())
              .assertSuccess()
              .resultChecker(r -> {
-                 // Expect similar output: "foo,  requires mandated java.base
-                 // exports jdk.test.foo,  contains jdk.test.foo.internal"
-                 Pattern p = Pattern.compile("\\s+foo\\s+requires\\s+mandated\\s+java.base");
+                 // Expect similar output: "foo... exports jdk.test.foo ...
+                 //   ... requires java.base mandated... contains jdk.test.foo.internal"
+                 Pattern p = Pattern.compile("foo\\s+exports\\s+jdk.test.foo");
                  assertTrue(p.matcher(r.output).find(),
-                           "Expecting to find \"foo, requires java.base\"" +
+                           "Expecting to find \"foo... exports jdk.test.foo\"" +
                                 "in output, but did not: [" + r.output + "]");
                  p = Pattern.compile(
-                        "exports\\s+jdk.test.foo\\s+contains\\s+jdk.test.foo.internal");
+                        "requires\\s+java.base\\s+mandated\\s+contains\\s+jdk.test.foo.internal");
                  assertTrue(p.matcher(r.output).find(),
-                           "Expecting to find \"exports ..., contains ...\"" +
+                           "Expecting to find \"requires java.base mandated..., " +
+                                "contains jdk.test.foo.internal ...\"" +
                                 "in output, but did not: [" + r.output + "]");
              });
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/launcher/modules/describe/DescribeModuleTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,103 @@
+/*
+ * 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
+ * @modules java.xml
+ * @library /lib/testlibrary
+ * @build DescribeModuleTest jdk.testlibrary.*
+ * @run testng DescribeModuleTest
+ * @summary Basic test for java --describe-module
+ */
+
+import jdk.testlibrary.ProcessTools;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class DescribeModuleTest {
+
+    /**
+     * Test that the output describes java.base
+     */
+    private void expectJavaBase(String... args) throws Exception {
+        int exitValue = ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldContain("java.base")
+                .stdoutShouldContain("exports java.lang")
+                .stdoutShouldContain("uses java.nio.file.spi.FileSystemProvider")
+                .stdoutShouldContain("contains sun.launcher")
+                .stdoutShouldNotContain("requires ")
+                .getExitValue();
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test that the output describes java.xml
+     */
+    private void expectJavaXml(String... args) throws Exception {
+        int exitValue = ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldContain("java.xml")
+                .stdoutShouldContain("exports javax.xml")
+                .stdoutShouldContain("requires java.base")
+                .stdoutShouldContain("uses javax.xml.stream.XMLInputFactory")
+                .getExitValue();
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test output/exitValue when describing an unknown module
+     */
+    private void expectUnknownModule(String... args) throws Exception {
+        int exitValue = ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldNotContain("requires java.base")
+                .getExitValue();
+        assertTrue(exitValue != 0);
+    }
+
+
+    public void testDescribeJavaBase() throws Exception {
+        expectJavaBase("--describe-module", "java.base");
+        expectJavaBase("--describe-module=java.base");
+        expectJavaBase("-d", "java.base");
+    }
+
+    public void testDescribeJavaXml() throws Exception {
+        expectJavaXml("--describe-module", "java.xml");
+        expectJavaXml("--describe-module=java.xml");
+        expectJavaXml("-d", "java.xml");
+    }
+
+    public void testDescribeUnknownModule() throws Exception {
+        expectUnknownModule("--describe-module", "jdk.rhubarb");
+        expectUnknownModule("--describe-module=jdk.rhubarb");
+        expectUnknownModule("-d", "jdk.rhubarb");
+    }
+
+}
--- a/test/tools/launcher/modules/listmods/ListModsTest.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/launcher/modules/listmods/ListModsTest.java	Fri May 12 10:43:28 2017 -0700
@@ -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
@@ -33,7 +33,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import static jdk.testlibrary.ProcessTools.*;
+import jdk.testlibrary.ProcessTools;
 import jdk.testlibrary.OutputAnalyzer;
 
 import org.testng.annotations.BeforeTest;
@@ -66,138 +66,80 @@
                 SRC_DIR.resolve("java.transaction"),
                 UPGRADEMODS_DIR.resolve("java.transaction"));
         assertTrue(compiled);
-
     }
 
-
     @Test
     public void testListAll() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--list-modules")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldContain("java.xml");
-        assertTrue(output.getExitValue() == 0);
-    }
-
-
-    @Test
-    public void testListOneModule() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--list-modules=java.base")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldContain("exports java.lang");
-        assertTrue(output.getExitValue() == 0);
+        exec("--list-modules")
+                .shouldContain("java.base")
+                .shouldContain("java.xml")
+                .shouldHaveExitValue(0);
     }
 
-
-    @Test
-    public void testListTwoModules() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--list-modules", "java.base,java.xml")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldContain("exports java.lang");
-        output.shouldContain("java.xml");
-        output.shouldContain("exports javax.xml");
-        assertTrue(output.getExitValue() == 0);
-    }
-
-
-    @Test
-    public void testListUnknownModule() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--list-modules", "java.rhubarb")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldNotContain("java.base");
-        output.shouldContain("java.rhubarb not found");
-        assertTrue(output.getExitValue() == 0);
-    }
-
-
     @Test
     public void testListWithModulePath() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--module-path", MODS_DIR.toString(), "--list-modules")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldContain("m1");
-        assertTrue(output.getExitValue() == 0);
+        exec("--list-modules", "--module-path", MODS_DIR.toString())
+                .shouldContain("java.base")
+                .shouldContain("m1")
+                .shouldHaveExitValue(0);
     }
 
-
     @Test
     public void testListWithUpgradeModulePath() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--upgrade-module-path", UPGRADEMODS_DIR.toString(),
-                              "--list-modules", "java.transaction")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("exports javax.transaction.atomic");
-        assertTrue(output.getExitValue() == 0);
+        String dir = UPGRADEMODS_DIR.toString();
+        exec("--list-modules", "--upgrade-module-path", dir)
+                .shouldContain(UPGRADEMODS_DIR.toString())
+                .shouldHaveExitValue(0);
     }
 
-
     @Test
     public void testListWithLimitMods1() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--limit-modules", "java.management.rmi", "--list-modules")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.rmi");
-        output.shouldContain("java.base");
-        output.shouldNotContain("java.scripting");
-        assertTrue(output.getExitValue() == 0);
+        exec("--limit-modules", "java.management.rmi", "--list-modules")
+                .shouldContain("java.rmi")
+                .shouldContain("java.base")
+                .shouldNotContain("java.scripting")
+                .shouldHaveExitValue(0);
     }
 
-
     @Test
     public void testListWithLimitMods2() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--module-path", MODS_DIR.toString(),
-                              "--limit-modules", "java.management",
-                              "--list-modules")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldNotContain("m1");
-        assertTrue(output.getExitValue() == 0);
+        exec("--list-modules",
+                    "--module-path", MODS_DIR.toString(),
+                    "--limit-modules", "java.management")
+                .shouldContain("java.base")
+                .shouldNotContain("m1")
+                .shouldHaveExitValue(0);
     }
 
-
     /**
      * java -version --list-modules => should print version and exit
      */
     @Test
     public void testListWithPrintVersion1() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("-version", "--list-modules")
-                .outputTo(System.out)
-                .errorTo(System.out);
-        output.shouldNotContain("java.base");
-        output.shouldContain("Runtime Environment");
-        assertTrue(output.getExitValue() == 0);
+        exec("-version", "--list-modules")
+                .shouldNotContain("java.base")
+                .shouldContain("Runtime Environment")
+                .shouldHaveExitValue(0);
     }
 
-
     /**
      * java --list-modules -version => should list modules and exit
      */
     @Test
     public void testListWithPrintVersion2() throws Exception {
-        OutputAnalyzer output
-            = executeTestJava("--list-modules", "-version")
+        exec("--list-modules", "-version")
+                .shouldContain("java.base")
+                .shouldNotContain("Runtime Environment")
+                .shouldHaveExitValue(0);
+    }
+
+    /**
+     * java args... returning the OutputAnalyzer to analyzer the output
+     */
+    private OutputAnalyzer exec(String... args) throws Exception {
+        return ProcessTools.executeTestJava(args)
                 .outputTo(System.out)
                 .errorTo(System.out);
-        output.shouldContain("java.base");
-        output.shouldNotContain("Runtime Environment");
-        assertTrue(output.getExitValue() == 0);
     }
 
 }
--- a/test/tools/launcher/modules/listmods/src/java.transaction/javax/transaction/atomic/Atomic.java	Fri Apr 28 15:43:43 2017 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +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 javax.transaction.atomic;
-
-public interface Atomic {
-
-}
--- a/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/launcher/modules/listmods/src/java.transaction/module-info.java	Fri May 12 10:43:28 2017 -0700
@@ -23,5 +23,4 @@
 
 module java.transaction {
     exports javax.transaction;
-    exports javax.transaction.atomic;
 }
--- a/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java	Fri May 12 10:43:28 2017 -0700
@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,8 @@
 
 /*
  * @test
- * @bug 8157068
- * @summary Patch java.base and user module with Hashes attribute tied with
- *          other module.
+ * @bug 8157068 8177844
+ * @summary Patch java.base and user module with ModuleHashes attribute
  * @library /lib/testlibrary
  * @modules jdk.compiler
  * @build CompilerUtils
@@ -59,6 +58,7 @@
     private static final Path JARS_DIR = Paths.get("jars");
     private static final Path PATCH_DIR = Paths.get("patches");
     private static final Path IMAGE = Paths.get("image");
+    private static final Path NEW_M1_JAR = JARS_DIR.resolve("new_m1.jar");
 
     private static final String JAVA_BASE = "java.base";
     private final String[] modules = new String[] { "m1", "m2" };
@@ -80,13 +80,23 @@
         assertTrue(CompilerUtils.compile(PATCH_SRC_DIR.resolve("m2"),
                                          PATCH_DIR.resolve("m2")));
 
+        createJars();
+
         // create an image with only m1 and m2
         if (Files.exists(JMODS)) {
             // create an image with m1,m2
             createImage();
         }
+
+        // create new copy of m1.jar
+        jar("--create",
+            "--file=" + NEW_M1_JAR.toString(),
+            "-C", MODS_DIR.resolve("m1").toString(), ".");
     }
 
+    /*
+     * Test patching system module and user module on module path
+     */
     @Test
     public void test() throws Throwable {
         Path patchedJavaBase = PATCH_DIR.resolve(JAVA_BASE);
@@ -107,6 +117,9 @@
                 "-m", "m1/p1.Main", "2");
     }
 
+    /*
+     * Test --patch-module on a custom image
+     */
     @Test
     public void testImage() throws Throwable {
         if (Files.notExists(JMODS))
@@ -125,27 +138,49 @@
                 "-m", "m1/p1.Main", "2");
     }
 
+    /*
+     * Test a module linked in a system hashed in ModuleHashes attribute
+     * cannot be upgraded
+     */
     @Test
-    public void upgradeTiedModule() throws Throwable {
+    public void upgradeHashedModule() throws Throwable {
         if (Files.notExists(JMODS))
             return;
 
-        Path m1 = MODS_DIR.resolve("m1.jar");
-
-        // create another m1.jar
-        jar("--create",
-            "--file=" + m1.toString(),
-            "-C", MODS_DIR.resolve("m1").toString(), ".");
-
         // Fail to upgrade m1.jar with mismatched hash
         runTestWithExitCode(getJava(IMAGE),
-                "--upgrade-module-path", m1.toString(),
-                "-m", "m1/p1.Main");
+                "--upgrade-module-path", NEW_M1_JAR.toString(),
+                "-m", "m1/p1.Main", "ShouldNeverRun");
 
+        // test when SystemModules fast path is not enabled, i.e. exploded image
         runTestWithExitCode(getJava(IMAGE),
                 "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
-                "--upgrade-module-path", m1.toString(),
-                "-m", "m1/p1.Main", "1");
+                "--upgrade-module-path", NEW_M1_JAR.toString(),
+                "-m", "m1/p1.Main", "ShouldNeverRun");
+    }
+
+    /*
+     * Test a module linked in a system hashed in ModuleHashes attribute
+     * cannot be upgraded combining with --patch-module and --upgrade-module-path
+     */
+    @Test
+    public void patchHashedModule() throws Throwable {
+        if (Files.notExists(JMODS))
+            return;
+
+        // --patch-module does not disable hash check.
+        // Test that a hashed module cannot be upgraded.
+        runTestWithExitCode(getJava(IMAGE),
+                "--patch-module", "m1=.jar",
+                "--upgrade-module-path", NEW_M1_JAR.toString(),
+                "-m", "m1/p1.Main", "ShouldNeverRun");
+
+        // test when SystemModules fast path is not enabled, i.e. exploded image
+        runTestWithExitCode(getJava(IMAGE),
+                "--patch-module", "java.base=" + PATCH_DIR.resolve(JAVA_BASE),
+                "--patch-module", "m1=.jar",
+                "--upgrade-module-path", NEW_M1_JAR.toString(),
+                "-m", "m1/p1.Main", "ShouldNeverRun");
     }
 
     private void runTestWithExitCode(String... options) throws Throwable {
@@ -171,9 +206,8 @@
         assertTrue(exitValue == 0);
     }
 
-    static void createImage() throws Throwable {
+    static void createJars() throws Throwable {
         FileUtils.deleteFileTreeUnchecked(JARS_DIR);
-        FileUtils.deleteFileTreeUnchecked(IMAGE);
 
         Files.createDirectories(JARS_DIR);
         Path m1 = JARS_DIR.resolve("m1.jar");
@@ -189,7 +223,10 @@
             "--module-path", JARS_DIR.toString(),
             "--hash-modules", "m1",
             "-C", MODS_DIR.resolve("m2").toString(), ".");
+    }
 
+    static void createImage() throws Throwable {
+        FileUtils.deleteFileTreeUnchecked(IMAGE);
 
         String mpath = JARS_DIR.toString() + File.pathSeparator + JMODS.toString();
         execTool("jlink", "--module-path", mpath,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,84 @@
+/*
+ * 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
+ * @modules jdk.jdeps jdk.zipfs
+ * @library /lib/testlibrary
+ * @build ShowModuleResolutionTest jdk.testlibrary.*
+ * @run testng ShowModuleResolutionTest
+ * @summary Basic test for java --show-module-resolution
+ */
+
+import jdk.testlibrary.ProcessTools;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class ShowModuleResolutionTest {
+
+    /**
+     * Test that the resolution does not bind any services
+     */
+    private void expectJavaBase(String... args) throws Exception {
+        int exitValue = ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldContain("root java.base")
+                .stdoutShouldNotContain("java.base binds")
+                .getExitValue();
+        assertTrue(exitValue == 0);
+    }
+
+    /**
+     * Test that the resolution binds services that resolves additional
+     * modules
+     */
+    private void expectProviders(String... args) throws Exception {
+        int exitValue = ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out)
+                .stdoutShouldContain("root java.base")
+                .stdoutShouldContain("root java.compiler")
+                .stdoutShouldContain("root jdk.compiler")
+                .stdoutShouldContain("root java.compiler")
+                .stdoutShouldContain("jdk.compiler requires java.compiler")
+                .stdoutShouldContain("java.base binds jdk.compiler")
+                .stdoutShouldContain("java.base binds jdk.jdeps")
+                .stdoutShouldContain("java.base binds jdk.zipfs")
+                .stdoutShouldContain("java.compiler binds jdk.compiler")
+                .stdoutShouldContain("jdk.jdeps requires jdk.compiler")
+                .getExitValue();
+        assertTrue(exitValue == 0);
+    }
+
+    public void test() throws Exception {
+        expectJavaBase("--show-module-resolution",
+                       "--limit-modules", "java.base",
+                       "-version");
+        expectProviders("--show-module-resolution",
+                        "--limit-modules", "java.base,jdk.jdeps,jdk.zipfs",
+                        "-version");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/launcher/modules/validate/ValidateModulesTest.java	Fri May 12 10:43:28 2017 -0700
@@ -0,0 +1,135 @@
+/*
+ * 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
+ * @modules java.xml
+ * @library /lib/testlibrary
+ * @build ValidateModulesTest JarUtils jdk.testlibrary.*
+ * @run testng ValidateModulesTest
+ * @summary Basic test for java --validate-modules
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import jdk.testlibrary.ProcessTools;
+import jdk.testlibrary.OutputAnalyzer;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class ValidateModulesTest {
+
+    /**
+     * Test that the system modules validate.
+     */
+    public void testSystemModules() throws Exception {
+        run("--validate-modules")
+                .stdoutShouldContain("java.base")
+                .stdoutShouldContain("java.xml")
+                .shouldHaveExitValue(0);
+    }
+
+    /**
+     * Test an automatic module on the module path with classes in the same
+     * package as a system module.
+     */
+    public void testPackageConflict() throws Exception {
+        Path tmpdir = Files.createTempDirectory("tmp");
+
+        Path classes = Files.createDirectory(tmpdir.resolve("classes"));
+        touch(classes, "javax/xml/XMLConstants.class");
+        touch(classes, "javax/xml/parsers/SAXParser.class");
+
+        Path lib = Files.createDirectory(tmpdir.resolve("lib"));
+        JarUtils.createJarFile(lib.resolve("xml.jar"), classes);
+
+        int exitValue = run("-p", lib.toString(), "--validate-modules")
+                .shouldContain("xml automatic")
+                .shouldContain("conflicts with module java.xml")
+                .getExitValue();
+        assertTrue(exitValue != 0);
+
+    }
+
+    /**
+     * Test two modules with the same name in a directory.
+     */
+    public void testDuplicateModule() throws Exception {
+        Path tmpdir = Files.createTempDirectory("tmp");
+
+        Path classes = Files.createDirectory(tmpdir.resolve("classes"));
+        touch(classes, "org/foo/Bar.class");
+
+        Path lib = Files.createDirectory(tmpdir.resolve("lib"));
+        JarUtils.createJarFile(lib.resolve("foo-1.0.jar"), classes);
+        JarUtils.createJarFile(lib.resolve("foo-2.0.jar"), classes);
+
+        int exitValue = run("-p", lib.toString(), "--validate-modules")
+                .shouldContain("contains same module")
+                .getExitValue();
+        assertTrue(exitValue != 0);
+    }
+
+    /**
+     * Test two modules with the same name in different directories.
+     */
+    public void testShadowed() throws Exception {
+        Path tmpdir = Files.createTempDirectory("tmp");
+
+        Path classes = Files.createDirectory(tmpdir.resolve("classes"));
+        touch(classes, "org/foo/Bar.class");
+
+        Path lib1 = Files.createDirectory(tmpdir.resolve("lib1"));
+        JarUtils.createJarFile(lib1.resolve("foo-1.0.jar"), classes);
+
+        Path lib2 = Files.createDirectory(tmpdir.resolve("lib2"));
+        JarUtils.createJarFile(lib2.resolve("foo-2.0.jar"), classes);
+
+        run("-p", lib1 + File.pathSeparator + lib2, "--validate-modules")
+                .shouldContain("shadowed by")
+                .shouldHaveExitValue(0);
+    }
+
+    /**
+     * Runs the java launcher with the given arguments.
+     */
+    private OutputAnalyzer run(String... args) throws Exception {
+        return ProcessTools.executeTestJava(args)
+                .outputTo(System.out)
+                .errorTo(System.out);
+    }
+
+    /**
+     * Creates a file relative the given directory.
+     */
+    private void touch(Path dir, String relPath) throws IOException {
+        Path file = dir.resolve(relPath.replace('/', File.separatorChar));
+        Files.createDirectories(file.getParent());
+        Files.createFile(file);
+    }
+}
--- a/test/tools/pack200/MultiRelease.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/pack200/MultiRelease.java	Fri May 12 10:43:28 2017 -0700
@@ -12,7 +12,7 @@
  * version 2 for more details (a copy is included in the LICENSE file that
  * accompanied this code).
  *
- r You should have received a copy of the GNU General Public License version
+ * You should have received a copy of the GNU General Public License version
  * 2 along with this work; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  *
--- a/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java	Fri Apr 28 15:43:43 2017 -0700
+++ b/test/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java	Fri May 12 10:43:28 2017 -0700
@@ -1542,8 +1542,7 @@
     @Override
     public Element visitModuleTarget(ModuleTarget_attribute attr, Element p) {
         Element e = new Element(x.getCpString(attr.attribute_name_index));
-        e.add(x.getCpString(attr.os_name_index));
-        e.add(x.getCpString(attr.os_arch_index));
+        e.add(x.getCpString(attr.target_platform_index));
         e.trimToSize();
         p.add(e);
         return null;