Merge
authorduke
Thu, 24 Aug 2017 16:36:25 +0200
changeset 46165 d3b1fde5fadb
parent 46164 5e6999fa94a0 (current diff)
parent 46161 f6a5a6241f79 (diff)
child 46170 684380faae7c
Merge
--- a/.hgtags-top-repo	Tue Aug 08 22:57:00 2017 +0000
+++ b/.hgtags-top-repo	Thu Aug 24 16:36:25 2017 +0200
@@ -441,3 +441,6 @@
 252475ccfd84cc249f8d6faf4b7806b5e2c384ce jdk-9+179
 a133a7d1007b1456bc62824382fd8ac93b45d329 jdk-10+17
 536b81db8075486ca0fe3225d8e59313df5b936c jdk-10+18
+b803e6cff41e72a1e6d8782e1ef7c25a6e3e5ee3 jdk-10+19
+d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
+b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
--- a/hotspot/.hgtags	Tue Aug 08 22:57:00 2017 +0000
+++ b/hotspot/.hgtags	Thu Aug 24 16:36:25 2017 +0200
@@ -601,3 +601,6 @@
 d2661aa42bff322badbe6c1337fc638d2e0f5730 jdk-9+179
 73e2cb8700bfa51304bd4b02f224620859a3f600 jdk-10+17
 c9d3317623d48da3327232c81e3f8cfc0d29d888 jdk-10+18
+33b74e13c1457f36041addb8b850831f81ca6e9f jdk-10+19
+d7baadc223e790c08bc69bf7e553bce65b4e7e40 jdk-9+180
+4a443796f6f57842d6a0434ac27ca3d1033ccc20 jdk-9+181
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Aug 08 22:57:00 2017 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -4389,6 +4389,15 @@
   rp->verify_no_references_recorded();
   assert(!rp->discovery_enabled(), "should have been disabled");
 
+  // If during an initial mark pause we install a pending list head which is not otherwise reachable
+  // ensure that it is marked in the bitmap for concurrent marking to discover.
+  if (collector_state()->during_initial_mark_pause()) {
+    oop pll_head = Universe::reference_pending_list();
+    if (pll_head != NULL) {
+      _cm->grayRoot(pll_head);
+    }
+  }
+
   // FIXME
   // CM's reference processing also cleans up the string and symbol tables.
   // Should we do that here also? We could, but it is a serial operation
--- a/hotspot/src/share/vm/memory/universe.cpp	Tue Aug 08 22:57:00 2017 +0000
+++ b/hotspot/src/share/vm/memory/universe.cpp	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -497,7 +497,11 @@
 #define assert_pll_ownership() assert_pll_locked(owned_by_self)
 
 oop Universe::reference_pending_list() {
-  assert_pll_ownership();
+  if (Thread::current()->is_VM_thread()) {
+    assert_pll_locked(is_locked);
+  } else {
+    assert_pll_ownership();
+  }
   return _reference_pending_list;
 }
 
--- a/jdk/.hgtags	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/.hgtags	Thu Aug 24 16:36:25 2017 +0200
@@ -441,3 +441,6 @@
 06df1ce4b9b887d05ce6a13f4def3547e434dd1a jdk-9+179
 d93f2fd542b7d7855c2cd49ae15ebcc3d441a83b jdk-10+17
 c4b709bad6c5d29294124de5e74e1e2ac84fcf1f jdk-10+18
+b561eeca30decc6258b4aca8bb23beffbb6e2f7d jdk-10+19
+4feab1acec6a9c3620a19ff379a65ab8618d0e2a jdk-9+180
+bd66ea2fdde3d60a73b5272263a7b8b0ca926a33 jdk-9+181
--- a/jdk/src/java.base/share/classes/java/io/DataInput.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/DataInput.java	Thu Aug 24 16:36:25 2017 +0200
@@ -54,83 +54,90 @@
  * Unicode strings in a format that is a slight modification of UTF-8.
  * (For information regarding the standard UTF-8 format, see section
  * <i>3.9 Unicode Encoding Forms</i> of <i>The Unicode Standard, Version
- * 4.0</i>).
- * Note that in the following table, the most significant bit appears in the
- * far left-hand column.
+ * 4.0</i>)
  *
- * <blockquote>
- *   <table class="plain">
- *     <caption style="display:none">Bit values and bytes</caption>
- *     <tbody>
+ * <ul>
+ * <li>Characters in the range {@code '\u005Cu0001'} to
+ *         {@code '\u005Cu007F'} are represented by a single byte.
+ * <li>The null character {@code '\u005Cu0000'} and characters
+ *         in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
+ *         represented by a pair of bytes.
+ * <li>Characters in the range {@code '\u005Cu0800'}
+ *         to {@code '\u005CuFFFF'} are represented by three bytes.
+ * </ul>
+ *
+ *   <table class="plain" style="margin-left:2em;">
+ *     <caption>Encoding of UTF-8 values</caption>
+ *     <thead>
  *     <tr>
- *       <th colspan="9"><span style="font-weight:normal">
- *         All characters in the range {@code '\u005Cu0001'} to
- *         {@code '\u005Cu007F'} are represented by a single byte:</span></th>
+ *       <th scope="col" rowspan="2">Value</th>
+ *       <th scope="col" rowspan="2">Byte</th>
+ *       <th scope="col" colspan="8" id="bit_a">Bit Values</th>
  *     </tr>
  *     <tr>
- *       <td></td>
- *       <th colspan="8" id="bit_a">Bit Values</th>
- *     </tr>
+ *       <!-- Value -->
+ *       <!-- Byte -->
+ *       <th scope="col" style="width:3em"> 7 </th>
+ *       <th scope="col" style="width:3em"> 6 </th>
+ *       <th scope="col" style="width:3em"> 5 </th>
+ *       <th scope="col" style="width:3em"> 4 </th>
+ *       <th scope="col" style="width:3em"> 3 </th>
+ *       <th scope="col" style="width:3em"> 2 </th>
+ *       <th scope="col" style="width:3em"> 1 </th>
+ *       <th scope="col" style="width:3em"> 0 </th>
+ *     </thead>
+ *     <tbody>
  *     <tr>
- *       <th id="byte1_a" style="text-align:left">Byte 1</th>
+ *       <th scope="row" style="text-align:left; font-weight:normal">
+ *         {@code \u005Cu0001} to {@code \u005Cu007F} </th>
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
  *       <td style="text-align:center">0
- *       <td colspan="7" style="text-align:center">bits 6-0
+ *       <td colspan="7" style="text-align:right; padding-right:6em">bits 6-0
  *     </tr>
  *     <tr>
- *       <th colspan="9"><span style="font-weight:normal">
- *         The null character {@code '\u005Cu0000'} and characters
- *         in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are
- *         represented by a pair of bytes:</span></th>
- *     </tr>
- *     <tr>
- *       <td></td>
- *       <th colspan="8" id="bit_b">Bit Values</th>
- *     </tr>
- *     <tr>
- *       <th id="byte1_b" style="text-align:left">Byte 1</th>
+ *       <th scope="row" rowspan="2" style="text-align:left; font-weight:normal">
+ *           {@code \u005Cu0000},<br>
+ *           {@code \u005Cu0080} to {@code \u005Cu07FF} </th>
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 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" 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
+ *       <td colspan="5" style="text-align:right; padding-right:6em">bits 10-6
  *     </tr>
  *     <tr>
- *       <th colspan="9"><span style="font-weight:normal">
- *         {@code char} values in the range {@code '\u005Cu0800'}
- *         to {@code '\u005CuFFFF'} are represented by three bytes:</span></th>
+ *       <!-- (value) -->
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
+ *       <td style="text-align:center">1
+ *       <td style="text-align:center">0
+ *       <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
  *     </tr>
  *     <tr>
- *       <td></td>
- *       <th colspan="8"id="bit_c">Bit Values</th>
- *     </tr>
- *     <tr>
- *       <th id="byte1_c" style="text-align:left">Byte 1</th>
+ *       <th scope="row" rowspan="3" style="text-align:left; font-weight:normal">
+ *         {@code \u005Cu0800} to {@code \u005CuFFFF} </th>
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 1 </th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">1
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
- *       <td colspan="4" style="text-align:center">bits 15-12
+ *       <td colspan="4" style="text-align:right; padding-right:6em">bits 15-12
  *     </tr>
  *     <tr>
- *       <th id="byte2_b" style="text-align:left">Byte 2</th>
+ *       <!-- (value) -->
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 2 </th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
- *       <td colspan="6" style="text-align:center">bits 11-6
+ *       <td colspan="6" style="text-align:right; padding-right:6em">bits 11-6
  *     </tr>
  *     <tr>
- *       <th id="byte3" style="text-align:left">Byte 3</th>
+ *       <!-- (value) -->
+ *       <th scope="row" style="font-weight:normal; text-align:center"> 3 </th>
  *       <td style="text-align:center">1
  *       <td style="text-align:center">0
- *       <td colspan="6" style="text-align:center">bits 5-0
+ *       <td colspan="6" style="text-align:right; padding-right:6em">bits 5-0
  *     </tr>
  *     </tbody>
  *   </table>
- * </blockquote>
+ *
  * <p>
  * The differences between this format and the
  * standard UTF-8 format are the following:
--- a/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java	Thu Aug 24 16:36:25 2017 +0200
@@ -34,6 +34,7 @@
 import java.util.Optional;
 import java.util.function.Function;
 
+import jdk.internal.misc.SharedSecrets;
 
 /**
  * Filter classes, array lengths, and graph metrics during deserialization.
@@ -265,6 +266,9 @@
                         return null;
                     });
             configLog = (configuredFilter != null) ? System.getLogger("java.io.serialization") : null;
+
+            // Setup shared secrets for RegistryImpl to use.
+            SharedSecrets.setJavaObjectInputFilterAccess(Config::createFilter2);
         }
 
         /**
@@ -370,7 +374,20 @@
          */
         public static ObjectInputFilter createFilter(String pattern) {
             Objects.requireNonNull(pattern, "pattern");
-            return Global.createFilter(pattern);
+            return Global.createFilter(pattern, true);
+        }
+
+        /**
+         * Returns an ObjectInputFilter from a string of patterns that
+         * checks only the length for arrays, not the component type.
+         *
+         * @param pattern the pattern string to parse; not null
+         * @return a filter to check a class being deserialized;
+         *          {@code null} if no patterns
+         */
+        static ObjectInputFilter createFilter2(String pattern) {
+            Objects.requireNonNull(pattern, "pattern");
+            return Global.createFilter(pattern, false);
         }
 
         /**
@@ -404,20 +421,26 @@
              * Maximum length of any array.
              */
             private long maxArrayLength;
+            /**
+             * True to check the component type for arrays.
+             */
+            private final boolean checkComponentType;
 
             /**
              * Returns an ObjectInputFilter from a string of patterns.
              *
              * @param pattern the pattern string to parse
+             * @param checkComponentType true if the filter should check
+             *                           the component type of arrays
              * @return a filter to check a class being deserialized;
              *          {@code null} if no patterns
              * @throws IllegalArgumentException if the parameter is malformed
              *                if the pattern is missing the name, the long value
              *                is not a number or is negative.
              */
-            static ObjectInputFilter createFilter(String pattern) {
+            static ObjectInputFilter createFilter(String pattern, boolean checkComponentType) {
                 try {
-                    return new Global(pattern);
+                    return new Global(pattern, checkComponentType);
                 } catch (UnsupportedOperationException uoe) {
                     // no non-empty patterns
                     return null;
@@ -428,12 +451,15 @@
              * Construct a new filter from the pattern String.
              *
              * @param pattern a pattern string of filters
+             * @param checkComponentType true if the filter should check
+             *                           the component type of arrays
              * @throws IllegalArgumentException if the pattern is malformed
              * @throws UnsupportedOperationException if there are no non-empty patterns
              */
-            private Global(String pattern) {
+            private Global(String pattern, boolean checkComponentType) {
                 boolean hasLimits = false;
                 this.pattern = pattern;
+                this.checkComponentType = checkComponentType;
 
                 maxArrayLength = Long.MAX_VALUE; // Default values are unlimited
                 maxDepth = Long.MAX_VALUE;
@@ -595,6 +621,10 @@
                             // array length is too big
                             return Status.REJECTED;
                         }
+                        if (!checkComponentType) {
+                            // As revised; do not check the component type for arrays
+                            return Status.UNDECIDED;
+                        }
                         do {
                             // Arrays are decided based on the component type
                             clazz = clazz.getComponentType();
--- a/jdk/src/java.base/share/classes/java/lang/Character.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Character.java	Thu Aug 24 16:36:25 2017 +0200
@@ -9566,18 +9566,23 @@
      * Determines if the specified character is ISO-LATIN-1 white space.
      * This method returns {@code true} for the following five
      * characters only:
-     * <table class="borderless">
+     * <table class="striped">
      * <caption style="display:none">truechars</caption>
+     * <thead>
+     * <tr><th scope="col">Character
+     *     <th scope="col">Code
+     *     <th scope="col">Name
+     * </thead>
      * <tbody>
-     * <tr><td>{@code '\t'}</td>            <td>{@code U+0009}</td>
+     * <tr><th scope="row">{@code '\t'}</th>            <td>{@code U+0009}</td>
      *     <td>{@code HORIZONTAL TABULATION}</td></tr>
-     * <tr><td>{@code '\n'}</td>            <td>{@code U+000A}</td>
+     * <tr><th scope="row">{@code '\n'}</th>            <td>{@code U+000A}</td>
      *     <td>{@code NEW LINE}</td></tr>
-     * <tr><td>{@code '\f'}</td>            <td>{@code U+000C}</td>
+     * <tr><th scope="row">{@code '\f'}</th>            <td>{@code U+000C}</td>
      *     <td>{@code FORM FEED}</td></tr>
-     * <tr><td>{@code '\r'}</td>            <td>{@code U+000D}</td>
+     * <tr><th scope="row">{@code '\r'}</th>            <td>{@code U+000D}</td>
      *     <td>{@code CARRIAGE RETURN}</td></tr>
-     * <tr><td>{@code ' '}</td>  <td>{@code U+0020}</td>
+     * <tr><th scope="row">{@code ' '}</th>  <td>{@code U+0020}</td>
      *     <td>{@code SPACE}</td></tr>
      * </tbody>
      * </table>
--- a/jdk/src/java.base/share/classes/java/lang/Class.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Class.java	Thu Aug 24 16:36:25 2017 +0200
@@ -728,22 +728,22 @@
      * one or more '{@code [}' characters representing the depth of the array
      * nesting.  The encoding of element type names is as follows:
      *
-     * <blockquote><table class="borderless">
+     * <blockquote><table class="striped">
      * <caption style="display:none">Element types and encodings</caption>
      * <thead>
-     * <tr><th style="padding-right:3em;"> Element Type <th> Encoding
+     * <tr><th scope="col"> Element Type <th scope="col"> 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 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 style="text-align:left">
+     * <tr><th scope="row"> boolean      <td style="text-align:center"> Z
+     * <tr><th scope="row"> byte         <td style="text-align:center"> B
+     * <tr><th scope="row"> char         <td style="text-align:center"> C
+     * <tr><th scope="row"> class or interface
+     *                                   <td style="text-align:center"> L<i>classname</i>;
+     * <tr><th scope="row"> double       <td style="text-align:center"> D
+     * <tr><th scope="row"> float        <td style="text-align:center"> F
+     * <tr><th scope="row"> int          <td style="text-align:center"> I
+     * <tr><th scope="row"> long         <td style="text-align:center"> J
+     * <tr><th scope="row"> short        <td style="text-align:center"> S
      * </tbody>
      * </table></blockquote>
      *
--- a/jdk/src/java.base/share/classes/java/lang/Double.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Double.java	Thu Aug 24 16:36:25 2017 +0200
@@ -255,25 +255,25 @@
      *
      * </ul>
      *
-     * <table class="plain">
+     * <table class="striped">
      * <caption>Examples</caption>
      * <thead>
-     * <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
+     * <tr><th scope="col">Floating-point Value</th><th scope="col">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>
-     * <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
-     * <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
-     * <tr><td>{@code 0.25}</td>        <td>{@code 0x1.0p-2}</td>
-     * <tr><td>{@code Double.MAX_VALUE}</td>
+     * <tbody style="text-align:right">
+     * <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
+     * <tr><th scope="row">{@code -1.0}</th>        <td>{@code -0x1.0p0}</td>
+     * <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
+     * <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
+     * <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
+     * <tr><th scope="row">{@code 0.25}</th>        <td>{@code 0x1.0p-2}</td>
+     * <tr><th scope="row">{@code Double.MAX_VALUE}</th>
      *     <td>{@code 0x1.fffffffffffffp1023}</td>
-     * <tr><td>{@code Minimum Normal Value}</td>
+     * <tr><th scope="row">{@code Minimum Normal Value}</th>
      *     <td>{@code 0x1.0p-1022}</td>
-     * <tr><td>{@code Maximum Subnormal Value}</td>
+     * <tr><th scope="row">{@code Maximum Subnormal Value}</th>
      *     <td>{@code 0x0.fffffffffffffp-1022}</td>
-     * <tr><td>{@code Double.MIN_VALUE}</td>
+     * <tr><th scope="row">{@code Double.MIN_VALUE}</th>
      *     <td>{@code 0x0.0000000000001p-1022}</td>
      * </tbody>
      * </table>
--- a/jdk/src/java.base/share/classes/java/lang/Float.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Float.java	Thu Aug 24 16:36:25 2017 +0200
@@ -256,25 +256,25 @@
      *
      * </ul>
      *
-     * <table class="plain">
+     * <table class="striped">
      * <caption>Examples</caption>
      * <thead>
-     * <tr><th>Floating-point Value</th><th>Hexadecimal String</th>
+     * <tr><th scope="col">Floating-point Value</th><th scope="col">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>
-     * <tr><td>{@code 3.0}</td> <td>{@code 0x1.8p1}</td>
-     * <tr><td>{@code 0.5}</td> <td>{@code 0x1.0p-1}</td>
-     * <tr><td>{@code 0.25}</td>        <td>{@code 0x1.0p-2}</td>
-     * <tr><td>{@code Float.MAX_VALUE}</td>
+     * <tr><th scope="row">{@code 1.0}</th> <td>{@code 0x1.0p0}</td>
+     * <tr><th scope="row">{@code -1.0}</th>        <td>{@code -0x1.0p0}</td>
+     * <tr><th scope="row">{@code 2.0}</th> <td>{@code 0x1.0p1}</td>
+     * <tr><th scope="row">{@code 3.0}</th> <td>{@code 0x1.8p1}</td>
+     * <tr><th scope="row">{@code 0.5}</th> <td>{@code 0x1.0p-1}</td>
+     * <tr><th scope="row">{@code 0.25}</th>        <td>{@code 0x1.0p-2}</td>
+     * <tr><th scope="row">{@code Float.MAX_VALUE}</th>
      *     <td>{@code 0x1.fffffep127}</td>
-     * <tr><td>{@code Minimum Normal Value}</td>
+     * <tr><th scope="row">{@code Minimum Normal Value}</th>
      *     <td>{@code 0x1.0p-126}</td>
-     * <tr><td>{@code Maximum Subnormal Value}</td>
+     * <tr><th scope="row">{@code Maximum Subnormal Value}</th>
      *     <td>{@code 0x0.fffffep-126}</td>
-     * <tr><td>{@code Float.MIN_VALUE}</td>
+     * <tr><th scope="row">{@code Float.MIN_VALUE}</th>
      *     <td>{@code 0x0.000002p-126}</td>
      * </tbody>
      * </table>
--- a/jdk/src/java.base/share/classes/java/lang/String.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/String.java	Thu Aug 24 16:36:25 2017 +0200
@@ -2208,29 +2208,29 @@
      * <caption style="display:none">Split example showing regex, limit, and result</caption>
      * <thead>
      * <tr>
-     *     <th>Regex</th>
-     *     <th>Limit</th>
-     *     <th>Result</th>
+     *     <th scope="col">Regex</th>
+     *     <th scope="col">Limit</th>
+     *     <th scope="col">Result</th>
      * </tr>
      * </thead>
      * <tbody>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">2</td>
+     * <tr><th scope="row" rowspan="3" style="font-weight:normal">:</th>
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">2</th>
      *     <td>{@code { "boo", "and:foo" }}</td></tr>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">5</td>
+     * <tr><!-- : -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">:</td>
-     *     <td style="text-align:center">-2</td>
+     * <tr><!-- : -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">5</td>
+     * <tr><th scope="row" rowspan="3" style="font-weight:normal">o</th>
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">5</th>
      *     <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">-2</td>
+     * <tr><!-- o -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">-2</th>
      *     <td>{@code { "b", "", ":and:f", "", "" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
-     *     <td style="text-align:center">0</td>
+     * <tr><!-- o -->
+     *     <th scope="row" style="font-weight:normal; text-align:right; padding-right:1em">0</th>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
      * </tbody>
      * </table></blockquote>
@@ -2336,14 +2336,14 @@
      * <caption style="display:none">Split examples showing regex and result</caption>
      * <thead>
      * <tr>
-     *  <th>Regex</th>
-     *  <th>Result</th>
+     *  <th scope="col">Regex</th>
+     *  <th scope="col">Result</th>
      * </tr>
      * </thead>
      * <tbody>
-     * <tr><td style="text-align:center">:</td>
+     * <tr><th scope="row" style="text-weight:normal">:</th>
      *     <td>{@code { "boo", "and", "foo" }}</td></tr>
-     * <tr><td style="text-align:center">o</td>
+     * <tr><th scope="row" style="text-weight:normal">o</th>
      *     <td>{@code { "b", "", ":and:f" }}</td></tr>
      * </tbody>
      * </table></blockquote>
@@ -2460,36 +2460,37 @@
      * <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>
+     *   <th scope="col">Language Code of Locale</th>
+     *   <th scope="col">Upper Case</th>
+     *   <th scope="col">Lower Case</th>
+     *   <th scope="col">Description</th>
      * </tr>
      * </thead>
      * <tbody>
      * <tr>
      *   <td>tr (Turkish)</td>
-     *   <td>&#92;u0130</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">&#92;u0130</th>
      *   <td>&#92;u0069</td>
      *   <td>capital letter I with dot above -&gt; small letter i</td>
      * </tr>
      * <tr>
      *   <td>tr (Turkish)</td>
-     *   <td>&#92;u0049</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">&#92;u0049</th>
      *   <td>&#92;u0131</td>
      *   <td>capital letter I -&gt; small letter dotless i </td>
      * </tr>
      * <tr>
      *   <td>(all)</td>
-     *   <td>French Fries</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">French Fries</th>
      *   <td>french fries</td>
      *   <td>lowercased all chars in String</td>
      * </tr>
      * <tr>
      *   <td>(all)</td>
-     *   <td><img src="doc-files/capiota.gif" alt="capiota"><img src="doc-files/capchi.gif" alt="capchi">
+     *   <th scope="row" style="font-weight:normal; text-align:left">
+     *       <img src="doc-files/capiota.gif" alt="capiota"><img src="doc-files/capchi.gif" alt="capchi">
      *       <img src="doc-files/captheta.gif" alt="captheta"><img src="doc-files/capupsil.gif" alt="capupsil">
-     *       <img src="doc-files/capsigma.gif" alt="capsigma"></td>
+     *       <img src="doc-files/capsigma.gif" alt="capsigma"></th>
      *   <td><img src="doc-files/iota.gif" alt="iota"><img src="doc-files/chi.gif" alt="chi">
      *       <img src="doc-files/theta.gif" alt="theta"><img src="doc-files/upsilon.gif" alt="upsilon">
      *       <img src="doc-files/sigma1.gif" alt="sigma"></td>
@@ -2546,34 +2547,34 @@
      * <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>
+     *   <th scope="col">Language Code of Locale</th>
+     *   <th scope="col">Lower Case</th>
+     *   <th scope="col">Upper Case</th>
+     *   <th scope="col">Description</th>
      * </tr>
      * </thead>
      * <tbody>
      * <tr>
      *   <td>tr (Turkish)</td>
-     *   <td>&#92;u0069</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">&#92;u0069</th>
      *   <td>&#92;u0130</td>
      *   <td>small letter i -&gt; capital letter I with dot above</td>
      * </tr>
      * <tr>
      *   <td>tr (Turkish)</td>
-     *   <td>&#92;u0131</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">&#92;u0131</th>
      *   <td>&#92;u0049</td>
      *   <td>small letter dotless i -&gt; capital letter I</td>
      * </tr>
      * <tr>
      *   <td>(all)</td>
-     *   <td>&#92;u00df</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">&#92;u00df</th>
      *   <td>&#92;u0053 &#92;u0053</td>
      *   <td>small letter sharp s -&gt; two letters: SS</td>
      * </tr>
      * <tr>
      *   <td>(all)</td>
-     *   <td>Fahrvergn&uuml;gen</td>
+     *   <th scope="row" style="font-weight:normal; text-align:left">Fahrvergn&uuml;gen</th>
      *   <td>FAHRVERGN&Uuml;GEN</td>
      *   <td></td>
      * </tr>
--- a/jdk/src/java.base/share/classes/java/lang/System.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/System.java	Thu Aug 24 16:36:25 2017 +0200
@@ -583,7 +583,7 @@
      * 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 class="striped">
+     * <table class="striped" style="text-align:left">
      * <caption style="display:none">Shows property keys and associated values</caption>
      * <thead>
      * <tr><th scope="col">Key</th>
@@ -1049,26 +1049,28 @@
          * of corresponding severity.
          * <br>The mapping is as follows:
          * <br><br>
-         * <table border="1">
+         * <table class="striped">
          * <caption>System.Logger Severity Level Mapping</caption>
-         * <tr><td><b>System.Logger Levels</b></td>
-         * <td>{@link Logger.Level#ALL ALL}</td>
-         * <td>{@link Logger.Level#TRACE TRACE}</td>
-         * <td>{@link Logger.Level#DEBUG DEBUG}</td>
-         * <td>{@link Logger.Level#INFO INFO}</td>
-         * <td>{@link Logger.Level#WARNING WARNING}</td>
-         * <td>{@link Logger.Level#ERROR ERROR}</td>
-         * <td>{@link Logger.Level#OFF OFF}</td>
-         * </tr>
-         * <tr><td><b>java.util.logging Levels</b></td>
-         * <td>{@link java.util.logging.Level#ALL ALL}</td>
-         * <td>{@link java.util.logging.Level#FINER FINER}</td>
-         * <td>{@link java.util.logging.Level#FINE FINE}</td>
-         * <td>{@link java.util.logging.Level#INFO INFO}</td>
-         * <td>{@link java.util.logging.Level#WARNING WARNING}</td>
-         * <td>{@link java.util.logging.Level#SEVERE SEVERE}</td>
-         * <td>{@link java.util.logging.Level#OFF OFF}</td>
-         * </tr>
+         * <thead>
+         * <tr><th scope="col">System.Logger Levels</th>
+         *     <th scope="col">java.util.logging Levels</th>
+         * </thead>
+         * <tbody>
+         * <tr><th scope="row">{@link Logger.Level#ALL ALL}</th>
+         *     <td>{@link java.util.logging.Level#ALL ALL}</td>
+         * <tr><th scope="row">{@link Logger.Level#TRACE TRACE}</th>
+         *     <td>{@link java.util.logging.Level#FINER FINER}</td>
+         * <tr><th scope="row">{@link Logger.Level#DEBUG DEBUG}</th>
+         *     <td>{@link java.util.logging.Level#FINE FINE}</td>
+         * <tr><th scope="row">{@link Logger.Level#INFO INFO}</th>
+         *     <td>{@link java.util.logging.Level#INFO INFO}</td>
+         * <tr><th scope="row">{@link Logger.Level#WARNING WARNING}</th>
+         *     <td>{@link java.util.logging.Level#WARNING WARNING}</td>
+         * <tr><th scope="row">{@link Logger.Level#ERROR ERROR}</th>
+         *     <td>{@link java.util.logging.Level#SEVERE SEVERE}</td>
+         * <tr><th scope="row">{@link Logger.Level#OFF OFF}</th>
+         *     <td>{@link java.util.logging.Level#OFF OFF}</td>
+         * </tbody>
          * </table>
          *
          * @since 9
--- a/jdk/src/java.base/share/classes/java/lang/Thread.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/Thread.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, 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
@@ -347,7 +347,7 @@
      * the calling thread indicates to the runtime that it is busy-waiting.
      * The runtime may take action to improve the performance of invoking
      * spin-wait loop constructions.
-     * <p>
+     *
      * @apiNote
      * As an example consider a method in a class that spins in a loop until
      * some flag is set outside of that method. A call to the {@code onSpinWait}
@@ -373,7 +373,7 @@
      * method was not called at all. However on some architectures the Java
      * Virtual Machine may issue the processor instructions to address such
      * code patterns in a more beneficial way.
-     * <p>
+     *
      * @since 9
      */
     @HotSpotIntrinsicCandidate
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java	Thu Aug 24 16:36:25 2017 +0200
@@ -149,24 +149,24 @@
  * capture argument (corresponding to the receiver) must be non-null.
  *
  * <p>A type Q is considered adaptable to S as follows:
- * <table class="borderless">
+ * <table class="striped">
  *   <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>
+ *     <tr><th scope="col">Q</th><th scope="col">S</th><th scope="col">Link-time checks</th><th scope="col">Invocation-time checks</th></tr>
  *   </thead>
  *   <tbody>
  *     <tr>
- *         <td>Primitive</td><td>Primitive</td>
+ *         <th scope="row">Primitive</th><th scope="row">Primitive</th>
  *         <td>Q can be converted to S via a primitive widening conversion</td>
  *         <td>None</td>
  *     </tr>
  *     <tr>
- *         <td>Primitive</td><td>Reference</td>
+ *         <th scope="row">Primitive</th><th scope="row">Reference</th>
  *         <td>S is a supertype of the Wrapper(Q)</td>
  *         <td>Cast from Wrapper(Q) to S</td>
  *     </tr>
  *     <tr>
- *         <td>Reference</td><td>Primitive</td>
+ *         <th scope="row">Reference</th><th scope="row">Primitive</th>
  *         <td>for parameter types: Q is a primitive wrapper and Primitive(Q)
  *         can be widened to S
  *         <br>for return types: If Q is a primitive wrapper, check that
@@ -175,7 +175,7 @@
  *         for example Number for numeric types</td>
  *     </tr>
  *     <tr>
- *         <td>Reference</td><td>Reference</td>
+ *         <th scope="row">Reference</th><th scope="row">Reference</th>
  *         <td>for parameter types: S is a supertype of Q
  *         <br>for return types: none</td>
  *         <td>Cast from Q to S</td>
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -889,7 +889,7 @@
      * <p>
      * This method behaves very much like {@link #asSpreader(Class, int)}, but accepts an additional {@code spreadArgPos}
      * argument to indicate at which position in the parameter list the spreading should take place.
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
     MethodHandle compare = LOOKUP.findStatic(Objects.class, "compare", methodType(int.class, Object.class, Object.class, Comparator.class));
@@ -1094,7 +1094,7 @@
      * This method behaves very much like {@link #asCollector(Class, int)}, but differs in that its {@code
      * collectArgPos} argument indicates at which position in the parameter list arguments should be collected. This
      * index is zero-based.
-     * <p>
+     *
      * @apiNote Examples:
      * <blockquote><pre>{@code
     StringWriter swr = new StringWriter();
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Thu Aug 24 16:36:25 2017 +0200
@@ -3353,7 +3353,7 @@
      * That is, it returns a zero primitive value, a {@code null}, or {@code void}.
      * <p>The returned method handle is equivalent to
      * {@code dropArguments(zero(type.returnType()), 0, type.parameterList())}.
-     * <p>
+     *
      * @apiNote Given a predicate and target, a useful "if-then" construct can be produced as
      * {@code guardWithTest(pred, target, empty(target.type())}.
      * @param type the type of the desired method handle
@@ -3676,7 +3676,7 @@
      * Given these assumptions, the result of an invocation of {@code dropArgumentsToMatch} will have the parameter type
      * list {@code S..., P..., M..., A...}, with the {@code P} and {@code A} types inserted as if by
      * {@link #dropArguments(MethodHandle, int, Class[])}.
-     * <p>
+     *
      * @apiNote
      * Two method handles whose argument lists are "effectively identical" (i.e., identical in a common prefix) may be
      * mutually converted to a common type by two calls to {@code dropArgumentsToMatch}, as follows:
@@ -4169,7 +4169,7 @@
      * position in the parameter list at which folding takes place. The argument controlling this, {@code pos}, is a
      * zero-based index. The aforementioned method {@link #foldArguments(MethodHandle, MethodHandle)} assumes position
      * 0.
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
     import static java.lang.invoke.MethodHandles.*;
@@ -4698,7 +4698,7 @@
      * Note that the parameter type lists {@code (V...)} and {@code (A...)} have been expanded
      * to their full length, even though individual clause functions may neglect to take them all.
      * As noted above, missing parameters are filled in as if by {@link #dropArgumentsToMatch}.
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // iterative implementation of the factorial function as a loop handle
@@ -4991,7 +4991,7 @@
      *   return v;
      * }
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // implement the zip function for lists as a loop handle
@@ -5010,7 +5010,7 @@
      * assertEquals(zipped, (List<String>) loop.invoke(a.iterator(), b.iterator()));
      * }</pre></blockquote>
      *
-     * <p>
+     *
      * @apiNote The implementation of this method can be expressed as follows:
      * <blockquote><pre>{@code
      * MethodHandle whileLoop(MethodHandle init, MethodHandle pred, MethodHandle body) {
@@ -5104,7 +5104,7 @@
      *   return v;
      * }
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // int i = 0; while (i < limit) { ++i; } return i; => limit
@@ -5116,7 +5116,7 @@
      * assertEquals(23, loop.invoke(23));
      * }</pre></blockquote>
      *
-     * <p>
+     *
      * @apiNote The implementation of this method can be expressed as follows:
      * <blockquote><pre>{@code
      * MethodHandle doWhileLoop(MethodHandle init, MethodHandle body, MethodHandle pred) {
@@ -5248,7 +5248,7 @@
      *   return v;
      * }
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example with a fully conformant body method:
      * <blockquote><pre>{@code
      * // String s = "Lambdaman!"; for (int i = 0; i < 13; ++i) { s = "na " + s; } return s;
@@ -5260,7 +5260,7 @@
      * MethodHandle loop = MethodHandles.countedLoop(fit13, start, MH_step);
      * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("Lambdaman!"));
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example with the simplest possible body method type,
      * and passing the number of iterations to the loop invocation:
      * <blockquote><pre>{@code
@@ -5273,7 +5273,7 @@
      * MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step);  // (v, i) -> "na " + v
      * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "Lambdaman!"));
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example that treats the number of iterations, string to append to, and string to append
      * as loop parameters:
      * <blockquote><pre>{@code
@@ -5286,7 +5286,7 @@
      * MethodHandle loop = MethodHandles.countedLoop(count, start, MH_step);  // (v, i, _, pre, _) -> pre + " " + v
      * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke(13, "na", "Lambdaman!"));
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example that illustrates the usage of {@link #dropArgumentsToMatch(MethodHandle, int, List, int)}
      * to enforce a loop type:
      * <blockquote><pre>{@code
@@ -5301,7 +5301,7 @@
      * MethodHandle loop = MethodHandles.countedLoop(count, start, body);  // (v, i, pre, _, _) -> pre + " " + v
      * assertEquals("na na na na na na na na na na na na na Lambdaman!", loop.invoke("na", 13, "Lambdaman!"));
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote The implementation of this method can be expressed as follows:
      * <blockquote><pre>{@code
      * MethodHandle countedLoop(MethodHandle iterations, MethodHandle init, MethodHandle body) {
@@ -5406,7 +5406,6 @@
      * }
      * }</pre></blockquote>
      *
-     * <p>
      * @apiNote The implementation of this method can be expressed as follows:
      * <blockquote><pre>{@code
      * MethodHandle countedLoop(MethodHandle start, MethodHandle end, MethodHandle init, MethodHandle body) {
@@ -5607,7 +5606,7 @@
      *   return v;
      * }
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote Example:
      * <blockquote><pre>{@code
      * // get an iterator from a list
@@ -5622,7 +5621,7 @@
      * List<String> reversedList = Arrays.asList("e", "d", "c", "b", "a");
      * assertEquals(reversedList, (List<String>) loop.invoke(list));
      * }</pre></blockquote>
-     * <p>
+     *
      * @apiNote The implementation of this method can be expressed approximately as follows:
      * <blockquote><pre>{@code
      * MethodHandle iteratedLoop(MethodHandle iterator, MethodHandle init, MethodHandle body) {
--- a/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/package-info.java	Thu Aug 24 16:36:25 2017 +0200
@@ -165,28 +165,33 @@
  * <p>
  * Given these rules, here are examples of legal bootstrap method declarations,
  * given various numbers {@code N} of extra arguments.
- * The first rows (marked {@code *}) will work for any number of extra arguments.
- * <table class="plain">
+ * The first row (marked {@code *}) will work for any number of extra arguments.
+ * <table class="plain" style="vertical-align:top">
  * <caption style="display:none">Static argument types</caption>
- * <tr><th>N</th><th>Sample bootstrap method</th></tr>
- * <tr><td>*</td>
- *     <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
- * <tr><td>*</td><td>
- *     <code>CallSite bootstrap(Object... args)</code></td></tr>
- * <tr><td>*</td><td>
- *     <code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code></td></tr>
- * <tr><td>0</td><td>
- *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code></td></tr>
- * <tr><td>0</td><td>
- *     <code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code></td></tr>
- * <tr><td>1</td><td>
+ * <thead>
+ * <tr><th scope="col">N</th><th scope="col">Sample bootstrap method</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row" style="font-weight:normal; vertical-align:top">*</th><td>
+ *     <ul style="list-style:none; padding-left: 0; margin:0">
+ *     <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
+ *     <li><code>CallSite bootstrap(Object... args)</code>
+ *     <li><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code>
+ *     </ul></td></tr>
+ * <tr><th scope="row" style="font-weight:normal; vertical-align:top">0</th><td>
+ *     <ul style="list-style:none; padding-left: 0; margin:0">
+ *     <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code>
+ *     <li><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code>
+ *     </ul></td></tr>
+ * <tr><th scope="row" style="font-weight:normal; vertical-align:top">1</th><td>
  *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
- * <tr><td>2</td><td>
- *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code></td></tr>
- * <tr><td>2</td><td>
- *     <code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code></td></tr>
- * <tr><td>2</td>
- *     <td><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code></td></tr>
+ * <tr><th scope="row" style="font-weight:normal; vertical-align:top">2</th><td>
+ *     <ul style="list-style:none; padding-left: 0; margin:0">
+ *     <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
+ *     <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code>
+ *     <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code>
+ *     </ul></td></tr>
+ * </tbody>
  * </table>
  * The last example assumes that the extra arguments are of type
  * {@code CONSTANT_String} and {@code CONSTANT_Integer}, respectively.
--- a/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java	Thu Aug 24 16:36:25 2017 +0200
@@ -108,27 +108,39 @@
  * <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>
+ * <tr><th colspan=2 scope="col">Method</th>
+ *     <th colspan=4 scope="col">Kind of Presence</th>
+ * <tr><th scope="col">Return Type</th>
+ *     <th scope="col">Signature</th>
+ *     <th scope="col">Directly Present</th>
+ *     <th scope="col">Indirectly Present</th>
+ *     <th scope="col">Present</th>
+ *     <th scope="col">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><td style="text-align:right">{@code T}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotation(Class) getAnnotation(Class&lt;T&gt;)}
+ * <td></td><td></td><td style="text-align:center">X</td><td></td>
  * </tr>
- * <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getAnnotations getAnnotations()}
- * <td></td><td></td><td>X</td><td></td>
+ * <tr><td style="text-align:right">{@code Annotation[]}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotations getAnnotations()}
+ * <td></td><td></td><td style="text-align:center">X</td><td></td>
  * </tr>
- * <tr><td style="text-align:right">{@code T[]}</td><td>{@link #getAnnotationsByType(Class) getAnnotationsByType(Class&lt;T&gt;)}
- * <td></td><td></td><td></td><td>X</td>
+ * <tr><td style="text-align:right">{@code T[]}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getAnnotationsByType(Class) getAnnotationsByType(Class&lt;T&gt;)}
+ * <td></td><td></td><td></td><td style="text-align:center">X</td>
  * </tr>
- * <tr><td style="text-align:right">{@code T}</td><td>{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class&lt;T&gt;)}
- * <td>X</td><td></td><td></td><td></td>
+ * <tr><td style="text-align:right">{@code T}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotation(Class) getDeclaredAnnotation(Class&lt;T&gt;)}
+ * <td style="text-align:center">X</td><td></td><td></td><td></td>
  * </tr>
- * <tr><td style="text-align:right">{@code Annotation[]}</td><td>{@link #getDeclaredAnnotations getDeclaredAnnotations()}
- * <td>X</td><td></td><td></td><td></td>
+ * <tr><td style="text-align:right">{@code Annotation[]}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotations getDeclaredAnnotations()}
+ * <td style="text-align:center">X</td><td></td><td></td><td></td>
  * </tr>
- * <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><td style="text-align:right">{@code T[]}</td>
+ * <th scope="row" style="font-weight:normal; text-align:left">{@link #getDeclaredAnnotationsByType(Class) getDeclaredAnnotationsByType(Class&lt;T&gt;)}
+ * <td style="text-align:center">X</td><td style="text-align:center">X</td><td></td><td></td>
  * </tr>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/math/BigDecimal.java	Thu Aug 24 16:36:25 2017 +0200
@@ -120,18 +120,18 @@
  * preferred scale for representing a result.  The preferred
  * scale for each operation is listed in the table below.
  *
- * <table class="plain">
- * <caption><b>Preferred Scales for Results of Arithmetic Operations
- * </b></caption>
+ * <table class="striped" style="text-align:left">
+ * <caption>Preferred Scales for Results of Arithmetic Operations
+ * </caption>
  * <thead>
- * <tr><th>Operation</th><th>Preferred Scale of Result</th></tr>
+ * <tr><th scope="col">Operation</th><th scope="col">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>
+ * <tr><th scope="row">Add</th><td>max(addend.scale(), augend.scale())</td>
+ * <tr><th scope="row">Subtract</th><td>max(minuend.scale(), subtrahend.scale())</td>
+ * <tr><th scope="row">Multiply</th><td>multiplier.scale() + multiplicand.scale()</td>
+ * <tr><th scope="row">Divide</th><td>dividend.scale() - divisor.scale()</td>
+ * <tr><th scope="row">Square root</th><td>radicand.scale()/2</td>
  * </tbody>
  * </table>
  *
--- a/jdk/src/java.base/share/classes/java/math/RoundingMode.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/math/RoundingMode.java	Thu Aug 24 16:36:25 2017 +0200
@@ -51,13 +51,13 @@
  * proper {@code MathContext}.  A summary table showing the results
  * of these rounding operations for all rounding modes appears below.
  *
- *<table class="plain">
+ *<table class="striped">
  * <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
+ * <tr><th scope="col" rowspan="2">Input Number</th><th scope="col"colspan=8>Result of rounding input to one digit with the given
  *                           rounding mode</th>
  * <tr style="vertical-align:top">
- * <th>Input Number</th>         <th>{@code UP}</th>
+ *                               <th>{@code UP}</th>
  *                                           <th>{@code DOWN}</th>
  *                                                        <th>{@code CEILING}</th>
  *                                                                       <th>{@code FLOOR}</th>
@@ -66,18 +66,18 @@
  *                                                                                                                    <th>{@code HALF_EVEN}</th>
  *                                                                                                                                     <th>{@code UNNECESSARY}</th>
  * </thead>
- * <tbody>
+ * <tbody style="text-align:right">
  *
- * <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>
- * <tr style="text-align:right"><td>1.6</td>  <td>2</td>  <td>1</td>    <td>2</td>    <td>1</td>  <td>2</td>      <td>2</td>       <td>2</td>       <td>throw {@code ArithmeticException}</td>
- * <tr style="text-align:right"><td>1.1</td>  <td>2</td>  <td>1</td>    <td>2</td>    <td>1</td>  <td>1</td>      <td>1</td>       <td>1</td>       <td>throw {@code ArithmeticException}</td>
- * <tr style="text-align:right"><td>1.0</td>  <td>1</td>  <td>1</td>    <td>1</td>    <td>1</td>  <td>1</td>      <td>1</td>       <td>1</td>       <td>1</td>
- * <tr style="text-align:right"><td>-1.0</td> <td>-1</td> <td>-1</td>   <td>-1</td>   <td>-1</td> <td>-1</td>     <td>-1</td>      <td>-1</td>      <td>-1</td>
- * <tr style="text-align:right"><td>-1.1</td> <td>-2</td> <td>-1</td>   <td>-1</td>   <td>-2</td> <td>-1</td>     <td>-1</td>      <td>-1</td>      <td>throw {@code ArithmeticException}</td>
- * <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>
+ * <tr><th scope="row">5.5</th>  <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><th scope="row">2.5</th>  <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>
+ * <tr><th scope="row">1.6</th>  <td>2</td>  <td>1</td>    <td>2</td>    <td>1</td>  <td>2</td>      <td>2</td>       <td>2</td>       <td>throw {@code ArithmeticException}</td>
+ * <tr><th scope="row">1.1</th>  <td>2</td>  <td>1</td>    <td>2</td>    <td>1</td>  <td>1</td>      <td>1</td>       <td>1</td>       <td>throw {@code ArithmeticException}</td>
+ * <tr><th scope="row">1.0</th>  <td>1</td>  <td>1</td>    <td>1</td>    <td>1</td>  <td>1</td>      <td>1</td>       <td>1</td>       <td>1</td>
+ * <tr><th scope="row">-1.0</th> <td>-1</td> <td>-1</td>   <td>-1</td>   <td>-1</td> <td>-1</td>     <td>-1</td>      <td>-1</td>      <td>-1</td>
+ * <tr><th scope="row">-1.1</th> <td>-2</td> <td>-1</td>   <td>-1</td>   <td>-2</td> <td>-1</td>     <td>-1</td>      <td>-1</td>      <td>throw {@code ArithmeticException}</td>
+ * <tr><th scope="row">-1.6</th> <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><th scope="row">-2.5</th> <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><th scope="row">-5.5</th> <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>
  * </tbody>
  * </table>
  *
@@ -104,23 +104,23 @@
          * value.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode UP Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode UP Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code UP} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>2</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-2</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>6</td>
+         *<tr><th scope="row">2.5</th>  <td>3</td>
+         *<tr><th scope="row">1.6</th>  <td>2</td>
+         *<tr><th scope="row">1.1</th>  <td>2</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-2</td>
+         *<tr><th scope="row">-1.6</th> <td>-2</td>
+         *<tr><th scope="row">-2.5</th> <td>-3</td>
+         *<tr><th scope="row">-5.5</th> <td>-6</td>
          *</tbody>
          *</table>
          */
@@ -132,23 +132,23 @@
          * rounding mode never increases the magnitude of the calculated value.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode DOWN Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode DOWN Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code DOWN} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>1</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>5</td>
+         *<tr><th scope="row">2.5</th>  <td>2</td>
+         *<tr><th scope="row">1.6</th>  <td>1</td>
+         *<tr><th scope="row">1.1</th>  <td>1</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-1</td>
+         *<tr><th scope="row">-1.6</th> <td>-1</td>
+         *<tr><th scope="row">-2.5</th> <td>-2</td>
+         *<tr><th scope="row">-5.5</th> <td>-5</td>
          *</tbody>
          *</table>
          */
@@ -161,23 +161,23 @@
          * that this rounding mode never decreases the calculated value.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode CEILING Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode CEILING Examples</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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>2</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>6</td>
+         *<tr><th scope="row">2.5</th>  <td>3</td>
+         *<tr><th scope="row">1.6</th>  <td>2</td>
+         *<tr><th scope="row">1.1</th>  <td>2</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-1</td>
+         *<tr><th scope="row">-1.6</th> <td>-1</td>
+         *<tr><th scope="row">-2.5</th> <td>-2</td>
+         *<tr><th scope="row">-5.5</th> <td>-5</td>
          *</tbody>
          *</table>
          */
@@ -190,23 +190,23 @@
          * this rounding mode never increases the calculated value.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode FLOOR Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode FLOOR Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code FLOOR} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>1</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-2</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>5</td>
+         *<tr><th scope="row">2.5</th>  <td>2</td>
+         *<tr><th scope="row">1.6</th>  <td>1</td>
+         *<tr><th scope="row">1.1</th>  <td>1</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-2</td>
+         *<tr><th scope="row">-1.6</th> <td>-2</td>
+         *<tr><th scope="row">-2.5</th> <td>-3</td>
+         *<tr><th scope="row">-5.5</th> <td>-6</td>
          *</tbody>
          *</table>
          */
@@ -221,23 +221,23 @@
          * mode commonly taught at school.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode HALF_UP Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode HALF_UP Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code HALF_UP} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>1</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>6</td>
+         *<tr><th scope="row">2.5</th>  <td>3</td>
+         *<tr><th scope="row">1.6</th>  <td>2</td>
+         *<tr><th scope="row">1.1</th>  <td>1</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-1</td>
+         *<tr><th scope="row">-1.6</th> <td>-2</td>
+         *<tr><th scope="row">-2.5</th> <td>-3</td>
+         *<tr><th scope="row">-5.5</th> <td>-6</td>
          *</tbody>
          *</table>
          */
@@ -251,23 +251,23 @@
          * {@code RoundingMode.DOWN}.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode HALF_DOWN Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode HALF_DOWN Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code HALF_DOWN} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>1</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>5</td>
+         *<tr><th scope="row">2.5</th>  <td>2</td>
+         *<tr><th scope="row">1.6</th>  <td>2</td>
+         *<tr><th scope="row">1.1</th>  <td>1</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-1</td>
+         *<tr><th scope="row">-1.6</th> <td>-2</td>
+         *<tr><th scope="row">-2.5</th> <td>-2</td>
+         *<tr><th scope="row">-5.5</th> <td>-5</td>
          *</tbody>
          *</table>
          */
@@ -288,23 +288,23 @@
          * arithmetic in Java.
          *
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode HALF_EVEN Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode HALF_EVEN Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code HALF_EVEN} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>1</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>-1</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>6</td>
+         *<tr><th scope="row">2.5</th>  <td>2</td>
+         *<tr><th scope="row">1.6</th>  <td>2</td>
+         *<tr><th scope="row">1.1</th>  <td>1</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>-1</td>
+         *<tr><th scope="row">-1.6</th> <td>-2</td>
+         *<tr><th scope="row">-2.5</th> <td>-2</td>
+         *<tr><th scope="row">-5.5</th> <td>-6</td>
          *</tbody>
          *</table>
          */
@@ -316,23 +316,23 @@
          * specified on an operation that yields an inexact result, an
          * {@code ArithmeticException} is thrown.
          *<p>Example:
-         *<table class="plain">
-         * <caption><b>Rounding mode UNNECESSARY Examples</b></caption>
+         *<table class="striped">
+         * <caption>Rounding mode UNNECESSARY Examples</caption>
          *<thead>
-         *<tr style="vertical-align:top"><th>Input Number</th>
-         *    <th>Input rounded to one digit<br> with {@code UNNECESSARY} rounding
+         *<tr style="vertical-align:top"><th scope="col">Input Number</th>
+         *    <th scope="col">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>
-         *<tr style="text-align:right"><td>1.1</td>  <td>throw {@code ArithmeticException}</td>
-         *<tr style="text-align:right"><td>1.0</td>  <td>1</td>
-         *<tr style="text-align:right"><td>-1.0</td> <td>-1</td>
-         *<tr style="text-align:right"><td>-1.1</td> <td>throw {@code ArithmeticException}</td>
-         *<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 style="text-align:right">
+         *<tr><th scope="row">5.5</th>  <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">2.5</th>  <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">1.6</th>  <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">1.1</th>  <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">1.0</th>  <td>1</td>
+         *<tr><th scope="row">-1.0</th> <td>-1</td>
+         *<tr><th scope="row">-1.1</th> <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">-1.6</th> <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">-2.5</th> <td>throw {@code ArithmeticException}</td>
+         *<tr><th scope="row">-5.5</th> <td>throw {@code ArithmeticException}</td>
          *</tbody>
          *</table>
          */
--- a/jdk/src/java.base/share/classes/java/net/InetAddress.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/InetAddress.java	Thu Aug 24 16:36:25 2017 +0200
@@ -72,10 +72,13 @@
  *
  * <h3> Address types </h3>
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
  *   <caption style="display:none">Description of unicast and multicast address types</caption>
+ *   <thead>
+ *   <tr><th scope="col">Address Type</th><th scope="col">Description</th></tr>
+ *   </thead>
  *   <tbody>
- *   <tr><th style="vertical-align:top"><i>unicast</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">unicast</th>
  *       <td>An identifier for a single interface. A packet sent to
  *         a unicast address is delivered to the interface identified by
  *         that address.
@@ -94,12 +97,12 @@
  *         IP address loops around and becomes IP input on the local
  *         host. This address is often used when testing a
  *         client.</td></tr>
- *   <tr><th style="vertical-align:top"><i>multicast</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">multicast</th>
  *       <td>An identifier for a set of interfaces (typically belonging
  *         to different nodes). A packet sent to a multicast address is
  *         delivered to all interfaces identified by that address.</td></tr>
  * </tbody>
- * </table></blockquote>
+ * </table>
  *
  * <h4> IP address scope </h4>
  *
@@ -163,8 +166,7 @@
  * <p> Two Java security properties control the TTL values used for
  *  positive and negative host name resolution caching:
  *
- * <blockquote>
- * <dl>
+ * <dl style="margin-left:2em">
  * <dt><b>networkaddress.cache.ttl</b></dt>
  * <dd>Indicates the caching policy for successful name lookups from
  * the name service. The value is specified as an integer to indicate
@@ -183,7 +185,6 @@
  * A value of -1 indicates "cache forever".
  * </dd>
  * </dl>
- * </blockquote>
  *
  * @author  Chris Warth
  * @see     java.net.InetAddress#getByAddress(byte[])
--- a/jdk/src/java.base/share/classes/java/net/URI.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/URI.java	Thu Aug 24 16:36:25 2017 +0200
@@ -132,23 +132,23 @@
  *
  * <p> All told, then, a URI instance has the following nine components:
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
  * <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>
+ * <tr><th scope="col">Component</th><th scope="col">Type</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>
- * <tr><td>user-info</td><td>{@code String}</td></tr>
- * <tr><td>host</td><td>{@code String}</td></tr>
- * <tr><td>port</td><td>{@code int}</td></tr>
- * <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 style="text-align:left">
+ * <tr><th scope="row">scheme</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">scheme-specific-part</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">authority</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">user-info</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">host</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">port</th><td>{@code int}</td></tr>
+ * <tr><th scope="row">path</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">query</th><td>{@code String}</td></tr>
+ * <tr><th scope="row">fragment</th><td>{@code String}</td></tr>
  * </tbody>
- * </table></blockquote>
+ * </table>
  *
  * In a given instance any particular component is either <i>undefined</i> or
  * <i>defined</i> with a distinct value.  Undefined string components are
@@ -253,32 +253,35 @@
  * which are taken from that specification, are used below to describe these
  * constraints:
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em">
  * <caption style="display:none">Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other</caption>
- *   <tbody>
- *   <tr><th style="vertical-align:top"><i>alpha</i></th>
+ *   <thead>
+ *   <tr><th scope="col">Category</th><th scope="col">Description</th></tr>
+ *   </thead>
+ *   <tbody style="text-align:left">
+ *   <tr><th scope="row" style="vertical-align:top">alpha</th>
  *       <td>The US-ASCII alphabetic characters,
  *        {@code 'A'}&nbsp;through&nbsp;{@code 'Z'}
  *        and {@code 'a'}&nbsp;through&nbsp;{@code 'z'}</td></tr>
- *   <tr><th style="vertical-align:top"><i>digit</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">digit</th>
  *       <td>The US-ASCII decimal digit characters,
  *       {@code '0'}&nbsp;through&nbsp;{@code '9'}</td></tr>
- *   <tr><th style="vertical-align:top"><i>alphanum</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">alphanum</th>
  *       <td>All <i>alpha</i> and <i>digit</i> characters</td></tr>
- *   <tr><th style="vertical-align:top"><i>unreserved</i>&nbsp;&nbsp;&nbsp;&nbsp;</th>
+ *   <tr><th scope="row" style="vertical-align:top">unreserved</th>
  *       <td>All <i>alphanum</i> characters together with those in the string
  *        {@code "_-!.~'()*"}</td></tr>
- *   <tr><th style="vertical-align:top"><i>punct</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">punct</th>
  *       <td>The characters in the string {@code ",;:$&+="}</td></tr>
- *   <tr><th style="vertical-align:top"><i>reserved</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">reserved</th>
  *       <td>All <i>punct</i> characters together with those in the string
  *        {@code "?/[]@"}</td></tr>
- *   <tr><th style="vertical-align:top"><i>escaped</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">escaped</th>
  *       <td>Escaped octets, that is, triplets consisting of the percent
  *           character ({@code '%'}) followed by two hexadecimal digits
  *           ({@code '0'}-{@code '9'}, {@code 'A'}-{@code 'F'}, and
  *           {@code 'a'}-{@code 'f'})</td></tr>
- *   <tr><th style="vertical-align:top"><i>other</i></th>
+ *   <tr><th scope="row" style="vertical-align:top">other</th>
  *       <td>The Unicode characters that are not in the US-ASCII character set,
  *           are not control characters (according to the {@link
  *           java.lang.Character#isISOControl(char) Character.isISOControl}
@@ -287,7 +290,7 @@
  *           method)&nbsp;&nbsp;<i>(<b>Deviation from RFC 2396</b>, which is
  *           limited to US-ASCII)</i></td></tr>
  * </tbody>
- * </table></blockquote>
+ * </table>
  *
  * <p><a id="legal-chars"></a> The set of all legal URI characters consists of
  * the <i>unreserved</i>, <i>reserved</i>, <i>escaped</i>, and <i>other</i>
--- a/jdk/src/java.base/share/classes/java/net/URLConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/URLConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -51,31 +51,16 @@
  * The abstract class {@code URLConnection} is the superclass
  * of all classes that represent a communications link between the
  * application and a URL. Instances of this class can be used both to
- * read from and to write to the resource referenced by the URL. In
- * general, creating a connection to a URL is a multistep process:
+ * read from and to write to the resource referenced by the URL.
  *
- * <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>
- *
+ * <p>
+ * In general, creating a connection to a URL is a multistep process:
  * <ol>
  * <li>The connection object is created by invoking the
- *     {@code openConnection} method on a URL.
+ *     {@link URL#openConnection() openConnection} method on a URL.
  * <li>The setup parameters and general request properties are manipulated.
  * <li>The actual connection to the remote object is made, using the
- *    {@code connect} method.
+ *    {@link #connect() connect} method.
  * <li>The remote object becomes available. The header fields and the contents
  *     of the remote object can be accessed.
  * </ol>
--- a/jdk/src/java.base/share/classes/java/net/URLPermission.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/URLPermission.java	Thu Aug 24 16:36:25 2017 +0200
@@ -72,22 +72,22 @@
  * 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 class="plain">
+ * <table class="striped">
  * <caption>URL Examples</caption>
  * <thead>
- * <tr><th>Example url</th><th>Description</th></tr>
+ * <tr><th scope="col">Example url</th><th scope="col">Description</th></tr>
  * </thead>
- * <tbody>
- * <tr><td style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</td>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row" style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</th>
  *   <td>A url which identifies a specific (single) resource</td>
  * </tr>
- * <tr><td>http://www.oracle.com/a/b/*</td>
+ * <tr><th scope="row">http://www.oracle.com/a/b/*</th>
  *   <td>The '*' character refers to all resources in the same "directory" - in
  *       other words all resources with the same number of path components, and
  *       which only differ in the final path component, represented by the '*'.
  *   </td>
  * </tr>
- * <tr><td>http://www.oracle.com/a/b/-</td>
+ * <tr><th scope="row">http://www.oracle.com/a/b/-</th>
  *   <td>The '-' character refers to all resources recursively below the
  *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
  *       example).
@@ -114,11 +114,12 @@
  * methods and permitted request headers of the permission (respectively). The two lists
  * are separated by a colon ':' character and elements of each list are comma separated.
  * Some examples are:
- * <pre>
- *         "POST,GET,DELETE"
- *         "GET:X-Foo-Request,X-Bar-Request"
- *         "POST,GET:Header1,Header2"
- * </pre>
+ * <ul>
+ * <li>"POST,GET,DELETE"
+ * <li>"GET:X-Foo-Request,X-Bar-Request"
+ * <li>"POST,GET:Header1,Header2"
+ * </ul>
+ * <p>
  * The first example specifies the methods: POST, GET and DELETE, but no request headers.
  * The second example specifies one request method and two headers. The third
  * example specifies two request methods, and two headers.
@@ -253,16 +254,16 @@
      * <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>
+     * <tr><th scope="col">this's path</th><th scope="col">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>
-     * <tr><td>/a/b/-</td><td>/a/b/c/d</td><td>yes</td></tr>
-     * <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 style="text-align:left">
+     * <tr><th scope="row">/a/b</th><th scope="row">/a/b</th><td>yes</td></tr>
+     * <tr><th scope="row" rowspan="3">/a/b/*</th><th scope="row">/a/b/c</th><td>yes</td></tr>
+     * <tr>  <th scope="row">/a/b/c/d</th><td>no</td></tr>
+     * <tr>  <th scope="row">/a/b/c/-</th><td>no</td></tr>
+     * <tr><th scope="row" rowspan="3">/a/b/-</th><th scope="row">/a/b/c/d</th><td>yes</td></tr>
+     * <tr>  <th scope="row">/a/b/c/d/e</th><td>yes</td></tr>
+     * <tr>  <th scope="row">/a/b/c/*</th><td>yes</td></tr>
      * </tbody>
      * </table>
      */
--- a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html	Thu Aug 24 16:36:25 2017 +0200
@@ -23,7 +23,7 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 -->
-<HTML>
+<HTML lang="EN">
 <HEAD>
 	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
 	<TITLE>Networking Properties</TITLE>
@@ -35,7 +35,7 @@
 java.net package. Some are checked only once at startup of the VM,
 and therefore are best set using the -D option of the java command,
 while others have a more dynamic nature and can also be changed using
-the <a href="../../lang/System.html#setProperty(java.lang.String,%20java.lang.String)">System.setProperty()</a> API.
+the <a href="../../lang/System.html#setProperty-java.lang.String-java.lang.String-">System.setProperty()</a> API.
 The purpose of this document is to list
 and detail all of these properties.</P>
 <P>If there is no special note, a property value is checked every time it is used.</P>
--- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java	Thu Aug 24 16:36:25 2017 +0200
@@ -30,46 +30,50 @@
  *
  * <a id="channels"></a>
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="text-align:left; margin-left:2em">
  *     <caption style="display:none">Lists channels and their descriptions</caption>
- * <tr><th style="text-align:left">Channels</th>
- *     <th style="text-align:left">Description</th></tr>
- * <tr><td style="vertical-align:top"><i>{@link java.nio.channels.Channel}</i></td>
+ * <thead>
+ * <tr><th scope="col">Channels</th>
+ *     <th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row"><i>{@link java.nio.channels.Channel}</i></th>
  *     <td>A nexus for I/O operations</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.channels.ReadableByteChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.channels.ReadableByteChannel}</i></span></th>
  *     <td>Can read into a buffer</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.ScatteringByteChannel}&nbsp;&nbsp;</i></td>
- *     <td>Can read into a sequence of&nbsp;buffers</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.channels.WritableByteChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em"><i>{@link java.nio.channels.ScatteringByteChannel}</i></span></th>
+ *     <td>Can read into a sequence of buffers</td></tr>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.channels.WritableByteChannel}</i></span></th>
  *     <td>Can write from a buffer</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.GatheringByteChannel}</i></td>
- *     <td>Can write from a sequence of&nbsp;buffers</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.channels.ByteChannel}</i></td>
- *     <td>Can read/write to/from a&nbsp;buffer</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.SeekableByteChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em"><i>{@link java.nio.channels.GatheringByteChannel}</i></span></th>
+ *     <td>Can write from a sequence of buffers</td></tr>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.channels.ByteChannel}</i></span></th>
+ *     <td>Can read/write to/from a buffer</td></tr>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em"><i>{@link java.nio.channels.SeekableByteChannel}</i></span></th>
  *     <td>A {@code ByteChannel} connected to an entity that contains a variable-length
  *         sequence of bytes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.channels.AsynchronousChannel}</i></span></th>
  *     <td>Supports asynchronous I/O operations.</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.AsynchronousByteChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em"><i>{@link java.nio.channels.AsynchronousByteChannel}</i></span></th>
  *     <td>Can read and write bytes asynchronously</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.channels.NetworkChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.channels.NetworkChannel}</i></span></th>
  *     <td>A channel to a network socket</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;<i>{@link java.nio.channels.MulticastChannel}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em"><i>{@link java.nio.channels.MulticastChannel}</i></span></th>
  *     <td>Can join Internet Protocol (IP) multicast groups</td></tr>
- * <tr><td style="vertical-align:top">{@link java.nio.channels.Channels}</td>
+ * <tr><th scope="row">{@link java.nio.channels.Channels}</th>
  *     <td>Utility methods for channel/stream interoperation</td></tr>
- * </table></blockquote>
+ * </tbody>
+ * </table>
  *
  * <p> A <i>channel</i> represents an open connection to an entity such as a
  * hardware device, a file, a network socket, or a program component that is
@@ -122,21 +126,25 @@
  * be constructed that uses a given charset to encode characters into bytes and
  * write them to a given writable byte channel.
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em; text-align:left">
  *     <caption style="display:none">
  *         Lists file channels and their descriptions</caption>
- * <tr><th style="text-align:left">File channels</th>
- *     <th style="text-align:left">Description</th></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.FileChannel}</td>
+ * <thead>
+ * <tr><th scope="col">File channels</th>
+ *     <th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.FileChannel}</th>
  *     <td>Reads, writes, maps, and manipulates files</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.FileLock}</td>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.FileLock}</th>
  *     <td>A lock on a (region of a) file</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
- *     <td>A direct byte buffer mapped to a region of a&nbsp;file</td></tr>
- * </table></blockquote>
+ * <tr><th scope="row">
+ *     {@link java.nio.MappedByteBuffer}</th>
+ *     <td>A direct byte buffer mapped to a region of a file</td></tr>
+ * </tbody>
+ * </table>
  *
  * <p> The {@link java.nio.channels.FileChannel} class supports the usual
  * operations of reading bytes from, and writing bytes to, a channel connected to
@@ -156,36 +164,40 @@
  * class.
  *
  * <a id="multiplex"></a>
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em; text-align:left">
  *     <caption style="display:none">
  *         Lists multiplexed, non-blocking channels and their descriptions</caption>
- * <tr><th style="text-align:left">Multiplexed, non-blocking I/O</th>
- *     <th style="text-align:left">Description</th></tr>
- * <tr><td style="vertical-align:top">{@link java.nio.channels.SelectableChannel}</td>
+ * <thead>
+ * <tr><th scope="col">Multiplexed, non-blocking I/O</th>
+ *     <th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row">{@link java.nio.channels.SelectableChannel}</th>
  *     <td>A channel that can be multiplexed</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;{@link java.nio.channels.DatagramChannel}</td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">{@link java.nio.channels.DatagramChannel}</span></th>
  *     <td>A channel to a datagram-oriented socket</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;{@link java.nio.channels.Pipe.SinkChannel}</td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">{@link java.nio.channels.Pipe.SinkChannel}</span></th>
  *     <td>The write end of a pipe</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;{@link java.nio.channels.Pipe.SourceChannel}</td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">{@link java.nio.channels.Pipe.SourceChannel}</span></th>
  *     <td>The read end of a pipe</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;{@link java.nio.channels.ServerSocketChannel}&nbsp;&nbsp;</td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">{@link java.nio.channels.ServerSocketChannel}</span></th>
  *     <td>A channel to a stream-oriented listening socket</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;{@link java.nio.channels.SocketChannel}</td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">{@link java.nio.channels.SocketChannel}</span></th>
  *     <td>A channel for a stream-oriented connecting socket</td></tr>
- * <tr><td style="vertical-align:top">{@link java.nio.channels.Selector}</td>
+ * <tr><th scope="row">{@link java.nio.channels.Selector}</th>
  *     <td>A multiplexor of selectable channels</td></tr>
- * <tr><td style="vertical-align:top">{@link java.nio.channels.SelectionKey}</td>
- *     <td>A token representing the registration <br> of a channel
- *     with&nbsp;a&nbsp;selector</td></tr>
- * <tr><td style="vertical-align:top">{@link java.nio.channels.Pipe}</td>
- *     <td>Two channels that form a unidirectional&nbsp;pipe</td></tr>
- * </table></blockquote>
+ * <tr><th scope="row">{@link java.nio.channels.SelectionKey}</th>
+ *     <td>A token representing the registration of a channel
+ *     with a selector</td></tr>
+ * <tr><th scope="row">{@link java.nio.channels.Pipe}</th>
+ *     <td>Two channels that form a unidirectional pipe</td></tr>
+ * </tbody>
+ * </table>
  *
  * <p> Multiplexed, non-blocking I/O, which is much more scalable than
  * thread-oriented, blocking I/O, is provided by <i>selectors</i>, <i>selectable
@@ -251,27 +263,31 @@
  *
  * <a id="async"></a>
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="padding-left:2em; text-align:left">
  *     <caption style="display:none">
  *         Lists asynchronous channels and their descriptions</caption>
- * <tr><th style="text-align:left">
- *     Asynchronous I/O</th><th style="text-align:left">Description</th></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.AsynchronousFileChannel}</td>
+ * <thead>
+ * <tr><th scope="col">Asynchronous I/O</th>
+ *     <th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.AsynchronousFileChannel}</th>
  *     <td>An asynchronous channel for reading, writing, and manipulating a file</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.AsynchronousSocketChannel}</td>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.AsynchronousSocketChannel}</th>
  *     <td>An asynchronous channel to a stream-oriented connecting socket</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.AsynchronousServerSocketChannel}&nbsp;&nbsp;</td>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.AsynchronousServerSocketChannel}</th>
  *     <td>An asynchronous channel to a stream-oriented listening socket</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.CompletionHandler}</td>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.CompletionHandler}</th>
  *     <td>A handler for consuming the result of an asynchronous operation</td></tr>
- * <tr><td style="vertical-align:top">
- *     {@link java.nio.channels.AsynchronousChannelGroup}</td>
+ * <tr><th scope="row">
+ *     {@link java.nio.channels.AsynchronousChannelGroup}</th>
  *     <td>A grouping of asynchronous channels for the purpose of resource sharing</td></tr>
- * </table></blockquote>
+ * </tbody>
+ * </table>
  *
  * <p> {@link java.nio.channels.AsynchronousChannel Asynchronous channels} are a
  * special type of channel capable of asynchronous I/O operations. Asynchronous
--- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,22 +27,25 @@
  * Defines charsets, decoders, and encoders, for translating between
  * bytes and Unicode characters.
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em; text-align:left">
  *     <caption style="display:none">Summary of charsets, decoders, and encoders in this package</caption>
- *  <tr><th style="text-align:left">Class name</th>
- *      <th style="text-align:left"><th>DescriptiPath
- *   <tr><td style="vertical-align:top">{@link java.nio.charset.Charset}</td>
- *       <td>A named mapping between characters<br>and bytes</td></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetDecoder}</td>
+ *  <thead>
+ *  <tr><th scope="col">Class name</th>
+ *      <th scope="col">Description
+ *  </thead>
+ *  <tbody>
+ *   <tr><th scope="row">{@link java.nio.charset.Charset}</th>
+ *       <td>A named mapping between characters and bytes</td></tr>
+ *   <tr><th scope="row">{@link java.nio.charset.CharsetDecoder}</th>
  *       <td>Decodes bytes into characters</td></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.charset.CharsetEncoder}</td>
+ *   <tr><th scope="row">{@link java.nio.charset.CharsetEncoder}</th>
  *       <td>Encodes characters into bytes</td></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.charset.CoderResult}</td>
+ *   <tr><th scope="row">{@link java.nio.charset.CoderResult}</th>
  *       <td>Describes coder results</td></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.charset.CodingErrorAction}</td>
- *       <td>Describes actions to take when<br>coding errors are detected</td></tr>
- *
- * </table></blockquote>
+ *   <tr><th scope="row">{@link java.nio.charset.CodingErrorAction}</th>
+ *       <td>Describes actions to take when coding errors are detected</td></tr>
+ * </tbody>
+ * </table>
  *
  * <p> A <i>charset</i> is named mapping between sequences of
  * sixteen-bit Unicode characters and sequences of bytes, in the sense
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystem.java	Thu Aug 24 16:36:25 2017 +0200
@@ -314,45 +314,49 @@
      * representation of the path is matched using a limited pattern language
      * that resembles regular expressions but with a simpler syntax. For example:
      *
-     * <blockquote>
-     * <table class="borderless">
+     * <table class="striped" style="text-align:left; margin-left:2em">
      * <caption style="display:none">Pattern Language</caption>
+     * <thead>
+     * <tr>
+     *   <th scope="col">Example
+     *   <th scope="col">Description
+     * </tr>
+     * </thead>
      * <tbody>
      * <tr>
-     *   <td>{@code *.java}</td>
+     *   <th scope="row">{@code *.java}</th>
      *   <td>Matches a path that represents a file name ending in {@code .java}</td>
      * </tr>
      * <tr>
-     *   <td>{@code *.*}</td>
+     *   <th scope="row">{@code *.*}</th>
      *   <td>Matches file names containing a dot</td>
      * </tr>
      * <tr>
-     *   <td>{@code *.{java,class}}</td>
+     *   <th scope="row">{@code *.{java,class}}</th>
      *   <td>Matches file names ending with {@code .java} or {@code .class}</td>
      * </tr>
      * <tr>
-     *   <td>{@code foo.?}</td>
+     *   <th scope="row">{@code foo.?}</th>
      *   <td>Matches file names starting with {@code foo.} and a single
      *   character extension</td>
      * </tr>
      * <tr>
-     *   <td><code>&#47;home&#47;*&#47;*</code>
+     *   <th scope="row"><code>&#47;home&#47;*&#47;*</code>
      *   <td>Matches <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
      * </tr>
      * <tr>
-     *   <td><code>&#47;home&#47;**</code>
+     *   <th scope="row"><code>&#47;home&#47;**</code>
      *   <td>Matches <code>&#47;home&#47;gus</code> and
      *   <code>&#47;home&#47;gus&#47;data</code> on UNIX platforms</td>
      * </tr>
      * <tr>
-     *   <td><code>C:&#92;&#92;*</code>
+     *   <th scope="row"><code>C:&#92;&#92;*</code>
      *   <td>Matches <code>C:&#92;foo</code> and <code>C:&#92;bar</code> on the Windows
      *   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>
      *
      * <p> The following rules are used to interpret glob patterns:
      *
--- a/jdk/src/java.base/share/classes/java/nio/file/Files.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/file/Files.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1923,30 +1923,33 @@
      * <p> The following examples demonstrate possible values for the {@code
      * attributes} parameter:
      *
-     * <blockquote>
-     * <table class="borderless">
+     * <table class="striped" style="text-align: left; margin-left:2em">
      * <caption style="display:none">Possible values</caption>
+     * <thead>
+     * <tr>
+     *  <th scope="col">Example
+     *  <th scope="col">Description
+     * </thead>
      * <tbody>
      * <tr>
-     *   <td> {@code "*"} </td>
+     *   <th scope="row"> {@code "*"} </th>
      *   <td> Read all {@link BasicFileAttributes basic-file-attributes}. </td>
      * </tr>
      * <tr>
-     *   <td> {@code "size,lastModifiedTime,lastAccessTime"} </td>
+     *   <th scope="row"> {@code "size,lastModifiedTime,lastAccessTime"} </th>
      *   <td> Reads the file size, last modified time, and last access time
      *     attributes. </td>
      * </tr>
      * <tr>
-     *   <td> {@code "posix:*"} </td>
+     *   <th scope="row"> {@code "posix:*"} </th>
      *   <td> Read all {@link PosixFileAttributes POSIX-file-attributes}. </td>
      * </tr>
      * <tr>
-     *   <td> {@code "posix:permissions,owner,size"} </td>
+     *   <th scope="row"> {@code "posix:permissions,owner,size"} </th>
      *   <td> Reads the POSIX file permissions, owner, and file size. </td>
      * </tr>
      * </tbody>
      * </table>
-     * </blockquote>
      *
      * <p> The {@code options} array may be used to indicate how symbolic links
      * are handled for the case that the file is a symbolic link. By default,
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -26,43 +26,47 @@
 /**
  * Interfaces and classes providing access to file and file system attributes.
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="padding-left:2em; text-align:left">
  *     <caption style="display:none">Attribute views</caption>
- * <tr><th style="text-align:left">Attribute views</th>
- *     <th style="text-align:left">Description</th></tr>
- * <tr><td><i>{@link java.nio.file.attribute.AttributeView}</i></td>
+ * <thead>
+ * <tr><th scope="col">Attribute views</th>
+ *     <th scope="col">Description</th></tr>
+ * </thead>
+ * <tbody>
+ * <tr><th scope="row"><i>{@link java.nio.file.attribute.AttributeView}</i></th>
  *     <td>Can read or update non-opaque values associated with objects in a file system</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileAttributeView}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileAttributeView}</i></span></th>
  *     <td>Can read or update file attributes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.BasicFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">
+ *     <i>{@link java.nio.file.attribute.BasicFileAttributeView}</i></span></th>
  *     <td>Can read or update a basic set of file attributes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.PosixFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:3em">
+ *     <i>{@link java.nio.file.attribute.PosixFileAttributeView}</i></span></th>
  *     <td>Can read or update POSIX defined file attributes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.DosFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:3em">
+ *     <i>{@link java.nio.file.attribute.DosFileAttributeView}</i></span></th>
  *     <td>Can read or update FAT file attributes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.FileOwnerAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">
+ *     <i>{@link java.nio.file.attribute.FileOwnerAttributeView}</i></span></th>
  *     <td>Can read or update the owner of a file</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.AclFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:3em">
+ *     <i>{@link java.nio.file.attribute.AclFileAttributeView}</i></span></th>
  *     <td>Can read or update Access Control Lists</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;&nbsp;&nbsp;
- *     <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}&nbsp;&nbsp;</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:2em">
+ *     <i>{@link java.nio.file.attribute.UserDefinedFileAttributeView}</i></span></th>
  *     <td>Can read or update user-defined file attributes</td></tr>
- * <tr><td style="vertical-align:top">
- *     &nbsp;&nbsp;<i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></td>
+ * <tr><th scope="row">
+ *     <span style="padding-left:1em"><i>{@link java.nio.file.attribute.FileStoreAttributeView}</i></span></th>
  *     <td>Can read or update file system attributes</td></tr>
- * </table></blockquote>
+ * </tbody>
+ * </table>
  *
  * <p> An attribute view provides a read-only or updatable view of the non-opaque
  * values, or <em>metadata</em>, associated with objects in a file system.
--- a/jdk/src/java.base/share/classes/java/nio/package-info.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/nio/package-info.java	Thu Aug 24 16:36:25 2017 +0200
@@ -48,7 +48,7 @@
  *   <li><p> <i>Selectors</i> and <i>selection keys</i>, which
  *   together with <br> <i>selectable channels</i> define a <a
  *   href="channels/package-summary.html#multiplex">multiplexed,
- *   non-blocking <br> I/O</a>&nbsp;facility.  </p></li>
+ *   non-blocking <br> I/O</a> facility.  </p></li>
  *
  *  </ul>
  *
@@ -62,33 +62,44 @@
  *
  * <a id="buffers"> </a>
  *
- * <blockquote><table class="borderless">
+ * <table class="striped" style="margin-left:2em; text-align:left">
  *     <caption style="display:none">Description of the various buffers</caption>
- *   <tr><th style="text-align:left">Buffers</th>
- *       <th style="text-align:left">Description</th></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.Buffer}</td>
+ *   <thead>
+ *   <tr><th scope="col">Buffers</th>
+ *       <th scope="col">Description</th></tr>
+ *   </thead>
+ *   <tbody>
+ *   <tr><th scope="row">{@link java.nio.Buffer}</th>
  *       <td>Position, limit, and capacity;
- *           <br>clear, flip, rewind, and mark/reset</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ByteBuffer}</td>
- *       <td>Get/put, compact, views; allocate,&nbsp;wrap</td></tr>
- *   <tr><td style="vertical-align:top">
- *       &nbsp;&nbsp;&nbsp;&nbsp;{@link java.nio.MappedByteBuffer}&nbsp;&nbsp;</td>
+ *           clear, flip, rewind, and mark/reset</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.ByteBuffer}</span></th>
+ *       <td>Get/put, compact, views; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:2em">{@link java.nio.MappedByteBuffer}</span></th>
  *       <td>A byte buffer mapped to a file</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.CharBuffer}</td>
- *       <td>Get/put, compact; allocate,&nbsp;wrap</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.DoubleBuffer}</td>
- *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.FloatBuffer}</td>
- *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.IntBuffer}</td>
- *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.LongBuffer}</td>
- *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td style="vertical-align:top">&nbsp;&nbsp;{@link java.nio.ShortBuffer}</td>
- *       <td>&nbsp;&nbsp;&nbsp;&nbsp;'&nbsp;'</td></tr>
- *   <tr><td style="vertical-align:top">{@link java.nio.ByteOrder}</td>
- *       <td>Typesafe enumeration for&nbsp;byte&nbsp;orders</td></tr>
- * </table></blockquote>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.CharBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.DoubleBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.FloatBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.IntBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.LongBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">
+ *         <span style="padding-left:1em">{@link java.nio.ShortBuffer}</span></th>
+ *       <td>Get/put, compact; allocate, wrap</td></tr>
+ *   <tr><th scope="row">{@link java.nio.ByteOrder}</th>
+ *       <td>Typesafe enumeration for byte orders</td></tr>
+ * </tbody>
+ * </table>
  *
  * <p> A <i>buffer</i> is a container for a fixed amount of data of a
  * specific primitive type.  In addition to its content a buffer has a
--- a/jdk/src/java.base/share/classes/java/security/DrbgParameters.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/security/DrbgParameters.java	Thu Aug 24 16:36:25 2017 +0200
@@ -263,18 +263,18 @@
      * Capability effective = ((DrbgParametes.Initiate) s.getParameters())
      *         .getCapability();</pre>
      * </blockquote>
-     * <table class="plain">
+     * <table class="striped">
      * <caption style="display:none">requested and effective capabilities</caption>
      * <thead>
      * <tr>
-     * <th>Requested Value</th>
-     * <th>Possible Effective Values</th>
+     * <th scope="col">Requested Value</th>
+     * <th scope="col">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 style="text-align:left">
+     * <tr><th scope="row">NONE</th><td>NONE, RESEED_ONLY, PR_AND_RESEED</td></tr>
+     * <tr><th scope="row">RESEED_ONLY</th><td>RESEED_ONLY, PR_AND_RESEED</td></tr>
+     * <tr><th scope="row">PR_AND_RESEED</th><td>PR_AND_RESEED</td></tr>
      * </tbody>
      * </table>
      * <p>
--- a/jdk/src/java.base/share/classes/java/security/Provider.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java	Thu Aug 24 16:36:25 2017 +0200
@@ -61,19 +61,19 @@
  * 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 class="plain">
+ * <table class="striped">
  * <caption><b>Attributes Automatically Placed in a Provider Object</b></caption>
  * <thead>
- * <tr><th>Name</th><th>Value</th>
+ * <tr><th scope="col">Name</th><th scope="col">Value</th>
  * </thead>
- * <tbody>
- * <tr><td>{@code Provider.id name}</td>
+ * <tbody style="text-align:left">
+ * <tr><th scope="row">{@code Provider.id name}</th>
  *     <td>{@code String.valueOf(provider.getName())}</td>
- * <tr><td>{@code Provider.id version}</td>
+ * <tr><th scope="row">{@code Provider.id version}</th>
  *     <td>{@code String.valueOf(provider.getVersionStr())}</td>
- * <tr><td>{@code Provider.id info}</td>
+ * <tr><th scope="row">{@code Provider.id info}</th>
  *     <td>{@code String.valueOf(provider.getInfo())}</td>
- * <tr><td>{@code Provider.id className}</td>
+ * <tr><th scope="row">{@code Provider.id className}</th>
  *     <td>{@code provider.getClass().getName()}</td>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java	Thu Aug 24 16:36:25 2017 +0200
@@ -153,33 +153,33 @@
      * by periods.
      *
      * <p>For example:<br>
-     * <table class="plain">
+     * <table class="striped">
      * <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>
+     * <th scope="col">OID <em>(Object Identifier)</em></th>
+     * <th scope="col">Extension Name</th></tr>
      * </thead>
-     * <tbody>
-     * <tr><td>2.5.29.14</td>
+     * <tbody style="text-align:left">
+     * <tr><th scope="row">2.5.29.14</th>
      * <td>SubjectKeyIdentifier</td></tr>
-     * <tr><td>2.5.29.15</td>
+     * <tr><th scope="row">2.5.29.15</th>
      * <td>KeyUsage</td></tr>
-     * <tr><td>2.5.29.16</td>
+     * <tr><th scope="row">2.5.29.16</th>
      * <td>PrivateKeyUsage</td></tr>
-     * <tr><td>2.5.29.17</td>
+     * <tr><th scope="row">2.5.29.17</th>
      * <td>SubjectAlternativeName</td></tr>
-     * <tr><td>2.5.29.18</td>
+     * <tr><th scope="row">2.5.29.18</th>
      * <td>IssuerAlternativeName</td></tr>
-     * <tr><td>2.5.29.19</td>
+     * <tr><th scope="row">2.5.29.19</th>
      * <td>BasicConstraints</td></tr>
-     * <tr><td>2.5.29.30</td>
+     * <tr><th scope="row">2.5.29.30</th>
      * <td>NameConstraints</td></tr>
-     * <tr><td>2.5.29.33</td>
+     * <tr><th scope="row">2.5.29.33</th>
      * <td>PolicyMappings</td></tr>
-     * <tr><td>2.5.29.35</td>
+     * <tr><th scope="row">2.5.29.35</th>
      * <td>AuthorityKeyIdentifier</td></tr>
-     * <tr><td>2.5.29.36</td>
+     * <tr><th scope="row">2.5.29.36</th>
      * <td>PolicyConstraints</td></tr>
      * </tbody>
      * </table>
--- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java	Thu Aug 24 16:36:25 2017 +0200
@@ -150,73 +150,73 @@
  * <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
+ *       <th scope="col" class="TableHeadingColor">FormatType
+ *       <th scope="col" class="TableHeadingColor">FormatStyle
+ *       <th scope="col" class="TableHeadingColor">Subformat Created
  * </thead>
  * <tbody>
  *    <tr>
- *       <td headers="ft"><i>(none)</i>
- *       <td headers="fs"><i>(none)</i>
- *       <td headers="sc"><code>null</code>
+ *       <th scope="row" style="text-weight: normal"><i>(none)</i>
+ *       <th scope="row" style="text-weight: normal"><i>(none)</i>
+ *       <td>{@code null}
  *    <tr>
- *       <td headers="ft" rowspan=5><code>number</code>
- *       <td headers="fs"><i>(none)</i>
- *       <td headers="sc">{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())}
+ *       <th scope="row" style="text-weight: normal" rowspan=5>{@code number}
+ *       <th scope="row" style="text-weight: normal"><i>(none)</i>
+ *       <td>{@link NumberFormat#getInstance(Locale) NumberFormat.getInstance}{@code (getLocale())}
  *    <tr>
- *       <td headers="fs"><code>integer</code>
- *       <td headers="sc">{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code integer}
+ *       <td>{@link NumberFormat#getIntegerInstance(Locale) NumberFormat.getIntegerInstance}{@code (getLocale())}
  *    <tr>
- *       <td headers="fs"><code>currency</code>
- *       <td headers="sc">{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code currency}
+ *       <td>{@link NumberFormat#getCurrencyInstance(Locale) NumberFormat.getCurrencyInstance}{@code (getLocale())}
  *    <tr>
- *       <td headers="fs"><code>percent</code>
- *       <td headers="sc">{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code percent}
+ *       <td>{@link NumberFormat#getPercentInstance(Locale) NumberFormat.getPercentInstance}{@code (getLocale())}
  *    <tr>
- *       <td headers="fs"><i>SubformatPattern</i>
- *       <td headers="sc">{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))}
+ *       <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
+ *       <td>{@code new} {@link DecimalFormat#DecimalFormat(String,DecimalFormatSymbols) DecimalFormat}{@code (subformatPattern,} {@link DecimalFormatSymbols#getInstance(Locale) DecimalFormatSymbols.getInstance}{@code (getLocale()))}
  *    <tr>
- *       <td headers="ft" rowspan=6><code>date</code>
- *       <td headers="fs"><i>(none)</i>
- *       <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal" rowspan=6>{@code date}
+ *       <th scope="row" style="text-weight: normal"><i>(none)</i>
+ *       <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>short</code>
- *       <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code short}
+ *       <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>medium</code>
- *       <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code medium}
+ *       <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>long</code>
- *       <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code long}
+ *       <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>full</code>
- *       <td headers="sc">{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code full}
+ *       <td>{@link DateFormat#getDateInstance(int,Locale) DateFormat.getDateInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><i>SubformatPattern</i>
- *       <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
+ *       <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
+ *       <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
  *    <tr>
- *       <td headers="ft" rowspan=6><code>time</code>
- *       <td headers="fs"><i>(none)</i>
- *       <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal" rowspan=6>{@code time}
+ *       <th scope="row" style="text-weight: normal"><i>(none)</i>
+ *       <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>short</code>
- *       <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code short}
+ *       <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#SHORT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>medium</code>
- *       <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code medium}
+ *       <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#DEFAULT}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>long</code>
- *       <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code long}
+ *       <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#LONG}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><code>full</code>
- *       <td headers="sc">{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
+ *       <th scope="row" style="text-weight: normal">{@code full}
+ *       <td>{@link DateFormat#getTimeInstance(int,Locale) DateFormat.getTimeInstance}{@code (}{@link DateFormat#FULL}{@code , getLocale())}
  *    <tr>
- *       <td headers="fs"><i>SubformatPattern</i>
- *       <td headers="sc">{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
+ *       <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
+ *       <td>{@code new} {@link SimpleDateFormat#SimpleDateFormat(String,Locale) SimpleDateFormat}{@code (subformatPattern, getLocale())}
  *    <tr>
- *       <td headers="ft"><code>choice</code>
- *       <td headers="fs"><i>SubformatPattern</i>
- *       <td headers="sc">{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
+ *       <th scope="row" style="text-weight: normal">{@code choice}
+ *       <th scope="row" style="text-weight: normal"><i>SubformatPattern</i>
+ *       <td>{@code new} {@link ChoiceFormat#ChoiceFormat(String) ChoiceFormat}{@code (subformatPattern)}
  * </tbody>
  * </table>
  *
@@ -776,44 +776,40 @@
      * <caption style="display:none">Examples of subformat,argument,and formatted text</caption>
      * <thead>
      *    <tr>
-     *       <th>Subformat
-     *       <th>Argument
-     *       <th>Formatted Text
+     *       <th scope="col">Subformat
+     *       <th scope="col">Argument
+     *       <th scope="col">Formatted Text
      * </thead>
      * <tbody>
      *    <tr>
-     *       <td><i>any</i>
-     *       <td><i>unavailable</i>
+     *       <th scope="row" style="text-weight-normal" rowspan=2><i>any</i>
+     *       <th scope="row" style="text-weight-normal"><i>unavailable</i>
      *       <td><code>"{" + argumentIndex + "}"</code>
      *    <tr>
-     *       <td><i>any</i>
-     *       <td><code>null</code>
+     *       <th scope="row" style="text-weight-normal"><code>null</code>
      *       <td><code>"null"</code>
      *    <tr>
-     *       <td><code>instanceof ChoiceFormat</code>
-     *       <td><i>any</i>
+     *       <th scope="row" style="text-weight-normal"><code>instanceof ChoiceFormat</code>
+     *       <th scope="row" style="text-weight-normal"><i>any</i>
      *       <td><code>subformat.format(argument).indexOf('{') &gt;= 0 ?<br>
      *           (new MessageFormat(subformat.format(argument), getLocale())).format(argument) :
      *           subformat.format(argument)</code>
      *    <tr>
-     *       <td><code>!= null</code>
-     *       <td><i>any</i>
+     *       <th scope="row" style="text-weight-normal"><code>!= null</code>
+     *       <th scope="row" style="text-weight-normal"><i>any</i>
      *       <td><code>subformat.format(argument)</code>
      *    <tr>
-     *       <td><code>null</code>
-     *       <td><code>instanceof Number</code>
+     *       <th scope="row" style="text-weight-normal" rowspan=4><code>null</code>
+     *       <th scope="row" style="text-weight-normal"><code>instanceof Number</code>
      *       <td><code>NumberFormat.getInstance(getLocale()).format(argument)</code>
      *    <tr>
-     *       <td><code>null</code>
-     *       <td><code>instanceof Date</code>
+     *       <th scope="row" style="text-weight-normal"><code>instanceof Date</code>
      *       <td><code>DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, getLocale()).format(argument)</code>
      *    <tr>
-     *       <td><code>null</code>
-     *       <td><code>instanceof String</code>
+     *       <th scope="row" style="text-weight-normal"><code>instanceof String</code>
      *       <td><code>argument</code>
      *    <tr>
-     *       <td><code>null</code>
-     *       <td><i>any</i>
+     *       <th scope="row" style="text-weight-normal"><i>any</i>
      *       <td><code>argument.toString()</code>
      * </tbody>
      * </table>
--- a/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/chrono/HijrahChronology.java	Thu Aug 24 16:36:25 2017 +0200
@@ -103,19 +103,19 @@
  *
  * <p>
  * CLDR and LDML identify variants:
- * <table class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption style="display:none">Variants of Hijrah Calendars</caption>
  * <thead>
  * <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>
+ * <th scope="col">Chronology ID</th>
+ * <th scope="col">Calendar Type</th>
+ * <th scope="col">Locale extension, see {@link java.util.Locale}</th>
+ * <th scope="col">Description</th>
  * </tr>
  * </thead>
  * <tbody>
  * <tr>
- * <td>Hijrah-umalqura</td>
+ * <th scope="row">Hijrah-umalqura</th>
  * <td>islamic-umalqura</td>
  * <td>ca-islamic-umalqura</td>
  * <td>Islamic - Umm Al-Qura calendar of Saudi Arabia</td>
@@ -148,38 +148,38 @@
  * <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 class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption style="display:none">Configuration of Hijrah Calendar</caption>
  * <thead>
  * <tr>
- * <th style="text-align:left" > Property Name</th>
- * <th style="text-align:left" > Property value</th>
- * <th style="text-align:left" > Description </th>
+ * <th scope="col">Property Name</th>
+ * <th scope="col">Property value</th>
+ * <th scope="col">Description</th>
  * </tr>
  * </thead>
  * <tbody>
  * <tr>
- * <td>id</td>
+ * <th scope="row">id</th>
  * <td>Chronology Id, for example, "Hijrah-umalqura"</td>
  * <td>The Id of the calendar in common usage</td>
  * </tr>
  * <tr>
- * <td>type</td>
+ * <th scope="row">type</th>
  * <td>Calendar type, for example, "islamic-umalqura"</td>
  * <td>LDML defines the calendar types</td>
  * </tr>
  * <tr>
- * <td>version</td>
+ * <th scope="row">version</th>
  * <td>Version, for example: "1.8.0_1"</td>
  * <td>The version of the Hijrah variant data</td>
  * </tr>
  * <tr>
- * <td>iso-start</td>
+ * <th scope="row">iso-start</th>
  * <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>
- * <td>yyyy - a numeric 4 digit year, for example "1434"</td>
+ * <th scope="row">yyyy - a numeric 4 digit year, for example "1434"</th>
  * <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>
  * <td>The lengths of the 12 months of the year separated by whitespace.
--- a/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/chrono/IsoEra.java	Thu Aug 24 16:36:25 2017 +0200
@@ -70,27 +70,27 @@
  * 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 class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption style="display:none">ISO years and eras</caption>
  * <thead>
  * <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 scope="col">year-of-era</th>
+ * <th scope="col">era</th>
+ * <th scope="col">proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
  * <tr>
- * <td>2</td><td>CE</td><td>2</td>
+ * <td>2</td><td>CE</td><th scope="row">2</th>
  * </tr>
  * <tr>
- * <td>1</td><td>CE</td><td>1</td>
+ * <td>1</td><td>CE</td><th scope="row">1</th>
  * </tr>
  * <tr>
- * <td>1</td><td>BCE</td><td>0</td>
+ * <td>1</td><td>BCE</td><th scope="row">0</th>
  * </tr>
  * <tr>
- * <td>2</td><td>BCE</td><td>-1</td>
+ * <td>2</td><td>BCE</td><th scope="row">-1</th>
  * </tr>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/chrono/MinguoEra.java	Thu Aug 24 16:36:25 2017 +0200
@@ -71,28 +71,28 @@
  * 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 class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption style="display:none">Minguo years and eras</caption>
  * <thead>
  * <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>
+ * <th>year-of-era</th>
+ * <th>era</th>
+ * <th>proleptic-year</th>
+ * <th>ISO proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
  * <tr>
- * <td>2</td><td>ROC</td><td>2</td><td>1913</td>
+ * <td>2</td><td>ROC</td><th scope="row">2</th><td>1913</td>
  * </tr>
  * <tr>
- * <td>1</td><td>ROC</td><td>1</td><td>1912</td>
+ * <td>1</td><td>ROC</td><th scope="row">1</th><td>1912</td>
  * </tr>
  * <tr>
- * <td>1</td><td>BEFORE_ROC</td><td>0</td><td>1911</td>
+ * <td>1</td><td>BEFORE_ROC</td><th scope="row">0</th><td>1911</td>
  * </tr>
  * <tr>
- * <td>2</td><td>BEFORE_ROC</td><td>-1</td><td>1910</td>
+ * <td>2</td><td>BEFORE_ROC</td><th scope="row">-1</th><td>1910</td>
  * </tr>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/chrono/ThaiBuddhistEra.java	Thu Aug 24 16:36:25 2017 +0200
@@ -71,28 +71,28 @@
  * 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 class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption style="display:none">Buddhist years and eras</caption>
  * <thead>
  * <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>
+ * <th scope="col">year-of-era</th>
+ * <th scope="col">era</th>
+ * <th scope="col">proleptic-year</th>
+ * <th scope="col">ISO proleptic-year</th>
  * </tr>
  * </thead>
  * <tbody>
  * <tr>
- * <td>2</td><td>BE</td><td>2</td><td>-542</td>
+ * <td>2</td><td>BE</td><th scope="row">2</th><td>-542</td>
  * </tr>
  * <tr>
- * <td>1</td><td>BE</td><td>1</td><td>-543</td>
+ * <td>1</td><td>BE</td><th scope="row">1</th><td>-543</td>
  * </tr>
  * <tr>
- * <td>1</td><td>BEFORE_BE</td><td>0</td><td>-544</td>
+ * <td>1</td><td>BEFORE_BE</td><th scope="row">0</th><td>-544</td>
  * </tr>
  * <tr>
- * <td>2</td><td>BEFORE_BE</td><td>-1</td><td>-545</td>
+ * <td>2</td><td>BEFORE_BE</td><th scope="row">-1</th><td>-545</td>
  * </tr>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Thu Aug 24 16:36:25 2017 +0200
@@ -150,13 +150,13 @@
  * implementation of {@code java.text.Format}.
  *
  * <h3 id="predefined">Predefined Formatters</h3>
- * <table class="striped">
+ * <table class="striped" style="text-align:left">
  * <caption>Predefined Formatters</caption>
  * <thead>
  * <tr>
- * <th scope="col" style="text-align:left">Formatter</th>
- * <th scope="col" style="text-align:left">Description</th>
- * <th scope="col" style="text-align:left">Example</th>
+ * <th scope="col">Formatter</th>
+ * <th scope="col">Description</th>
+ * <th scope="col">Example</th>
  * </tr>
  * </thead>
  * <tbody>
@@ -276,56 +276,60 @@
  * <p>
  * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
  * following pattern letters are defined:
- * <pre>
- *  Symbol  Meaning                     Presentation      Examples
- *  ------  -------                     ------------      -------
- *   G       era                         text              AD; Anno Domini; A
- *   u       year                        year              2004; 04
- *   y       year-of-era                 year              2004; 04
- *   D       day-of-year                 number            189
- *   M/L     month-of-year               number/text       7; 07; Jul; July; J
- *   d       day-of-month                number            10
- *   g       modified-julian-day         number            2451334
+ * <table class="striped">
+ * <caption>Pattern Letters and Symbols</caption>
+ * <thead>
+ *  <tr><th scope="col">Symbol</th>   <th scope="col">Meaning</th>         <th scope="col">Presentation</th> <th scope="col">Examples</th>
+ * </thead>
+ * <tbody>
+ *   <tr><th scope="row">G</th>       <td>era</td>                         <td>text</td>              <td>AD; Anno Domini; A</td>
+ *   <tr><th scope="row">u</th>       <td>year</td>                        <td>year</td>              <td>2004; 04</td>
+ *   <tr><th scope="row">y</th>       <td>year-of-era</td>                 <td>year</td>              <td>2004; 04</td>
+ *   <tr><th scope="row">D</th>       <td>day-of-year</td>                 <td>number</td>            <td>189</td>
+ *   <tr><th scope="row">M/L</th>     <td>month-of-year</td>               <td>number/text</td>       <td>7; 07; Jul; July; J</td>
+ *   <tr><th scope="row">d</th>       <td>day-of-month</td>                <td>number</td>            <td>10</td>
+ *   <tr><th scope="row">g</th>       <td>modified-julian-day</td>         <td>number</td>            <td>2451334</td>
  *
- *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
- *   Y       week-based-year             year              1996; 96
- *   w       week-of-week-based-year     number            27
- *   W       week-of-month               number            4
- *   E       day-of-week                 text              Tue; Tuesday; T
- *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
- *   F       day-of-week-in-month        number            3
+ *   <tr><th scope="row">Q/q</th>     <td>quarter-of-year</td>             <td>number/text</td>       <td>3; 03; Q3; 3rd quarter</td>
+ *   <tr><th scope="row">Y</th>       <td>week-based-year</td>             <td>year</td>              <td>1996; 96</td>
+ *   <tr><th scope="row">w</th>       <td>week-of-week-based-year</td>     <td>number</td>            <td>27</td>
+ *   <tr><th scope="row">W</th>       <td>week-of-month</td>               <td>number</td>            <td>4</td>
+ *   <tr><th scope="row">E</th>       <td>day-of-week</td>                 <td>text</td>              <td>Tue; Tuesday; T</td>
+ *   <tr><th scope="row">e/c</th>     <td>localized day-of-week</td>       <td>number/text</td>       <td>2; 02; Tue; Tuesday; T</td>
+ *   <tr><th scope="row">F</th>       <td>day-of-week-in-month</td>        <td>number</td>            <td>3</td>
  *
- *   a       am-pm-of-day                text              PM
- *   h       clock-hour-of-am-pm (1-12)  number            12
- *   K       hour-of-am-pm (0-11)        number            0
- *   k       clock-hour-of-day (1-24)    number            24
+ *   <tr><th scope="row">a</th>       <td>am-pm-of-day</td>                <td>text</td>              <td>PM</td>
+ *   <tr><th scope="row">h</th>       <td>clock-hour-of-am-pm (1-12)</td>  <td>number</td>            <td>12</td>
+ *   <tr><th scope="row">K</th>       <td>hour-of-am-pm (0-11)</td>        <td>number</td>            <td>0</td>
+ *   <tr><th scope="row">k</th>       <td>clock-hour-of-day (1-24)</td>    <td>number</td>            <td>24</td>
  *
- *   H       hour-of-day (0-23)          number            0
- *   m       minute-of-hour              number            30
- *   s       second-of-minute            number            55
- *   S       fraction-of-second          fraction          978
- *   A       milli-of-day                number            1234
- *   n       nano-of-second              number            987654321
- *   N       nano-of-day                 number            1234000000
+ *   <tr><th scope="row">H</th>       <td>hour-of-day (0-23)</td>          <td>number</td>            <td>0</td>
+ *   <tr><th scope="row">m</th>       <td>minute-of-hour</td>              <td>number</td>            <td>30</td>
+ *   <tr><th scope="row">s</th>       <td>second-of-minute</td>            <td>number</td>            <td>55</td>
+ *   <tr><th scope="row">S</th>       <td>fraction-of-second</td>          <td>fraction</td>          <td>978</td>
+ *   <tr><th scope="row">A</th>       <td>milli-of-day</td>                <td>number</td>            <td>1234</td>
+ *   <tr><th scope="row">n</th>       <td>nano-of-second</td>              <td>number</td>            <td>987654321</td>
+ *   <tr><th scope="row">N</th>       <td>nano-of-day</td>                 <td>number</td>            <td>1234000000</td>
  *
- *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
- *   v       generic time-zone name      zone-name         Pacific Time; PT
- *   z       time-zone name              zone-name         Pacific Standard Time; PST
- *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00
- *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15
- *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15
- *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00
+ *   <tr><th scope="row">V</th>       <td>time-zone ID</td>                <td>zone-id</td>           <td>America/Los_Angeles; Z; -08:30</td>
+ *   <tr><th scope="row">v</th>       <td>generic time-zone name</td>      <td>zone-name</td>         <td>Pacific Time; PT</td>
+ *   <tr><th scope="row">z</th>       <td>time-zone name</td>              <td>zone-name</td>         <td>Pacific Standard Time; PST</td>
+ *   <tr><th scope="row">O</th>       <td>localized zone-offset</td>       <td>offset-O</td>          <td>GMT+8; GMT+08:00; UTC-08:00</td>
+ *   <tr><th scope="row">X</th>       <td>zone-offset 'Z' for zero</td>    <td>offset-X</td>          <td>Z; -08; -0830; -08:30; -083015; -08:30:15</td>
+ *   <tr><th scope="row">x</th>       <td>zone-offset</td>                 <td>offset-x</td>          <td>+0000; -08; -0830; -08:30; -083015; -08:30:15</td>
+ *   <tr><th scope="row">Z</th>       <td>zone-offset</td>                 <td>offset-Z</td>          <td>+0000; -0800; -08:00</td>
+ *
+ *   <tr><th scope="row">p</th>       <td>pad next</td>                    <td>pad modifier</td>      <td>1</td>
  *
- *   p       pad next                    pad modifier      1
- *
- *   '       escape for text             delimiter
- *   ''      single quote                literal           '
- *   [       optional section start
- *   ]       optional section end
- *   #       reserved for future use
- *   {       reserved for future use
- *   }       reserved for future use
- * </pre>
+ *   <tr><th scope="row">'</th>       <td>escape for text</td>             <td>delimiter</td>         <td></td>
+ *   <tr><th scope="row">''</th>      <td>single quote</td>                <td>literal</td>           <td>'</td>
+ *   <tr><th scope="row">[</th>       <td>optional section start</td>      <td></td>                  <td></td>
+ *   <tr><th scope="row">]</th>       <td>optional section end</td>        <td></td>                  <td></td>
+ *   <tr><th scope="row">#</th>       <td>reserved for future use</td>     <td></td>                  <td></td>
+ *   <tr><th scope="row">{</th>       <td>reserved for future use</td>     <td></td>                  <td></td>
+ *   <tr><th scope="row">}</th>       <td>reserved for future use</td>     <td></td>                  <td></td>
+ * </tbody>
+ * </table>
  * <p>
  * The count of pattern letters determines the format.
  * <p>
--- a/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/temporal/IsoFields.java	Thu Aug 24 16:36:25 2017 +0200
@@ -136,18 +136,18 @@
  * <p>
  * For example:
  *
- * <table class=striped style="text-align: left; width: 50%;">
+ * <table class=striped style="text-align: left">
  * <caption>Examples of Week based Years</caption>
  * <thead>
- * <tr><th>Date</th><th>Day-of-week</th><th>Field values</th></tr>
+ * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th><th scope="col">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>
+ * <tr><th scope="row">2008-12-28</th><td>Sunday</td><td>Week 52 of week-based-year 2008</td></tr>
+ * <tr><th scope="row">2008-12-29</th><td>Monday</td><td>Week 1 of week-based-year 2009</td></tr>
+ * <tr><th scope="row">2008-12-31</th><td>Wednesday</td><td>Week 1 of week-based-year 2009</td></tr>
+ * <tr><th scope="row">2009-01-01</th><td>Thursday</td><td>Week 1 of week-based-year 2009</td></tr>
+ * <tr><th scope="row">2009-01-04</th><td>Sunday</td><td>Week 1 of week-based-year 2009</td></tr>
+ * <tr><th scope="row">2009-01-05</th><td>Monday</td><td>Week 2 of week-based-year 2009</td></tr>
  * </tbody>
  * </table>
  *
--- a/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/time/temporal/WeekFields.java	Thu Aug 24 16:36:25 2017 +0200
@@ -130,17 +130,17 @@
  * <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>
+ * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
+ *  <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
  * </thead>
  * <tbody>
- * <tr><th>2008-12-31</th><td>Wednesday</td>
+ * <tr><th scope="row">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>
+ * <tr><th scope="row">2009-01-01</th><td>Thursday</td>
  *  <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr>
- * <tr><th>2009-01-04</th><td>Sunday</td>
+ * <tr><th scope="row">2009-01-04</th><td>Sunday</td>
  *  <td>Week 1 of January 2009</td><td>Week 0 of January 2009</td></tr>
- * <tr><th>2009-01-05</th><td>Monday</td>
+ * <tr><th scope="row">2009-01-05</th><td>Monday</td>
  *  <td>Week 2 of January 2009</td><td>Week 1 of January 2009</td></tr>
  * </tbody>
  * </table>
@@ -164,17 +164,17 @@
  * <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>
+ * <tr><th scope="col">Date</th><th scope="col">Day-of-week</th>
+ *  <th scope="col">First day: Monday<br>Minimal days: 4</th><th scope="col">First day: Monday<br>Minimal days: 5</th></tr>
  * </thead>
  * <tbody>
- * <tr><th>2008-12-31</th><td>Wednesday</td>
+ * <tr><th scope="row">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>
+ * <tr><th scope="row">2009-01-01</th><td>Thursday</td>
  *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
- * <tr><th>2009-01-04</th><td>Sunday</td>
+ * <tr><th scope="row">2009-01-04</th><td>Sunday</td>
  *  <td>Week 1 of 2009</td><td>Week 53 of 2008</td></tr>
- * <tr><th>2009-01-05</th><td>Monday</td>
+ * <tr><th scope="row">2009-01-05</th><td>Monday</td>
  *  <td>Week 2 of 2009</td><td>Week 1 of 2009</td></tr>
  * </tbody>
  * </table>
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java	Thu Aug 24 16:36:25 2017 +0200
@@ -35,8 +35,7 @@
 
 package java.util.concurrent;
 
-import java.lang.invoke.MethodHandles;
-import java.lang.invoke.VarHandle;
+import java.lang.reflect.Field;
 import java.util.AbstractSet;
 import java.util.Collection;
 import java.util.Collections;
@@ -506,19 +505,21 @@
             : ((ConcurrentSkipListMap.SubMap<E,?>)m).new SubMapKeyIterator();
     }
 
-    // Support for resetting map in clone
+    /** Initializes map field; for use in clone. */
     private void setMap(ConcurrentNavigableMap<E,Object> map) {
-        MAP.setVolatile(this, map);
-    }
-
-    // VarHandle mechanics
-    private static final VarHandle MAP;
-    static {
+        Field mapField = java.security.AccessController.doPrivileged(
+            (java.security.PrivilegedAction<Field>) () -> {
+                try {
+                    Field f = ConcurrentSkipListSet.class
+                        .getDeclaredField("m");
+                    f.setAccessible(true);
+                    return f;
+                } catch (ReflectiveOperationException e) {
+                    throw new Error(e);
+                }});
         try {
-            MethodHandles.Lookup l = MethodHandles.lookup();
-            MAP = l.findVarHandle(ConcurrentSkipListSet.class, "m",
-                                  ConcurrentNavigableMap.class);
-        } catch (ReflectiveOperationException e) {
+            mapField.set(this, map);
+        } catch (IllegalAccessException e) {
             throw new Error(e);
         }
     }
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Flow.java	Thu Aug 24 16:36:25 2017 +0200
@@ -85,9 +85,9 @@
  *       this.executor = executor;
  *     }
  *     public synchronized void request(long n) {
- *       if (n != 0 && !completed) {
+ *       if (!completed) {
  *         completed = true;
- *         if (n < 0) {
+ *         if (n <= 0) {
  *           IllegalArgumentException ex = new IllegalArgumentException();
  *           executor.execute(() -> subscriber.onError(ex));
  *         } else {
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java	Thu Aug 24 16:36:25 2017 +0200
@@ -576,7 +576,7 @@
     private static final RuntimePermission shutdownPerm =
         new RuntimePermission("modifyThread");
 
-    /* The context to be used when executing the finalizer, or null. */
+    /** The context to be used when executing the finalizer, or null. */
     private final AccessControlContext acc;
 
     /**
@@ -1314,9 +1314,9 @@
             throw new IllegalArgumentException();
         if (workQueue == null || threadFactory == null || handler == null)
             throw new NullPointerException();
-        this.acc = System.getSecurityManager() == null ?
-                null :
-                AccessController.getContext();
+        this.acc = (System.getSecurityManager() == null)
+            ? null
+            : AccessController.getContext();
         this.corePoolSize = corePoolSize;
         this.maximumPoolSize = maximumPoolSize;
         this.workQueue = workQueue;
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipUtils.java	Thu Aug 24 16:36:25 2017 +0200
@@ -81,13 +81,24 @@
      * Converts DOS time to Java time (number of milliseconds since epoch).
      */
     public static long dosToJavaTime(long dtime) {
-        LocalDateTime ldt = LocalDateTime.of(
-                (int) (((dtime >> 25) & 0x7f) + 1980),
-                (int) ((dtime >> 21) & 0x0f),
-                (int) ((dtime >> 16) & 0x1f),
-                (int) ((dtime >> 11) & 0x1f),
-                (int) ((dtime >> 5) & 0x3f),
-                (int) ((dtime << 1) & 0x3e));
+        int year;
+        int month;
+        int day;
+        int hour = (int) ((dtime >> 11) & 0x1f);
+        int minute = (int) ((dtime >> 5) & 0x3f);
+        int second = (int) ((dtime << 1) & 0x3e);
+        if ((dtime >> 16) == 0) {
+            // Interpret the 0 DOS date as 1979-11-30 for compatibility with
+            // other implementations.
+            year = 1979;
+            month = 11;
+            day = 30;
+        } else {
+            year = (int) (((dtime >> 25) & 0x7f) + 1980);
+            month = (int) ((dtime >> 21) & 0x0f);
+            day = (int) ((dtime >> 16) & 0x1f);
+        }
+        LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, minute, second);
         return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
                 ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
     }
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1292,7 +1292,7 @@
      * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
      * Application-Layer Protocol Negotiation (ALPN), can negotiate
      * application-level values between peers.
-     * <p>
+     *
      * @implSpec
      * The implementation in this class throws
      * {@code UnsupportedOperationException} and performs no other action.
@@ -1317,7 +1317,7 @@
      * Like {@link #getHandshakeSession()},
      * a connection may be in the middle of a handshake. The
      * application protocol may or may not yet be available.
-     * <p>
+     *
      * @implSpec
      * The implementation in this class throws
      * {@code UnsupportedOperationException} and performs no other action.
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLParameters.java	Thu Aug 24 16:36:25 2017 +0200
@@ -646,7 +646,7 @@
      * requested by the peer, the underlying protocol will determine what
      * action to take.  (For example, ALPN will send a
      * {@code "no_application_protocol"} alert and terminate the connection.)
-     * <p>
+     *
      * @implSpec
      * This method will make a copy of the {@code protocols} array.
      *
--- a/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Thu Aug 24 16:36:25 2017 +0200
@@ -702,7 +702,7 @@
      * href="http://www.ietf.org/rfc/rfc7301.txt"> RFC 7301 </a>, the
      * Application-Layer Protocol Negotiation (ALPN), can negotiate
      * application-level values between peers.
-     * <p>
+     *
      * @implSpec
      * The implementation in this class throws
      * {@code UnsupportedOperationException} and performs no other action.
@@ -727,7 +727,7 @@
      * Like {@link #getHandshakeSession()},
      * a connection may be in the middle of a handshake. The
      * application protocol may or may not yet be available.
-     * <p>
+     *
      * @implSpec
      * The implementation in this class throws
      * {@code UnsupportedOperationException} and performs no other action.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaObjectInputFilterAccess.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import java.io.ObjectInputFilter;
+
+/**
+ * Access to the alternative ObjectInputFilter.Config.createFilter2 for RMI.
+ */
+public interface JavaObjectInputFilterAccess {
+    /**
+     * Creates a filter from the pattern.
+     */
+    ObjectInputFilter createFilter2(String pattern);
+}
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Aug 24 16:36:25 2017 +0200
@@ -25,6 +25,7 @@
 
 package jdk.internal.misc;
 
+import java.io.ObjectInputFilter;
 import java.lang.module.ModuleDescriptor;
 import java.util.ResourceBundle;
 import java.util.jar.JarFile;
@@ -70,6 +71,7 @@
     private static JavaAWTFontAccess javaAWTFontAccess;
     private static JavaBeansAccess javaBeansAccess;
     private static JavaObjectInputStreamAccess javaObjectInputStreamAccess;
+    private static JavaObjectInputFilterAccess javaObjectInputFilterAccess;
     private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess;
 
     public static JavaUtilJarAccess javaUtilJarAccess() {
@@ -315,6 +317,17 @@
         javaObjectInputStreamAccess = access;
     }
 
+    public static JavaObjectInputFilterAccess getJavaObjectInputFilterAccess() {
+        if (javaObjectInputFilterAccess == null) {
+            unsafe.ensureClassInitialized(ObjectInputFilter.Config.class);
+        }
+        return javaObjectInputFilterAccess;
+    }
+
+    public static void setJavaObjectInputFilterAccess(JavaObjectInputFilterAccess access) {
+        javaObjectInputFilterAccess = access;
+    }
+
     public static void setJavaIORandomAccessFileAccess(JavaIORandomAccessFileAccess jirafa) {
         javaIORandomAccessFileAccess = jirafa;
     }
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Thu Aug 24 16:36:25 2017 +0200
@@ -3071,8 +3071,14 @@
 
     private String withWeak(PublicKey key) {
         if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
-            return String.format(rb.getString("key.bit"),
-                    KeyUtil.getKeySize(key), key.getAlgorithm());
+            int kLen = KeyUtil.getKeySize(key);
+            if (kLen >= 0) {
+                return String.format(rb.getString("key.bit"),
+                        kLen, key.getAlgorithm());
+            } else {
+                return String.format(
+                        rb.getString("unknown.size.1"), key.getAlgorithm());
+            }
         } else {
             return String.format(rb.getString("key.bit.weak"),
                     KeyUtil.getKeySize(key), key.getAlgorithm());
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Resources.java	Thu Aug 24 16:36:25 2017 +0200
@@ -462,6 +462,7 @@
         {"with.weak", "%s (weak)"},
         {"key.bit", "%d-bit %s key"},
         {"key.bit.weak", "%d-bit %s key (weak)"},
+        {"unknown.size.1", "unknown size %s key"},
         {".PATTERN.printX509Cert.with.weak",
                 "Owner: {0}\nIssuer: {1}\nSerial number: {2}\nValid from: {3} until: {4}\nCertificate fingerprints:\n\t SHA1: {5}\n\t SHA256: {6}\nSignature algorithm name: {7}\nSubject Public Key Algorithm: {8}\nVersion: {9}"},
         {"PKCS.10.with.weak",
--- a/jdk/src/java.base/share/conf/security/java.security	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.base/share/conf/security/java.security	Thu Aug 24 16:36:25 2017 +0200
@@ -951,12 +951,36 @@
 #
 # The filter pattern uses the same format as jdk.serialFilter.
 # This filter can override the builtin filter if additional types need to be
-# allowed or rejected from the RMI Registry.
+# allowed or rejected from the RMI Registry or to decrease limits but not
+# to increase limits.
+# If the limits (maxdepth, maxrefs, or maxbytes) are exceeded, the object is rejected.
+#
+# Each non-array type is allowed or rejected if it matches one of the patterns,
+# evaluated from left to right, and is otherwise allowed. Arrays of any
+# component type, including subarrays and arrays of primitives, are allowed.
+#
+# Array construction of any component type, including subarrays and arrays of
+# primitives, are allowed unless the length is greater than the maxarray limit.
+# The filter is applied to each array element.
 #
 # Note: This property is currently used by the JDK Reference implementation.
 # It is not guaranteed to be examined and used by other implementations.
 #
-#sun.rmi.registry.registryFilter=pattern;pattern
+# The built-in filter allows subclasses of allowed classes and
+# can approximately be represented as the pattern:
+#
+#sun.rmi.registry.registryFilter=\
+#    maxarray=1000000;\
+#    maxdepth=20;\
+#    java.lang.String;\
+#    java.lang.Number;\
+#    java.lang.reflect.Proxy;\
+#    java.rmi.Remote;\
+#    sun.rmi.server.UnicastRef;\
+#    sun.rmi.server.RMIClientSocketFactory;\
+#    sun.rmi.server.RMIServerSocketFactory;\
+#    java.rmi.activation.ActivationID;\
+#    java.rmi.server.UID
 #
 # RMI Distributed Garbage Collector (DGC) Serial Filter
 #
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1887,13 +1887,17 @@
      * The registered {@linkplain #addConfigurationListener configuration
      * listeners} will be invoked after the configuration is successfully updated.
      * <br><br>
-     * <table><caption style="display:none">Updating configuration properties</caption>
+     * <table class="striped">
+     * <caption style="display:none">Updating configuration properties</caption>
+     * <thead>
      * <tr>
-     * <th>Property</th>
-     * <th>Resulting Behavior</th>
+     * <th scope="col">Property</th>
+     * <th scope="col">Resulting Behavior</th>
      * </tr>
+     * </thead>
+     * <tbody>
      * <tr>
-     * <td valign="top">{@code <logger>.level}</td>
+     * <th scope="row" valign="top">{@code <logger>.level}</th>
      * <td>
      * <ul>
      *   <li>If the resulting configuration defines a level for a logger and
@@ -1914,7 +1918,7 @@
      * </ul>
      * </td>
      * <tr>
-     * <td valign="top">{@code <logger>.useParentHandlers}</td>
+     * <th scope="row" valign="top">{@code <logger>.useParentHandlers}</th>
      * <td>
      * <ul>
      *   <li>If either the resulting or the old value for the useParentHandlers
@@ -1928,7 +1932,7 @@
      * </td>
      * </tr>
      * <tr>
-     * <td valign="top">{@code <logger>.handlers}</td>
+     * <th scope="row" valign="top">{@code <logger>.handlers}</th>
      * <td>
      * <ul>
      *   <li>If the resulting configuration defines a list of handlers for a
@@ -1952,7 +1956,7 @@
      * </td>
      * </tr>
      * <tr>
-     * <td valign="top">{@code <handler-name>.*}</td>
+     * <th scope="row" valign="top">{@code <handler-name>.*}</th>
      * <td>
      * <ul>
      *   <li>Properties configured/changed on handler classes will only affect
@@ -1964,7 +1968,7 @@
      * </td>
      * </tr>
      * <tr>
-     * <td valign="top">{@code config} and any other property</td>
+     * <th scope="row" valign="top">{@code config} and any other property</th>
      * <td>
      * <ul>
      *   <li>The resulting value for these property will be stored in the
@@ -1974,6 +1978,7 @@
      * </ul>
      * </td>
      * </tr>
+     * </tbody>
      * </table>
      * <p>
      * <em>Example mapper functions:</em>
--- a/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.logging/share/classes/java/util/logging/Logger.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -1497,7 +1497,7 @@
      * The {@code msg} string is localized using the given resource bundle.
      * If the resource bundle is {@code null}, then the {@code msg} string is not
      * localized.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., {@code SEVERE}
      * @param   bundle  Resource bundle to localize {@code msg};
      *                  can be {@code null}.
@@ -1614,7 +1614,7 @@
      * processed specially by output {@code Formatter} objects and is not treated
      * as a formatting parameter to the {@code LogRecord} {@code message}
      * property.
-     * <p>
+     *
      * @param   level   One of the message level identifiers, e.g., {@code SEVERE}
      * @param   bundle  Resource bundle to localize {@code msg};
      *                  can be {@code null}.
--- a/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.logging/share/classes/java/util/logging/SimpleFormatter.java	Thu Aug 24 16:36:25 2017 +0200
@@ -41,7 +41,7 @@
  * The {@code SimpleFormatter} is initialized with the
  * <a href="../Formatter.html#syntax">format string</a>
  * specified in the {@code java.util.logging.SimpleFormatter.format}
- * property to {@linkplain #format format} the log messages.
+ * property to {@linkplain #format(LogRecord) format} the log messages.
  * This property can be defined
  * in the {@linkplain LogManager#getProperty logging properties}
  * configuration file
--- a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Thu Aug 24 16:36:25 2017 +0200
@@ -28,7 +28,6 @@
 import java.io.ObjectInputFilter;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.rmi.server.LogStream;
 import java.security.PrivilegedAction;
 import java.security.Security;
 import java.util.ArrayList;
@@ -58,6 +57,7 @@
 import java.security.ProtectionDomain;
 import java.text.MessageFormat;
 
+import jdk.internal.misc.SharedSecrets;
 import sun.rmi.runtime.Log;
 import sun.rmi.server.UnicastRef;
 import sun.rmi.server.UnicastServerRef;
@@ -109,7 +109,7 @@
     private static final int REGISTRY_MAX_DEPTH = 20;
 
     /** Registry maximum array size in remote invocations. **/
-    private static final int REGISTRY_MAX_ARRAY_SIZE = 10000;
+    private static final int REGISTRY_MAX_ARRAY_SIZE = 1_000_000;
 
     /**
      * The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"}
@@ -130,7 +130,7 @@
             props = Security.getProperty(REGISTRY_FILTER_PROPNAME);
         }
         if (props != null) {
-            filter = ObjectInputFilter.Config.createFilter(props);
+            filter = SharedSecrets.getJavaObjectInputFilterAccess().createFilter2(props);
             Log regLog = Log.getLog("sun.rmi.registry", "registry", -1);
             if (regLog.isLoggable(Log.BRIEF)) {
                 regLog.log(Log.BRIEF, "registryFilter = " + filter);
@@ -451,17 +451,10 @@
         Class<?> clazz = filterInfo.serialClass();
         if (clazz != null) {
             if (clazz.isArray()) {
-                if (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE) {
-                    return ObjectInputFilter.Status.REJECTED;
-                }
-                do {
-                    // Arrays are allowed depending on the component type
-                    clazz = clazz.getComponentType();
-                } while (clazz.isArray());
-            }
-            if (clazz.isPrimitive()) {
-                // Arrays of primitives are allowed
-                return ObjectInputFilter.Status.ALLOWED;
+                // Arrays are REJECTED only if they exceed the limit
+                return (filterInfo.arrayLength() >= 0 && filterInfo.arrayLength() > REGISTRY_MAX_ARRAY_SIZE)
+                    ? ObjectInputFilter.Status.REJECTED
+                    : ObjectInputFilter.Status.UNDECIDED;
             }
             if (String.class == clazz
                     || java.lang.Number.class.isAssignableFrom(clazz)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AbstractAsyncSSLConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.incubator.http;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.util.concurrent.CompletableFuture;
+import javax.net.ssl.SSLEngine;
+import jdk.incubator.http.internal.common.ExceptionallyCloseable;
+
+
+/**
+ * Asynchronous version of SSLConnection.
+ *
+ * There are two concrete implementations of this class: AsyncSSLConnection
+ * and AsyncSSLTunnelConnection.
+ * This abstraction is useful when downgrading from HTTP/2 to HTTP/1.1 over
+ * an SSL connection. See ExchangeImpl::get in the case where an ALPNException
+ * is thrown.
+ *
+ * Note: An AsyncSSLConnection wraps a PlainHttpConnection, while an
+ *       AsyncSSLTunnelConnection wraps a PlainTunnelingConnection.
+ *       If both these wrapped classes where made to inherit from a
+ *       common abstraction then it might be possible to merge
+ *       AsyncSSLConnection and AsyncSSLTunnelConnection back into
+ *       a single class - and simply use different factory methods to
+ *       create different wrappees, but this is left up for further cleanup.
+ *
+ */
+abstract class AbstractAsyncSSLConnection extends HttpConnection
+               implements AsyncConnection, ExceptionallyCloseable {
+
+
+    AbstractAsyncSSLConnection(InetSocketAddress addr, HttpClientImpl client) {
+        super(addr, client);
+    }
+
+    abstract SSLEngine getEngine();
+    abstract AsyncSSLDelegate sslDelegate();
+    abstract HttpConnection plainConnection();
+    abstract HttpConnection downgrade();
+
+    @Override
+    final boolean isSecure() {
+        return true;
+    }
+
+    // Blocking read functions not used here
+    @Override
+    protected final ByteBuffer readImpl() throws IOException {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+    // whenReceivedResponse only used in HTTP/1.1 (Http1Exchange)
+    // AbstractAsyncSSLConnection is only used with HTTP/2
+    @Override
+    final CompletableFuture<Void> whenReceivingResponse() {
+        throw new UnsupportedOperationException("Not supported.");
+    }
+
+}
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -35,14 +35,12 @@
 import javax.net.ssl.SSLEngine;
 
 import jdk.incubator.http.internal.common.ByteBufferReference;
-import jdk.incubator.http.internal.common.ExceptionallyCloseable;
 import jdk.incubator.http.internal.common.Utils;
 
 /**
  * Asynchronous version of SSLConnection.
  */
-class AsyncSSLConnection extends HttpConnection
-                         implements AsyncConnection, ExceptionallyCloseable {
+class AsyncSSLConnection extends AbstractAsyncSSLConnection {
 
     final AsyncSSLDelegate sslDelegate;
     final PlainHttpConnection plainConnection;
@@ -61,15 +59,14 @@
         plainConnection.configureMode(mode);
     }
 
-    private CompletableFuture<Void> configureModeAsync(Void ignore) {
-        CompletableFuture<Void> cf = new CompletableFuture<>();
-        try {
-            configureMode(Mode.ASYNC);
-            cf.complete(null);
-        } catch (Throwable t) {
-            cf.completeExceptionally(t);
-        }
-        return cf;
+    @Override
+    PlainHttpConnection plainConnection() {
+        return plainConnection;
+    }
+
+    @Override
+    AsyncSSLDelegate sslDelegate() {
+        return sslDelegate;
     }
 
     @Override
@@ -92,11 +89,6 @@
     }
 
     @Override
-    boolean isSecure() {
-        return true;
-    }
-
-    @Override
     boolean isProxied() {
         return false;
     }
@@ -172,6 +164,7 @@
         plainConnection.channel().shutdownOutput();
     }
 
+    @Override
     SSLEngine getEngine() {
         return sslDelegate.getEngine();
     }
@@ -184,18 +177,6 @@
         plainConnection.setAsyncCallbacks(sslDelegate::asyncReceive, errorReceiver, sslDelegate::getNetBuffer);
     }
 
-    // Blocking read functions not used here
-
-    @Override
-    protected ByteBuffer readImpl() throws IOException {
-        throw new UnsupportedOperationException("Not supported.");
-    }
-
-    @Override
-    CompletableFuture<Void> whenReceivingResponse() {
-        throw new UnsupportedOperationException("Not supported.");
-    }
-
     @Override
     public void startReading() {
         plainConnection.startReading();
@@ -206,4 +187,9 @@
     public void stopAsyncReading() {
         plainConnection.stopAsyncReading();
     }
+
+    @Override
+    SSLConnection downgrade() {
+        return new SSLConnection(this);
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AsyncSSLTunnelConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,206 @@
+/*
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.incubator.http;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
+import jdk.incubator.http.internal.common.ByteBufferReference;
+import jdk.incubator.http.internal.common.Utils;
+
+/**
+ * An SSL tunnel built on a Plain (CONNECT) TCP tunnel.
+ */
+class AsyncSSLTunnelConnection extends AbstractAsyncSSLConnection {
+
+    final PlainTunnelingConnection plainConnection;
+    final AsyncSSLDelegate sslDelegate;
+    final String serverName;
+
+    @Override
+    public void connect() throws IOException, InterruptedException {
+        plainConnection.connect();
+        configureMode(Mode.ASYNC);
+        startReading();
+        sslDelegate.connect();
+    }
+
+    @Override
+    boolean connected() {
+        return plainConnection.connected() && sslDelegate.connected();
+    }
+
+    @Override
+    public CompletableFuture<Void> connectAsync() {
+        throw new InternalError();
+    }
+
+    AsyncSSLTunnelConnection(InetSocketAddress addr,
+                        HttpClientImpl client,
+                        String[] alpn,
+                        InetSocketAddress proxy)
+    {
+        super(addr, client);
+        this.serverName = Utils.getServerName(addr);
+        this.plainConnection = new PlainTunnelingConnection(addr, proxy, client);
+        this.sslDelegate = new AsyncSSLDelegate(plainConnection, client, alpn, serverName);
+    }
+
+    @Override
+    synchronized void configureMode(Mode mode) throws IOException {
+        super.configureMode(mode);
+        plainConnection.configureMode(mode);
+    }
+
+    @Override
+    SSLParameters sslParameters() {
+        return sslDelegate.getSSLParameters();
+    }
+
+    @Override
+    public String toString() {
+        return "AsyncSSLTunnelConnection: " + super.toString();
+    }
+
+    @Override
+    PlainTunnelingConnection plainConnection() {
+        return plainConnection;
+    }
+
+    @Override
+    AsyncSSLDelegate sslDelegate() {
+        return sslDelegate;
+    }
+
+    @Override
+    ConnectionPool.CacheKey cacheKey() {
+        return ConnectionPool.cacheKey(address, plainConnection.proxyAddr);
+    }
+
+    @Override
+    long write(ByteBuffer[] buffers, int start, int number) throws IOException {
+        //debugPrint("Send", buffers, start, number);
+        ByteBuffer[] bufs = Utils.reduce(buffers, start, number);
+        long n = Utils.remaining(bufs);
+        sslDelegate.writeAsync(ByteBufferReference.toReferences(bufs));
+        sslDelegate.flushAsync();
+        return n;
+    }
+
+    @Override
+    long write(ByteBuffer buffer) throws IOException {
+        //debugPrint("Send", buffer);
+        long n = buffer.remaining();
+        sslDelegate.writeAsync(ByteBufferReference.toReferences(buffer));
+        sslDelegate.flushAsync();
+        return n;
+    }
+
+    @Override
+    public void writeAsync(ByteBufferReference[] buffers) throws IOException {
+        sslDelegate.writeAsync(buffers);
+    }
+
+    @Override
+    public void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
+        sslDelegate.writeAsyncUnordered(buffers);
+    }
+
+    @Override
+    public void flushAsync() throws IOException {
+        sslDelegate.flushAsync();
+    }
+
+    @Override
+    public void close() {
+        Utils.close(sslDelegate, plainConnection.channel());
+    }
+
+    @Override
+    void shutdownInput() throws IOException {
+        plainConnection.channel().shutdownInput();
+    }
+
+    @Override
+    void shutdownOutput() throws IOException {
+        plainConnection.channel().shutdownOutput();
+    }
+
+    @Override
+    SocketChannel channel() {
+        return plainConnection.channel();
+    }
+
+    @Override
+    boolean isProxied() {
+        return true;
+    }
+
+    @Override
+    public void setAsyncCallbacks(Consumer<ByteBufferReference> asyncReceiver,
+                                  Consumer<Throwable> errorReceiver,
+                                  Supplier<ByteBufferReference> readBufferSupplier) {
+        sslDelegate.setAsyncCallbacks(asyncReceiver, errorReceiver, readBufferSupplier);
+        plainConnection.setAsyncCallbacks(sslDelegate::asyncReceive, errorReceiver, sslDelegate::getNetBuffer);
+    }
+
+    @Override
+    public void startReading() {
+        plainConnection.startReading();
+        sslDelegate.startReading();
+    }
+
+    @Override
+    public void stopAsyncReading() {
+        plainConnection.stopAsyncReading();
+    }
+
+    @Override
+    public void enableCallback() {
+        sslDelegate.enableCallback();
+    }
+
+    @Override
+    public void closeExceptionally(Throwable cause) throws IOException {
+        Utils.close(cause, sslDelegate, plainConnection.channel());
+    }
+
+    @Override
+    SSLEngine getEngine() {
+        return sslDelegate.getEngine();
+    }
+
+    @Override
+    SSLTunnelConnection downgrade() {
+        return new SSLTunnelConnection(this);
+    }
+}
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java	Thu Aug 24 16:36:25 2017 +0200
@@ -82,9 +82,9 @@
                 c = c2.getConnectionFor(request);
             } catch (Http2Connection.ALPNException e) {
                 // failed to negotiate "h2"
-                AsyncSSLConnection as = e.getConnection();
+                AbstractAsyncSSLConnection as = e.getConnection();
                 as.stopAsyncReading();
-                SSLConnection sslc = new SSLConnection(as);
+                HttpConnection sslc = as.downgrade();
                 ExchangeImpl<U> ex = new Http1Exchange<>(exchange, sslc);
                 return ex;
             }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -211,12 +211,13 @@
         this.hpackIn = new Decoder(clientSettings.getParameter(HEADER_TABLE_SIZE));
         this.windowUpdater = new ConnectionWindowUpdateSender(this, client.getReceiveBufferSize());
     }
-        /**
-         * Case 1) Create from upgraded HTTP/1.1 connection.
-         * Is ready to use. Will not be SSL. exchange is the Exchange
-         * that initiated the connection, whose response will be delivered
-         * on a Stream.
-         */
+
+    /**
+     * Case 1) Create from upgraded HTTP/1.1 connection.
+     * Is ready to use. Will not be SSL. exchange is the Exchange
+     * that initiated the connection, whose response will be delivered
+     * on a Stream.
+     */
     Http2Connection(HttpConnection connection,
                     Http2ClientImpl client2,
                     Exchange<?> exchange,
@@ -280,7 +281,7 @@
      * Throws an IOException if h2 was not negotiated
      */
     private void checkSSLConfig() throws IOException {
-        AsyncSSLConnection aconn = (AsyncSSLConnection)connection;
+        AbstractAsyncSSLConnection aconn = (AbstractAsyncSSLConnection)connection;
         SSLEngine engine = aconn.getEngine();
         String alpn = engine.getApplicationProtocol();
         if (alpn == null || !alpn.equals("h2")) {
@@ -906,14 +907,14 @@
      */
     static final class ALPNException extends IOException {
         private static final long serialVersionUID = 23138275393635783L;
-        final AsyncSSLConnection connection;
+        final AbstractAsyncSSLConnection connection;
 
-        ALPNException(String msg, AsyncSSLConnection connection) {
+        ALPNException(String msg, AbstractAsyncSSLConnection connection) {
             super(msg);
             this.connection = connection;
         }
 
-        AsyncSSLConnection getConnection() {
+        AbstractAsyncSSLConnection getConnection() {
             return connection;
         }
     }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -34,7 +34,6 @@
 import java.util.concurrent.CompletableFuture;
 
 import jdk.incubator.http.internal.common.ByteBufferReference;
-import jdk.incubator.http.internal.common.Utils;
 
 /**
  * Wraps socket channel layer and takes care of SSL also.
@@ -136,7 +135,11 @@
             String[] alpn, boolean isHttp2, HttpClientImpl client)
     {
         if (proxy != null) {
-            return new SSLTunnelConnection(addr, client, proxy);
+            if (!isHttp2) {
+                return new SSLTunnelConnection(addr, client, proxy);
+            } else {
+                return new AsyncSSLTunnelConnection(addr, client, alpn, proxy);
+            }
         } else if (!isHttp2) {
             return new SSLConnection(addr, client, alpn);
         } else {
@@ -154,6 +157,12 @@
     {
         HttpConnection c = null;
         InetSocketAddress proxy = request.proxy(client);
+        if (proxy != null && proxy.isUnresolved()) {
+            // The default proxy selector may select a proxy whose
+            // address is unresolved. We must resolve the address
+            // before using it to connect.
+            proxy = new InetSocketAddress(proxy.getHostString(), proxy.getPort());
+        }
         boolean secure = request.secure();
         ConnectionPool pool = client.connectionPool();
         String[] alpn =  null;
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainTunnelingConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -34,12 +34,15 @@
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
 
 /**
  * A plain text socket tunnel through a proxy. Uses "CONNECT" but does not
- * encrypt. Used by WebSocket. Subclassed in SSLTunnelConnection for encryption.
+ * encrypt. Used by WebSocket, as well as HTTP over SSL + Proxy.
+ * Wrapped in SSLTunnelConnection or AsyncSSLTunnelConnection for encryption.
  */
-class PlainTunnelingConnection extends HttpConnection {
+class PlainTunnelingConnection extends HttpConnection implements AsyncConnection {
 
     final PlainHttpConnection delegate;
     protected final InetSocketAddress proxyAddr;
@@ -116,17 +119,17 @@
     }
 
     @Override
-    void writeAsync(ByteBufferReference[] buffers) throws IOException {
+    public void writeAsync(ByteBufferReference[] buffers) throws IOException {
         delegate.writeAsync(buffers);
     }
 
     @Override
-    void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
+    public void writeAsyncUnordered(ByteBufferReference[] buffers) throws IOException {
         delegate.writeAsyncUnordered(buffers);
     }
 
     @Override
-    void flushAsync() throws IOException {
+    public void flushAsync() throws IOException {
         delegate.flushAsync();
     }
 
@@ -165,4 +168,32 @@
     boolean isProxied() {
         return true;
     }
+
+    @Override
+    public void setAsyncCallbacks(Consumer<ByteBufferReference> asyncReceiver,
+            Consumer<Throwable> errorReceiver,
+            Supplier<ByteBufferReference> readBufferSupplier) {
+        delegate.setAsyncCallbacks(asyncReceiver, errorReceiver, readBufferSupplier);
+    }
+
+    @Override
+    public void startReading() {
+        delegate.startReading();
+    }
+
+    @Override
+    public void stopAsyncReading() {
+        delegate.stopAsyncReading();
+    }
+
+    @Override
+    public void enableCallback() {
+        delegate.enableCallback();
+    }
+
+    @Override
+    synchronized void configureMode(Mode mode) throws IOException {
+        super.configureMode(mode);
+        delegate.configureMode(mode);
+    }
 }
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -77,8 +77,8 @@
      */
     SSLConnection(AsyncSSLConnection c) {
         super(c.address, c.client);
-        this.delegate = c.plainConnection;
-        AsyncSSLDelegate adel = c.sslDelegate;
+        this.delegate = c.plainConnection();
+        AsyncSSLDelegate adel = c.sslDelegate();
         this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName);
         this.alpn = adel.alpn;
         this.serverName = adel.serverName;
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLTunnelConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLTunnelConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -85,6 +85,19 @@
         delegate = new PlainTunnelingConnection(addr, proxy, client);
     }
 
+    /**
+     * Create an SSLTunnelConnection from an existing connected AsyncSSLTunnelConnection.
+     * Used when downgrading from HTTP/2 to HTTP/1.1
+     */
+    SSLTunnelConnection(AsyncSSLTunnelConnection c) {
+        super(c.address, c.client);
+        this.delegate = c.plainConnection();
+        AsyncSSLDelegate adel = c.sslDelegate();
+        this.sslDelegate = new SSLDelegate(adel.engine, delegate.channel(), client, adel.serverName);
+        this.serverName = adel.serverName;
+        connected = c.connected();
+    }
+
     @Override
     SSLParameters sslParameters() {
         return sslDelegate.getSSLParameters();
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Main.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1088,8 +1088,12 @@
 
     private String withWeak(PublicKey key) {
         if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
-            return String.format(
-                    rb.getString("key.bit"), KeyUtil.getKeySize(key));
+            int kLen = KeyUtil.getKeySize(key);
+            if (kLen >= 0) {
+                return String.format(rb.getString("key.bit"), kLen);
+            } else {
+                return rb.getString("unknown.size");
+            }
         } else {
             seeWeak = true;
             return String.format(
--- a/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/Resources.java	Thu Aug 24 16:36:25 2017 +0200
@@ -164,6 +164,7 @@
         {"with.weak", "%s (weak)"},
         {"key.bit", "%d-bit key"},
         {"key.bit.weak", "%d-bit key (weak)"},
+        {"unknown.size", "unknown size"},
 
         {"jarsigner.", "jarsigner: "},
         {"signature.filename.must.consist.of.the.following.characters.A.Z.0.9.or.",
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidModuleException.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/InvalidModuleException.java	Thu Aug 24 16:36:25 2017 +0200
@@ -28,7 +28,6 @@
 /**
  * Thrown to indicate that the requested module is invalid
  * or became invalid after the module was unloaded.
- * <p>
  *
  * @since  9
  */
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Thu Aug 24 16:36:25 2017 +0200
@@ -40,17 +40,20 @@
  * permission allows, and discusses the risks of granting code the
  * permission.
  *
- * <table class="plain">
+ * <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>
+ * <th scope="col">Permission Target Name</th>
+ * <th scope="col">What the Permission Allows</th>
+ * <th scope="col">Risks of Allowing this Permission</th>
  * </tr>
+ * </thead>
  *
+ * <tbody>
  * <tr>
- *   <td>virtualMachineManager</td>
+ *   <th scope="row">virtualMachineManager</th>
  *   <td>Ability to inspect and modify the JDI objects in the
  *   {@code VirtualMachineManager}
  *   </td>
@@ -59,6 +62,7 @@
  *   misbehave.
  *   </td>
  * </tr>
+ * </tbody>
  *
  * </table>
  *
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Type.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Type.java	Thu Aug 24 16:36:25 2017 +0200
@@ -43,79 +43,86 @@
  *  {@link ArrayType#componentType()}
  * </BLOCKQUOTE>
  * <P>
- * The following table illustrates which subinterfaces of Type
+ * The following tables illustrate which subinterfaces of Type
  * are used to mirror types in the target VM --
- * <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 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>
+ * <TABLE class="plain">
+ * <CAPTION>Subinterfaces of {@link PrimitiveType}</CAPTION>
+ * <THEAD style="background-color:#EEEEFF; text-align:left">
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>boolean</CODE></TD>
- *   <TD headers="primtype mirrored"> {@link BooleanType}</TD>
+ *   <TH scope="col" style="width:25em">Type declared in target as</TH>
+ *   <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
+ * </THEAD>
+ * <TBODY style="text-align:left">
+ * <TR>
+ *   <TH scope="row"><CODE>boolean</CODE></TH>
+ *   <TD> {@link BooleanType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>byte</CODE></TD>
- *   <TD headers="primtype mirrored">{@link ByteType}</TD>
+ *   <TH scope="row"><CODE>byte</CODE></TH>
+ *   <TD>{@link ByteType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>char</CODE></TD>
- *   <TD headers="primtype mirrored">{@link CharType}</TD>
+ *   <TH scope="row"><CODE>char</CODE></TH>
+ *   <TD>{@link CharType}</TD>
+ * <TR>
+ *   <TH scope="row"><CODE>double</CODE></TH>
+ *   <TD>{@link DoubleType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>double</CODE></TD>
- *   <TD headers="primtype mirrored">{@link DoubleType}</TD>
+ *   <TH scope="row"><CODE>float</CODE></TH>
+ *   <TD>{@link FloatType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>float</CODE></TD>
- *   <TD headers="primtype mirrored">{@link FloatType}</TD>
+ *   <TH scope="row"><CODE>int</CODE></TH>
+ *   <TD>{@link IntegerType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>int</CODE></TD>
- *   <TD headers="primtype mirrored">{@link IntegerType}</TD>
+ *   <TH scope="row"><CODE>long</CODE></TH>
+ *   <TD>{@link LongType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>long</CODE></TD>
- *   <TD headers="primtype mirrored">{@link LongType}</TD>
- * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>short</CODE></TD>
- *   <TD headers="primtype mirrored">{@link ShortType}</TD>
+ *   <TH scope="row"><CODE>short</CODE></TH>
+ *   <TD>{@link ShortType}</TD>
  * <TR>
- *   <TD headers="primtype declared" colspan=2><CODE>void</CODE></TD>
- *   <TD headers="primtype mirrored">{@link VoidType}</TD>
- * <TR style="background-color:#EEEEFF">
- *   <TH id="reftype"  colspan=3>Subinterfaces of {@link ReferenceType}</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>
+ *   <TH scope="row"><CODE>void</CODE></TH>
+ *   <TD>{@link VoidType}</TD>
+ * </TBODY>
+ * </TABLE>
+ *
+ * <TABLE class="plain">
+ * <CAPTION>Subinterfaces of {@link ReferenceType}</CAPTION>
+ * <THEAD style="background-color:#EEEEFF; text-align:left">
  * <TR>
- *   <TD headers="reftype declared2"><I>a class</I></TD>
- *   <TD headers="reftype example2"><CODE>Date</CODE></TD>
- *   <TD headers="reftype mirrored2">{@link ClassType}</TD>
+ *   <TH scope="col" style="width:15em">Type declared in target as</TH>
+ *   <TH scope="col" style="width:10em">For example</TH>
+ *   <TH scope="col" style="width:20em">Is mirrored as an instance of</TH>
+ * </THEAD>
+ * <TBODY style="text-align:left">
  * <TR>
- *   <TD headers="reftype declared2"><I>an interface</I></TD>
- *   <TD headers="reftype example2"><CODE>Runnable</CODE></TD>
- *   <TD headers="reftype mirrored2">{@link InterfaceType}</TD>
+ *   <TH scope="row"><I>a class</I></TH>
+ *   <TH scope="row"><CODE>Date</CODE></TH>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="reftype declared2"><I>an array</I></TD>
- *   <TD headers="reftype example2">&nbsp;</TD>
- *   <TD headers="reftype mirrored2">{@link ArrayType}</TD>
+ *   <TH scope="row"><I>an interface</I></TH>
+ *   <TH scope="row"><CODE>Runnable</CODE></TH>
+ *   <TD>{@link InterfaceType}</TD>
  * <TR>
- *   <TD headers="reftype declared2"><I>an array</I></TD>
- *   <TD headers="reftype example2"><CODE>int[]</CODE></TD>
- *   <TD headers="reftype mirrored2">{@link ArrayType} whose
+ *   <TH scope="row" rowspan="4"><I>an array</I></TH>
+ *   <TH scope="row"><i>(any)</i></TH>
+ *   <TD>{@link ArrayType}</TD>
+ * <TR>
+ *   <!--<TH scope="row"><I>an array</I></TH>-->
+ *   <TH scope="row"><CODE>int[]</CODE></TH>
+ *   <TD>{@link ArrayType} whose
  *         {@link ArrayType#componentType() componentType()} is
  *         {@link IntegerType}</TD>
  * <TR>
- *   <TD headers="reftype declared2"><I>an array</I></TD>
- *   <TD headers="reftype example2"><CODE>Date[]</CODE></TD>
- *   <TD headers="reftype mirrored2">{@link ArrayType} whose
+ *   <!--<TH scope="row"><I>an array</I></TH>-->
+ *   <TH scope="row"><CODE>Date[]</CODE></TH>
+ *   <TD>{@link ArrayType} whose
  *         {@link ArrayType#componentType() componentType()} is
  *         {@link ClassType}</TD>
  * <TR>
- *   <TD headers="reftype declared2"><I>an array</I></TD>
- *   <TD headers="reftype example2"><CODE>Runnable[]</CODE></TD>
- *   <TD headers="reftype mirrored2">{@link ArrayType} whose
+ *   <!--<TH scope="row"><I>an array</I></TH>-->
+ *   <TH scope="row"><CODE>Runnable[]</CODE></TH>
+ *   <TD>{@link ArrayType} whose
  *         {@link ArrayType#componentType() componentType()} is
  *         {@link InterfaceType}</TD>
+ * </TBODY>
  * </TABLE>
  *
  * @see PrimitiveType Subinterface PrimitiveType
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Thu Aug 24 16:36:25 2017 +0200
@@ -33,7 +33,7 @@
  * value hierarchy encompassing primitive values and object values.
  * <P>
  * Some examples of where values may be accessed:
- * <BLOCKQUOTE><TABLE><CAPTION style="display:none">layout</CAPTION>
+ * <BLOCKQUOTE><TABLE role="presentation">
  * <TR>
  *   <TD>{@link ObjectReference#getValue(Field)
  *                 ObjectReference.getValue(Field)}
@@ -52,117 +52,130 @@
  *   <TD>- returned with an event
  * </TABLE></BLOCKQUOTE>
  * <P>
- * The following table illustrates which subinterfaces of Value
+ * The following tables illustrate which subinterfaces of Value
  * are used to mirror values in the target VM --
- * <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 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>
+ * <TABLE class="plain">
+ * <CAPTION>Subinterfaces of {@link PrimitiveValue}</CAPTION>
+ * <THEAD style="background-color:#EEEEFF; text-align:left">
  * <TR>
- *   <TD headers="primval kind">     a boolean</TD>
- *   <TD headers="primval example">  {@code true}</TD>
- *   <TD headers="primval mirrored"> {@link BooleanValue}</TD>
- *   <TD headers="primval type">     {@link BooleanType}</TD>
+ *   <TH scope="col" style="width:10em">Kind of value</TH>
+ *   <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
+ *   <TH scope="col" style="width:15em">Is mirrored as an<br>instance of</TH>
+ *   <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
+ * </THEAD>
+ * <TBODY style="text-align:left">
  * <TR>
- *   <TD headers="primval kind">     a byte</TD>
- *   <TD headers="primval example">  {@code (byte)4}</TD>
- *   <TD headers="primval mirrored"> {@link ByteValue}</TD>
- *   <TD headers="primval type">     {@link ByteType}</TD>
+ *   <TH scope="row">a boolean</TH>
+ *   <TD>{@code true}</TD>
+ *   <TD>{@link BooleanValue}</TD>
+ *   <TD>{@link BooleanType}</TD>
+ * <TR>
+ *   <TH scope="row">a byte</TH>
+ *   <TD>{@code (byte)4}</TD>
+ *   <TD>{@link ByteValue}</TD>
+ *   <TD>{@link ByteType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a char</TD>
- *   <TD headers="primval example">  {@code 'a'}</TD>
- *   <TD headers="primval mirrored"> {@link CharValue}</TD>
- *   <TD headers="primval type">     {@link CharType}</TD>
+ *   <TH scope="row">a char</TH>
+ *   <TD>{@code 'a'}</TD>
+ *   <TD>{@link CharValue}</TD>
+ *   <TD>{@link CharType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a double</TD>
- *   <TD headers="primval example">  {@code 3.1415926}</TD>
- *   <TD headers="primval mirrored"> {@link DoubleValue}</TD>
- *   <TD headers="primval type">     {@link DoubleType}</TD>
+ *   <TH scope="row">a double</TH>
+ *   <TD>{@code 3.1415926}</TD>
+ *   <TD>{@link DoubleValue}</TD>
+ *   <TD>{@link DoubleType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a float</TD>
- *   <TD headers="primval example">  {@code 2.5f}</TD>
- *   <TD headers="primval mirrored"> {@link FloatValue}</TD>
- *   <TD headers="primval type">     {@link FloatType}</TD>
+ *   <TH scope="row">a float</TH>
+ *   <TD>{@code 2.5f}</TD>
+ *   <TD>{@link FloatValue}</TD>
+ *   <TD>{@link FloatType}</TD>
  * <TR>
- *   <TD headers="primval kind">     an int</TD>
- *   <TD headers="primval example">  {@code 22}</TD>
- *   <TD headers="primval mirrored"> {@link IntegerValue}</TD>
- *   <TD headers="primval type">     {@link IntegerType}</TD>
+ *   <TH scope="row">an int</TH>
+ *   <TD>{@code 22}</TD>
+ *   <TD>{@link IntegerValue}</TD>
+ *   <TD>{@link IntegerType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a long</TD>
- *   <TD headers="primval example">  {@code 1024L}</TD>
- *   <TD headers="primval mirrored"> {@link LongValue}</TD>
- *   <TD headers="primval type">     {@link LongType}</TD>
+ *   <TH scope="row">a long</TH>
+ *   <TD>{@code 1024L}</TD>
+ *   <TD>{@link LongValue}</TD>
+ *   <TD>{@link LongType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a short</TD>
- *   <TD headers="primval example">  {@code (short)12}</TD>
- *   <TD headers="primval mirrored"> {@link ShortValue}</TD>
- *   <TD headers="primval type">     {@link ShortType}</TD>
+ *   <TH scope="row">a short</TH>
+ *   <TD>{@code (short)12}</TD>
+ *   <TD>{@link ShortValue}</TD>
+ *   <TD>{@link ShortType}</TD>
  * <TR>
- *   <TD headers="primval kind">     a void</TD>
- *   <TD headers="primval example">  </TD>
- *   <TD headers="primval mirrored"> {@link VoidValue}</TD>
- *   <TD headers="primval type">     {@link VoidType}</TD>
- * <TR style="background-color:#EEEEFF">
- *   <TH id="objref" colspan=4>Subinterfaces of {@link ObjectReference}</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>
+ *   <TH scope="row">a void</TH>
+ *   <TD></TD>
+ *   <TD>{@link VoidValue}</TD>
+ *   <TD>{@link VoidType}</TD>
+ * </TBODY>
+ * </TABLE>
+ *
+ * <TABLE class="plain">
+ * <CAPTION>Subinterfaces of {@link ObjectReference}</CAPTION>
+ * <THEAD style="background-color:#EEEEFF; text-align:left">
  * <TR>
- *   <TD headers="objref kind2">     a class instance</TD>
- *   <TD headers="objref example2">  {@code this}</TD>
- *   <TD headers="objref mirrored2"> {@link ObjectReference}</TD>
- *   <TD headers="objref type2">     {@link ClassType}</TD>
+ *   <TH scope="col" style="width:10em">Kind of value</TH>
+ *   <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
+ *   <TH scope="col" style="width:15em">Is mirrored as an<br>instance of</TH>
+ *   <TH scope="col" style="width:15em">{@link Type} of value<br>{@link #type() Value.type()}</TH>
+ * </THEAD>
+ * <TBODY style="text-align:left">
  * <TR>
- *   <TD headers="objref kind2">     an array</TD>
- *   <TD headers="objref example2">  {@code new int[5]}</TD>
- *   <TD headers="objref mirrored2"> {@link ArrayReference}</TD>
- *   <TD headers="objref type2">     {@link ArrayType}</TD>
+ *   <TH scope="row">a class instance</TH>
+ *   <TD>{@code this}</TD>
+ *   <TD>{@link ObjectReference}</TD>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a string</TD>
- *   <TD headers="objref example2">  {@code "hello"}</TD>
- *   <TD headers="objref mirrored2"> {@link StringReference}</TD>
- *   <TD headers="objref type2">     {@link ClassType}</TD>
+ *   <TH scope="row">an array</TH>
+ *   <TD>{@code new int[5]}</TD>
+ *   <TD>{@link ArrayReference}</TD>
+ *   <TD>{@link ArrayType}</TD>
+ * <TR>
+ *   <TH scope="row">a string</TH>
+ *   <TD>{@code "hello"}</TD>
+ *   <TD>{@link StringReference}</TD>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a thread</TD>
- *   <TD headers="objref example2">  {@code Thread.currentThread()}</TD>
- *   <TD headers="objref mirrored2"> {@link ThreadReference}</TD>
- *   <TD headers="objref type2">     {@link ClassType}</TD>
+ *   <TH scope="row">a thread</TH>
+ *   <TD>{@code Thread.currentThread()}</TD>
+ *   <TD>{@link ThreadReference}</TD>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a thread group</TD>
- *   <TD headers="objref example2">  {@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD>
- *   <TD headers="objref mirrored2"> {@link ThreadGroupReference}</TD>
- *   <TD headers="objref type2">     {@link ClassType}</TD>
+ *   <TH scope="row">a thread group</TH>
+ *   <TD>{@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD>
+ *   <TD>{@link ThreadGroupReference}</TD>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a {@code java.lang.Class}<br>instance</TD>
- *   <TD headers="objref example2">  {@code this.getClass()}</TD>
- *   <TD headers="objref mirrored2"> {@link ClassObjectReference}</TD>
- *   <TD headers="objref type2">     {@link ClassType}</TD>
+ *   <TH scope="row">a {@code java.lang.Class}<br>instance</TH>
+ *   <TD>{@code this.getClass()}</TD>
+ *   <TD>{@link ClassObjectReference}</TD>
+ *   <TD>{@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a class loader</TD>
- *   <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 style="background-color:#EEEEFF">
- *   <TH id="other" colspan=4>Other</TH>
- * <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>
+ *   <TH scope="row">a class loader</TH>
+ *   <TD>{@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD>
+ *   <TD>{@link ClassLoaderReference}</TD>
+ *   <TD>{@link ClassType}</TD>
+ * </TBODY>
+ * </TABLE>
+ *
+ * <TABLE class="plain">
+ * <CAPTION>Other values</CAPTION>
+ * <THEAD style="background-color:#EEEEFF; text-align:left">
  * <TR>
- *   <TD headers="other kind3">     null</TD>
- *   <TD headers="other example3">  {@code null}</TD>
- *   <TD headers="other mirrored3"> {@code null}</TD>
- *   <TD headers="other type3">     n/a</TD>
+ *   <TH scope="col" style="width:10em">Kind of value</TH>
+ *   <TH scope="col" style="width:15em">For example -<br>expression in target</TH>
+ *   <TH scope="col" style="width:15em">Is mirrored as</TH>
+ *   <TH scope="col" style="width:15em">{@link Type} of value</TH>
+ * </THEAD>
+ * <TBODY style="text-align:left">
+ * <TR>
+ *   <TH scope="row">null</TH>
+ *   <TD>{@code null}</TD>
+ *   <TD>{@code null}</TD>
+ *   <TD>n/a</TD>
+ * </TBODY>
  * </TABLE>
  *
  * @author Robert Field
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Thu Aug 24 16:36:25 2017 +0200
@@ -59,13 +59,16 @@
  * Some {@link Connector} implementations may require slightly
  * different handling than presented below.
  *
- * <TABLE BORDER="1" style="width:75%">
+ * <TABLE class="striped">
  * <CAPTION style="display:none">Four scenarios for connecting a debugger to a virtual machine"</CAPTION>
+ * <THEAD>
  * <TR>
- * <TH scope=col>Scenario</TH>
- * <TH scope=col>Description</TH>
+ * <TH scope="col">Scenario</TH>
+ * <TH scope="col">Description</TH>
+ * </THEAD>
+ * <TBODY>
  * <TR>
- * <TD>Debugger launches target VM (simplest, most-common scenario)</TD>
+ * <TH scope="row">Debugger launches target VM (simplest, most-common scenario)</TH>
  *
  * <TD>Debugger calls the {@link LaunchingConnector#launch(java.util.Map)}
  * method of the default connector, obtained with {@link #defaultConnector}. The
@@ -86,7 +89,7 @@
  * </TD>
  * </TR>
  * <TR>
- * <TD>Debugger attaches to previously-running VM</TD>
+ * <TH scope="row">Debugger attaches to previously-running VM</TH>
  * <TD>
  * <UL>
  * <LI>
@@ -113,7 +116,7 @@
  * </TR>
  *
  * <TR>
- * <TD>Target VM attaches to previously-running debugger</TD>
+ * <TH scope="row">Target VM attaches to previously-running debugger</TH>
  * <TD>
  * <UL>
  * <LI>
@@ -146,7 +149,7 @@
  * </TR>
  *
  * <TR>
- * <TD>Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TD>
+ * <TH scope="row">Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TH>
  * <TD>
  * <UL>
  * <LI>
--- a/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Thu Aug 24 16:36:25 2017 +0200
@@ -1,34 +1,42 @@
 <!DOCTYPE HTML>
-<HTML>
+<HTML lang="EN">
 <HEAD>
 <TITLE>
 JDI Type Signatures
 </TITLE>
+<META charset="UTF-8">
+<STYLE type="text/css">
+tbody th { font-weight: normal }
+</STYLE>
 </HEAD>
 <BODY style="background-color:white">
 <dl><dd>
 <Table Border="0">
-<caption><font size=5><b>JDI Type Signatures</b></font></caption>
-<tr><th>Type Signature
-<th>Java Type
-<tr><td>Z<td>boolean
-<tr><td>B<td>byte
-<tr><td>C<td>char
-<tr><td>S<td>short
-<tr><td>I<td>int
-<tr><td>J<td>long
-<tr><td>F<td>float
-<tr><td>D<td>double
-<tr><td><strong>L</strong> <em>fully-qualified-class</em> 
+<caption style="font-size:x-large"><b>JDI Type Signatures</b></caption>
+<thead>
+<tr><th scope="col">Type Signature
+<th scope="col">Java Type
+</thead>
+<tbody>
+<tr><th scope="row">Z<td>boolean
+<tr><th scope="row">B<td>byte
+<tr><th scope="row">C<td>char
+<tr><th scope="row">S<td>short
+<tr><th scope="row">I<td>int
+<tr><th scope="row">J<td>long
+<tr><th scope="row">F<td>float
+<tr><th scope="row">D<td>double
+<tr><th scope="row"><strong>L</strong> <em>fully-qualified-class</em> 
 <strong>;</strong>
 <td>fully-qualified-class
-<tr><td><strong>[</strong> <em>type
+<tr><th scope="row"><strong>[</strong> <em>type
 </em>
 <td><em>type</em>[]
-<tr><td>
+<tr><th scope="row">
 <strong>(</strong> <em>arg-types </em><strong>)</strong> <em>ret-type
 </em>
 <td>method type (including constructors)
+</tbody>
 </Table>
 </dd></dl>
 <p>For example, the Java method:
--- a/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Thu Aug 24 16:36:25 2017 +0200
@@ -106,13 +106,24 @@
      * Converts DOS time to Java time (number of milliseconds since epoch).
      */
     public static long dosToJavaTime(long dtime) {
-        LocalDateTime ldt = LocalDateTime.of(
-                (int) (((dtime >> 25) & 0x7f) + 1980),
-                (int) ((dtime >> 21) & 0x0f),
-                (int) ((dtime >> 16) & 0x1f),
-                (int) ((dtime >> 11) & 0x1f),
-                (int) ((dtime >> 5) & 0x3f),
-                (int) ((dtime << 1) & 0x3e));
+        int year;
+        int month;
+        int day;
+        int hour = (int) ((dtime >> 11) & 0x1f);
+        int minute = (int) ((dtime >> 5) & 0x3f);
+        int second = (int) ((dtime << 1) & 0x3e);
+        if ((dtime >> 16) == 0) {
+            // Interpret the 0 DOS date as 1979-11-30 for compatibility with
+            // other implementations.
+            year = 1979;
+            month = 11;
+            day = 30;
+        } else {
+            year = (int) (((dtime >> 25) & 0x7f) + 1980);
+            month = (int) ((dtime >> 21) & 0x0f);
+            day = (int) ((dtime >> 16) & 0x1f);
+        }
+        LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, minute, second);
         return TimeUnit.MILLISECONDS.convert(ldt.toEpochSecond(
                 ZoneId.systemDefault().getRules().getOffset(ldt)), TimeUnit.SECONDS);
     }
--- a/jdk/test/TEST.ROOT	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/TEST.ROOT	Thu Aug 24 16:36:25 2017 +0200
@@ -10,9 +10,11 @@
 # randomness tests.
 #
 # A "headful" test requires a graphical environment to meaningfully
-# run. Tests that are not headful are "headless."
+# run. Tests that are not headful are "headless".
+# A test flagged with key "printer" requires a printer to succeed, else 
+# throws a PrinterException or the like.
 
-keys=2d dnd i18n intermittent randomness headful
+keys=2d dnd headful i18n intermittent printer randomness
 
 # Tests that must run in othervm mode
 othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle
--- a/jdk/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, 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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8007267
  * @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
  * @requires (os.family == "mac")
--- a/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -20,13 +20,16 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/*
+
+/**
  * @test
+ * @key headful
  * @bug 8158325
  * @summary Memory leak in com.apple.laf.ScreenMenu: removed JMenuItems are still referenced
  * @requires (os.family == "mac")
  * @run main/timeout=300/othervm -Xmx16m ScreenMenuMemoryLeakTest
  */
+
 import java.awt.EventQueue;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.InvocationTargetException;
--- a/jdk/test/java/awt/Choice/ChoiceHiDpi/ChoiceTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Choice/ChoiceHiDpi/ChoiceTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8144594
  * @summary HiDPI: awt.Choice looks improperly (Win 8)
  * @run main ChoiceTest
--- a/jdk/test/java/awt/Desktop/DesktopGtkLoadTest/DesktopGtkLoadTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Desktop/DesktopGtkLoadTest/DesktopGtkLoadTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8157827
  * @summary AWT_Desktop/Automated/Exceptions/BasicTest loads incorrect GTK
  * version when jdk.gtk.version=3
--- a/jdk/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, 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
@@ -30,11 +30,13 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8043705
  * @summary Can't exit color chooser dialog when running as an applet
  * @modules java.desktop/sun.awt
  * @run main CloseDialogTest
  */
+
 public class CloseDialogTest {
 
     private static volatile Frame frame;
--- a/jdk/test/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, 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
@@ -21,17 +21,19 @@
  * questions.
  */
 
- /*
- @test 8155740
- @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
-          called when it is button is clicked (system load related)
- @summary com.apple.junit.java.awt.Frame
- @library ../../../regtesthelpers
- @build VisibilityValidator
- @build Util
- @build Waypoint
- @run main NestedModalDialogTest
+/**
+ * @test 8155740
+ * @key headful
+ * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
+ *          called when it is button is clicked (system load related)
+ * @summary com.apple.junit.java.awt.Frame
+ * @library ../../../regtesthelpers
+ * @build VisibilityValidator
+ * @build Util
+ * @build Waypoint
+ * @run main NestedModalDialogTest
  */
+
 //////////////////////////////////////////////////////////////////////////////
 //  NestedModalDialogTest.java
 // The test launches a parent frame. From this parent frame it launches a modal
--- a/jdk/test/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, 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
@@ -21,17 +21,19 @@
  * questions.
  */
 
- /*
- @test 8155740
- @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
-              called when it is button is clicked (system load related)
- @summary com.apple.junit.java.awt.Frame
- @library ../../../regtesthelpers
- @build VisibilityValidator
- @build Util
- @build Waypoint
- @run main NestedModelessDialogTest
+/**
+ * @test 8155740
+ * @key headful
+ * @summary See <rdar://problem/3429130>: Events: actionPerformed() method not
+ *              called when it is button is clicked (system load related)
+ * @summary com.apple.junit.java.awt.Frame
+ * @library ../../../regtesthelpers
+ * @build VisibilityValidator
+ * @build Util
+ * @build Waypoint
+ * @run main NestedModelessDialogTest -Xlog:exception
  */
+
 /////////////////////////////////////////////////////////////////////////////
 //  NestedModelessDialogTest.java
 // The test launches a parent frame. From this parent frame it launches a modal
--- a/jdk/test/java/awt/EmbeddedFrame/DisplayChangedTest/DisplayChangedTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/EmbeddedFrame/DisplayChangedTest/DisplayChangedTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, 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,24 +21,20 @@
  * questions.
  */
 
-/*
- @test
- @bug 4980592 8171363
- @summary   switching user in XP causes an NPE in
-            sun.awt.windows.WWindowPeer.displayChanged
- @requires (os.family == "windows")
- @modules java.desktop/java.awt.peer
- @modules java.desktop/sun.awt.windows:open
- @modules java.desktop/sun.awt
- @author son@sparc.spb.su: area=embedded
- @run main DisplayChangedTest
+/**
+ * @test
+ * @key headful
+ * @bug 4980592 8171363
+ * @summary   switching user in XP causes an NPE in
+ *            sun.awt.windows.WWindowPeer.displayChanged
+ * @requires (os.family == "windows")
+ * @modules java.desktop/java.awt.peer
+ * @modules java.desktop/sun.awt.windows:open
+ * @modules java.desktop/sun.awt
+ * @author son@sparc.spb.su: area=embedded
+ * @run main DisplayChangedTest
  */
-/**
- * DisplayChangedTest.java
- *
- * summary: switching user in XP causes an NPE in
- * sun.awt.windows.WWindowPeer.displayChanged
- */
+
 import java.awt.Frame;
 import java.awt.Dialog;
 import java.awt.TextArea;
--- a/jdk/test/java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/EmbeddedFrame/EmbeddedFrameGrabTest/EmbeddedFrameGrabTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, 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,22 +21,19 @@
  * questions.
  */
 
-/*
- @test
- @bug 6345003 8171363
- @summary grab problems with EmbeddedFrame
- @requires (os.family == "windows")
- @modules java.desktop/java.awt.peer
- @modules java.desktop/sun.awt
- @modules java.desktop/sun.awt.windows:open
- @author Oleg.Semenov@sun.com area=EmbeddedFrame
- @run main EmbeddedFrameGrabTest
+/**
+ * @test
+ * @key headful
+ * @bug 6345003 8171363
+ * @summary grab problems with EmbeddedFrame
+ * @requires (os.family == "windows")
+ * @modules java.desktop/java.awt.peer
+ * @modules java.desktop/sun.awt
+ * @modules java.desktop/sun.awt.windows:open
+ * @author Oleg.Semenov@sun.com area=EmbeddedFrame
+ * @run main EmbeddedFrameGrabTest
  */
-/**
- * EmbeddedFrameGrabTest.java
- *
- * summary: grab problems with EmbeddedFrame
- */
+
 import java.awt.Frame;
 import java.awt.peer.FramePeer;
 import javax.swing.JComboBox;
--- a/jdk/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -23,6 +23,7 @@
 
 <HTML>
   <!--  @test
+        @key headful
         @bug 4023283
         @summary Checks that an Error which propogate up to the EventDispatch
         loop does not crash AWT.
--- a/jdk/test/java/awt/EventQueue/6980209/bug6980209.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/EventQueue/6980209/bug6980209.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,11 +21,13 @@
  * questions.
  */
 
-/* @test
-   @bug 6980209
-   @summary Make tracking SecondaryLoop.enter/exit methods easier
-   @author Semyon Sadetsky
-  */
+/**
+ * @test
+ * @key headful
+ * @bug 6980209
+ * @summary Make tracking SecondaryLoop.enter/exit methods easier
+ * @author Semyon Sadetsky
+ */
 
 import javax.swing.*;
 import java.awt.*;
--- a/jdk/test/java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/FileDialog/FileDialogIconTest/FileDialogIconTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8157163 8159132
  * @summary AWT FileDialog does not inherit icon image from parent Frame
  * @requires os.family=="windows"
@@ -68,8 +70,8 @@
                         "owning window. Wrong color: " + color);
             }
         } finally {
-            dialog.dispose();
-            frame.dispose();
+            if (dialog != null) { dialog.dispose(); }
+            if (frame  != null) { frame.dispose();  }
         }
     }
 
--- a/jdk/test/java/awt/Focus/FocusEmbeddedFrameTest/FocusEmbeddedFrameTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Focus/FocusEmbeddedFrameTest/FocusEmbeddedFrameTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,20 +21,21 @@
  * questions.
  */
 
-/*
-  @test
-  @bug       6516675
-  @summary   Tests that EmbeddedFrame can be focused.
-  @author    anton.tarasov: area=awt-focus
-  @requires (os.family == "windows")
-  @modules   java.desktop/java.awt.peer
-             java.desktop/sun.awt
-             java.desktop/sun.awt.windows
-  @library /java/awt/patchlib    ../../regtesthelpers
-  @build java.desktop/java.awt.Helper
-  @build     Util UtilInternal
-  @run       main FocusEmbeddedFrameTest
-*/
+/**
+ * @test
+ * @key       headful
+ * @bug       6516675
+ * @summary   Tests that EmbeddedFrame can be focused.
+ * @author    anton.tarasov: area=awt-focus
+ * @requires (os.family == "windows")
+ * @modules   java.desktop/java.awt.peer
+ *            java.desktop/sun.awt
+ *            java.desktop/sun.awt.windows
+ * @library /java/awt/patchlib    ../../regtesthelpers
+ * @build java.desktop/java.awt.Helper
+ * @build     Util UtilInternal
+ * @run       main FocusEmbeddedFrameTest
+ */
 
 import java.awt.*;
 import java.awt.event.*;
--- a/jdk/test/java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Focus/FocusTraversalPolicy/ButtonGroupLayoutTraversal/ButtonGroupLayoutTraversalTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,15 @@
  * questions.
  */
 
- /*
-  @test
-  @bug 8154043 8172509
-  @summary Fields not reachable anymore by tab-key, because of new tabbing
-  behaviour of radio button groups.
-  @run main ButtonGroupLayoutTraversalTest
+/**
+ * @test
+ * @key headful
+ * @bug 8154043 8172509
+ * @summary Fields not reachable anymore by tab-key, because of new tabbing
+ * behaviour of radio button groups.
+ * @run main ButtonGroupLayoutTraversalTest
  */
+
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.GridLayout;
--- a/jdk/test/java/awt/Focus/RequestFocusByCause/RequestFocusByCauseTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Focus/RequestFocusByCause/RequestFocusByCauseTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,14 @@
  * questions.
  */
 
-/*
-  @test
-  @bug 8154434
-  @summary Open the request focus methods of the java.awt.Component which accept
-           FocusEvent.Cause
-  @run main RequestFocusByCauseTest
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8154434
+ * @summary Open the request focus methods of the java.awt.Component which accept
+ *          FocusEvent.Cause
+ * @run main RequestFocusByCauseTest
+ */
 
 import java.awt.*;
 import java.awt.event.FocusEvent;
@@ -148,4 +149,5 @@
             frame.dispose();
         }
     }
-}
\ No newline at end of file
+}
+
--- a/jdk/test/java/awt/FontClass/HelvLtOblTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/FontClass/HelvLtOblTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8064833
  * @summary Test correct font is obtained via famil+style
  * @run main HelvLtOblTest
--- a/jdk/test/java/awt/FontClass/SurrogateTest/SuppCharTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/FontClass/SurrogateTest/SuppCharTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8015556
  * @summary Surrogate pairs do not render properly on MacOS X.
  */
--- a/jdk/test/java/awt/Frame/8158918/SetExtendedState.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/8158918/SetExtendedState.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,14 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8158918
  * @summary setExtendedState(1) for maximized Frame results in state==7
  * @run main SetExtendedState
  */
+
 import java.awt.Frame;
 
 public class SetExtendedState {
--- a/jdk/test/java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/DecoratedFrameInsets/DecoratedFrameInsetsTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8165619
  * @summary Frame is not repainted if created in state=MAXIMIZED_BOTH on Unity
  * @run main DecoratedFrameInsetsTest
--- a/jdk/test/java/awt/Frame/ExceptionOnSetExtendedStateTest/ExceptionOnSetExtendedStateTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/ExceptionOnSetExtendedStateTest/ExceptionOnSetExtendedStateTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,12 +21,14 @@
  * questions.
  */
 
-/* @test
-   @bug 8032078
-   @summary Frame.setExtendedState throws RuntimeException, if
-            windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X
-   @author Anton Litvinov
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8032078
+ * @summary Frame.setExtendedState throws RuntimeException, if
+ *          windowState=ICONIFIED|MAXIMIZED_BOTH, on OS X
+ * @author Anton Litvinov
+ */
 
 import java.awt.*;
 
--- a/jdk/test/java/awt/Frame/MaximizedByPlatform/MaximizedByPlatform.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/MaximizedByPlatform/MaximizedByPlatform.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8026143
  * @summary [macosx] Maximized state could be inconsistent between peer and frame
  * @author Petr Pchelko
@@ -70,7 +72,7 @@
                 throw new RuntimeException("Maximized state was not set for frame in setBounds");
             }
         } finally {
-            frame.dispose();
+            if (frame != null) frame.dispose();
         }
 
 
@@ -87,7 +89,7 @@
                 throw new RuntimeException("Maximized state was not set for frame in setVisible");
             }
         } finally {
-            frame.dispose();
+            if (frame != null) frame.dispose();
         }
     }
 
--- a/jdk/test/java/awt/Frame/NormalToIconified/NormalToIconifiedTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/NormalToIconified/NormalToIconifiedTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8171949
  * @summary Tests that bitwise mask is set and state listener is notified during state transition.
  * @author Dmitry Markov
--- a/jdk/test/java/awt/Frame/SetMaximizedBounds/MaximizedMovedWindow.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/SetMaximizedBounds/MaximizedMovedWindow.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,14 +22,16 @@
  */
 import java.awt.*;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8065739
  * @summary Moved window is maximazed to new screen
  * @author Alexandr Scherbatiy
  *
  * @run main MaximizedMovedWindow
  */
+
 public class MaximizedMovedWindow {
 
     public static void main(String[] args) throws Exception {
--- a/jdk/test/java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -22,8 +22,10 @@
  */
 
 import java.awt.*;
-/*
+
+/**
  * @test
+ * @key headful
  * @bug 8065739 8131339
  * @summary When Frame.setExtendedState(Frame.MAXIMIZED_BOTH)
  *          is called for a Frame after been called setMaximizedBounds() with
--- a/jdk/test/java/awt/Frame/WindowDragTest/WindowDragTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Frame/WindowDragTest/WindowDragTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,15 +21,16 @@
  * questions.
  */
 
-/*
-  @test
-  @bug 7128738 7161759
-  @summary dragged dialog freezes system on dispose
-  @author Oleg Pekhovskiy: area=awt.toplevel
-  @library ../../regtesthelpers
-  @build Util
-  @run main WindowDragTest
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 7128738 7161759
+ * @summary dragged dialog freezes system on dispose
+ * @author Oleg Pekhovskiy: area=awt.toplevel
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main WindowDragTest
+ */
 
 import java.awt.Frame;
 import java.awt.event.InputEvent;
--- a/jdk/test/java/awt/FullScreen/CurrentDisplayModeTest/CurrentDisplayModeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/FullScreen/CurrentDisplayModeTest/CurrentDisplayModeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,6 +23,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8022810
  * @summary Device.getDisplayMode() doesn't report refresh rate on Linux in case
  *          of dual screen
--- a/jdk/test/java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,6 +23,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8022810
  * @summary Cannot list all the available display modes on Ubuntu linux in case
  *          of two screen devices
--- a/jdk/test/java/awt/KeyboardFocusmanager/DefaultPolicyChange/DefaultPolicyChange_Swing.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/KeyboardFocusmanager/DefaultPolicyChange/DefaultPolicyChange_Swing.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, 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
@@ -21,13 +21,14 @@
  * questions.
  */
 
-/*
-  @test
-  @bug 6741526 8004693
-  @summary KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy) affects created components
-  @author Andrei Dmitriev : area=awt-focus
-  @run main DefaultPolicyChange_Swing
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 6741526 8004693
+ * @summary KeyboardFocusManager.setDefaultFocusTraversalPolicy(FocusTraversalPolicy) affects created components
+ * @author Andrei Dmitriev : area=awt-focus
+ * @run main DefaultPolicyChange_Swing
+ */
 
 import java.awt.*;
 
--- a/jdk/test/java/awt/MenuBar/8007006/bug8007006.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/MenuBar/8007006/bug8007006.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8007006
  * @summary [macosx] Closing subwindow loses main window menus.
  * @author Leonid Romanov
--- a/jdk/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -32,8 +32,9 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8013468
  * @summary Cursor does not update properly when in fullscreen mode on Mac
  *    The core reason of the issue was the lack of a mouse entered event in fullscreen
@@ -45,6 +46,7 @@
  * @author Petr Pchelko area=awt.event
  * @run main FullscreenEnterEventTest
  */
+
 public class FullscreenEnterEventTest {
 
     private static String OS = System.getProperty("os.name").toLowerCase();
--- a/jdk/test/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Robot/HiDPIMouseClick/HiDPIRobotMouseClick.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -29,13 +29,16 @@
 import java.awt.event.MouseEvent;
 import javax.swing.UIManager;
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8073320
  * @summary  Windows HiDPI support
  * @author Alexander Scherbatiy
  * @requires (os.family == "windows")
  * @run main/othervm -Dsun.java2d.win.uiScale=2 HiDPIRobotMouseClick
  */
+
 public class HiDPIRobotMouseClick {
 
     private static volatile int mouseX;
--- a/jdk/test/java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -32,7 +32,9 @@
 import java.awt.image.BufferedImage;
 import javax.swing.UIManager;
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8073320
  * @summary  Windows HiDPI support
  * @author Alexander Scherbatiy
@@ -40,6 +42,7 @@
  * @run main/othervm -Dsun.java2d.win.uiScaleX=3 -Dsun.java2d.win.uiScaleY=2
  *                    HiDPIRobotScreenCaptureTest
  */
+
 public class HiDPIRobotScreenCaptureTest {
 
     private static final Color[] COLORS = {
--- a/jdk/test/java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -26,9 +26,11 @@
 
 /**
  * @test
+ * @key headful
  * @bug 4449139
  * @summary test MouseWheelEvent generation by Scrollbar component
  */
+
 public final class ScrollbarMouseWheelTest
         implements MouseWheelListener, WindowListener {
 
--- a/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Thu Aug 24 16:36:25 2017 +0200
@@ -34,8 +34,9 @@
 import javax.swing.SwingUtilities;
 import javax.swing.WindowConstants;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8024185
  * @summary Native Mac OS X full screen does not work after showing the splash
  * @requires (os.family == "mac")
@@ -48,6 +49,7 @@
  * @author Petr Pchelko area=awt.event
  * @run main/othervm -splash:test.png FullScreenAfterSplash
  */
+
 public class FullScreenAfterSplash {
 
     private static JFrame frame;
--- a/jdk/test/java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -45,12 +45,14 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8145174 8151787 8168657
  * @summary HiDPI splash screen support on Linux
  * @modules java.desktop/sun.java2d
  * @requires (os.family == "linux")
  * @run main UnixMultiResolutionSplashTest
  */
+
 public class UnixMultiResolutionSplashTest {
 
     private static final int IMAGE_WIDTH = 300;
--- a/jdk/test/java/awt/TextArea/AutoScrollOnSelectAndAppend/AutoScrollOnSelectAndAppend.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/TextArea/AutoScrollOnSelectAndAppend/AutoScrollOnSelectAndAppend.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,13 @@
  * questions.
  */
 
- /*
-  @test
-  @bug 5003402 8151588
-  @summary TextArea must scroll automatically when calling append and select,
-           even when not in focus.
-  @run main AutoScrollOnSelectAndAppend
+/**
+ * @test
+ * @key headful
+ * @bug 5003402 8151588
+ * @summary TextArea must scroll automatically when calling append and select,
+ *          even when not in focus.
+ * @run main AutoScrollOnSelectAndAppend
  */
 
 import java.awt.Button;
--- a/jdk/test/java/awt/TextArea/OverScrollTest/OverScrollTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/TextArea/OverScrollTest/OverScrollTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,13 @@
  * questions.
  */
 
-/*
- @test
- @bug 8149636
- @summary TextArea over scrolls to right when selecting text towards right.
- @requires os.family == "windows"
- @run main OverScrollTest
+/**
+ * @test
+ * @key headful
+ * @bug 8149636
+ * @summary TextArea over scrolls to right when selecting text towards right.
+ * @requires os.family == "windows"
+ * @run main OverScrollTest
  */
 
 import java.awt.Frame;
--- a/jdk/test/java/awt/TextField/OverScrollTest/OverScrollTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/TextField/OverScrollTest/OverScrollTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,13 @@
  * questions.
  */
 
-/*
- @test
- @bug 8149636
- @summary TextField over scrolls to right when selecting text towards right.
- @requires os.family == "windows"
- @run main OverScrollTest
+/**
+ * @test
+ * @key headful
+ * @bug 8149636
+ * @summary TextField over scrolls to right when selecting text towards right.
+ * @requires os.family == "windows"
+ * @run main OverScrollTest
  */
 
 import java.awt.Frame;
--- a/jdk/test/java/awt/Window/GetScreenLocation/GetScreenLocationTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Window/GetScreenLocation/GetScreenLocationTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,6 +23,7 @@
 
 /**
  * @test @summary setLocationRelativeTo stopped working in Ubuntu 13.10 (Unity)
+ * @key headful
  * @bug 8036915 8161273
  * @run main/othervm -Dsun.java2d.uiScale=1 GetScreenLocationTest
  * @run main/othervm -Dsun.java2d.uiScale=2 GetScreenLocationTest
--- a/jdk/test/java/awt/Window/SetWindowLocationByPlatformTest/SetWindowLocationByPlatformTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/Window/SetWindowLocationByPlatformTest/SetWindowLocationByPlatformTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8025130
  * @summary setLocationByPlatform has no effect
  * @author Dmitry Markov
@@ -29,6 +31,7 @@
  * @build Util
  * @run main SetWindowLocationByPlatformTest
  */
+
 import java.awt.*;
 
 import test.java.awt.regtesthelpers.Util;
--- a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,6 @@
  * questions.
  */
 
-/*
-  test
-  @bug 6193279
-  @summary REGRESSION: AppletViewer throws IOException when path is encoded URL
-  @author Dmitry Cherepanov: area=appletviewer
-  @run compile IOExceptionIfEncodedURLTest.java
-  @run main IOExceptionIfEncodedURLTest
-  @run shell IOExceptionIfEncodedURLTest.sh
-*/
-
 import java.applet.Applet;
 import sun.net.www.ParseUtil;
 import java.io.File;
--- a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Thu Aug 24 16:36:25 2017 +0200
@@ -24,7 +24,8 @@
 #!/bin/ksh -p
 #
 #   @test    IOExceptionIfEncodedURLTest.sh
-#   @bug     6193279 6619458 8137087
+#   @key     headful
+#   @bug     6193279 6619458 8137087 8186259
 #   @summary REGRESSION: AppletViewer throws IOException when path is encoded URL
 #   @author  Dmitry Cherepanov: area=appletviewer
 #   @modules java.base/sun.net.www
--- a/jdk/test/java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -31,6 +31,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8076106
  * @author Hendrik Schreiber
  * @summary [macosx] Drag image of TransferHandler does not honor
--- a/jdk/test/java/awt/datatransfer/HTMLDataFlavors/HTMLDataFlavorTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/datatransfer/HTMLDataFlavors/HTMLDataFlavorTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,17 +21,19 @@
  * questions.
  */
 
-/*
-  @test
-  @bug 7075105
-  @summary WIN: Provide a way to format HTML on drop
-  @author Denis Fokin: area=datatransfer
-  @library ../../../../lib/testlibrary
-  @build HtmlTransferable PutAllHtmlFlavorsOnClipboard
-  @build PutOnlyAllHtmlFlavorOnClipboard PutSelectionAndFragmentHtmlFlavorsOnClipboard
-  @build jdk.testlibrary.OSInfo
-  @run main HTMLDataFlavorTest
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 7075105
+ * @summary WIN: Provide a way to format HTML on drop
+ * @author Denis Fokin: area=datatransfer
+ * @requires (os.family == "windows")
+ * @library ../../../../lib/testlibrary
+ * @build HtmlTransferable PutAllHtmlFlavorsOnClipboard
+ * @build PutOnlyAllHtmlFlavorOnClipboard PutSelectionAndFragmentHtmlFlavorsOnClipboard
+ * @build jdk.testlibrary.OSInfo
+ * @run main HTMLDataFlavorTest
+ */
 
 import java.awt.*;
 import java.awt.datatransfer.*;
--- a/jdk/test/java/awt/event/KeyEvent/8020209/bug8020209.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/8020209/bug8020209.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8020209
  * @summary [macosx] Mac OS X key event confusion for "COMMAND PLUS"
  * @author leonid.romanov@oracle.com
--- a/jdk/test/java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSXInputText.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSXInputText.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 7199180
  * @summary [macosx] Dead keys handling for input methods
  * @author alexandr.scherbatiy area=awt.event
@@ -30,6 +31,7 @@
  * @build jdk.testlibrary.OSInfo
  * @run main DeadKeyMacOSXInputText
  */
+
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.event.KeyEvent;
--- a/jdk/test/java/awt/event/KeyEvent/DeadKey/deadKeyMacOSX.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/DeadKey/deadKeyMacOSX.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 7196547
  * @summary Dead Key implementation for KeyEvent on Mac OS X
  * @author alexandr.scherbatiy area=awt.event
--- a/jdk/test/java/awt/font/TextLayout/TestSinhalaChar.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/font/TextLayout/TestSinhalaChar.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,7 +21,9 @@
  *
  */
 
-/* @test @(#)TestSinhalaChar.java
+/**
+ * @test @(#)TestSinhalaChar.java
+ * @key headful
  * @summary verify lack of crash on U+0DDD.
  * @bug 6795060
  */
--- a/jdk/test/java/awt/hidpi/properties/HiDPIPropertiesWindowsTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/hidpi/properties/HiDPIPropertiesWindowsTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -28,7 +28,9 @@
 import java.awt.geom.AffineTransform;
 import javax.swing.UIManager;
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8073320
  * @summary  Windows HiDPI support
  * @author Alexander Scherbatiy
--- a/jdk/test/java/awt/im/6396526/IMLookAndFeel.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/im/6396526/IMLookAndFeel.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,12 +21,13 @@
  * questions.
  */
 
-/*
+/**
  * @test
- * @bug  6396526
- * @summary  Verify below-the-spot IM in the swing L&F JFrame.
- *           Although the swing component is decorated with L&F
- *           the IM window should have no decoration.
+ * @key headful
+ * @bug 6396526
+ * @summary Verify below-the-spot IM in the swing L&F JFrame.
+ *          Although the swing component is decorated with L&F
+ *          the IM window should have no decoration.
  * @author yuriko.yamasaki
  */
 
--- a/jdk/test/java/awt/im/8041990/bug8041990.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/im/8041990/bug8041990.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, 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
@@ -22,13 +22,14 @@
  */
 
 
-/*
-  @test
-  @bug 8041990
-  @summary Language specific keys does not work in applets when opened outside the browser
-  @author Petr Pchelko
-  @modules java.desktop/sun.awt
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8041990
+ * @summary Language specific keys does not work in applets when opened outside the browser
+ * @author Petr Pchelko
+ * @modules java.desktop/sun.awt
+ */
 
 import sun.awt.SunToolkit;
 
--- a/jdk/test/java/awt/image/MultiResolutionImageTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/image/MultiResolutionImageTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, 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
@@ -41,6 +41,7 @@
 
 /**
  * @test @bug 8011059
+ * @key headful
  * @author Alexander Scherbatiy
  * @summary [macosx] Make JDK demos look perfect on retina displays
  * @library /test/lib
@@ -53,6 +54,7 @@
  * @run main MultiResolutionImageTest TOOLKIT_LOAD
  * @run main MultiResolutionImageTest TOOLKIT
  */
+
 public class MultiResolutionImageTest {
 
     private static final int IMAGE_WIDTH = 300;
--- a/jdk/test/java/awt/image/multiresolution/Corrupted2XImageTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/image/multiresolution/Corrupted2XImageTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8142406
  * @author a.stepanov
  * @summary [HiDPI] [macosx] check that for a pair of images
--- a/jdk/test/java/awt/image/multiresolution/MultiResolutionToolkitImageTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/image/multiresolution/MultiResolutionToolkitImageTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, 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
@@ -36,6 +36,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8040291
  * @author Alexander Scherbatiy
  * @summary [macosx] Http-Images are not fully loaded when using ImageIcon
@@ -43,6 +44,7 @@
  *          java.desktop/sun.awt.image
  * @run main MultiResolutionToolkitImageTest
  */
+
 public class MultiResolutionToolkitImageTest {
 
     private static final int IMAGE_WIDTH = 300;
--- a/jdk/test/java/awt/keyboard/AllKeyCode/AllKeyCode.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/keyboard/AllKeyCode/AllKeyCode.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,12 +21,13 @@
  * questions.
  */
 
-/*
- @test
- @bug 8149456 8147834 8150230 8155740
- @requires os.family == "mac"
- @summary Tests key codes for all keys supported in Java for Mac OS X.
- @run main AllKeyCode
+/**
+ * @test
+ * @key headful
+ * @bug 8149456 8147834 8150230 8155740
+ * @requires os.family == "mac"
+ * @summary Tests key codes for all keys supported in Java for Mac OS X.
+ * @run main AllKeyCode
  */
 
 import java.awt.AWTException;
--- a/jdk/test/java/awt/keyboard/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/keyboard/AltPlusNumberKeyCombinationsTest/AltPlusNumberKeyCombinationsTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -25,16 +25,15 @@
 import java.awt.event.*;
 
 /**
- * Test that it is possible to type "Alt code" on Windows.
- * Windows-only test.
+ * @test
+ * @key headful
+ * @summary Test that it is possible to type "Alt code" on Windows.
+ * @requires (os.family == "windows")
+ * @library ../../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main AltPlusNumberKeyCombinationsTest
  */
-/*
-@test
-@summary Test that it is possible to type "Alt code" on Windows.
-@library ../../../../lib/testlibrary
-@build ExtendedRobot
-@run main AltPlusNumberKeyCombinationsTest
-*/
+
 public class AltPlusNumberKeyCombinationsTest {
 
     private Frame frame;
--- a/jdk/test/java/awt/print/PrinterJob/CheckPrivilege.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/CheckPrivilege.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 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
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @key printer
  * @bug 4151151
  * @summary Confirm that low-level print code does doPrivilege.
  * @author Graham Hamilton
--- a/jdk/test/java/awt/print/PrinterJob/ExceptionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/ExceptionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @key printer
  * @bug 6467557
  * @summary No exception should be thrown.
  * @run main ExceptionTest
--- a/jdk/test/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/ImagePrinting/NullClipARGB.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @key printer
  * @bug 8061392
  * @summary Test no NPE when printing transparency with null clip.
  */
--- a/jdk/test/java/awt/print/PrinterJob/Margins.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/Margins.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 6543815 6601097 8160888
  * @summary Image should be sent to printer, no exceptions thrown.
  *    The 3 printouts should have a rectangle which is the minimum
--- a/jdk/test/java/awt/print/PrinterJob/PaintText.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/PaintText.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, 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
@@ -23,6 +23,7 @@
 
 /**
  * @test
+ * @key headful printer
  * @bug 6498340
  * @summary No exception when printing text with a paint.
  * @run main PaintText
--- a/jdk/test/java/awt/print/PrinterJob/PrintCrashTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/PrintCrashTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key printer
  * @bug 8163889
  * @summary Printing crashes on OSX.
  * @run main PrintCrashTest
--- a/jdk/test/java/awt/print/PrinterJob/PrintTextPane.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/PrintTextPane.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,14 +21,15 @@
  * questions.
  */
 
-/*
-  @test PrintTextPane.java
-  @bug 6452415 6570471
-  @summary Test that swing text prints using GDI printer fonts.
-  @author prr: area=PrinterJob
-  @run main PrintTextPane
+/**
+ * @test PrintTextPane.java
+ * @key headful printer
+ * @bug 6452415 6570471
+ * @summary Test that swing text prints using GDI printer fonts.
+ * @author prr: area=PrinterJob
+ * @run main PrintTextPane
+ */
 
- */
 import java.io.*;
 import java.net.*;
 import java.awt.*;
--- a/jdk/test/java/awt/print/PrinterJob/PrtException.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/awt/print/PrinterJob/PrtException.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -20,12 +20,14 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/*
-  @test
-  @bug 4429544
-  @summary This test should not throw a printer exception. Test has been modified to correspond with the behavior of 1.5 and above.
-  @run main PrtException
-*/
+
+/**
+ * @test
+ * @key printer
+ * @bug 4429544
+ * @summary This test should not throw a printer exception. Test has been modified to correspond with the behavior of 1.5 and above.
+ * @run main PrtException
+ */
 
 import java.awt.*;
 import java.awt.print.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/ProxyTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,349 @@
+/*
+ * 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.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsParameters;
+import com.sun.net.httpserver.HttpsServer;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+import java.net.ProxySelector;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.security.NoSuchAlgorithmException;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import jdk.incubator.http.HttpClient;
+import jdk.incubator.http.HttpRequest;
+import jdk.incubator.http.HttpResponse;
+import jdk.testlibrary.SimpleSSLContext;
+
+/**
+ * @test
+ * @bug 8185852 8181422
+ * @summary Verifies that passing a proxy with an unresolved address does
+ *          not cause java.nio.channels.UnresolvedAddressException.
+ *          Verifies that downgrading from HTTP/2 to HTTP/1.1 works through
+ *          an SSL Tunnel connection when the client is HTTP/2 and the server
+ *          and proxy are HTTP/1.1
+ * @modules jdk.incubator.httpclient
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.SimpleSSLContext ProxyTest
+ * @run main/othervm ProxyTest
+ * @author danielfuchs
+ */
+public class ProxyTest {
+
+    static {
+        try {
+            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
+                    public boolean verify(String hostname, SSLSession session) {
+                        return true;
+                    }
+                });
+            SSLContext.setDefault(new SimpleSSLContext().get());
+        } catch (IOException ex) {
+            throw new ExceptionInInitializerError(ex);
+        }
+    }
+
+    static final String RESPONSE = "<html><body><p>Hello World!</body></html>";
+    static final String PATH = "/foo/";
+
+    static HttpServer createHttpsServer() throws IOException, NoSuchAlgorithmException {
+        HttpsServer server = com.sun.net.httpserver.HttpsServer.create();
+        HttpContext context = server.createContext(PATH);
+        context.setHandler(new HttpHandler() {
+            @Override
+            public void handle(HttpExchange he) throws IOException {
+                he.getResponseHeaders().add("encoding", "UTF-8");
+                he.sendResponseHeaders(200, RESPONSE.length());
+                he.getResponseBody().write(RESPONSE.getBytes(StandardCharsets.UTF_8));
+                he.close();
+            }
+        });
+
+        server.setHttpsConfigurator(new Configurator(SSLContext.getDefault()));
+        server.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0), 0);
+        return server;
+    }
+
+    public static void main(String[] args)
+            throws IOException,
+            URISyntaxException,
+            NoSuchAlgorithmException,
+            InterruptedException
+    {
+        HttpServer server = createHttpsServer();
+        server.start();
+        try {
+            test(server, HttpClient.Version.HTTP_1_1);
+            test(server, HttpClient.Version.HTTP_2);
+        } finally {
+            server.stop(0);
+            System.out.println("Server stopped");
+        }
+    }
+
+    public static void test(HttpServer server, HttpClient.Version version)
+            throws IOException,
+            URISyntaxException,
+            NoSuchAlgorithmException,
+            InterruptedException
+    {
+        System.out.println("Server is: " + server.getAddress().toString());
+        System.out.println("Verifying communication with server");
+        URI uri = new URI("https:/" + server.getAddress().toString() + PATH + "x");
+        try (InputStream is = uri.toURL().openConnection().getInputStream()) {
+            String resp = new String(is.readAllBytes(), StandardCharsets.UTF_8);
+            System.out.println(resp);
+            if (!RESPONSE.equals(resp)) {
+                throw new AssertionError("Unexpected response from server");
+            }
+        }
+        System.out.println("Communication with server OK");
+
+        TunnelingProxy proxy = new TunnelingProxy(server);
+        proxy.start();
+        try {
+            System.out.println("Proxy started");
+            Proxy p = new Proxy(Proxy.Type.HTTP,
+                    InetSocketAddress.createUnresolved("localhost", proxy.getAddress().getPort()));
+            System.out.println("Verifying communication with proxy");
+            HttpURLConnection conn = (HttpURLConnection)uri.toURL().openConnection(p);
+            try (InputStream is = conn.getInputStream()) {
+                String resp = new String(is.readAllBytes(), StandardCharsets.UTF_8);
+                System.out.println(resp);
+                if (!RESPONSE.equals(resp)) {
+                    throw new AssertionError("Unexpected response from proxy");
+                }
+            }
+            System.out.println("Communication with proxy OK");
+            System.out.println("\nReal test begins here.");
+            System.out.println("Setting up request with HttpClient for version: "
+                    + version.name());
+            ProxySelector ps = ProxySelector.of(
+                    InetSocketAddress.createUnresolved("localhost", proxy.getAddress().getPort()));
+            HttpClient client = HttpClient.newBuilder()
+                .version(version)
+                .proxy(ps)
+                .build();
+            HttpRequest request = HttpRequest.newBuilder()
+                .uri(uri)
+                .GET()
+                .build();
+
+            System.out.println("Sending request with HttpClient");
+            HttpResponse<String> response
+                = client.send(request, HttpResponse.BodyHandler.asString());
+            System.out.println("Got response");
+            String resp = response.body();
+            System.out.println("Received: " + resp);
+            if (!RESPONSE.equals(resp)) {
+                throw new AssertionError("Unexpected response");
+            }
+        } finally {
+            System.out.println("Stopping proxy");
+            proxy.stop();
+            System.out.println("Proxy stopped");
+        }
+    }
+
+    static class TunnelingProxy {
+        final Thread accept;
+        final ServerSocket ss;
+        final boolean DEBUG = false;
+        final HttpServer serverImpl;
+        TunnelingProxy(HttpServer serverImpl) throws IOException {
+            this.serverImpl = serverImpl;
+            ss = new ServerSocket();
+            accept = new Thread(this::accept);
+        }
+
+        void start() throws IOException {
+            ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0));
+            accept.start();
+        }
+
+        // Pipe the input stream to the output stream.
+        private synchronized Thread pipe(InputStream is, OutputStream os, char tag) {
+            return new Thread("TunnelPipe("+tag+")") {
+                @Override
+                public void run() {
+                    try {
+                        try {
+                            int c;
+                            while ((c = is.read()) != -1) {
+                                os.write(c);
+                                os.flush();
+                                // if DEBUG prints a + or a - for each transferred
+                                // character.
+                                if (DEBUG) System.out.print(tag);
+                            }
+                            is.close();
+                        } finally {
+                            os.close();
+                        }
+                    } catch (IOException ex) {
+                        if (DEBUG) ex.printStackTrace(System.out);
+                    }
+                }
+            };
+        }
+
+        public InetSocketAddress getAddress() {
+            return new InetSocketAddress(ss.getInetAddress(), ss.getLocalPort());
+        }
+
+        // This is a bit shaky. It doesn't handle continuation
+        // lines, but our client shouldn't send any.
+        // Read a line from the input stream, swallowing the final
+        // \r\n sequence. Stops at the first \n, doesn't complain
+        // if it wasn't preceded by '\r'.
+        //
+        String readLine(InputStream r) throws IOException {
+            StringBuilder b = new StringBuilder();
+            int c;
+            while ((c = r.read()) != -1) {
+                if (c == '\n') break;
+                b.appendCodePoint(c);
+            }
+            if (b.codePointAt(b.length() -1) == '\r') {
+                b.delete(b.length() -1, b.length());
+            }
+            return b.toString();
+        }
+
+        public void accept() {
+            Socket clientConnection = null;
+            try {
+                while (true) {
+                    System.out.println("Tunnel: Waiting for client");
+                    Socket previous = clientConnection;
+                    try {
+                        clientConnection = ss.accept();
+                    } catch (IOException io) {
+                        if (DEBUG) io.printStackTrace(System.out);
+                        break;
+                    } finally {
+                        // we have only 1 client at a time, so it is safe
+                        // to close the previous connection here
+                        if (previous != null) previous.close();
+                    }
+                    System.out.println("Tunnel: Client accepted");
+                    Socket targetConnection = null;
+                    InputStream  ccis = clientConnection.getInputStream();
+                    OutputStream ccos = clientConnection.getOutputStream();
+                    Writer w = new OutputStreamWriter(ccos, "UTF-8");
+                    PrintWriter pw = new PrintWriter(w);
+                    System.out.println("Tunnel: Reading request line");
+                    String requestLine = readLine(ccis);
+                    System.out.println("Tunnel: Request status line: " + requestLine);
+                    if (requestLine.startsWith("CONNECT ")) {
+                        // We should probably check that the next word following
+                        // CONNECT is the host:port of our HTTPS serverImpl.
+                        // Some improvement for a followup!
+
+                        // Read all headers until we find the empty line that
+                        // signals the end of all headers.
+                        while(!requestLine.equals("")) {
+                            System.out.println("Tunnel: Reading header: "
+                                               + (requestLine = readLine(ccis)));
+                        }
+
+                        // Open target connection
+                        targetConnection = new Socket(
+                                serverImpl.getAddress().getAddress(),
+                                serverImpl.getAddress().getPort());
+
+                        // Then send the 200 OK response to the client
+                        System.out.println("Tunnel: Sending "
+                                           + "HTTP/1.1 200 OK\r\n\r\n");
+                        pw.print("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
+                        pw.flush();
+                    } else {
+                        // This should not happen.
+                        throw new IOException("Tunnel: Unexpected status line: "
+                                           + requestLine);
+                    }
+
+                    // Pipe the input stream of the client connection to the
+                    // output stream of the target connection and conversely.
+                    // Now the client and target will just talk to each other.
+                    System.out.println("Tunnel: Starting tunnel pipes");
+                    Thread t1 = pipe(ccis, targetConnection.getOutputStream(), '+');
+                    Thread t2 = pipe(targetConnection.getInputStream(), ccos, '-');
+                    t1.start();
+                    t2.start();
+
+                    // We have only 1 client... wait until it has finished before
+                    // accepting a new connection request.
+                    // System.out.println("Tunnel: Waiting for pipes to close");
+                    // t1.join();
+                    // t2.join();
+                    System.out.println("Tunnel: Done - waiting for next client");
+                }
+            } catch (Throwable ex) {
+                try {
+                    ss.close();
+                } catch (IOException ex1) {
+                    ex.addSuppressed(ex1);
+                }
+                ex.printStackTrace(System.err);
+            }
+        }
+
+        void stop() throws IOException {
+            ss.close();
+        }
+
+    }
+
+    static class Configurator extends HttpsConfigurator {
+        public Configurator(SSLContext ctx) {
+            super(ctx);
+        }
+
+        @Override
+        public void configure (HttpsParameters params) {
+            params.setSSLParameters (getSSLContext().getSupportedSSLParameters());
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/net/httpclient/http2/ProxyTest2.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,323 @@
+/*
+ * 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.net.httpserver.HttpContext;
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import com.sun.net.httpserver.HttpsConfigurator;
+import com.sun.net.httpserver.HttpsParameters;
+import com.sun.net.httpserver.HttpsServer;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.net.HttpURLConnection;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+import java.net.ProxySelector;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
+import java.security.NoSuchAlgorithmException;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import jdk.incubator.http.HttpClient;
+import jdk.incubator.http.HttpRequest;
+import jdk.incubator.http.HttpResponse;
+import jdk.testlibrary.SimpleSSLContext;
+import java.util.concurrent.*;
+
+/**
+ * @test
+ * @bug 8181422
+ * @summary  Verifies that you can access an HTTP/2 server over HTTPS by
+ *           tunnelling through an HTTP/1.1 proxy.
+ * @modules jdk.incubator.httpclient
+ * @library /lib/testlibrary server
+ * @modules jdk.incubator.httpclient/jdk.incubator.http.internal.common
+ *          jdk.incubator.httpclient/jdk.incubator.http.internal.frame
+ *          jdk.incubator.httpclient/jdk.incubator.http.internal.hpack
+ * @build jdk.testlibrary.SimpleSSLContext ProxyTest2
+ * @run main/othervm ProxyTest2
+ * @author danielfuchs
+ */
+public class ProxyTest2 {
+
+    static {
+        try {
+            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
+                    public boolean verify(String hostname, SSLSession session) {
+                        return true;
+                    }
+                });
+            SSLContext.setDefault(new SimpleSSLContext().get());
+        } catch (IOException ex) {
+            throw new ExceptionInInitializerError(ex);
+        }
+    }
+
+    static final String RESPONSE = "<html><body><p>Hello World!</body></html>";
+    static final String PATH = "/foo/";
+
+    static Http2TestServer createHttpsServer(ExecutorService exec) throws Exception {
+        Http2TestServer server = new Http2TestServer(true, 0, exec, SSLContext.getDefault());
+        server.addHandler(new Http2Handler() {
+            @Override
+            public void handle(Http2TestExchange he) throws IOException {
+                he.getResponseHeaders().addHeader("encoding", "UTF-8");
+                he.sendResponseHeaders(200, RESPONSE.length());
+                he.getResponseBody().write(RESPONSE.getBytes(StandardCharsets.UTF_8));
+                he.close();
+            }
+        }, PATH);
+
+        return server;
+    }
+
+    public static void main(String[] args)
+            throws Exception
+    {
+        ExecutorService exec = Executors.newCachedThreadPool();
+        Http2TestServer server = createHttpsServer(exec);
+        server.start();
+        try {
+            // Http2TestServer over HTTPS does not support HTTP/1.1
+            // => only test with a HTTP/2 client
+            test(server, HttpClient.Version.HTTP_2);
+        } finally {
+            server.stop();
+            exec.shutdown();
+            System.out.println("Server stopped");
+        }
+    }
+
+    public static void test(Http2TestServer server, HttpClient.Version version)
+            throws Exception
+    {
+        System.out.println("Server is: " + server.getAddress().toString());
+        URI uri = new URI("https://localhost:" + server.getAddress().getPort() + PATH + "x");
+        TunnelingProxy proxy = new TunnelingProxy(server);
+        proxy.start();
+        try {
+            System.out.println("Proxy started");
+            Proxy p = new Proxy(Proxy.Type.HTTP,
+                    InetSocketAddress.createUnresolved("localhost", proxy.getAddress().getPort()));
+            System.out.println("Setting up request with HttpClient for version: "
+                    + version.name() + "URI=" + uri);
+            ProxySelector ps = ProxySelector.of(
+                    InetSocketAddress.createUnresolved("localhost", proxy.getAddress().getPort()));
+            HttpClient client = HttpClient.newBuilder()
+                .version(version)
+                .proxy(ps)
+                .build();
+            HttpRequest request = HttpRequest.newBuilder()
+                .uri(uri)
+                .GET()
+                .build();
+
+            System.out.println("Sending request with HttpClient");
+            HttpResponse<String> response
+                = client.send(request, HttpResponse.BodyHandler.asString());
+            System.out.println("Got response");
+            String resp = response.body();
+            System.out.println("Received: " + resp);
+            if (!RESPONSE.equals(resp)) {
+                throw new AssertionError("Unexpected response");
+            }
+        } finally {
+            System.out.println("Stopping proxy");
+            proxy.stop();
+            System.out.println("Proxy stopped");
+        }
+    }
+
+    static class TunnelingProxy {
+        final Thread accept;
+        final ServerSocket ss;
+        final boolean DEBUG = false;
+        final Http2TestServer serverImpl;
+        TunnelingProxy(Http2TestServer serverImpl) throws IOException {
+            this.serverImpl = serverImpl;
+            ss = new ServerSocket();
+            accept = new Thread(this::accept);
+        }
+
+        void start() throws IOException {
+            ss.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0));
+            accept.start();
+        }
+
+        // Pipe the input stream to the output stream.
+        private synchronized Thread pipe(InputStream is, OutputStream os, char tag) {
+            return new Thread("TunnelPipe("+tag+")") {
+                @Override
+                public void run() {
+                    try {
+                        try {
+                            int c;
+                            while ((c = is.read()) != -1) {
+                                os.write(c);
+                                os.flush();
+                                // if DEBUG prints a + or a - for each transferred
+                                // character.
+                                if (DEBUG) System.out.print(tag);
+                            }
+                            is.close();
+                        } finally {
+                            os.close();
+                        }
+                    } catch (IOException ex) {
+                        if (DEBUG) ex.printStackTrace(System.out);
+                    }
+                }
+            };
+        }
+
+        public InetSocketAddress getAddress() {
+            return new InetSocketAddress(ss.getInetAddress(), ss.getLocalPort());
+        }
+
+        // This is a bit shaky. It doesn't handle continuation
+        // lines, but our client shouldn't send any.
+        // Read a line from the input stream, swallowing the final
+        // \r\n sequence. Stops at the first \n, doesn't complain
+        // if it wasn't preceded by '\r'.
+        //
+        String readLine(InputStream r) throws IOException {
+            StringBuilder b = new StringBuilder();
+            int c;
+            while ((c = r.read()) != -1) {
+                if (c == '\n') break;
+                b.appendCodePoint(c);
+            }
+            if (b.codePointAt(b.length() -1) == '\r') {
+                b.delete(b.length() -1, b.length());
+            }
+            return b.toString();
+        }
+
+        public void accept() {
+            Socket clientConnection = null;
+            try {
+                while (true) {
+                    System.out.println("Tunnel: Waiting for client");
+                    Socket previous = clientConnection;
+                    try {
+                        clientConnection = ss.accept();
+                    } catch (IOException io) {
+                        if (DEBUG) io.printStackTrace(System.out);
+                        break;
+                    } finally {
+                        // we have only 1 client at a time, so it is safe
+                        // to close the previous connection here
+                        if (previous != null) previous.close();
+                    }
+                    System.out.println("Tunnel: Client accepted");
+                    Socket targetConnection = null;
+                    InputStream  ccis = clientConnection.getInputStream();
+                    OutputStream ccos = clientConnection.getOutputStream();
+                    Writer w = new OutputStreamWriter(ccos, "UTF-8");
+                    PrintWriter pw = new PrintWriter(w);
+                    System.out.println("Tunnel: Reading request line");
+                    String requestLine = readLine(ccis);
+                    System.out.println("Tunnel: Request status line: " + requestLine);
+                    if (requestLine.startsWith("CONNECT ")) {
+                        // We should probably check that the next word following
+                        // CONNECT is the host:port of our HTTPS serverImpl.
+                        // Some improvement for a followup!
+
+                        // Read all headers until we find the empty line that
+                        // signals the end of all headers.
+                        while(!requestLine.equals("")) {
+                            System.out.println("Tunnel: Reading header: "
+                                               + (requestLine = readLine(ccis)));
+                        }
+
+                        // Open target connection
+                        targetConnection = new Socket(
+                                serverImpl.getAddress().getAddress(),
+                                serverImpl.getAddress().getPort());
+
+                        // Then send the 200 OK response to the client
+                        System.out.println("Tunnel: Sending "
+                                           + "HTTP/1.1 200 OK\r\n\r\n");
+                        pw.print("HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n");
+                        pw.flush();
+                    } else {
+                        // This should not happen.
+                        throw new IOException("Tunnel: Unexpected status line: "
+                                           + requestLine);
+                    }
+
+                    // Pipe the input stream of the client connection to the
+                    // output stream of the target connection and conversely.
+                    // Now the client and target will just talk to each other.
+                    System.out.println("Tunnel: Starting tunnel pipes");
+                    Thread t1 = pipe(ccis, targetConnection.getOutputStream(), '+');
+                    Thread t2 = pipe(targetConnection.getInputStream(), ccos, '-');
+                    t1.start();
+                    t2.start();
+
+                    // We have only 1 client... wait until it has finished before
+                    // accepting a new connection request.
+                    // System.out.println("Tunnel: Waiting for pipes to close");
+                    t1.join();
+                    t2.join();
+                    System.out.println("Tunnel: Done - waiting for next client");
+                }
+            } catch (Throwable ex) {
+                try {
+                    ss.close();
+                } catch (IOException ex1) {
+                    ex.addSuppressed(ex1);
+                }
+                ex.printStackTrace(System.err);
+            }
+        }
+
+        void stop() throws IOException {
+            ss.close();
+        }
+
+    }
+
+    static class Configurator extends HttpsConfigurator {
+        public Configurator(SSLContext ctx) {
+            super(ctx);
+        }
+
+        @Override
+        public void configure (HttpsParameters params) {
+            params.setSSLParameters (getSSLContext().getSupportedSSLParameters());
+        }
+    }
+
+}
--- a/jdk/test/java/net/httpclient/http2/server/Http2TestServer.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/net/httpclient/http2/server/Http2TestServer.java	Thu Aug 24 16:36:25 2017 +0200
@@ -201,7 +201,17 @@
                     InetSocketAddress addr = (InetSocketAddress) socket.getRemoteSocketAddress();
                     Http2TestServerConnection c = new Http2TestServerConnection(this, socket);
                     connections.put(addr, c);
-                    c.run();
+                    try {
+                        c.run();
+                    } catch(Throwable e) {
+                        // we should not reach here, but if we do
+                        // the connection might not have been closed
+                        // and if so then the client might wait
+                        // forever.
+                        connections.remove(addr, c);
+                        c.close();
+                        throw e;
+                    }
                 }
             } catch (Throwable e) {
                 if (!stopping) {
--- a/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/net/httpclient/http2/server/Http2TestServerConnection.java	Thu Aug 24 16:36:25 2017 +0200
@@ -133,10 +133,10 @@
     }
 
     void close() {
+        stopping = true;
         streams.forEach((i, q) -> {
             q.close();
         });
-        stopping = true;
         try {
             socket.close();
             // TODO: put a reset on each stream
@@ -557,7 +557,14 @@
     void writeLoop() {
         try {
             while (!stopping) {
-                Http2Frame frame = outputQ.take();
+                Http2Frame frame;
+                try {
+                    frame = outputQ.take();
+                } catch(IOException x) {
+                    if (stopping && x.getCause() instanceof InterruptedException) {
+                        break;
+                    } else throw x;
+                }
                 if (frame instanceof ResponseHeaders) {
                     ResponseHeaders rh = (ResponseHeaders)frame;
                     HeadersFrame hf = new HeadersFrame(rh.streamid(), rh.getFlags(), encodeHeaders(rh.headers));
--- a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -35,7 +35,6 @@
 import java.util.Objects;
 
 import org.testng.Assert;
-import org.testng.TestNG;
 import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
@@ -65,21 +64,14 @@
 
     static final int REGISTRY_MAX_DEPTH = 20;
 
-    static final int REGISTRY_MAX_ARRAY = 10000;
+    static final int REGISTRY_MAX_ARRAY = 1_000_000;
 
     static final String registryFilter =
             System.getProperty("sun.rmi.registry.registryFilter",
                     Security.getProperty("sun.rmi.registry.registryFilter"));
 
-    @DataProvider(name = "bindAllowed")
-    static Object[][] bindAllowedObjects() {
-        Object[][] objects = {
-        };
-        return objects;
-    }
-
     /**
-     * Data RMI Regiry bind test.
+     * Data RMI Registry bind test.
      * - name
      * - Object
      * - true/false if object is blacklisted by a filter (implicit or explicit)
@@ -90,9 +82,11 @@
         Object[][] data = {
                 { "byte[max]", new XX(new byte[REGISTRY_MAX_ARRAY]), false },
                 { "String", new XX("now is the time"), false},
-                { "String[]", new XX(new String[3]), false},
-                { "Long[4]", new XX(new Long[4]), registryFilter != null },
+                { "String[3]", new XX(new String[3]), false},
+                { "Long[4]", new XX(new Long[4]), false },
+                { "Object[REGISTRY_MAX_ARRAY]", new XX(new Object[REGISTRY_MAX_ARRAY]), false },
                 { "rej-byte[toobig]", new XX(new byte[REGISTRY_MAX_ARRAY + 1]), true },
+                { "rej-Object[toobig]", new XX(new Object[REGISTRY_MAX_ARRAY + 1]), true },
                 { "rej-MarshalledObject", createMarshalledObject(), true },
                 { "rej-RejectableClass", new RejectableClass(), registryFilter != null},
         };
--- a/jdk/test/java/util/Scanner/ScanTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/Scanner/ScanTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -59,7 +59,14 @@
                 !"ja".equals(lang)) {
                 //Before we have resource to improve the test to be ready for
                 //arbitrary locale, force the default locale to be "English"
-                //for now.
+                //for now. First we check whether the "English" locale is
+                //available on the system as it could be absent due to varying
+                //configurations.
+                if (!Arrays.asList(Locale.getAvailableLocales())
+                    .contains(Locale.ENGLISH)) {
+                    throw new RuntimeException
+                       ("The \"English\" Locale is unavailable on this system");
+                }
                 Locale.setDefault(Locale.ENGLISH);
             }
             skipTest();
--- a/jdk/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -903,7 +903,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements in same order
+     * A deserialized/reserialized queue has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/ArrayDequeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ArrayDequeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -939,7 +939,7 @@
     }
 
     /**
-     * A deserialized serialized deque has same elements in same order
+     * A deserialized/reserialized deque has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedDeque(SIZE);
--- a/jdk/test/java/util/concurrent/tck/ArrayListTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ArrayListTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -33,6 +33,7 @@
  */
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import junit.framework.Test;
@@ -61,4 +62,27 @@
                 CollectionTest.testSuite(new SubListImplementation()));
     }
 
+    /**
+     * A cloned list equals original
+     */
+    public void testClone() throws Exception {
+        ArrayList<Integer> x = new ArrayList<>();
+        x.add(1);
+        x.add(2);
+        x.add(3);
+        ArrayList<Integer> y = (ArrayList<Integer>) x.clone();
+
+        assertNotSame(y, x);
+        assertEquals(x, y);
+        assertEquals(y, x);
+        assertEquals(x.size(), y.size());
+        assertEquals(x.toString(), y.toString());
+        assertTrue(Arrays.equals(x.toArray(), y.toArray()));
+        while (!x.isEmpty()) {
+            assertFalse(y.isEmpty());
+            assertEquals(x.remove(0), y.remove(0));
+        }
+        assertTrue(y.isEmpty());
+    }
+
 }
--- a/jdk/test/java/util/concurrent/tck/AtomicBooleanTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicBooleanTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -147,7 +147,7 @@
     }
 
     /**
-     * a deserialized serialized atomic holds same value
+     * a deserialized/reserialized atomic holds same value
      */
     public void testSerialization() throws Exception {
         AtomicBoolean x = new AtomicBoolean();
--- a/jdk/test/java/util/concurrent/tck/AtomicIntegerArrayTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicIntegerArrayTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -342,7 +342,7 @@
     }
 
     /**
-     * a deserialized serialized array holds same values
+     * a deserialized/reserialized array holds same values in same order
      */
     public void testSerialization() throws Exception {
         AtomicIntegerArray x = new AtomicIntegerArray(SIZE);
--- a/jdk/test/java/util/concurrent/tck/AtomicIntegerTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicIntegerTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -218,7 +218,7 @@
     }
 
     /**
-     * a deserialized serialized atomic holds same value
+     * a deserialized/reserialized atomic holds same value
      */
     public void testSerialization() throws Exception {
         AtomicInteger x = new AtomicInteger();
--- a/jdk/test/java/util/concurrent/tck/AtomicLongArrayTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicLongArrayTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -341,7 +341,7 @@
     }
 
     /**
-     * a deserialized serialized array holds same values
+     * a deserialized/reserialized array holds same values in same order
      */
     public void testSerialization() throws Exception {
         AtomicLongArray x = new AtomicLongArray(SIZE);
--- a/jdk/test/java/util/concurrent/tck/AtomicLongTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicLongTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -220,7 +220,7 @@
     }
 
     /**
-     * a deserialized serialized atomic holds same value
+     * a deserialized/reserialized atomic holds same value
      */
     public void testSerialization() throws Exception {
         AtomicLong x = new AtomicLong();
--- a/jdk/test/java/util/concurrent/tck/AtomicReferenceArrayTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicReferenceArrayTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -220,7 +220,7 @@
     }
 
     /**
-     * a deserialized serialized array holds same values
+     * a deserialized/reserialized array holds same values in same order
      */
     public void testSerialization() throws Exception {
         AtomicReferenceArray x = new AtomicReferenceArray(SIZE);
--- a/jdk/test/java/util/concurrent/tck/AtomicReferenceTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/AtomicReferenceTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -143,7 +143,7 @@
     }
 
     /**
-     * a deserialized serialized atomic holds same value
+     * a deserialized/reserialized atomic holds same value
      */
     public void testSerialization() throws Exception {
         AtomicReference x = new AtomicReference();
--- a/jdk/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Thu Aug 24 16:36:25 2017 +0200
@@ -570,7 +570,7 @@
     }
 
     /**
-     * A deserialized serialized set is equal
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         int size = 20;
--- a/jdk/test/java/util/concurrent/tck/ConcurrentHashMapTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentHashMapTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -811,7 +811,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testSerialization() throws Exception {
         Map x = map5();
--- a/jdk/test/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -889,7 +889,7 @@
     }
 
     /**
-     * A deserialized serialized deque has same elements in same order
+     * A deserialized/reserialized deque has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedDeque(SIZE);
--- a/jdk/test/java/util/concurrent/tck/ConcurrentLinkedQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentLinkedQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -538,7 +538,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements in same order
+     * A deserialized/reserialized queue has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/ConcurrentSkipListMapTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentSkipListMapTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -828,7 +828,24 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A cloned map equals original
+     */
+    public void testClone() {
+        ConcurrentSkipListMap x = map5();
+        ConcurrentSkipListMap y = x.clone();
+
+        assertNotSame(x, y);
+        assertEquals(x.size(), y.size());
+        assertEquals(x.toString(), y.toString());
+        assertEquals(x, y);
+        assertEquals(y, x);
+        y.clear();
+        assertTrue(y.isEmpty());
+        assertFalse(x.equals(y));
+    }
+
+    /**
+     * A deserialized/reserialized map equals original
      */
     public void testSerialization() throws Exception {
         NavigableMap x = map5();
@@ -839,6 +856,9 @@
         assertEquals(x.toString(), y.toString());
         assertEquals(x, y);
         assertEquals(y, x);
+        y.clear();
+        assertTrue(y.isEmpty());
+        assertFalse(x.equals(y));
     }
 
     /**
--- a/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSetTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSetTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -553,7 +553,25 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A cloned set equals original
+     */
+    public void testClone() {
+        ConcurrentSkipListSet x = populatedSet(SIZE);
+        ConcurrentSkipListSet y = x.clone();
+
+        assertNotSame(x, y);
+        assertEquals(x.size(), y.size());
+        assertEquals(x, y);
+        assertEquals(y, x);
+        while (!x.isEmpty()) {
+            assertFalse(y.isEmpty());
+            assertEquals(x.pollFirst(), y.pollFirst());
+        }
+        assertTrue(y.isEmpty());
+    }
+
+    /**
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         NavigableSet x = populatedSet(SIZE);
--- a/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSubMapTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSubMapTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -625,7 +625,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testSerialization() throws Exception {
         NavigableMap x = map5();
@@ -1299,7 +1299,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testDescendingSerialization() throws Exception {
         NavigableMap x = dmap5();
--- a/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSubSetTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentSkipListSubSetTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -503,7 +503,7 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         NavigableSet x = populatedSet(SIZE);
@@ -1002,7 +1002,7 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A deserialized/reserialized set equals original
      */
     public void testDescendingSerialization() throws Exception {
         NavigableSet x = dset5();
--- a/jdk/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -774,7 +774,7 @@
     }
 
     /**
-     * a deserialized serialized list is equal
+     * a deserialized/reserialized list equals original
      */
     public void testSerialization() throws Exception {
         List x = populatedArray(SIZE);
--- a/jdk/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -403,7 +403,7 @@
     }
 
     /**
-     * A deserialized serialized set is equal
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         Set x = populatedSet(SIZE);
--- a/jdk/test/java/util/concurrent/tck/DoubleAdderTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/DoubleAdderTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -89,7 +89,7 @@
     }
 
     /**
-     * a deserialized serialized adder holds same value
+     * a deserialized/reserialized adder holds same value
      */
     public void testSerialization() throws Exception {
         DoubleAdder x = new DoubleAdder();
--- a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1143,53 +1143,6 @@
     }
 
     /**
-     * Checks that thread does not terminate within the default
-     * millisecond delay of {@code timeoutMillis()}.
-     * TODO: REMOVEME
-     */
-    void assertThreadStaysAlive(Thread thread) {
-        assertThreadStaysAlive(thread, timeoutMillis());
-    }
-
-    /**
-     * Checks that thread does not terminate within the given millisecond delay.
-     * TODO: REMOVEME
-     */
-    void assertThreadStaysAlive(Thread thread, long millis) {
-        try {
-            // No need to optimize the failing case via Thread.join.
-            delay(millis);
-            assertTrue(thread.isAlive());
-        } catch (InterruptedException fail) {
-            threadFail("Unexpected InterruptedException");
-        }
-    }
-
-    /**
-     * Checks that the threads do not terminate within the default
-     * millisecond delay of {@code timeoutMillis()}.
-     * TODO: REMOVEME
-     */
-    void assertThreadsStayAlive(Thread... threads) {
-        assertThreadsStayAlive(timeoutMillis(), threads);
-    }
-
-    /**
-     * Checks that the threads do not terminate within the given millisecond delay.
-     * TODO: REMOVEME
-     */
-    void assertThreadsStayAlive(long millis, Thread... threads) {
-        try {
-            // No need to optimize the failing case via Thread.join.
-            delay(millis);
-            for (Thread thread : threads)
-                assertTrue(thread.isAlive());
-        } catch (InterruptedException fail) {
-            threadFail("Unexpected InterruptedException");
-        }
-    }
-
-    /**
      * Checks that future.get times out, with the default timeout of
      * {@code timeoutMillis()}.
      */
--- a/jdk/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1800,7 +1800,7 @@
     }
 
     /**
-     * A deserialized serialized deque has same elements in same order
+     * A deserialized/reserialized deque has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedDeque(SIZE);
--- a/jdk/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -823,7 +823,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements in same order
+     * A deserialized/reserialized queue has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/LinkedTransferQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -674,7 +674,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements in same order
+     * A deserialized/reserialized queue has same elements in same order
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/LongAdderTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/LongAdderTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -111,7 +111,7 @@
     }
 
     /**
-     * a deserialized serialized adder holds same value
+     * a deserialized/reserialized adder holds same value
      */
     public void testSerialization() throws Exception {
         LongAdder x = new LongAdder();
--- a/jdk/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -686,7 +686,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements
+     * A deserialized/reserialized queue has same elements
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/PriorityQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/PriorityQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -522,7 +522,7 @@
     }
 
     /**
-     * A deserialized serialized queue has same elements
+     * A deserialized/reserialized queue has same elements
      */
     public void testSerialization() throws Exception {
         Queue x = populatedQueue(SIZE);
--- a/jdk/test/java/util/concurrent/tck/SynchronousQueueTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/SynchronousQueueTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -557,7 +557,7 @@
     }
 
     /**
-     * a deserialized serialized queue is usable
+     * a deserialized/reserialized queue is usable
      */
     public void testSerialization() {
         final SynchronousQueue x = new SynchronousQueue();
--- a/jdk/test/java/util/concurrent/tck/ThreadLocalRandom8Test.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ThreadLocalRandom8Test.java	Thu Aug 24 16:36:25 2017 +0200
@@ -260,8 +260,8 @@
     }
 
     /**
-     * A deserialized ThreadLocalRandom is always identical to
-     * ThreadLocalRandom.current()
+     * A deserialized/reserialized ThreadLocalRandom is always
+     * identical to ThreadLocalRandom.current()
      */
     public void testSerialization() {
         assertSame(
--- a/jdk/test/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1319,8 +1319,8 @@
     public void testMaximumPoolSizeIllegalArgumentException2() {
         final ThreadPoolExecutor p =
             new CustomTPE(2, 3,
-                          LONG_DELAY_MS,
-                          MILLISECONDS,new ArrayBlockingQueue<Runnable>(10));
+                          LONG_DELAY_MS, MILLISECONDS,
+                          new ArrayBlockingQueue<Runnable>(10));
         try (PoolCleaner cleaner = cleaner(p)) {
             try {
                 p.setMaximumPoolSize(-1);
--- a/jdk/test/java/util/concurrent/tck/TimeUnitTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/TimeUnitTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -623,7 +623,7 @@
     }
 
     /**
-     * a deserialized serialized unit is the same instance
+     * a deserialized/reserialized unit is the same instance
      */
     public void testSerialization() throws Exception {
         for (TimeUnit x : TimeUnit.values())
--- a/jdk/test/java/util/concurrent/tck/TreeMapTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/TreeMapTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -633,7 +633,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testSerialization() throws Exception {
         NavigableMap x = map5();
--- a/jdk/test/java/util/concurrent/tck/TreeSetTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/TreeSetTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -549,7 +549,7 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         NavigableSet x = populatedSet(SIZE);
--- a/jdk/test/java/util/concurrent/tck/TreeSubMapTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/TreeSubMapTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -460,7 +460,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testSerialization() throws Exception {
         NavigableMap x = map5();
@@ -987,7 +987,7 @@
     }
 
     /**
-     * A deserialized map equals original
+     * A deserialized/reserialized map equals original
      */
     public void testDescendingSerialization() throws Exception {
         NavigableMap x = dmap5();
--- a/jdk/test/java/util/concurrent/tck/TreeSubSetTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/java/util/concurrent/tck/TreeSubSetTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -500,7 +500,7 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A deserialized/reserialized set equals original
      */
     public void testSerialization() throws Exception {
         NavigableSet x = populatedSet(SIZE);
@@ -988,7 +988,7 @@
     }
 
     /**
-     * A deserialized serialized set has same elements
+     * A deserialized/reserialized set equals original
      */
     public void testDescendingSerialization() throws Exception {
         NavigableSet x = dset5();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/util/zip/ZipFile/ZeroDate.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,112 @@
+/*
+ * 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 static java.util.zip.ZipFile.CENOFF;
+import static java.util.zip.ZipFile.CENTIM;
+import static java.util.zip.ZipFile.ENDHDR;
+import static java.util.zip.ZipFile.ENDOFF;
+import static java.util.zip.ZipFile.LOCTIM;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import java.util.zip.ZipOutputStream;
+
+/* @test
+ * @bug 8184940
+ * @summary JDK 9 rejects zip files where the modified day or month is 0
+ * @author Liam Miller-Cushon
+ */
+public class ZeroDate {
+
+    public static void main(String[] args) throws Exception {
+        // create a zip file, and read it in as a byte array
+        Path path = Files.createTempFile("bad", ".zip");
+        try (OutputStream os = Files.newOutputStream(path);
+                ZipOutputStream zos = new ZipOutputStream(os)) {
+            ZipEntry e = new ZipEntry("x");
+            zos.putNextEntry(e);
+            zos.write((int) 'x');
+        }
+        int len = (int) Files.size(path);
+        byte[] data = new byte[len];
+        try (InputStream is = Files.newInputStream(path)) {
+            is.read(data);
+        }
+        Files.delete(path);
+
+        // year, month, day are zero
+        testDate(data.clone(), 0, LocalDate.of(1979, 11, 30));
+        // only year is zero
+        testDate(data.clone(), 0 << 25 | 4 << 21 | 5 << 16, LocalDate.of(1980, 4, 5));
+    }
+
+    private static void testDate(byte[] data, int date, LocalDate expected) throws IOException {
+        // set the datetime
+        int endpos = data.length - ENDHDR;
+        int cenpos = u16(data, endpos + ENDOFF);
+        int locpos = u16(data, cenpos + CENOFF);
+        writeU32(data, cenpos + CENTIM, date);
+        writeU32(data, locpos + LOCTIM, date);
+
+        // ensure that the archive is still readable, and the date is 1979-11-30
+        Path path = Files.createTempFile("out", ".zip");
+        try (OutputStream os = Files.newOutputStream(path)) {
+            os.write(data);
+        }
+        try (ZipFile zf = new ZipFile(path.toFile())) {
+            ZipEntry ze = zf.entries().nextElement();
+            Instant actualInstant = ze.getLastModifiedTime().toInstant();
+            Instant expectedInstant =
+                    expected.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant();
+            if (!actualInstant.equals(expectedInstant)) {
+                throw new AssertionError(
+                        String.format("actual: %s, expected: %s", actualInstant, expectedInstant));
+            }
+        } finally {
+            Files.delete(path);
+        }
+    }
+
+    static int u8(byte[] data, int offset) {
+        return data[offset] & 0xff;
+    }
+
+    static int u16(byte[] data, int offset) {
+        return u8(data, offset) + (u8(data, offset + 1) << 8);
+    }
+
+    private static void writeU32(byte[] data, int pos, int value) {
+        data[pos] = (byte) (value & 0xff);
+        data[pos + 1] = (byte) ((value >> 8) & 0xff);
+        data[pos + 2] = (byte) ((value >> 16) & 0xff);
+        data[pos + 3] = (byte) ((value >> 24) & 0xff);
+    }
+}
--- a/jdk/test/javax/print/CheckDupFlavor.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/CheckDupFlavor.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2009, 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
@@ -21,12 +21,14 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key printer
  * @bug 4996318 6731937
  * @summary  There should be no duplicates returned by getSupportedDocFlavors.
  * @run main CheckDupFlavor
  */
+
 import javax.print.*;
 import javax.print.attribute.*;
 import javax.print.attribute.standard.*;
--- a/jdk/test/javax/print/PrintSE/PrintSE.sh	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/PrintSE/PrintSE.sh	Thu Aug 24 16:36:25 2017 +0200
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2008, 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
@@ -24,8 +24,11 @@
 #
 
 # @test
+# @key printer
 # @bug 6662775
-# @summary Tests queuePrintJob is sufficient permission.
+# @summary Tests queuePrintJob is sufficient permission for printing. This test 
+#          prints a page to a printer. If a document printer is installed, a 
+#          popup can appear (to select the file location).
 # @run clean PrintSE
 # @run build PrintSE
 # @run compile PrintSE.java
--- a/jdk/test/javax/print/attribute/AttributeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/attribute/AttributeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2010, 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
@@ -21,12 +21,14 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key printer
  * @bug 6387255
  * @summary  Tests conflict of Media values returned by isAttrValueSupported and getSupportedAttrValues.  No runtime exception should be thrown.
  * @run main AttributeTest
  */
+
 import javax.print.*;
 import javax.print.attribute.standard.*;
 import javax.print.attribute.*;
--- a/jdk/test/javax/print/attribute/GetCopiesSupported.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/attribute/GetCopiesSupported.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -20,12 +20,14 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/*
-  @test
-  @bug 4463280
-  @summary No ClassCastException should occur.
-  @run main GetCopiesSupported
-*/
+
+/**
+ * @test
+ * @key printer
+ * @bug 4463280
+ * @summary No ClassCastException should occur.
+ * @run main GetCopiesSupported
+ */
 
 import javax.print.*;
 import javax.print.attribute.*;
--- a/jdk/test/javax/print/attribute/SidesPageRangesTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/attribute/SidesPageRangesTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -20,12 +20,15 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/*
+
+/**
  * @test
+ * @key printer
  * @bug 4903366
  * @summary No crash should occur.
  * @run main SidesPageRangesTest
-*/
+ */
+
 import java.awt.*;
 import javax.print.*;
 import javax.print.attribute.standard.*;
--- a/jdk/test/javax/print/attribute/SupportedPrintableAreas.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/print/attribute/SupportedPrintableAreas.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key printer
  * @bug 4762773 6289206 6324049 6362765
  * @summary Tests that get non-null return list of printable areas.
  * @run main SupportedPrintableAreas
--- a/jdk/test/javax/swing/JButton/8151303/PressedIconTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JButton/8151303/PressedIconTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -39,11 +39,13 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8151303
  * @summary [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it
  * @run main/othervm  PressedIconTest
  * @run main/othervm -Dsun.java2d.uiScale=2 PressedIconTest
  */
+
 public class PressedIconTest {
 
     private final static int IMAGE_SIZE = 300;
--- a/jdk/test/javax/swing/JComboBox/6567433/UpdateUIRecursionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComboBox/6567433/UpdateUIRecursionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6567433
  *
  * @summary  JComboBox.updateUI() invokes updateUI() on its cellrenderer via
--- a/jdk/test/javax/swing/JComboBox/8019180/Test8019180.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComboBox/8019180/Test8019180.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -26,8 +26,9 @@
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8019180
  * @summary Tests that combobox works if it is used as action listener
  * @author Sergey Malenkov
--- a/jdk/test/javax/swing/JComboBox/8041909/ActionListenerExceptionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComboBox/8041909/ActionListenerExceptionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,11 +21,13 @@
  * questions.
  */
 
- /* @test
-  * @bug 8041909
-  * @summary Test to check JComboBox does not lose its ability to invoke
-  * registerd ActionListener in case of exception in ActionListener
-  * @run main ActionListenerExceptionTest
+/**
+ * @test
+ * @key headful
+ * @bug 8041909
+ * @summary Test to check JComboBox does not lose its ability to invoke
+ * registerd ActionListener in case of exception in ActionListener
+ * @run main ActionListenerExceptionTest
  */
 
 import java.awt.AWTEvent;
--- a/jdk/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComboBox/WindowsComboBoxSize/WindowsComboBoxSizeTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8179027
  * @requires (os.family == "windows")
  * @summary JComboBox too small under Windows LAF
--- a/jdk/test/javax/swing/JComponent/4337267/bug4337267.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComponent/4337267/bug4337267.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 4337267
  * @summary test that numeric shaping works in Swing components
  * @author Sergey Groznyh
--- a/jdk/test/javax/swing/JComponent/8043610/bug8043610.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JComponent/8043610/bug8043610.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, 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
@@ -22,14 +22,15 @@
  */
 
 
-/*
-  @test
-  @bug 8043610
-  @summary Tests that JComponent invalidate, revalidate and repaint methods could
-           be called from any thread
-  @author Petr Pchelko
-  @modules java.desktop/sun.awt
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8043610
+ * @summary Tests that JComponent invalidate, revalidate and repaint methods could
+ *          be called from any thread
+ * @author Petr Pchelko
+ * @modules java.desktop/sun.awt
+ */
 
 import sun.awt.SunToolkit;
 
--- a/jdk/test/javax/swing/JDialog/6639507/bug6639507.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JDialog/6639507/bug6639507.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,11 +21,14 @@
  * questions.
  */
 
-/* @test
-   @bug 6639507
-   @summary Title of javax.swing.JDialog is null while spec says it's empty
-   @author Pavel Porvatov
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 6639507
+ * @summary Title of javax.swing.JDialog is null while spec says it's empty
+ * @author Pavel Porvatov
+ */
+
 import javax.swing.*;
 import java.awt.*;
 
--- a/jdk/test/javax/swing/JFileChooser/6713352/bug6713352.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6713352/bug6713352.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,13 +21,15 @@
  * questions.
  */
 
-/* @test
-   @bug 6713352
-   @summary Deadlock in JFileChooser with synchronized custom FileSystemView
-   @author Pavel Porvatov
-   @modules java.desktop/sun.awt.shell
-   @run main bug6713352
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 6713352
+ * @summary Deadlock in JFileChooser with synchronized custom FileSystemView
+ * @author Pavel Porvatov
+ * @modules java.desktop/sun.awt.shell
+ * @run main bug6713352
+ */
 
 import sun.awt.shell.ShellFolder;
 
--- a/jdk/test/javax/swing/JFileChooser/6817933/Test6817933.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFileChooser/6817933/Test6817933.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, 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,11 +21,13 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 6817933
  * @summary Tests that HTMLEditorKit does not affect JFileChooser
  * @author Sergey Malenkov
+ * @requires (os.family == "windows")
  * @modules java.desktop/sun.awt
  *          java.desktop/sun.swing
  */
--- a/jdk/test/javax/swing/JFileChooser/8010718/bug8010718.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8010718/bug8010718.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -23,10 +23,12 @@
 
 /*
  * @test
+ * @key headful
  * @bug 8010718
  * @summary [macosx] JFileChooser current filter nullified by addChoosableFileFilter
  * @author Tomas Hurka
  */
+
 import java.io.File;
 import javax.swing.*;
 import javax.swing.filechooser.FileFilter;
--- a/jdk/test/javax/swing/JFileChooser/8013442/Test8013442.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8013442/Test8013442.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8013442
  * @summary Tests that at least one file filter is selected
  * @author Sergey Malenkov
--- a/jdk/test/javax/swing/JFileChooser/8152677/SelectAllFilesFilterTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8152677/SelectAllFilesFilterTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -31,8 +31,9 @@
 import javax.swing.filechooser.FileFilter;
 import javax.swing.filechooser.FileNameExtensionFilter;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8152677
  * @requires (os.family == "mac")
  * @summary [macosx] All files filter can't be selected in JFileChooser
--- a/jdk/test/javax/swing/JFrame/8016356/bug8016356.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFrame/8016356/bug8016356.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, 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,14 +21,17 @@
  * questions.
  */
 
-/* @test
-   @bug 8016356
-   @summary Any swing frame resizes ugly.
-   @author Oleg Pekhovskiy
-   @library ../../../../lib/testlibrary
-   @build jdk.testlibrary.OSInfo
-   @run main bug8016356
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8016356
+ * @summary Any swing frame resizes ugly.
+ * @author Oleg Pekhovskiy
+ * @requires (os.family == "windows")
+ * @library ../../../../lib/testlibrary
+ * @build jdk.testlibrary.OSInfo
+ * @run main bug8016356
+ */
 
 import java.awt.AWTException;
 import java.awt.Color;
--- a/jdk/test/javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -31,6 +31,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 7124513
  * @summary We should support NSTexturedBackgroundWindowMask style on OSX.
  * @author Sergey Bylokhov
@@ -38,6 +39,7 @@
  * @build ExtendedRobot jdk.testlibrary.OSInfo
  * @run main NSTexturedJFrame
  */
+
 public final class NSTexturedJFrame {
 
     private static final String BRUSH = "apple.awt.brushMetalLook";
--- a/jdk/test/javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/6288609/TestJInternalFrameDispose.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 6288609
  * @summary JInternalFrame.setDefaultCloseOperation() interferes with "close"
               behavior
@@ -30,6 +31,7 @@
  * @build Util
  * @run main TestJInternalFrameDispose
  */
+
 import java.awt.Point;
 import java.awt.Robot;
 import java.awt.event.ActionEvent;
--- a/jdk/test/javax/swing/JInternalFrame/8075314/bug8075314.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/8075314/bug8075314.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,14 +21,15 @@
  * questions.
  */
 
-/* @test
-   @bug 8075314
-   @summary All the InternalFrames will be maximized after maximizing only one
-   of the InternalFrame with the special options "-client -Xmixed
-   -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel".
-   @author Semyon Sadetsky
-  */
-
+/**
+ * @test
+ * @key headful
+ * @bug 8075314
+ * @summary All the InternalFrames will be maximized after maximizing only one
+ * of the InternalFrame with the special options "-client -Xmixed
+ * -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel".
+ * @author Semyon Sadetsky
+ */
 
 import javax.swing.*;
 import java.beans.PropertyVetoException;
@@ -71,7 +72,7 @@
                     }
                 });
             } finally {
-                frame.dispose();
+                if (frame != null) { frame.dispose(); }
             }
         }
         System.out.println("ok");
--- a/jdk/test/javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/8145060/TestJInternalFrameMinimize.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,14 +21,16 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8145060
  * @summary Minimizing a JInternalFrame not shifting focus to frame below it
  * @library ../../regtesthelpers
  * @build Util
  * @run main TestJInternalFrameMinimize
  */
+
 import java.awt.Point;
 import java.awt.Robot;
 import java.awt.event.ActionEvent;
--- a/jdk/test/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -35,6 +35,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8160248 8160332
  * @summary Dragged internal frame leaves artifacts for floating point ui scale
  * @run main/othervm -Dsun.java2d.uiScale=1.2 JInternalFrameDraggingTest
@@ -42,6 +43,7 @@
  * @run main/othervm -Dsun.java2d.uiScale=1 JInternalFrameDraggingTest
  * @run main/othervm -Dsun.java2d.uiScale=2.5 JInternalFrameDraggingTest
  */
+
 public class JInternalFrameDraggingTest {
 
     private static JFrame frame;
--- a/jdk/test/javax/swing/JInternalFrame/DockIconRepaint/DockIconRepaint.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/DockIconRepaint/DockIconRepaint.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -36,9 +36,11 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8144166
  * @requires (os.family == "mac")
  */
+
 public final class DockIconRepaint {
 
     private static volatile Color color;
--- a/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/Test6325652.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2016, 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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 6325652 8159152
  * @summary Tests keyboard shortcuts
  * @library ..
--- a/jdk/test/javax/swing/JList/6567433/UpdateUIRecursionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JList/6567433/UpdateUIRecursionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6567433
  *
  * @summary  JList.updateUI() for invokes updateUI() on its cellrenderer via
--- a/jdk/test/javax/swing/JList/8161483/Bug8161483.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JList/8161483/Bug8161483.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8161483
  * @summary Implement AccessibleAction in JList.AccessibleJList.AccessibleJListChild
  * @run main Bug8161483
@@ -39,7 +40,7 @@
 
 public class Bug8161483 extends JFrame {
 
-    private static JFrame frame;
+    private static JFrame frame = null;
     private static volatile Exception exception = null;
     private JList<String> countryList;
 
@@ -96,7 +97,7 @@
             }
         } finally {
             SwingUtilities.invokeAndWait(() -> {
-                frame.dispose();
+                if (frame != null) { frame.dispose(); }
             });
         }
     }
--- a/jdk/test/javax/swing/JMenu/6538132/bug6538132.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenu/6538132/bug6538132.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, 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
@@ -20,14 +20,18 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/* @test
-   @bug 6538132
-   @summary Regression: Pressing Escape key don't close the menu items from jdk7.0 b07 onwards
-   @author Alexander Potochkin
-   @library ../../../../lib/testlibrary
-   @build ExtendedRobot
-   @run main bug6538132
-*/
+
+/**
+ * @test
+ * @key headful
+ * @bug 6538132
+ * @summary Regression: Pressing Escape key don't close the menu items from jdk7.0 b07 onwards
+ * @author Alexander Potochkin
+ * @requires (os.family == "windows")
+ * @library ../../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main bug6538132
+ */
 
 import javax.swing.*;
 import java.awt.*;
--- a/jdk/test/javax/swing/JMenu/8067346/bug8067346.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenu/8067346/bug8067346.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,12 +21,15 @@
  * questions.
  */
 
-/* @test
- @bug 8067346
- @summary Submenu has a changed offset on Windows7 with Windows look and feel
- @requires (os.family == "windows")
- @run main bug8067346
+/**
+ * @test
+ * @key headful
+ * @bug 8067346
+ * @summary Submenu has a changed offset on Windows7 with Windows look and feel
+ * @requires (os.family == "windows")
+ * @run main bug8067346
  */
+
 import java.awt.Insets;
 import javax.swing.JFrame;
 import javax.swing.JMenu;
--- a/jdk/test/javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenuItem/8139169/ScreenMenuBarInputTwice.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8139169 8158390
  * @summary verifies if TextArea gets input twice due to Apple's Screen Menubar
  * @requires (os.family=="mac")
@@ -29,6 +31,7 @@
  * @build Util
  * @run main ScreenMenuBarInputTwice
  */
+
 import java.awt.BorderLayout;
 import java.awt.Point;
 import java.awt.Robot;
--- a/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenuItem/8152981/MenuItemIconTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,15 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8152981 8159135
  * @summary Double icons with JMenuItem setHorizontalTextPosition on Win 10
  * @requires (os.family == "windows")
  * @run main MenuItemIconTest
  */
+
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Graphics;
--- a/jdk/test/javax/swing/JMenuItem/8158566/CloseOnMouseClickPropertyTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenuItem/8158566/CloseOnMouseClickPropertyTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -35,11 +35,13 @@
 import javax.swing.SwingUtilities;
 import javax.swing.UIManager;
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8158566 8160879 8160977 8158566
  * @summary Provide a Swing property which modifies MenuItemUI behaviour
  */
+
 public class CloseOnMouseClickPropertyTest {
 
     private static final String CHECK_BOX_PROP = "CheckBoxMenuItem."
@@ -219,4 +221,5 @@
             }
         }
     }
-}
\ No newline at end of file
+}
+
--- a/jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,8 +21,9 @@
  * questions.
  */
 
- /*
+/**
  * @test
+ * @key headful
  * @bug 7160951 8152492
  * @summary [macosx] ActionListener called twice for JMenuItem using ScreenMenuBar
  * @author vera.akulova@oracle.com
@@ -30,6 +31,7 @@
  * @build jdk.testlibrary.OSInfo
  * @run main ActionListenerCalledTwiceTest
  */
+
 import jdk.testlibrary.OSInfo;
 import java.awt.*;
 import java.awt.event.*;
--- a/jdk/test/javax/swing/JMenuItem/ClickMenuTestManual/ClickMenuTestManual.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JMenuItem/ClickMenuTestManual/ClickMenuTestManual.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,12 +21,15 @@
  * questions.
  */
 
- /* @test
+/**
+ * @test
+ * @key headful
  * @bug 8158230
  * @summary Verify menu item option apple.laf.useScreenMenuBar implementation
  * @requires (os.family=="mac")
  * @run main ClickMenuTestManual
  */
+
 import java.awt.Color;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
--- a/jdk/test/javax/swing/JOptionPane/8081019/bug8081019.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JOptionPane/8081019/bug8081019.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -28,6 +28,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8081019
  * @summary Check peer to null in CPlatformWindow.checkZoom() method
  * @author Alexandr Scherbatiy
--- a/jdk/test/javax/swing/JPopupMenu/6217905/bug6217905.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/6217905/bug6217905.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, 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
@@ -20,15 +20,18 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-/*
-@test
-@bug 6217905
-@summary JPopupMenu keyboard navigation stops working
-@author Alexander Potochkin
-@library ../../../../lib/testlibrary
-@build ExtendedRobot
-@run main bug6217905
-*/
+
+/**
+ * @test
+ * @key headful
+ * @bug 6217905
+ * @summary JPopupMenu keyboard navigation stops working
+ * @author Alexander Potochkin
+ * @requires (os.family == "windows")
+ * @library ../../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main bug6217905
+ */
 
 import javax.swing.*;
 import java.awt.*;
--- a/jdk/test/javax/swing/JPopupMenu/7154841/bug7154841.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/7154841/bug7154841.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,14 +21,15 @@
  * questions.
  */
 
-/*
-  @test
-  @bug 7154841
-  @summary JPopupMenu is overlapped by a Dock on Mac OS X
-  @author Petr Pchelko
-  @library ../../../../lib/testlibrary
-  @build ExtendedRobot jdk.testlibrary.OSInfo
-  @run main bug7154841
+/**
+ * @test
+ * @key headful
+ * @bug 7154841
+ * @summary JPopupMenu is overlapped by a Dock on Mac OS X
+ * @author Petr Pchelko
+ * @library ../../../../lib/testlibrary
+ * @build ExtendedRobot jdk.testlibrary.OSInfo
+ * @run main bug7154841
  */
 
 import java.awt.*;
--- a/jdk/test/javax/swing/JTabbedPane/7170310/bug7170310.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTabbedPane/7170310/bug7170310.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -37,6 +37,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 7170310
  * @author Alexey Ivanov
  * @summary Selected tab should be scrolled into view.
@@ -44,6 +45,7 @@
  * @build ExtendedRobot
  * @run main bug7170310
  */
+
 public class bug7170310 {
     private static final int TABS_NUMBER = 3;
 
@@ -75,7 +77,7 @@
                 System.out.printf("Test passed");
             }
         } finally {
-            frame.dispose();
+            if (frame != null) { frame.dispose(); }
         }
     }
 
--- a/jdk/test/javax/swing/JTable/6567433/UpdateUIRecursionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTable/6567433/UpdateUIRecursionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6567433
  *
  * @summary  JTable.updateUI() invokes updateUI() on its TableCellrenderer via
--- a/jdk/test/javax/swing/JTableHeader/6567433/UpdateUIRecursionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTableHeader/6567433/UpdateUIRecursionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6567433
  *
  * @summary  JTableHeader.updateUI() invokes updateUI() on its TableCellrenderer via
--- a/jdk/test/javax/swing/JTextArea/6940863/bug6940863.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTextArea/6940863/bug6940863.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,10 +21,13 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6940863
  * @summary Textarea within scrollpane shows vertical scrollbar
  * @author Pavel Porvatov
+ * @requires (os.family == "windows")
  * @library ../../../../lib/testlibrary
  * @build jdk.testlibrary.OSInfo
  * @run main bug6940863
--- a/jdk/test/javax/swing/JTextArea/ScrollbarFlicker/ScrollFlickerTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTextArea/ScrollbarFlicker/ScrollFlickerTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8160246
  * @summary Regression: 4410243 reproducible with GTK LaF
  * @run main ScrollFlickerTest
--- a/jdk/test/javax/swing/JTree/6567433/UpdateUIRecursionTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/JTree/6567433/UpdateUIRecursionTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 6567433
  *
  * @summary  JTree.updateUI() invokes updateUI() on its TreeCellrenderer via
--- a/jdk/test/javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/ProgressMonitor/ProgressMonitorEscapeKeyPress.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8065861
  * @summary Test to check pressing Escape key sets 'canceled' property of ProgressMonitor
  * @run main ProgressMonitorEscapeKeyPress
--- a/jdk/test/javax/swing/Security/6938813/bug6938813.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/Security/6938813/bug6938813.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
 
 /*
  * @test
+ * @key headful
  * @bug 6938813
  * @summary Swing mutable statics
  * @author Pavel Porvatov
--- a/jdk/test/javax/swing/ToolTipManager/7123767/bug7123767.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/ToolTipManager/7123767/bug7123767.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,7 +21,7 @@
  * questions.
  */
 
-/*
+/**
  * @test
  * @bug      7123767
  *
@@ -34,8 +34,7 @@
  *
  * @author   Vladislav Karnaukhov
  *
- * @key      headful
- * @key      randomness
+ * @key      headful randomness
  *
  * @modules  java.desktop/sun.awt
  * @library  /test/lib
--- a/jdk/test/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -31,6 +31,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8134947
  * @author Sergey Bylokhov
  * @run main/timeout=300/othervm -Xmx12m -XX:+HeapDumpOnOutOfMemoryError UnninstallUIMemoryLeaks
@@ -54,7 +55,7 @@
                 }
             }
         } finally {
-            EventQueue.invokeAndWait(() -> frame.dispose());
+            if (frame != null) { EventQueue.invokeAndWait(() -> frame.dispose()); }
         }
     }
 
--- a/jdk/test/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,14 +21,16 @@
  * questions.
  */
 
-/* @test
-   @bug     8073001 8081764
-   @summary Test verifies that combo box with custom editor renders
-            focus ring around arrow button correctly.
-   @library /lib/testlibrary
-   @build jdk.testlibrary.OSInfo
-   @run     main CustomComboBoxFocusTest
-*/
+/**
+ * @test
+ * @key headful
+ * @bug     8073001 8081764
+ * @summary Test verifies that combo box with custom editor renders
+ *          focus ring around arrow button correctly.
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.OSInfo
+ * @run     main CustomComboBoxFocusTest
+ */
 
 import java.awt.AWTException;
 import java.awt.Component;
--- a/jdk/test/javax/swing/plaf/basic/6866751/bug6866751.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/basic/6866751/bug6866751.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,11 +21,14 @@
  * questions.
  */
 
-/* @test
-   @bug 6866751
-   @summary J2SE_Swing_Reg: the caret disappears when moving to the end of the line.
-   @author Semyon Sadetsky
-  */
+/**
+ * @test
+ * @key headful
+ * @bug 6866751
+ * @summary J2SE_Swing_Reg: the caret disappears when moving to the end of the line.
+ * @author Semyon Sadetsky
+ */
+
 import javax.swing.*;
 import java.awt.*;
 
@@ -77,7 +80,7 @@
             SwingUtilities.invokeAndWait(new Runnable() {
                 @Override
                 public void run() {
-                    frame.dispose();
+                    if (frame != null) { frame.dispose(); }
                 }
             });
         }
--- a/jdk/test/javax/swing/plaf/basic/BasicComboPopup/8154069/Bug8154069.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicComboPopup/8154069/Bug8154069.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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,6 +23,7 @@
 
 /*
  * @test
+ * @key headful
  * @bug 8154069
  * @summary Jaws reads wrong values from comboboxes when no element is selected
  * @run main Bug8154069
@@ -89,7 +90,7 @@
             }
         } finally {
             SwingUtilities.invokeAndWait(() -> {
-                frame.dispose();
+                if (frame != null) { frame.dispose(); }
             });
         }
     }
--- a/jdk/test/javax/swing/plaf/basic/BasicHTML/4960629/bug4960629.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicHTML/4960629/bug4960629.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,12 +21,14 @@
  * questions.
  */
 
-/* @test
-   @bug 4960629 7124238
-   @summary  Tests if font for html text on widgets in correct.
-   @author Denis Sharypov
-   @run main bug4960629
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 4960629 7124238
+ * @summary  Tests if font for html text on widgets in correct.
+ * @author Denis Sharypov
+ * @run main bug4960629
+ */
 
 import java.awt.Font;
 import java.lang.reflect.InvocationTargetException;
@@ -57,7 +59,7 @@
             f.setVisible(true);
             test();
         } finally {
-            f.dispose();
+            if (f != null) { f.dispose(); }
         }
     }
 
--- a/jdk/test/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,14 +21,17 @@
  * questions.
  */
 
-/* @test
-   @bug 7172652
-   @summary With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
-   @author Semyon Sadetsky
-   @library /lib/testlibrary
-   @build jdk.testlibrary.OSInfo
-   @run main bug7172652
-  */
+/**
+ * @test
+ * @key headful
+ * @bug 7172652
+ * @summary With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
+ * @author Semyon Sadetsky
+ * @requires (os.family == "windows")
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.OSInfo
+ * @run main bug7172652
+ */
 
 import javax.swing.*;
 import javax.swing.event.ChangeEvent;
--- a/jdk/test/javax/swing/plaf/nimbus/8041642/ScrollBarThumbVisibleTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/nimbus/8041642/ScrollBarThumbVisibleTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,11 +21,13 @@
  * questions.
  */
 
-/* @test
-   @bug 8134828
-   @summary Scrollbar thumb disappears with Nimbus L&F
-   @author Semyon Sadetsky
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8134828
+ * @summary Scrollbar thumb disappears with Nimbus L&F
+ * @author Semyon Sadetsky
+ */
 
 import javax.swing.*;
 import java.awt.*;
@@ -76,7 +78,7 @@
             SwingUtilities.invokeAndWait(new Runnable() {
                 @Override
                 public void run() {
-                    frame.dispose();
+                    if (frame != null) { frame.dispose(); }
                 }
             });
         }
--- a/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/windows/6921687/bug6921687.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 6921687 8079428
  * @summary Mnemonic disappears after repeated attempts to open menu items using
  *          mnemonics
@@ -33,6 +34,7 @@
  * @modules java.desktop/com.sun.java.swing.plaf.windows
  * @run main bug6921687
  */
+
 import java.awt.Robot;
 import java.awt.event.KeyEvent;
 import javax.swing.JFrame;
@@ -83,7 +85,7 @@
             checkMnemonics();
             System.out.println("ok");
         } finally {
-            frame.dispose();
+            if (frame != null) { frame.dispose(); }
         }
 
     }
--- a/jdk/test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,12 +21,15 @@
  * questions.
  */
 
-/* @test
-   @bug 8001633 8028271 8039888
-   @summary Wrong alt processing during switching between windows
-   @author mikhail.cherkasov@oracle.com
-   @run main WrongAltProcessing
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 8001633 8028271 8039888
+ * @summary Wrong alt processing during switching between windows
+ * @author mikhail.cherkasov@oracle.com
+ * @requires (os.family == "windows")
+ * @run main WrongAltProcessing
+ */
 
 import javax.swing.*;
 import java.awt.*;
--- a/jdk/test/javax/swing/system/6799345/TestShutdown.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/system/6799345/TestShutdown.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
  * 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,16 @@
  * questions.
  */
 
-/* @test
-   @bug 6799345
-   @summary Tests that no exceptions are thrown from TimerQueue and
-SwingWorker on AppContext shutdown
-   @author art
-   @modules java.desktop/sun.awt
-   @run main TestShutdown
-*/
+/**
+ * @test
+ * @bug 6799345
+ * @key headful
+ * @summary Tests that no exceptions are thrown from TimerQueue and
+ * SwingWorker on AppContext shutdown
+ * @author art
+ * @modules java.desktop/sun.awt
+ * @run main TestShutdown
+ */
 
 import java.awt.*;
 import java.awt.event.*;
--- a/jdk/test/javax/swing/text/FlowView/LayoutTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/text/FlowView/LayoutTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,15 @@
  * questions.
  */
 
-/* @test
-   @bug 6452106 6606443 8161195
-   @author Peter Zhelezniakov
-   @library ../../regtesthelpers
-   @build Test JRobot SwingTestHelper
-   @run main/timeout=300 LayoutTest
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 6452106 6606443 8161195
+ * @author Peter Zhelezniakov
+ * @library ../../regtesthelpers
+ * @build Test JRobot SwingTestHelper
+ * @run main/timeout=300 LayoutTest
+ */
 
 import javax.swing.text.*;
 import javax.swing.*;
--- a/jdk/test/javax/swing/text/GlyphPainter2/6427244/bug6427244.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/text/GlyphPainter2/6427244/bug6427244.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, 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
@@ -22,14 +22,16 @@
  *
  */
 
-/* @test
-   @bug 6427244 8144240 8166003 8169879
-   @summary Test that pressing HOME correctly moves caret in I18N document.
-   @author Sergey Groznyh
-   @library ../../../regtesthelpers
-   @build JRobot
-   @run main bug6427244
-*/
+/**
+ * @test
+ * @key headful
+ * @bug 6427244 8144240 8166003 8169879
+ * @summary Test that pressing HOME correctly moves caret in I18N document.
+ * @author Sergey Groznyh
+ * @library ../../../regtesthelpers
+ * @build JRobot
+ * @run main bug6427244
+ */
 
 import java.awt.Container;
 import java.awt.Dimension;
--- a/jdk/test/javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -30,6 +30,7 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8142966
  * @summary Wrong cursor position in text components on HiDPI display
  * @run main/othervm -Dsun.java2d.uiScale=2 SwingFontMetricsTest
--- a/jdk/test/javax/swing/text/View/8015853/bug8015853.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/text/View/8015853/bug8015853.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -21,8 +21,9 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 8015853
  * @summary  Tests the rendering of a large HTML document
  * @author Dmitry Markov
--- a/jdk/test/javax/swing/text/html/Test4783068.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/javax/swing/text/html/Test4783068.java	Thu Aug 24 16:36:25 2017 +0200
@@ -21,11 +21,13 @@
  * questions.
  */
 
-/* @test
-   @bug 4783068
-   @summary Disabled components should render grayed-out HTML
-   @author Peter Zhelezniakov
-   @run main Test4783068
+/**
+ * @test
+ * @key headful
+ * @bug 4783068
+ * @summary Disabled components should render grayed-out HTML
+ * @author Peter Zhelezniakov
+ * @run main Test4783068
 */
 
 import java.awt.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/jdk/nio/zipfs/ZeroDate.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,120 @@
+/*
+ * 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 static java.util.zip.ZipFile.CENOFF;
+import static java.util.zip.ZipFile.CENTIM;
+import static java.util.zip.ZipFile.ENDHDR;
+import static java.util.zip.ZipFile.ENDOFF;
+import static java.util.zip.ZipFile.LOCTIM;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.Collections;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+/* @test
+ * @bug 8184940 8186227
+ * @summary JDK 9 rejects zip files where the modified day or month is 0
+ * @author Liam Miller-Cushon
+ */
+public class ZeroDate {
+
+    public static void main(String[] args) throws Exception {
+        // create a zip file, and read it in as a byte array
+        Path path = Files.createTempFile("bad", ".zip");
+        try (OutputStream os = Files.newOutputStream(path);
+                ZipOutputStream zos = new ZipOutputStream(os)) {
+            ZipEntry e = new ZipEntry("x");
+            zos.putNextEntry(e);
+            zos.write((int) 'x');
+        }
+        int len = (int) Files.size(path);
+        byte[] data = new byte[len];
+        try (InputStream is = Files.newInputStream(path)) {
+            is.read(data);
+        }
+        Files.delete(path);
+
+        // year, month, day are zero
+        testDate(data.clone(), 0, LocalDate.of(1979, 11, 30));
+        // only year is zero
+        testDate(data.clone(), 0 << 25 | 4 << 21 | 5 << 16, LocalDate.of(1980, 4, 5));
+    }
+
+    private static void testDate(byte[] data, int date, LocalDate expected) throws IOException {
+        // set the datetime
+        int endpos = data.length - ENDHDR;
+        int cenpos = u16(data, endpos + ENDOFF);
+        int locpos = u16(data, cenpos + CENOFF);
+        writeU32(data, cenpos + CENTIM, date);
+        writeU32(data, locpos + LOCTIM, date);
+
+        // ensure that the archive is still readable, and the date is 1979-11-30
+        Path path = Files.createTempFile("out", ".zip");
+        try (OutputStream os = Files.newOutputStream(path)) {
+            os.write(data);
+        }
+        URI uri = URI.create("jar:" + path.toUri());
+        try (FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap())) {
+            Path entry = fs.getPath("x");
+            Instant actualInstant =
+                    Files.readAttributes(entry, BasicFileAttributes.class)
+                            .lastModifiedTime()
+                            .toInstant();
+            Instant expectedInstant =
+                    expected.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant();
+            if (!actualInstant.equals(expectedInstant)) {
+                throw new AssertionError(
+                        String.format("actual: %s, expected: %s", actualInstant, expectedInstant));
+            }
+        } finally {
+            Files.delete(path);
+        }
+    }
+
+    static int u8(byte[] data, int offset) {
+        return data[offset] & 0xff;
+    }
+
+    static int u16(byte[] data, int offset) {
+        return u8(data, offset) + (u8(data, offset + 1) << 8);
+    }
+
+    private static void writeU32(byte[] data, int pos, int value) {
+        data[pos] = (byte) (value & 0xff);
+        data[pos + 1] = (byte) ((value >> 8) & 0xff);
+        data[pos + 2] = (byte) ((value >> 16) & 0xff);
+        data[pos + 3] = (byte) ((value >> 24) & 0xff);
+    }
+}
--- a/jdk/test/sun/awt/image/OffScreenImageSource/ImageConsumerUnregisterTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/sun/awt/image/OffScreenImageSource/ImageConsumerUnregisterTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,9 @@
  * questions.
  */
 
-/* @test
+/**
+ * @test
+ * @key headful
  * @bug 8160421 8161902
  * @summary Test to check OffScreenImageSource handles case where
  *          imageComplete(ImageConsumer.SINGLEFRAMEDONE) unregisters.
--- a/jdk/test/sun/java2d/DirectX/IAEforEmptyFrameTest/IAEforEmptyFrameTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/sun/java2d/DirectX/IAEforEmptyFrameTest/IAEforEmptyFrameTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2008, 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
@@ -21,14 +21,16 @@
  * questions.
  */
 
-/*
+/**
  * @test
+ * @key headful
  * @bug 6668439
  * @summary Verifies that no exceptions are thrown when frame is resized to 0x0
  * @author Dmitri.Trembovetski@sun.com: area=Graphics
  * @run main/othervm IAEforEmptyFrameTest
  * @run main/othervm -Dsun.java2d.d3d=false IAEforEmptyFrameTest
  */
+
 import javax.swing.JFrame;
 
 public class IAEforEmptyFrameTest {
--- a/jdk/test/sun/java2d/xrender/HugeGradientTest.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/sun/java2d/xrender/HugeGradientTest.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -27,10 +27,12 @@
 
 /**
  * @test
+ * @key headful
  * @bug 8162591
  * @summary tests gradients with start/endpoints exceeding Short.MAX coordinates
  * @author ceisserer
  */
+
 public class HugeGradientTest extends Frame {
         public static volatile boolean success = false;
 
--- a/jdk/test/sun/security/mscapi/SmallPrimeExponentP.java	Tue Aug 08 22:57:00 2017 +0000
+++ b/jdk/test/sun/security/mscapi/SmallPrimeExponentP.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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
@@ -55,6 +55,9 @@
         CertAndKeyGen ckg = new CertAndKeyGen("RSA", "SHA1withRSA");
         ckg.setRandom(new MySecureRandom(seed));
 
+        String alias = "anything";
+        int count = 0;
+
         boolean see63 = false;
         boolean see65 = false;
         while (!see63 || !see65) {
@@ -78,12 +81,19 @@
                         see65 = true;
                     }
                 }
-                ks.setKeyEntry("anything", k, null, new X509Certificate[]{
+                ks.setKeyEntry(alias, k, null, new X509Certificate[]{
                     ckg.getSelfCertificate(new X500Name("CN=Me"), 1000)
                 });
+                count++;
             }
         }
-        ks.store(null, null);
+
+        // Because of JDK-8185844, it has to reload the key store after
+        // deleting an entry.
+        for (int i = 0; i < count; i++) {
+            ks.deleteEntry(alias);
+            ks.load(null, null);
+        }
     }
 
     static class MySecureRandom extends SecureRandom {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/Compatibility.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,1183 @@
+/*
+ * 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
+ * @summary This test is used to verify the compatibility on jarsigner cross
+ *     different JDK releases. It also can be used to check jar signing (w/
+ *     and w/o TSA) and verifying on some specific key algorithms and digest
+ *     algorithms.
+ *     Note that, this is a manual test. For more details about the test and
+ *     its usages, please look through README.
+ *
+ * @modules java.base/sun.security.pkcs
+ *          java.base/sun.security.timestamp
+ *          java.base/sun.security.tools.keytool
+ *          java.base/sun.security.util
+ *          java.base/sun.security.x509
+ * @library /test/lib /lib/testlibrary ../warnings
+ * @compile -source 1.6 -target 1.6 JdkUtils.java
+ * @run main/manual/othervm Compatibility
+ */
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.util.JarUtils;
+
+public class Compatibility {
+
+    private static final String TEST_JAR_NAME = "test.jar";
+
+    private static final String TEST_SRC = System.getProperty("test.src");
+    private static final String TEST_CLASSES = System.getProperty("test.classes");
+    private static final String TEST_JDK = System.getProperty("test.jdk");
+    private static final String TEST_JARSIGNER = jarsignerPath(TEST_JDK);
+
+    private static final String PROXY_HOST = System.getProperty("proxyHost");
+    private static final String PROXY_PORT = System.getProperty("proxyPort", "80");
+
+    // An alternative security properties file.
+    // The test provides a default one, which only contains two lines:
+    // jdk.certpath.disabledAlgorithms=MD2, MD5
+    // jdk.jar.disabledAlgorithms=MD2, MD5
+    private static final String JAVA_SECURITY = System.getProperty(
+            "javaSecurityFile", TEST_SRC + "/java.security");
+
+    private static final String PASSWORD = "testpass";
+    private static final String KEYSTORE = "testKeystore";
+
+    private static final String RSA = "RSA";
+    private static final String DSA = "DSA";
+    private static final String EC = "EC";
+    private static final String[] KEY_ALGORITHMS = new String[] {
+            RSA,
+            DSA,
+            EC};
+
+    private static final String SHA1 = "SHA-1";
+    private static final String SHA256 = "SHA-256";
+    private static final String SHA512 = "SHA-512";
+    private static final String DEFAULT = "DEFAULT";
+    private static final String[] DIGEST_ALGORITHMS = new String[] {
+            SHA1,
+            SHA256,
+            SHA512,
+            DEFAULT};
+
+    private static final boolean[] EXPIRED = new boolean[] {
+            false,
+            true};
+
+    private static final Calendar CALENDAR = Calendar.getInstance();
+    private static final DateFormat DATE_FORMAT
+            = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+
+    // The certificate validity period in minutes. The default value is 1440
+    // minutes, namely 1 day.
+    private static final int CERT_VALIDITY
+            = Integer.valueOf(System.getProperty("certValidity", "1440"));
+    static {
+        if (CERT_VALIDITY < 1 || CERT_VALIDITY > 1440) {
+            throw new RuntimeException(
+                    "certValidity if out of range [1, 1440]: " + CERT_VALIDITY);
+        }
+    }
+
+    // If true, an additional verifying will be triggered after all of
+    // valid certificates expire. The default value is false.
+    public static final boolean DELAY_VERIFY
+            = Boolean.valueOf(System.getProperty("delayVerify", "false"));
+
+    private static long lastCertStartTime;
+
+    private static DetailsOutputStream detailsOutput;
+
+    public static void main(String[] args) throws Throwable {
+        // Backups stdout and stderr.
+        PrintStream origStdOut = System.out;
+        PrintStream origStdErr = System.err;
+
+        detailsOutput = new DetailsOutputStream();
+
+        // Redirects the system output to a custom one.
+        PrintStream printStream = new PrintStream(detailsOutput);
+        System.setOut(printStream);
+        System.setErr(printStream);
+
+        List<TsaInfo> tsaList = tsaInfoList();
+        if (tsaList.size() == 0) {
+            throw new RuntimeException("TSA service is mandatory.");
+        }
+
+        List<JdkInfo> jdkInfoList = jdkInfoList();
+        List<CertInfo> certList = createCertificates(jdkInfoList);
+        createJar();
+        List<SignItem> signItems = test(jdkInfoList, tsaList, certList);
+
+        boolean failed = generateReport(tsaList, signItems);
+
+        // Restores the original stdout and stderr.
+        System.setOut(origStdOut);
+        System.setErr(origStdErr);
+
+        if (failed) {
+            throw new RuntimeException("At least one test case failed. "
+                    + "Please check the failed row(s) in report.html "
+                    + "or failedReport.html.");
+        }
+    }
+
+    // Creates a jar file that contains an empty file.
+    private static void createJar() throws IOException {
+        String testFile = "test";
+        new File(testFile).createNewFile();
+        JarUtils.createJar(TEST_JAR_NAME, testFile);
+    }
+
+    // Creates a key store that includes a set of valid/expired certificates
+    // with various algorithms.
+    private static List<CertInfo> createCertificates(List<JdkInfo> jdkInfoList)
+            throws Throwable {
+        List<CertInfo> certList = new ArrayList<CertInfo>();
+        Set<String> expiredCertFilter = new HashSet<String>();
+
+        for(JdkInfo jdkInfo : jdkInfoList) {
+            for(String keyAlgorithm : KEY_ALGORITHMS) {
+                for(String digestAlgorithm : DIGEST_ALGORITHMS) {
+                    for(int keySize : keySizes(keyAlgorithm)) {
+                        for(boolean expired : EXPIRED) {
+                            // It creates only one expired certificate for one
+                            // key algorithm.
+                            if (expired
+                                    && !expiredCertFilter.add(keyAlgorithm)) {
+                                continue;
+                            }
+
+                            CertInfo certInfo = new CertInfo(
+                                    jdkInfo.version,
+                                    keyAlgorithm,
+                                    digestAlgorithm,
+                                    keySize,
+                                    expired);
+                            if (!certList.contains(certInfo)) {
+                                String alias = createCertificate(
+                                        jdkInfo.jdkPath, certInfo);
+                                if (alias != null) {
+                                    certList.add(certInfo);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return certList;
+    }
+
+    // Creates/Updates a key store that adds a certificate with specific algorithm.
+    private static String createCertificate(String jdkPath, CertInfo certInfo)
+            throws Throwable {
+        String alias = certInfo.alias();
+
+        List<String> arguments = new ArrayList<String>();
+        arguments.add("-J-Djava.security.properties=" + JAVA_SECURITY);
+        arguments.add("-v");
+        arguments.add("-storetype");
+        arguments.add("jks");
+        arguments.add("-genkey");
+        arguments.add("-keyalg");
+        arguments.add(certInfo.keyAlgorithm);
+        String sigalg = sigalg(certInfo.digestAlgorithm, certInfo.keyAlgorithm);
+        if (sigalg != null) {
+            arguments.add("-sigalg");
+            arguments.add(sigalg);
+        }
+        if (certInfo.keySize != 0) {
+            arguments.add("-keysize");
+            arguments.add(certInfo.keySize + "");
+        }
+        arguments.add("-dname");
+        arguments.add("CN=Test");
+        arguments.add("-alias");
+        arguments.add(alias);
+        arguments.add("-keypass");
+        arguments.add(PASSWORD);
+        arguments.add("-storepass");
+        arguments.add(PASSWORD);
+
+        arguments.add("-startdate");
+        arguments.add(startDate(certInfo.expired));
+        arguments.add("-validity");
+        arguments.add("1");
+        arguments.add("-keystore");
+        arguments.add(KEYSTORE);
+
+        OutputAnalyzer outputAnalyzer = execTool(
+                jdkPath + "/bin/keytool",
+                arguments.toArray(new String[arguments.size()]));
+        if (outputAnalyzer.getExitValue() == 0
+                && !outputAnalyzer.getOutput().matches("[Ee]xception")) {
+            return alias;
+        } else {
+            return null;
+        }
+    }
+
+    private static String sigalg(String digestAlgorithm, String keyAlgorithm) {
+        if (digestAlgorithm == DEFAULT) {
+            return null;
+        }
+
+        String keyName = keyAlgorithm == EC ? "ECDSA" : keyAlgorithm;
+        return digestAlgorithm.replace("-", "") + "with" + keyName;
+    }
+
+    // The validity period of a certificate always be 1 day. For creating an
+    // expired certificate, the start date is the time before 1 day, then the
+    // certificate expires immediately. And for creating a valid certificate,
+    // the start date is the time before (1 day - CERT_VALIDITY minutes), then
+    // the certificate will expires in CERT_VALIDITY minutes.
+    private static String startDate(boolean expiredCert) {
+        CALENDAR.setTime(new Date());
+        CALENDAR.add(Calendar.DAY_OF_MONTH, -1);
+        if (!expiredCert) {
+            CALENDAR.add(Calendar.MINUTE, CERT_VALIDITY);
+        }
+        Date startDate = CALENDAR.getTime();
+        lastCertStartTime = startDate.getTime();
+        return DATE_FORMAT.format(startDate);
+    }
+
+    // Retrieves JDK info from the file which is specified by property jdkListFile,
+    // or from property jdkList if jdkListFile is not available.
+    private static List<JdkInfo> jdkInfoList() throws Throwable {
+        String[] jdkList = list("jdkList");
+        if (jdkList.length == 0) {
+            jdkList = new String[] { TEST_JDK };
+        }
+
+        List<JdkInfo> jdkInfoList = new ArrayList<JdkInfo>();
+        for (String jdkPath : jdkList) {
+            JdkInfo jdkInfo = new JdkInfo(jdkPath);
+            // The JDK version must be unique.
+            if (!jdkInfoList.contains(jdkInfo)) {
+                jdkInfoList.add(jdkInfo);
+            } else {
+                System.out.println("The JDK version is duplicate: " + jdkPath);
+            }
+        }
+        return jdkInfoList;
+    }
+
+    // Retrieves TSA info from the file which is specified by property tsaListFile,
+    // or from property tsaList if tsaListFile is not available.
+    private static List<TsaInfo> tsaInfoList() throws IOException {
+        String[] tsaList = list("tsaList");
+
+        List<TsaInfo> tsaInfoList = new ArrayList<TsaInfo>();
+        for (int i = 0; i < tsaList.length; i++) {
+            String[] values = tsaList[i].split(";digests=");
+
+            String[] digests = new String[0];
+            if (values.length == 2) {
+                digests = values[1].split(",");
+            }
+
+            TsaInfo bufTsa = new TsaInfo(i, values[0]);
+
+            for (String digest : digests) {
+                bufTsa.addDigest(digest);
+            }
+
+            tsaInfoList.add(bufTsa);
+        }
+
+        return tsaInfoList;
+    }
+
+    private static String[] list(String listProp)
+            throws IOException {
+        String listFileProp = listProp + "File";
+        String listFile = System.getProperty(listFileProp);
+        if (!isEmpty(listFile)) {
+            System.out.println(listFileProp + "=" + listFile);
+            List<String> list = new ArrayList<String>();
+            BufferedReader reader = new BufferedReader(
+                    new FileReader(listFile));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                String item = line.trim();
+                if (!item.isEmpty()) {
+                    list.add(item);
+                }
+            }
+            reader.close();
+            return list.toArray(new String[list.size()]);
+        }
+
+        String list = System.getProperty(listProp);
+        System.out.println(listProp + "=" + list);
+        return !isEmpty(list) ? list.split("#") : new String[0];
+    }
+
+    private static boolean isEmpty(String str) {
+        return str == null || str.isEmpty();
+    }
+
+    // A JDK (signer) signs a jar with a variety of algorithms, and then all of
+    // JDKs (verifiers), including the signer itself, try to verify the signed
+    // jars respectively.
+    private static List<SignItem> test(List<JdkInfo> jdkInfoList,
+            List<TsaInfo> tsaInfoList, List<CertInfo> certList)
+            throws Throwable {
+        detailsOutput.transferPhase();
+        List<SignItem> signItems = signing(jdkInfoList, tsaInfoList, certList);
+
+        detailsOutput.transferPhase();
+        for (SignItem signItem : signItems) {
+            for (JdkInfo verifierInfo : jdkInfoList) {
+                // JDK 6 doesn't support EC
+                if (!verifierInfo.isJdk6()
+                        || signItem.certInfo.keyAlgorithm != EC) {
+                    verifying(signItem, VerifyItem.build(verifierInfo));
+                }
+            }
+        }
+
+        if (DELAY_VERIFY) {
+            detailsOutput.transferPhase();
+            System.out.print("Waiting for delay verifying");
+            long lastCertExpirationTime = lastCertStartTime + 24 * 60 * 60 * 1000;
+            while (System.currentTimeMillis() < lastCertExpirationTime) {
+                TimeUnit.SECONDS.sleep(30);
+                System.out.print(".");
+            }
+            System.out.println();
+
+            System.out.println("Delay verifying starts");
+            for (SignItem signItem : signItems) {
+                for (VerifyItem verifyItem : signItem.verifyItems) {
+                    verifying(signItem, verifyItem);
+                }
+            }
+        }
+
+        detailsOutput.transferPhase();
+
+        return signItems;
+    }
+
+    private static List<SignItem> signing(List<JdkInfo> jdkInfos,
+            List<TsaInfo> tsaList, List<CertInfo> certList) throws Throwable {
+        List<SignItem> signItems = new ArrayList<SignItem>();
+
+        Set<String> signFilter = new HashSet<String>();
+
+        for (JdkInfo signerInfo : jdkInfos) {
+            for (String keyAlgorithm : KEY_ALGORITHMS) {
+                // JDK 6 doesn't support EC
+                if (signerInfo.isJdk6() && keyAlgorithm == EC) {
+                    continue;
+                }
+
+                for (String digestAlgorithm : DIGEST_ALGORITHMS) {
+                    String sigalg = sigalg(digestAlgorithm, keyAlgorithm);
+                    // If the signature algorithm is not supported by the JDK,
+                    // it cannot try to sign jar with this algorithm.
+                    if (sigalg != null && !signerInfo.isSupportedSigalg(sigalg)) {
+                        continue;
+                    }
+
+                    // If the JDK doesn't support option -tsadigestalg, the
+                    // associated cases just be ignored.
+                    if (digestAlgorithm != DEFAULT
+                            && !signerInfo.supportsTsadigestalg) {
+                        continue;
+                    }
+
+                    for (int keySize : keySizes(keyAlgorithm)) {
+                        for (boolean expired : EXPIRED) {
+                            CertInfo certInfo = new CertInfo(
+                                    signerInfo.version,
+                                    keyAlgorithm,
+                                    digestAlgorithm,
+                                    keySize,
+                                    expired);
+                            if (!certList.contains(certInfo)) {
+                                continue;
+                            }
+
+                            String tsadigestalg = digestAlgorithm != DEFAULT
+                                                ? digestAlgorithm
+                                                : null;
+
+                            for (TsaInfo tsaInfo : tsaList) {
+                                // It has to ignore the digest algorithm, which
+                                // is not supported by the TSA server.
+                                if(!tsaInfo.isDigestSupported(tsadigestalg)) {
+                                    continue;
+                                }
+
+                                String tsaUrl = tsaInfo.tsaUrl;
+                                if (TsaFilter.filter(
+                                        signerInfo.version,
+                                        digestAlgorithm,
+                                        expired,
+                                        tsaInfo.index)) {
+                                    tsaUrl = null;
+                                }
+
+                                String signedJar = "JDK_"
+                                        + signerInfo.version + "-CERT_"
+                                        + certInfo
+                                        + (tsaUrl == null
+                                           ? ""
+                                           : "-TSA_" + tsaInfo.index);
+
+                                // It has to ignore the same jar signing.
+                                if (!signFilter.add(signedJar)) {
+                                    continue;
+                                }
+
+                                SignItem signItem = SignItem.build()
+                                        .certInfo(certInfo)
+                                        .version(signerInfo.version)
+                                        .signatureAlgorithm(sigalg)
+                                        .tsaDigestAlgorithm(
+                                                tsaUrl == null
+                                                ? null
+                                                : tsadigestalg)
+                                        .tsaIndex(
+                                                tsaUrl == null
+                                                ? -1
+                                                : tsaInfo.index)
+                                        .signedJar(signedJar);
+                                String signingId = signingId(signItem);
+                                detailsOutput.writeAnchorName(signingId,
+                                        "Signing: " + signingId);
+
+                                OutputAnalyzer signOA = signJar(
+                                        signerInfo.jarsignerPath,
+                                        sigalg,
+                                        tsadigestalg,
+                                        tsaUrl,
+                                        certInfo.alias(),
+                                        signedJar);
+                                Status signingStatus = signingStatus(signOA);
+                                signItem.status(signingStatus);
+
+                                if (signingStatus != Status.ERROR) {
+                                    // Using the testing JDK, which is specified
+                                    // by jtreg option "-jdk", to verify the
+                                    // signed jar and extract the signature
+                                    // algorithm and timestamp digest algorithm.
+                                    String output = verifyJar(TEST_JARSIGNER,
+                                            signedJar).getOutput();
+                                    signItem.extractedSignatureAlgorithm(
+                                            extract(output,
+                                                    " *Signature algorithm.*",
+                                                    ".*: |,.*"));
+                                    signItem.extractedTsaDigestAlgorithm(
+                                            extract(output,
+                                                    " *Timestamp digest algorithm.*",
+                                                    ".*: "));
+                                }
+
+                                signItems.add(signItem);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return signItems;
+    }
+
+    private static void verifying(SignItem signItem, VerifyItem verifyItem)
+            throws Throwable {
+        boolean delayVerify = verifyItem.status == Status.NONE;
+        String verifyingId = verifyingId(signItem, verifyItem, !delayVerify);
+        detailsOutput.writeAnchorName(verifyingId, "Verifying: " + verifyingId);
+
+        OutputAnalyzer verifyOA = verifyJar(verifyItem.jdkInfo.jarsignerPath,
+                signItem.signedJar);
+        Status verifyingStatus = verifyingStatus(verifyOA);
+
+        // It checks if the default timestamp digest algorithm is SHA-256.
+        if (verifyingStatus != Status.ERROR
+                && signItem.tsaDigestAlgorithm == null) {
+            verifyingStatus = signItem.extractedTsaDigestAlgorithm != null
+                                    && !signItem.extractedTsaDigestAlgorithm.matches("SHA-?256")
+                            ? Status.ERROR
+                            : verifyingStatus;
+            if (verifyingStatus == Status.ERROR) {
+                System.out.println("The default tsa digest is not SHA-256: "
+                    + signItem.extractedTsaDigestAlgorithm);
+            }
+        }
+
+        if (delayVerify) {
+            signItem.addVerifyItem(verifyItem.status(verifyingStatus));
+        } else {
+            verifyItem.delayStatus(verifyingStatus);
+        }
+    }
+
+    // Return key sizes according to the specified key algorithm.
+    private static int[] keySizes(String keyAlgorithm) {
+        if (keyAlgorithm == RSA || keyAlgorithm == DSA) {
+            return new int[] { 1024, 2048, 0 };
+        } else if (keyAlgorithm == EC) {
+            return new int[] { 384, 571, 0 };
+        }
+
+        return null;
+    }
+
+    // Determines the status of signing.
+    private static Status signingStatus(OutputAnalyzer outputAnalyzer) {
+        if (outputAnalyzer.getExitValue() == 0) {
+            if (outputAnalyzer.getOutput().contains(Test.WARNING)) {
+                return Status.WARNING;
+            } else {
+                return Status.NORMAL;
+            }
+        } else {
+            return Status.ERROR;
+        }
+    }
+
+    // Determines the status of verifying.
+    private static Status verifyingStatus(OutputAnalyzer outputAnalyzer) {
+        if (outputAnalyzer.getExitValue() == 0) {
+            String output = outputAnalyzer.getOutput();
+            if (!output.contains(Test.JAR_VERIFIED)) {
+                return Status.ERROR;
+            } else if (output.contains(Test.WARNING)) {
+                return Status.WARNING;
+            } else {
+                return Status.NORMAL;
+            }
+        } else {
+            return Status.ERROR;
+        }
+    }
+
+    // Extracts string from text by specified patterns.
+    private static String extract(String text, String linePattern,
+            String replacePattern) {
+        Matcher lineMatcher = Pattern.compile(linePattern).matcher(text);
+        if (lineMatcher.find()) {
+            String line = lineMatcher.group(0);
+            return line.replaceAll(replacePattern, "");
+        } else {
+            return null;
+        }
+    }
+
+    // Using specified jarsigner to sign the pre-created jar with specified
+    // algorithms.
+    private static OutputAnalyzer signJar(String jarsignerPath, String sigalg,
+            String tsadigestalg, String tsa, String alias, String signedJar)
+            throws Throwable {
+        List<String> arguments = new ArrayList<String>();
+
+        if (PROXY_HOST != null && PROXY_PORT != null) {
+            arguments.add("-J-Dhttp.proxyHost=" + PROXY_HOST);
+            arguments.add("-J-Dhttp.proxyPort=" + PROXY_PORT);
+            arguments.add("-J-Dhttps.proxyHost=" + PROXY_HOST);
+            arguments.add("-J-Dhttps.proxyPort=" + PROXY_PORT);
+        }
+        arguments.add("-J-Djava.security.properties=" + JAVA_SECURITY);
+        arguments.add("-debug");
+        arguments.add("-verbose");
+        if (sigalg != null) {
+            arguments.add("-sigalg");
+            arguments.add(sigalg);
+        }
+        if (tsa != null) {
+            arguments.add("-tsa");
+            arguments.add(tsa);
+        }
+        if (tsadigestalg != null) {
+            arguments.add("-tsadigestalg");
+            arguments.add(tsadigestalg);
+        }
+        arguments.add("-keystore");
+        arguments.add(KEYSTORE);
+        arguments.add("-storepass");
+        arguments.add(PASSWORD);
+        arguments.add("-signedjar");
+        arguments.add(signedJar + ".jar");
+        arguments.add(TEST_JAR_NAME);
+        arguments.add(alias);
+
+        OutputAnalyzer outputAnalyzer = execTool(
+                jarsignerPath,
+                arguments.toArray(new String[arguments.size()]));
+        return outputAnalyzer;
+    }
+
+    // Using specified jarsigner to verify the signed jar.
+    private static OutputAnalyzer verifyJar(String jarsignerPath,
+            String signedJar) throws Throwable {
+        OutputAnalyzer outputAnalyzer = execTool(
+                jarsignerPath,
+                "-J-Djava.security.properties=" + JAVA_SECURITY,
+                "-debug",
+                "-verbose",
+                "-certs",
+                "-keystore", KEYSTORE,
+                "-verify", signedJar + ".jar");
+        return outputAnalyzer;
+    }
+
+    // Generates the test result report.
+    private static boolean generateReport(List<TsaInfo> tsaList,
+            List<SignItem> signItems) throws IOException {
+        System.out.println("Report is being generated...");
+
+        StringBuilder report = new StringBuilder();
+        report.append(HtmlHelper.startHtml());
+        report.append(HtmlHelper.startPre());
+        // Generates TSA URLs
+        report.append("TSA list:\n");
+        for(TsaInfo tsaInfo : tsaList) {
+            report.append(
+                    String.format("%d=%s%n", tsaInfo.index, tsaInfo.tsaUrl));
+        }
+        report.append(HtmlHelper.endPre());
+
+        report.append(HtmlHelper.startTable());
+        // Generates report headers.
+        List<String> headers = new ArrayList<String>();
+        headers.add("[Certificate]");
+        headers.add("[Signer JDK]");
+        headers.add("[Signature Algorithm]");
+        headers.add("[TSA Digest]");
+        headers.add("[TSA]");
+        headers.add("[Signing Status]");
+        headers.add("[Verifier JDK]");
+        headers.add("[Verifying Status]");
+        if (DELAY_VERIFY) {
+            headers.add("[Delay Verifying Status]");
+        }
+        headers.add("[Failed]");
+        report.append(HtmlHelper.htmlRow(
+                headers.toArray(new String[headers.size()])));
+
+        StringBuilder failedReport = new StringBuilder(report.toString());
+
+        boolean failed = false;
+
+        // Generates report rows.
+        for (SignItem signItem : signItems) {
+            for (VerifyItem verifyItem : signItem.verifyItems) {
+                String reportRow = reportRow(signItem, verifyItem);
+                report.append(reportRow);
+                boolean isFailedCase = isFailed(signItem, verifyItem);
+                if (isFailedCase) {
+                    failedReport.append(reportRow);
+                }
+                failed = failed || isFailedCase;
+            }
+        }
+
+        report.append(HtmlHelper.endTable());
+        report.append(HtmlHelper.endHtml());
+        generateFile("report.html", report.toString());
+        if (failed) {
+            failedReport.append(HtmlHelper.endTable());
+            failedReport.append(HtmlHelper.endPre());
+            failedReport.append(HtmlHelper.endHtml());
+            generateFile("failedReport.html", failedReport.toString());
+        }
+
+        System.out.println("Report is generated.");
+        return failed;
+    }
+
+    private static void generateFile(String path, String content)
+            throws IOException {
+        FileWriter writer = new FileWriter(new File(path));
+        writer.write(content);
+        writer.close();
+    }
+
+    private static String jarsignerPath(String jdkPath) {
+        return jdkPath + "/bin/jarsigner";
+    }
+
+    // Executes the specified function on JdkUtils by the specified JDK.
+    private static String execJdkUtils(String jdkPath, String method,
+            String... args) throws Throwable {
+        String[] cmd = new String[args.length + 5];
+        cmd[0] = jdkPath + "/bin/java";
+        cmd[1] = "-cp";
+        cmd[2] = TEST_CLASSES;
+        cmd[3] = JdkUtils.class.getName();
+        cmd[4] = method;
+        System.arraycopy(args, 0, cmd, 5, args.length);
+        return ProcessTools.executeCommand(cmd).getOutput();
+    }
+
+    // Executes the specified JDK tools, such as keytool and jarsigner, and
+    // ensures the output is in US English.
+    private static OutputAnalyzer execTool(String toolPath, String... args)
+            throws Throwable {
+        String[] cmd = new String[args.length + 4];
+        cmd[0] = toolPath;
+        cmd[1] = "-J-Duser.language=en";
+        cmd[2] = "-J-Duser.country=US";
+        cmd[3] = "-J-Djava.security.egd=file:/dev/./urandom";
+        System.arraycopy(args, 0, cmd, 4, args.length);
+        return ProcessTools.executeCommand(cmd);
+    }
+
+    private static class JdkInfo {
+
+        private final String jdkPath;
+        private final String jarsignerPath;
+        private final String version;
+        private final boolean supportsTsadigestalg;
+
+        private Map<String, Boolean> sigalgMap = new HashMap<String, Boolean>();
+
+        private JdkInfo(String jdkPath) throws Throwable {
+            this.jdkPath = jdkPath;
+            version = execJdkUtils(jdkPath, JdkUtils.M_JAVA_RUNTIME_VERSION);
+            if (version == null || version.trim().isEmpty()) {
+                throw new RuntimeException(
+                        "Cannot determine the JDK version: " + jdkPath);
+            }
+            jarsignerPath = jarsignerPath(jdkPath);
+            supportsTsadigestalg = execTool(jarsignerPath, "-help")
+                    .getOutput().contains("-tsadigestalg");
+        }
+
+        private boolean isSupportedSigalg(String sigalg) throws Throwable {
+            if (!sigalgMap.containsKey(sigalg)) {
+                boolean isSupported = "true".equalsIgnoreCase(
+                        execJdkUtils(
+                                jdkPath,
+                                JdkUtils.M_IS_SUPPORTED_SIGALG,
+                                sigalg));
+                sigalgMap.put(sigalg, isSupported);
+            }
+
+            return sigalgMap.get(sigalg);
+        }
+
+        private boolean isJdk6() {
+            return version.startsWith("1.6");
+        }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result
+                    + ((version == null) ? 0 : version.hashCode());
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (getClass() != obj.getClass())
+                return false;
+            JdkInfo other = (JdkInfo) obj;
+            if (version == null) {
+                if (other.version != null)
+                    return false;
+            } else if (!version.equals(other.version))
+                return false;
+            return true;
+        }
+    }
+
+    private static class TsaInfo {
+
+        private final int index;
+        private final String tsaUrl;
+        private Set<String> digestList = new HashSet<String>();
+
+        private TsaInfo(int index, String tsa) {
+            this.index = index;
+            this.tsaUrl = tsa;
+        }
+
+        private void addDigest(String digest) {
+            if (!ignore(digest)) {
+                digestList.add(digest);
+            }
+        }
+
+        private static boolean ignore(String digest) {
+            return !SHA1.equalsIgnoreCase(digest)
+                    && !SHA256.equalsIgnoreCase(digest)
+                    && !SHA512.equalsIgnoreCase(digest);
+        }
+
+        private boolean isDigestSupported(String digest) {
+            return digest == null || digestList.isEmpty()
+                    || digestList.contains(digest);
+        }
+    }
+
+    private static class CertInfo {
+
+        private final String jdkVersion;
+        private final String keyAlgorithm;
+        private final String digestAlgorithm;
+        private final int keySize;
+        private final boolean expired;
+
+        private CertInfo(String jdkVersion, String keyAlgorithm,
+                String digestAlgorithm, int keySize, boolean expired) {
+            this.jdkVersion = jdkVersion;
+            this.keyAlgorithm = keyAlgorithm;
+            this.digestAlgorithm = digestAlgorithm;
+            this.keySize = keySize;
+            this.expired = expired;
+        }
+
+        @Override
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result
+                    + ((digestAlgorithm == null) ? 0 : digestAlgorithm.hashCode());
+            result = prime * result + (expired ? 1231 : 1237);
+            result = prime * result
+                    + ((jdkVersion == null) ? 0 : jdkVersion.hashCode());
+            result = prime * result
+                    + ((keyAlgorithm == null) ? 0 : keyAlgorithm.hashCode());
+            result = prime * result + keySize;
+            return result;
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj)
+                return true;
+            if (obj == null)
+                return false;
+            if (getClass() != obj.getClass())
+                return false;
+            CertInfo other = (CertInfo) obj;
+            if (digestAlgorithm == null) {
+                if (other.digestAlgorithm != null)
+                    return false;
+            } else if (!digestAlgorithm.equals(other.digestAlgorithm))
+                return false;
+            if (expired != other.expired)
+                return false;
+            if (jdkVersion == null) {
+                if (other.jdkVersion != null)
+                    return false;
+            } else if (!jdkVersion.equals(other.jdkVersion))
+                return false;
+            if (keyAlgorithm == null) {
+                if (other.keyAlgorithm != null)
+                    return false;
+            } else if (!keyAlgorithm.equals(other.keyAlgorithm))
+                return false;
+            if (keySize != other.keySize)
+                return false;
+            return true;
+        }
+
+        private String alias() {
+            return jdkVersion + "_" + toString();
+        }
+
+        @Override
+        public String toString() {
+            return keyAlgorithm + "_" + digestAlgorithm
+                    + (keySize == 0 ? "" : "_" + keySize)
+                    + (expired ? "_Expired" : "");
+        }
+    }
+
+    // It does only one timestamping for the same JDK, digest algorithm and
+    // TSA service with an arbitrary valid/expired certificate.
+    private static class TsaFilter {
+
+        private static final Set<Condition> SET = new HashSet<Condition>();
+
+        private static boolean filter(String signerVersion,
+                String digestAlgorithm, boolean expiredCert, int tsaIndex) {
+            return !SET.add(new Condition(signerVersion, digestAlgorithm,
+                    expiredCert, tsaIndex));
+        }
+
+        private static class Condition {
+
+            private final String signerVersion;
+            private final String digestAlgorithm;
+            private final boolean expiredCert;
+            private final int tsaIndex;
+
+            private Condition(String signerVersion, String digestAlgorithm,
+                    boolean expiredCert, int tsaIndex) {
+                this.signerVersion = signerVersion;
+                this.digestAlgorithm = digestAlgorithm;
+                this.expiredCert = expiredCert;
+                this.tsaIndex = tsaIndex;
+            }
+
+            @Override
+            public int hashCode() {
+                final int prime = 31;
+                int result = 1;
+                result = prime * result
+                        + ((digestAlgorithm == null) ? 0 : digestAlgorithm.hashCode());
+                result = prime * result + (expiredCert ? 1231 : 1237);
+                result = prime * result
+                        + ((signerVersion == null) ? 0 : signerVersion.hashCode());
+                result = prime * result + tsaIndex;
+                return result;
+            }
+
+            @Override
+            public boolean equals(Object obj) {
+                if (this == obj)
+                    return true;
+                if (obj == null)
+                    return false;
+                if (getClass() != obj.getClass())
+                    return false;
+                Condition other = (Condition) obj;
+                if (digestAlgorithm == null) {
+                    if (other.digestAlgorithm != null)
+                        return false;
+                } else if (!digestAlgorithm.equals(other.digestAlgorithm))
+                    return false;
+                if (expiredCert != other.expiredCert)
+                    return false;
+                if (signerVersion == null) {
+                    if (other.signerVersion != null)
+                        return false;
+                } else if (!signerVersion.equals(other.signerVersion))
+                    return false;
+                if (tsaIndex != other.tsaIndex)
+                    return false;
+                return true;
+            }
+        }}
+
+    private static enum Status {
+
+        // No action due to pre-action fails.
+        NONE,
+
+        // jar is signed/verified with error
+        ERROR,
+
+        // jar is signed/verified with warning
+        WARNING,
+
+        // jar is signed/verified without any warning and error
+        NORMAL
+    }
+
+    private static class SignItem {
+
+        private CertInfo certInfo;
+        private String version;
+        private String signatureAlgorithm;
+        // Signature algorithm that is extracted from verification output.
+        private String extractedSignatureAlgorithm;
+        private String tsaDigestAlgorithm;
+        // TSA digest algorithm that is extracted from verification output.
+        private String extractedTsaDigestAlgorithm;
+        private int tsaIndex;
+        private Status status;
+        private String signedJar;
+
+        private List<VerifyItem> verifyItems = new ArrayList<VerifyItem>();
+
+        private static SignItem build() {
+            return new SignItem();
+        }
+
+        private SignItem certInfo(CertInfo certInfo) {
+            this.certInfo = certInfo;
+            return this;
+        }
+
+        private SignItem version(String version) {
+            this.version = version;
+            return this;
+        }
+
+        private SignItem signatureAlgorithm(String signatureAlgorithm) {
+            this.signatureAlgorithm = signatureAlgorithm;
+            return this;
+        }
+
+        private SignItem extractedSignatureAlgorithm(
+                String extractedSignatureAlgorithm) {
+            this.extractedSignatureAlgorithm = extractedSignatureAlgorithm;
+            return this;
+        }
+
+        private SignItem tsaDigestAlgorithm(String tsaDigestAlgorithm) {
+            this.tsaDigestAlgorithm = tsaDigestAlgorithm;
+            return this;
+        }
+
+        private SignItem extractedTsaDigestAlgorithm(
+                String extractedTsaDigestAlgorithm) {
+            this.extractedTsaDigestAlgorithm = extractedTsaDigestAlgorithm;
+            return this;
+        }
+
+        private SignItem tsaIndex(int tsaIndex) {
+            this.tsaIndex = tsaIndex;
+            return this;
+        }
+
+        private SignItem status(Status status) {
+            this.status = status;
+            return this;
+        }
+
+        private SignItem signedJar(String signedJar) {
+            this.signedJar = signedJar;
+            return this;
+        }
+
+        private void addVerifyItem(VerifyItem verifyItem) {
+            verifyItems.add(verifyItem);
+        }
+    }
+
+    private static class VerifyItem {
+
+        private JdkInfo jdkInfo;
+        private Status status = Status.NONE;
+        private Status delayStatus = Status.NONE;
+
+        private static VerifyItem build(JdkInfo jdkInfo) {
+            VerifyItem verifyItem = new VerifyItem();
+            verifyItem.jdkInfo = jdkInfo;
+            return verifyItem;
+        }
+
+        private VerifyItem status(Status status) {
+            this.status = status;
+            return this;
+        }
+
+        private VerifyItem delayStatus(Status status) {
+            this.delayStatus = status;
+            return this;
+        }
+    }
+
+    // The identifier for a specific signing.
+    private static String signingId(SignItem signItem) {
+        return signItem.signedJar;
+    }
+
+    // The identifier for a specific verifying.
+    private static String verifyingId(SignItem signItem, VerifyItem verifyItem,
+            boolean delayVerify) {
+        return "S_" + signingId(signItem) + "-" + (delayVerify ? "DV" : "V")
+                + "_" + verifyItem.jdkInfo.version;
+    }
+
+    private static String reportRow(SignItem signItem, VerifyItem verifyItem) {
+        List<String> values = new ArrayList<String>();
+        values.add(signItem.certInfo.toString());
+        values.add(signItem.version);
+        values.add(null2Default(signItem.signatureAlgorithm,
+                signItem.extractedSignatureAlgorithm));
+        values.add(signItem.tsaIndex == -1
+                   ? ""
+                   : null2Default(signItem.tsaDigestAlgorithm,
+                        signItem.extractedTsaDigestAlgorithm));
+        values.add(signItem.tsaIndex == -1 ? "" : signItem.tsaIndex + "");
+        values.add(HtmlHelper.anchorLink(
+                PhaseOutputStream.fileName(PhaseOutputStream.Phase.SIGNING),
+                signingId(signItem),
+                signItem.status.toString()));
+        values.add(verifyItem.jdkInfo.version);
+        values.add(HtmlHelper.anchorLink(
+                PhaseOutputStream.fileName(PhaseOutputStream.Phase.VERIFYING),
+                verifyingId(signItem, verifyItem, false),
+                verifyItem.status.toString()));
+        if (DELAY_VERIFY) {
+            values.add(HtmlHelper.anchorLink(
+                    PhaseOutputStream.fileName(
+                            PhaseOutputStream.Phase.DELAY_VERIFYING),
+                    verifyingId(signItem, verifyItem, true),
+                    verifyItem.delayStatus.toString()));
+        }
+        values.add(isFailed(signItem, verifyItem) ? "X" : "");
+        return HtmlHelper.htmlRow(values.toArray(new String[values.size()]));
+    }
+
+    private static boolean isFailed(SignItem signItem,
+            VerifyItem verifyItem) {
+        return signItem.status == Status.ERROR
+                || verifyItem.status == Status.ERROR
+                || verifyItem.delayStatus == Status.ERROR;
+    }
+
+    // If a value is null, then displays the default value or N/A.
+    private static String null2Default(String value, String defaultValue) {
+        return value == null
+               ? DEFAULT + "(" + (defaultValue == null
+                                  ? "N/A"
+                                  : defaultValue) + ")"
+               : value;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/DetailsOutputStream.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+/*
+ * A custom output stream that redirects the testing outputs to a file, called
+ * details.out. It also calls another output stream to save some outputs to
+ * other files.
+ */
+public class DetailsOutputStream extends FileOutputStream {
+
+    private PhaseOutputStream phaseOutputStream = new PhaseOutputStream();
+
+    public DetailsOutputStream() throws FileNotFoundException {
+        super("details.out", true);
+    }
+
+    public void transferPhase() throws IOException {
+        if (phaseOutputStream.isCorePhase()) {
+            phaseOutputStream.write(HtmlHelper.endHtml());
+            phaseOutputStream.write(HtmlHelper.endPre());
+        }
+
+        phaseOutputStream.transfer();
+
+        if (phaseOutputStream.isCorePhase()) {
+            phaseOutputStream.write(HtmlHelper.startHtml());
+            phaseOutputStream.write(HtmlHelper.startPre());
+        }
+    }
+
+    @Override
+    public void write(byte[] b) throws IOException {
+        super.write(b);
+        phaseOutputStream.write(b);
+    }
+
+    @Override
+    public void write(int b) throws IOException {
+        super.write(b);
+        phaseOutputStream.write(b);
+    }
+
+    @Override
+    public void write(byte b[], int off, int len) throws IOException {
+        super.write(b, off, len);
+        phaseOutputStream.write(b, off, len);
+    }
+
+    public void writeAnchorName(String name, String text) throws IOException {
+        super.write((text).getBytes());
+        super.write('\n');
+        phaseOutputStream.write(HtmlHelper.anchorName(name, text));
+        phaseOutputStream.write('\n');
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/HtmlHelper.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ */
+
+/*
+ * A helper that is used for creating HTML elements.
+ */
+public class HtmlHelper {
+
+    private static final String STYLE
+            = "style=\"font-family: Courier New; "
+            + "font-size: 12px; "
+            + "white-space: pre-wrap\"";
+
+    public static String htmlRow(String... values) {
+        StringBuilder row = new StringBuilder();
+        row.append(startTr());
+        for (String value : values) {
+            row.append(startTd());
+            row.append(value);
+            row.append(endTd());
+        }
+        row.append(endTr());
+        return row.toString();
+    }
+
+    public static String startHtml() {
+        return startTag("html");
+    }
+
+    public static String endHtml() {
+        return endTag("html");
+    }
+
+    public static String startPre() {
+        return startTag("pre " + STYLE);
+    }
+
+    public static String endPre() {
+        return endTag("pre");
+    }
+
+    public static String startTable() {
+        return startTag("table " + STYLE);
+    }
+
+    public static String endTable() {
+        return endTag("table");
+    }
+
+    public static String startTr() {
+        return startTag("tr");
+    }
+
+    public static String endTr() {
+        return endTag("tr");
+    }
+
+    public static String startTd() {
+        return startTag("td");
+    }
+
+    public static String endTd() {
+        return endTag("td");
+    }
+
+    public static String startTag(String tag) {
+        return "<" + tag + ">";
+    }
+
+    public static String endTag(String tag) {
+        return "</" + tag + ">";
+    }
+
+    public static String anchorName(String name, String text) {
+        return "<a name=" + name + ">" + text + "</a>";
+    }
+
+    public static String anchorLink(String file, String anchorName,
+            String text) {
+        return "<a href=" + file + "#" + anchorName + ">" + text + "</a>";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/JdkUtils.java	Thu Aug 24 16:36:25 2017 +0200
@@ -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 java.security.NoSuchAlgorithmException;
+import java.security.Signature;
+
+/*
+ * This class is used for returning some specific JDK information.
+ */
+public class JdkUtils {
+
+    static final String M_JAVA_RUNTIME_VERSION = "javaRuntimeVersion";
+    static final String M_IS_SUPPORTED_SIGALG = "isSupportedSigalg";
+
+    // Returns the JDK build version.
+    static String javaRuntimeVersion() {
+        return System.getProperty("java.runtime.version");
+    }
+
+    // Checks if the specified signature algorithm is supported by the JDK.
+    static boolean isSupportedSigalg(String sigalg) {
+        boolean isSupported = false;
+        try {
+            isSupported = Signature.getInstance(sigalg) != null;
+        } catch (NoSuchAlgorithmException e) { }
+
+        if (!isSupported) {
+            System.out.println(sigalg + " is not supported yet.");
+        }
+
+        return isSupported;
+    }
+
+    public static void main(String[] args) {
+        if (M_JAVA_RUNTIME_VERSION.equals(args[0])) {
+            System.out.print(javaRuntimeVersion());
+        } else if (M_IS_SUPPORTED_SIGALG.equals(args[0])) {
+            System.out.print(isSupportedSigalg(args[1]));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/PhaseOutputStream.java	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,162 @@
+/*
+ * 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.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/*
+ * A custom output stream that saves the testing details to different files
+ * according to the current testing phase.
+ */
+public class PhaseOutputStream extends OutputStream {
+
+    public enum Phase {
+        PRE_SIGNING,        // before jar signing
+        SIGNING,            // jar signing
+        VERIFYING,          // jar verifying
+        DELAY_VERIFYING,    // jar verifying after certificates expire
+        POST_VERIFYING;     // after jar verifying
+    }
+
+    private OutputStream signingOut = null;
+    private OutputStream verifyingOut = null;
+    private OutputStream delayVerifyingOut = null;
+
+    private Phase currentPhase = Phase.PRE_SIGNING;
+
+    public void transfer() {
+        switch (currentPhase) {
+        case PRE_SIGNING:
+            currentPhase = Phase.SIGNING;
+            break;
+        case SIGNING:
+            currentPhase = Phase.VERIFYING;
+            break;
+        case VERIFYING:
+            currentPhase = Compatibility.DELAY_VERIFY
+                    ? Phase.DELAY_VERIFYING
+                    : Phase.POST_VERIFYING;
+            break;
+        case DELAY_VERIFYING:
+            currentPhase = Phase.POST_VERIFYING;
+            break;
+        case POST_VERIFYING:
+            currentPhase = Phase.POST_VERIFYING;
+            break;
+        }
+    }
+
+    // The core phases are SIGNING, VERIFYING and DELAY_VERIFYING.
+    public boolean isCorePhase() {
+        return currentPhase != PhaseOutputStream.Phase.PRE_SIGNING
+                && currentPhase != PhaseOutputStream.Phase.POST_VERIFYING;
+    }
+
+    public Phase currentPhase() {
+        return currentPhase;
+    }
+
+    @Override
+    public void write(int b) throws IOException {
+        OutputStream output = phaseOut();
+        if (output != null) {
+            output.write(b);
+        }
+    }
+
+    @Override
+    public void write(byte[] b) throws IOException {
+        OutputStream output = phaseOut();
+        if (output != null) {
+            output.write(b);
+        }
+    }
+
+    @Override
+    public void write(byte[] b, int off, int len) throws IOException {
+        OutputStream output = phaseOut();
+        if (output != null) {
+            output.write(b, off, len);
+        }
+    }
+
+    public void write(String str) throws IOException {
+        write(str.getBytes());
+    }
+
+    private OutputStream phaseOut() throws FileNotFoundException {
+        switch (currentPhase) {
+        case SIGNING:
+            return signingOut == null
+                    ? signingOut = createOutput(Phase.SIGNING)
+                    : signingOut;
+        case VERIFYING:
+            return verifyingOut == null
+                    ? verifyingOut = createOutput(Phase.VERIFYING)
+                    : verifyingOut;
+        case DELAY_VERIFYING:
+            return delayVerifyingOut == null
+                    ? delayVerifyingOut = createOutput(Phase.DELAY_VERIFYING)
+                    : delayVerifyingOut;
+        default:
+            return null;
+        }
+    }
+
+    @Override
+    public void flush() throws IOException {
+        flush(signingOut);
+        flush(verifyingOut);
+        flush(delayVerifyingOut);
+    }
+
+    private void flush(OutputStream output) throws IOException {
+        if (output != null) {
+            output.flush();
+        }
+    }
+
+    @Override
+    public void close() throws IOException {
+        close(signingOut);
+        close(verifyingOut);
+        close(delayVerifyingOut);
+    }
+
+    private void close(OutputStream output) throws IOException {
+        if (output != null) {
+            output.close();
+        }
+    }
+
+    private static OutputStream createOutput(Phase phase)
+            throws FileNotFoundException {
+        return new FileOutputStream(fileName(phase), true);
+    }
+
+    public static String fileName(Phase phase) {
+        return phase.name() + ".html";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/README	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,215 @@
+# 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 #####
+This test is used to verify the compatibility on jarsigner cross different JDK
+releases. It also can be used to check jar signing (w/ and w/o TSA) and verifying
+on some specific key algorithms and digest algorithms.
+
+##### Output #####
+The test will generate a report, at JTwork/scratch/report.html, to display the
+key parameters for signing and the status of signing and verifying. And it will
+generate another report, at JTwork/scratch/failedReport.html, to collect all of
+failed cases.
+
+Please note that, the test may output a great deal of logs if the jdk list and
+TSA list are big, and that would lead to jtreg output overflow. So, it redirects
+stdout and stderr to file JTwork/scratch/details.out.
+
+##### Report Columns #####
+Certificate
+    Certificate identifier. The identifier consists of specific attributes of
+    the certificate. Generally, the naming convention is:
+    KeyAlgorithm_DigestAlgorithm_[KeySize][_Expired]
+
+Signer JDK
+    The JDK version that signs jar.
+
+Signature Algorithm
+    The signature algorithm used by signing.
+
+TSA Digest
+    The timestamp digest algorithm used by signing.
+
+TSA
+    TSA URL index. All of TSA URLs and their indices can be found at the top
+    of this report.
+
+Signing Status
+    Signing process result status. The status are the followings:
+    [1]NONE, no action.
+    [2]NORMAL, no any error and warning.
+    [3]WARNING, no any error but some warnings raise.
+    [4]ERROR, some errors raise.
+
+Verifier JDK
+    The JDK version that verifies signed jars.
+
+Verifying Status
+    Verifying process result status. The status are the same as those for
+    "Status of Signing".
+
+Delay Verifying Status
+    Delay verifying process result status. The status are the same as those
+    for "Status of Signing".
+
+Failed
+    It highlights which case fails. The failed cases (rows) are marked with
+    letter X.
+
+##### Usages #####
+jtreg [-options] \
+    -jdk:<path/to/testing/JDK>
+    [-DproxyHost=<host> \
+     -DproxyPort=<port> \
+     -DtsaListFile=</url/to/tsaListFile> \
+     -DtsaList=</path/to/tsa1#/path/to/tsa2#/path/to/tsa3#...> \
+     -DjdkListFile=</path/to/jdkListFile> \
+     -DjdkList=</path/to/jdk1#/path/to/jdk2#/path/to/jdk3#...> \
+     -DjavaSecurityFile=</path/to/java/security/properties/file> \
+     -DdelayVerify=<true|false> \
+     -DcertValidity=<[1, 1440]>] \
+    <JDK_REPO>/jdk/test/sun/security/tools/jarsigner/compatibility/Compatibility.java
+
+Besides the common jtreg options, like -jdk, this test introduces a set of
+properties for receiving users' inputs and making the test more flexible. These
+properties are:
+proxyHost=<host>
+    This property indicates proxy host.
+
+proxyPort=<port>
+    This property indicates proxy port. The default value is 80.
+
+tsaListFile=</path/to/tsaListFile>
+    This property indicates a local file, which contains a set of TSA URLs and
+    the supported digest algorithms (by optional parameter digests). The format
+    of the file content looks like the below,
+    http://path/to/tsa1
+    http://path/to/tsa2;digests=SHA-1,SHA-256
+    https://path/to/tsa3
+    ...
+
+    If a TSA line does not list the supported digest algorithms, that means
+    the TSA supports SHA-1, SHA-256 and SHA-512. Because the test only focus
+    on SHA-1, SHA-256 and SHA-512. So, if other digest algorithms, like SHA-224
+    and SHA-384, are listed, they just be ignored.
+
+tsaList=</path/to/tsa1#/path/to/tsa2;digests=SHA-1,SHA-256#...>
+    This property directly lists a set of TSAs in command. "#" is the delimiter.
+    Note that, if both of tsaListFile and tsaList are specified, only property
+    jdkListFile is selected. If neither of tsaListFile and tsaList is specified,
+    the test will fails immediately.
+
+jdkListFile=</path/to/jdkListFile>
+    This property indicates a local file, which contains a set of local JDK
+    paths. The style of the file content looks like the below,
+    /path/to/jdk1
+    /path/to/jdk2
+    /path/to/jdk3
+    ...
+
+jdkList=</path/to/jdk1#/path/to/jdk2#/path/to/jdk3#...>
+    This property directly lists a set of local JDK paths in command. "#" is
+    the delimiter.
+    Note that, if both of jdkListFile and jdkList are specified, only property
+    jdkListFile is selected. If neither of jdkListFile nor jdkList is specified,
+    the testing JDK, which is specified by jtreg option -jdk will be used as
+    the only one JDK in the JDK list.
+
+javaSecurityFile=</path/to/java/security/properties/file>
+    This property indicates an alternative java security properties file. The
+    default file is the path of file java.scurity that is distributed with
+    this test.
+
+delayVerify=<true|false>
+    This property indicates if doing an additional verifying after all of valid
+    certificates expire. The default value is false.
+
+certValidity=<[1, 1440]>
+    This property indicates the remaining validity period in minutes for valid
+    certificates. The value range is [1, 1440]. The default value is 1440.
+    Note that, if delayVerify is false, this property doesn't take effect.
+
+The testing JDK, which is specified by jtreg option "-jdk", should include the
+fix for JDK-8163304. Otherwise, the signature algorithm and timestamp digest
+algorithm cannot be extracted from verification output. And this JDK should
+support as many as possible signature algorithms. Anyway the latest JDK build
+is always recommended.
+
+##### Examples #####
+$ cat /path/to/jdkList
+/path/to/jdk6u171-b05
+/path/to/jdk7u161-b05
+/path/to/jdk8u144-b01
+/path/to/jdk9-179 
+
+$ cat /path/to/tsaList
+http://timestamp.comodoca.com/rfc3161
+http://sha256timestamp.ws.symantec.com/sha256/timestamp
+http://tsa.starfieldtech.com
+http://timestamp.entrust.net/TSS/RFC3161sha1TS;digests=SHA-1,SHA-256
+http://timestamp.entrust.net/TSS/RFC3161sha2TS;digests=SHA-1,SHA-256
+http://rfc3161timestamp.globalsign.com/advanced;digests=SHA-256,SHA-512
+http://rfc3161timestamp.globalsign.com/standard
+http://timestamp.globalsign.com/scripts/timstamp.dll
+http://timestamp.globalsign.com/?signature=sha2;digests=SHA-256,SHA-512
+http://timestamp.digicert.com
+http://time.certum.pl
+http://tsa.swisssign.net
+http://zeitstempel.dfn.de
+https://tsp.iaik.tugraz.at/tsp/TspRequest
+
+$ jtreg -va -nr -timeout:100 \
+    -jdk:/path/to/latest/jdk \
+    -DproxyHost=<proxy> -DproxyPort=<port> \
+    -DjdkListFile=/path/to/jdkList \
+    -DtsaListFile=/path/to/tsaList \
+    -DdelayVerify=true -DcertValidity=60 \
+    <JDK_REPO>/jdk/test/sun/security/tools/jarsigner/compatibility/Compatibility.java
+
+The above is a comprehensive usage example. File "jdkList" lists the paths of
+testing JDK builds, and file "tsaList" lists the URLs of TSA services. Some TSAs,
+like http://timestamp.entrust.net/TSS/RFC3161sha1TS, specify the supported digest
+algorithms. Other TSAs, which don't specify parameter digests, are regarded to
+support SHA-1, SHA-256 and SHA-512. The test uses a proxy to access TSA services.
+And it enables delay verifying and set the certificate validity period to 60
+minutes. So, after the first verification is done, the test will wait for all
+of valid certificates expire and then does verification again.
+
+If don't want to provide such JDK list and TSA list files, the test allows to
+specify JDKs and TSAs (via properties jdkList and tsaList respectively) in the
+command directly, like the below style,
+$ jtreg -va -nr -timeout:100 \
+    -jdk:/path/to/latest/jdk \
+    -DproxyHost=<proxy> -DproxyPort=<port> \
+    -DjdkList=/path/to/jdk6u171-b05#/path/to/jdk7u161-b05#/path/to/jdk8u144-b01#/path/to/jdk9-179 \
+    -DtsaList=http://timestamp.comodoca.com/rfc3161#http://timestamp.entrust.net/TSS/RFC3161sha1TS;digests=SHA-1,SHA-256 \
+    -DdelayVerify=true -DcertValidity=60 \
+    <JDK_REPO>/jdk/test/sun/security/tools/jarsigner/compatibility/Compatibility.java
+
+Furthermore, here introduces one of the simplest usages. It doesn't specify any
+JDK list, so the testing JDK, which is specified by jtreg option "-jdk", will
+be tested. And it doesn't apply delay verifying, and no proxy is used, and use
+only one TSA. Now, the command is pretty simple and looks like the followings,
+$ jtreg -va -nr -timeout:100 \
+    -jdk:/path/to/latest/jdk \
+    -DtsaList=http://timestamp.comodoca.com/rfc3161 \
+    <JDK_REPO>/jdk/test/sun/security/tools/jarsigner/compatibility/Compatibility.java
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/tools/jarsigner/compatibility/java.security	Thu Aug 24 16:36:25 2017 +0200
@@ -0,0 +1,2 @@
+jdk.certpath.disabledAlgorithms=MD2, MD5
+jdk.jar.disabledAlgorithms=MD2, MD5
\ No newline at end of file